Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upgo-kosu: fixing witness issues #230
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
|
I've noticed an issue running this branch, that I also saw the one other time I deployed a multi-node test network. It seems that the nodes are unable to rebalance (every proposal gets rejected) and it's not clear to me why. This was tested on the Ropsten network. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
hrharder commentedAug 23, 2019
Overview
Fixing three small issues in the Witness.
Description
While working on the Explore API server and
kosu.jsGo-Kosu client, I noticed a few weird things via the RPC server that indicated underlying errors, all of which occurred in the witness.1. Rebalance periods skip 10 blocks
I noticed this:
Round
90should have hadstartsAt: 1986andendsAt: 1996. The reason for this error wasrebalancewas being called with the current Ethereum block, not the matured Ethereum block, causing the 10 block discrepancy. This is now fixed.2. Poster accounts not associated with the right address
After registering a poster account, I was able to see the account was created with
kosu_numberPosters, but unable to query it withkosu_queryPoster. After adding some log statements, I noticed the address being associated with the account was not my address, and was one I did not reckognize.The source of the failure was the
TransactionWitnessTX was being created in the Witness with theAddressof the contract that emitted the event, not the address contained within the event data. Certainly easy to miss, and now should be fixed.3. Validator Ethereum addresses being padded
In a similar vein to the above issue, I noticed validator objects were being sent over (from
kosu_queryValidator) like this:As you can see, there is 12 bytes of padding on the
ethAccountthat shouldn't be there. This was because all event data from theKosuEventis padded to 32 bytes, so the first 12 empty bytes just need to be stripped off.Notes
@gchaincl let me know what you think of these changes, and if you would approach any of them differently than I did.