Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2387: Refresh and use era parameters using latest era genesis. r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> ADP-609 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - 9a9f6a8 📍 **rework management of genesis, protocol and slotting parameters** This commit introduces a few changes: 1. It drops all the unused protocol parameters from the 'Checkpoint' table. This requires however a non-trivial database migration which is yet to be written. 2. It moves the blockchain start time and genesis hash in the 'Wallet' table instead of the 'Checkpoint' table, since those don't change, they need not to be repeated in each checkpoint. 3. It removes 'epochStability' from the 'GenesisParameters' and instead, adds 'securityParam' to the 'SlottingParameters'. 'GenesisParameters' are now only referring to the 'Byron' genesis parameters used at the very beginning of the blockchain, whereas 'SlottingParameters' are tied to each era. 4. It renames 'getProtocolParameters' to 'currentProtocolParameters' in the network layer for consistency with other functions from the network layer. 5. It moves and rename 'getSlottingParametersForTip' to the network layer as 'currentSlottingParameters' such that this can be implemented correctly in the network layer using the LSQ protocol and the 'GetGenesisConfig' query now available. 6. It adjusts the block restoration loop to use the latest slotting parameters (instead of the Byron's genesis ones) and changes the checkpoint stability window to `3k` (the stability window is `3k/f` slots, but our checkpoint pruning operates on blocks, so `3k`). - 6f4e9c3 📍 **implement 'currentSlottingParameters' in the cardano-node's Network layer.** - fb4b6d2 📍 **add database migration for protocol parameters drop and associated unit test** This isn't an easy migration for there's no 'remove column' command available in SQLite. So instead, we have to re-create the table without the column we want and copy back all the previous checkpoints in the new table. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
- Loading branch information
Showing
31 changed files
with
670 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.