-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistently use Merkle Tree root as ECChain key #834
Conversation
2065e1f
to
ce61a37
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #834 +/- ##
==========================================
- Coverage 67.31% 67.26% -0.06%
==========================================
Files 84 83 -1
Lines 9001 9017 +16
==========================================
+ Hits 6059 6065 +6
- Misses 2407 2413 +6
- Partials 535 539 +4
|
ce61a37
to
b569f7f
Compare
I have a slight concern, but it is more general. How do we transition Calibnet to it, given that it lives and breathes the older formats? |
Good question. If I have not missed anything I think the only wire format change is the To keep compatibility, I can override the CBOR marshalling for it to continue to write in old format since that's all we really need. I actually did this at first then I thought we don't need it having missed the fact that F3 on calibnet is live. That should be enough right? Is there anything else you can think of that I might have missed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
I think the ECChain is the only thing with persistent data. There is a question of how do we switch to chain exchange scheme but I think allowing it to go down for a bit and catch back up is good enough solution for calibnet. |
3e5b007
to
c3ac37b
Compare
I'll hold off resolving conflicts after Kuba had a chance to review the added CBOR encoding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, the copy is a bit annoying by oh well
7f1952d
to
d15b409
Compare
Remove the custom ECChain key generation inside `gpbft` in favor of consistently using Merkle Tree root of chain as key. This key is already used for signature payload generation, and in the new chain exchange as a key to identify a chain. Doing so enables signature validation of messages without having to know the chain. Consistent use of Merkle Tree root hash as key enables a number of simplifications across the repo: * unblocks the unification of validation logic between partial and full validators, since caching can use a consistent way to identify messages whether they're partial or not. * reduce various type gymnastics across root and chain exchange packages by repurposing gpbft ECChain Key. The work here also introduces lazy-loading for the ECChain, which requires ECChain type to be converted to `struct`, and be passed by pointer. As part of this work, TipSet is also turned into a pointer consistently across various interfaces. The ECChain receiver functions are adopted to accommodate potential nil values for a chain. Fixes #825
d15b409
to
eb6df84
Compare
03d88d8
to
eb6df84
Compare
Bumped timeout to 2 m, just to see if CI passes.
Remove the custom ECChain key generation inside
gpbft
in favor of consistently using Merkle Tree root of chain as key. This key is already used for signature payload generation, and in the new chain exchange as a key to identify a chain. Doing so enables signature validation of messages without having to know the chain.Consistent use of Merkle Tree root hash as key enables a number of simplifications across the repo:
The work here also introduces lazy-loading for the ECChain, which requires ECChain type to be converted to
struct
, and be passed by pointer. As part of this work, TipSet is also turned into a pointer consistently across various interfaces.The ECChain receiver functions are adopted to accommodate potential nil values for a chain.
Fixes #825