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

Eth1 Integration #542

Merged
merged 255 commits into from
Nov 15, 2019
Merged

Eth1 Integration #542

merged 255 commits into from
Nov 15, 2019

Conversation

paulhauner
Copy link
Member

@paulhauner paulhauner commented Sep 25, 2019

Issue Addressed

Proposed Changes

  • Add functions to connect to an eth1 node to get relevant the Eth1Data using the web3 crate.
  • Add get_eth1_vote function to determine new state for Beacon chain state.eth1_data using the above data.
  • Addresses a bunch of clippy lints across the entire project.
    • There are also quite a few modifications from rustfmt
  • Allows the genesis Fork to be defined in ChainSpec.
  • Ensures the Fork for verifying Deposit is always a constant [0, 0, 0, 0].
    • Removes some unnecessary parameters from the deposit SignatureSet.
  • Unifies the beacon_node and validator_client into a single ligyhthouse binary.
    • Introduces the concept of an Environment and a Context, which provide access to tokio and logging.
  • Adds basic framework for testing a BeaconNode in-process
    • Allows for services to be started on port 0 (i.e., let the OS choose a free port) and read which port was actually used.

…ixes

* Fix update_cache function
* Move fetch_eth1_data to impl block
* Fix deposit tests
* Add `run` function for running update_cache and subscribe_deposit_logs tasks
* Add logging
@paulhauner paulhauner marked this pull request as ready for review November 12, 2019 03:57
@paulhauner
Copy link
Member Author

This is finally ready for review!

@paulhauner paulhauner added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Nov 12, 2019
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Woah that's a lotta code. I think I've reviewed the most important parts thoroughly, and I've had a skim through the other parts.

I only found a few typos and nitpicks, no major changes. Happy to merge once they're addressed

Nice work!

beacon_node/beacon_chain/src/eth1_chain.rs Outdated Show resolved Hide resolved
beacon_node/beacon_chain/src/eth1_chain.rs Show resolved Hide resolved
beacon_node/eth1/src/block_cache.rs Outdated Show resolved Hide resolved
beacon_node/eth1/src/deposit_cache.rs Outdated Show resolved Hide resolved
beacon_node/eth1/src/deposit_log.rs Outdated Show resolved Hide resolved
beacon_node/eth1/src/block_cache.rs Outdated Show resolved Hide resolved
beacon_node/eth1/src/deposit_cache.rs Outdated Show resolved Hide resolved
beacon_node/eth1/src/service.rs Outdated Show resolved Hide resolved
beacon_node/beacon_chain/src/eth1_chain.rs Show resolved Hide resolved
beacon_node/beacon_chain/src/eth1_chain.rs Show resolved Hide resolved
@michaelsproul michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Nov 13, 2019
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

LGTM!

@michaelsproul michaelsproul added ready-to-merge and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Nov 14, 2019
@paulhauner paulhauner merged commit f229bbb into master Nov 15, 2019
@paulhauner paulhauner deleted the eth1 branch December 5, 2019 02:29
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.

Implement Eth1 RPC linking
3 participants