Skip to content
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

test: adds receive_message test #11

Merged
merged 29 commits into from
Mar 19, 2024
Merged

Conversation

pedrohba1
Copy link
Collaborator

Some more things had to be refactored in order to remove flat-files-decoder entirely from this crate. This will be merged into refactor branch because it is a specific part of era_validate that needs to be validate in the other 2 repos before merging, so having a new branch specifically for this helps in that.

@pedrohba1
Copy link
Collaborator Author

pedrohba1 commented Mar 1, 2024

I just opened an issue on Ethportal api, to add total_difficulty to the block header, which will simplify a lot the inclusion_proof: ethereum/trin#1191

adds optional lockfile usage, helps testing
…oder without using wrappers

sf-protos contains the dependencies from the proto files that are used both in the header accumulator and flat files decoder. This means that both of them can share a single instance of a type without implementing try_from conversions or similar
…ecords-function): extract_100_blocks is not necessary in header acc anymore, since block handling is now done by flat files decoder. ext_header_from_block now hande singular blocks and should be used inside a .map() for conversion of Block arrays
flat-files decoder is now only used in tests to facilitate validating header_accumulator functions
@pedrohba1
Copy link
Collaborator Author

Basically, I've used sf-protos to interchange types between header_accumulator and flat-files-decoder without having to rely on external crates conversions.

Before merging, I will make sure that the stream functionality from the main function exists in flat_head, and also the other inclusion proofs functionalities.

@pedrohba1
Copy link
Collaborator Author

From here onwards, most commits are tests to attempt to achieve at least 80% coverage.

Copy link
Collaborator

@severiano-sisneros severiano-sisneros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just a few minor changes requested.

tests/era_validator.rs Outdated Show resolved Hide resolved
src/inclusion_proof.rs Show resolved Hide resolved
src/inclusion_proof.rs Outdated Show resolved Hide resolved
src/inclusion_proof.rs Outdated Show resolved Hide resolved
src/inclusion_proof.rs Outdated Show resolved Hide resolved
src/inclusion_proof.rs Outdated Show resolved Hide resolved
src/era_validator.rs Show resolved Hide resolved
src/era_validator.rs Show resolved Hide resolved
@pedrohba1 pedrohba1 merged commit a805a4b into refactor Mar 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants