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

build-eth-block: mainnet building #54

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Conversation

zeroXbrock
Copy link
Member

@zeroXbrock zeroXbrock commented Apr 9, 2024

  • 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

Copy link
Collaborator

@andytudhope andytudhope left a comment

Choose a reason for hiding this comment

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

👍

// }

// 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) {
Copy link
Contributor

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.

// get latest block from live chain
// execBlock, err := fr.L1.RPC().BlockByNumber(context.Background(), nil)
maybe(err)
beaconBlock, beaconRoot, err := fr.L1Beacon.GetBlockHeader(nil)
Copy link
Contributor

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).

@zeroXbrock
Copy link
Member Author

oops, this PR was supposed to just be this commit, branch name confused me.
I'll make a new PR with just that commit, and use this one for the mainnet builder stuff.

@zeroXbrock zeroXbrock changed the title build-eth-block: use live gas price build-eth-block: mainnet building Apr 12, 2024
@zeroXbrock zeroXbrock marked this pull request as draft April 12, 2024 01:36
@zeroXbrock zeroXbrock marked this pull request as ready for review May 20, 2024 19:43
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.

3 participants