-
Notifications
You must be signed in to change notification settings - Fork 19
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
build-eth-block: mainnet building #54
base: main
Are you sure you want to change the base?
Conversation
zeroXbrock
commented
Apr 9, 2024
•
edited
Loading
edited
- fetches gas price estimate from L1 RPC to use in signed L1 transaction
- this makes the txs valid on eth providers that use a realistic gas price (e.g. anvil), so the txs can be simulated
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.
👍
framework/beacon.go
Outdated
// } | ||
|
||
// GetBlockHeader gets the beacon block header for a given beacon block ID, or the latest block if blockID is nil. | ||
func (b *BeaconChain) GetBlockHeader(blockID *common.Hash) (*types.Header, *common.Hash, error) { |
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.
I would assume there is a library already to do this.
examples/build-eth-block/main.go
Outdated
// get latest block from live chain | ||
// execBlock, err := fr.L1.RPC().BlockByNumber(context.Background(), nil) | ||
maybe(err) | ||
beaconBlock, beaconRoot, err := fr.L1Beacon.GetBlockHeader(nil) |
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.
I try to keep the examples valid for both local deployment (local suave-geth) too. Check an example here. Could we have a flag that skips this part of the process if running in local? (Since I am assuming it would be too much to mock everything locally even with Kurtosis).
oops, this PR was supposed to just be this commit, branch name confused me. |