-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Improved configuration of protocol updates (#816)
## Summary Basically it's a big refactor of the rust side of the code, roughly: * I've tried to re-organise things into clearer files/folders. * I've done some renames and some slight reworkings to clarify certain concepts: * The `ProtocolUpdateFactory` trait has become a single `ProtocolDefinitionResolver` implementation. This means we test our production code rather than using various stubs, and I think it's also easier to follow. * `ProtocolUpdate` has become `ProtocolUpdateTrigger` * `UpgradableStateComputerConfig` has become `ProtocolStateComputerConfig` * I've introduced a `ProtocolUpdateDefinition` which gives access to a static config and the ability to create a (boxed) `ProtocolUpdater` (which is no longer responsible for defining the static config). * I've added some more comments * I've hard coded `babylon-genesis` as the defacto standard genesis version everywhere. Attempting to use something else will fail. This was just part of my move to decrease the number of moving parts / opportunities for misconfiguration. (although still allows us to define a different genesis name with a different config if we want!) In terms of features/useful changes: * Different network protocol configs now live in rust, and testnets now attempt to run anemone at the start of epoch 3. * `ProtocolConfig` now has a field to define some overrides for protocol updating (which depends on the ProtocolUpdater). Don't worry test team - we try to deserialize the old model so it shouldn't break your tests. We should probably just make it versioned from some point to make the code a little less hacky. * Any protocol updates starting `test-` will inject a single empty test transaction. * Any protocol updates starting `custom-` will read flash transactions from the raw overrides to inject; else will inject nothing - as requested by @les-sheppard. I've pivoted across `test.rs` (which should probably be renamed).
- Loading branch information
Showing
63 changed files
with
1,294 additions
and
833 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
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.