Skip to content

build-eth-block: mainnet building#54

Open
zeroXbrock wants to merge 26 commits into
mainfrom
brock/mainnet-builder
Open

build-eth-block: mainnet building#54
zeroXbrock wants to merge 26 commits into
mainfrom
brock/mainnet-builder

Conversation

@zeroXbrock

@zeroXbrock zeroXbrock commented Apr 9, 2024

Copy link
Copy Markdown
Member
  • 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

@andytudhope andytudhope left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

Comment thread 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) {

Copy link
Copy Markdown
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.

Comment thread 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)

Copy link
Copy Markdown
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
Copy Markdown
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