-
Notifications
You must be signed in to change notification settings - Fork 44
Implement chainsync
ChainReader
with pallas
#1680
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
Merged
Merged
Conversation
This file contains hidden or 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
jpraynaud
commented
May 21, 2024
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.
Thanks @falcucci for updating the PR!
Here is a list of comments following a first review of it 🙂
- remove duplicated comment in the test code - update error handling in the test code
- remove `pallas_network` import in `interface.rs` - update comments in the `setup_server` function in `pallas_chain_reader.rs`
- add an enum `serveraction` with variants `rollbackwards` and `rollforwards` - change the type of the `action` parameter in setup_server function from string to serveraction - modify the match expressions in `setup_server` function to use `serveraction` enum variants instead of string literals
- remove unnecessary panic message from the code
- remove unnecessary comment in serveraction::rollforwards block
And implement Clone, PartialEq and Eq.
…nreader` and `pallaschainreader` - add a new method `intersect_tip` to `fakechainreader` - modify the signature of `get_next_chain_block` in `fakechainreader` - update the `get_next_chain_block` method in `fakechainreader` implementation - modify the signature of `get_next_chain_block` in `chainblockreader` trait - update the `get_next_chain_block` method in `pallaschainreader` implementation - add a new method `intersect_tip` to `pallaschainreader` - add enums `serveraction` and `hasagency` with associated variants - implement server setup with `hasagency` consideration for actions - test `intersect_tip` method with agency `yes` for `pallaschainreader` - test `get_next_chain_block` method with agency `yes` for `pallaschainreader` - test `get_next_chain_block` method with agency `no` for `pallaschainreader`
- remove unused import `entities::chainpoint` - update import path for `stdresult` in `chain_reader/interface.rs`
- add a new method `intersect_tip` to intersect the tip of the chain with a given point
- remove the `intersect_tip` method from the `fakechainreader` implementation - add the `intersect_point` method to the `fakechainreader` implementation - modify the `chain_reader` usage in the test module to call `intersect_point` instead of `intersect_tip` - update the `interface.rs` file to include the `intersect_point` method definition for the `chainblockreader` trait in the common chain reader module - remove the `intersect_tip` method from the `pallaschainreader` implementation - add the `intersect_point` method to the `pallaschainreader` implementation - update the `chain_reader` usage in the test module for the `pallaschainreader` to call `intersect_point` instead of `intersect_tip`
- uncomment intersect_point method in the chainblockreader trait
- add the `set_chain_point` method to the `chainblockreader` trait in `interface.rs` - add the `set_chain_point` method to the `fakechainreader` struct - add the `set_chain_point` method to the `pallaschainreader` struct
- change function name `get_fake_chain_point_backwards` to `get_fake_specific_point` - modify function `get_fake_chain_point_backwards` to use the updated function `get_fake_specific_point` - remove function `get_fake_chain_point_forwards` - update references to `get_fake_intersection_point` to use `get_fake_specific_point`
- delete `default.profraw` from `mithril-common` directory
5c550ba
to
871db12
Compare
- 'mithril-common' from '0.4.7' to '0.4.8wq'.
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Content
This PR includes an implementation of
ChainReader
traitPallasChainReader
implementation of thechainsync
mini protocol withpallas
FakeChainReader
fake implementationPre-submit checklist
Issue(s)
Closes #1590