-
Notifications
You must be signed in to change notification settings - Fork 86
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
Ledger integration #585
Ledger integration #585
Conversation
Co-authored-by: Nicholas Clarke <[email protected]> Co-authored-by: Thomas Winant <[email protected]>
This keeps the complication of Signable where it belongs (in PBFT).
This is consistent with what we do elsewhere in the codebase, and cleans stuff up considerably.
Clean up these modules at the same time.
Main reason: get rid of `toCBORBlockWithoutBoundary`. Deal with the renaming of `StakeholderId` to `KeyHash`.
In particular, thread it through for the KES stuff, even if we still require it to be empty in 'leaves'.
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.
Just taken a quick glance through this, but the changes look good
-- While the primitives in the ChainSync protocol are "roll back", "roll | ||
-- forward (apply block)", etc. The /real/ primitive is "switch to | ||
-- fork", which means that a roll back is always followed by applying at | ||
-- least as many blocks that we rolled back. |
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.
This assumes that chain selection will always prefer a longer chain, which isn't necessarily the case?
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.
No, this assumes it will always prefer a chain that is at least as long as the current chain. That will be the case, right?
The `getCreator` method, which tells you which node produced a block, is used in the checks of some consensus tests. The `getCreator` method takes a `NodeConfig`, but we didn't have a `NodeConfig` in those testing contexts, so we were using `error` instead. This was "fine" because this `NodeConfig` is only really used for the real PBFT implementation, which is not used in the tests, only in the demo. However, using `error` here is dirty and might work for now, but that may change in the future. Fix this by letting the test setup function return the `NodeConfig` for each node in addition to its chain. This `NodeConfig` can then be passed to `getCreator`. Actually, `getCreator` would work with any `NodeConfig` from the test setup, regardless to which node its corresponds. This is because `getCreator` only reads data from the `NodeConfig` that is common to all nodes, no node-specific data is used. Nonetheless, it is nicer to use the `NodeConfig` that belongs to "correct" node.
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.
I went through the whole PR in a Google Meet with Edsko and we have resolved all issues we had identified.
We can finally merge this! 🎉
bors r+ |
585: Ledger integration r=mrBliss a=edsko Co-authored-by: Nicholas Clarke <[email protected]> Co-authored-by: Thomas Winant <[email protected]> Co-authored-by: Edsko de Vries <[email protected]> Co-authored-by: Thomas Winant <[email protected]>
Co-authored-by: Nicholas Clarke [email protected]
Co-authored-by: Thomas Winant [email protected]