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

feat(beacon): update BlockMetadata #122

Merged
merged 3 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Push docker image to GCR"

on:
push:
branches: [taiko]
branches: [taiko,internal-devnet-new-genesis]
tags:
- "v*"

Expand Down
27 changes: 17 additions & 10 deletions beacon/engine/gen_blockmetadata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions beacon/engine/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type PayloadAttributes struct {
// CHANGE(taiko): extra fields.
BaseFeePerGas *big.Int `json:"baseFeePerGas" gencodec:"required"`
BlockMetadata *BlockMetadata `json:"blockMetadata" gencodec:"required"`
L1Origin *rawdb.L1Origin `json:"l1Origin" gencodec:"required"`
L1Origin *rawdb.L1Origin `json:"l1Origin" gencodec:"required"`
}

// JSON type overrides for PayloadAttributes.
Expand All @@ -54,14 +54,15 @@ type payloadAttributesMarshaling struct {
// protocol.
type BlockMetadata struct {
// Fields defined in `LibData.blockMetadata`.
Beneficiary common.Address `json:"beneficiary" gencodec:"required"`
Beneficiary common.Address `json:"beneficiary" gencodec:"required"`
GasLimit uint64 `json:"gasLimit" gencodec:"required"`
Timestamp uint64 `json:"timestamp" gencodec:"required"`
MixHash common.Hash `json:"mixHash" gencodec:"required"`
Timestamp uint64 `json:"timestamp" gencodec:"required"`
MixHash common.Hash `json:"mixHash" gencodec:"required"`

// Extra fields required in go-taiko.
TxList []byte `json:"txList" gencodec:"required"`
HighestBlockID *big.Int `json:"highestBlockID" gencodec:"required"`
// Extra fields required in taiko-geth.
TxList []byte `json:"txList" gencodec:"required"`
HighestBlockID *big.Int `json:"highestBlockID" gencodec:"required"`
ExtraData []byte `json:"extraData" gencodec:"required"`
}

// CHANGE(taiko): JSON type overrides for BlockMetadata.
Expand Down
46 changes: 23 additions & 23 deletions core/taiko_genesis/internal.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions core/taiko_genesis/internal_l3.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions miner/taiko_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ func (w *worker) sealBlockWith(
baseFeePerGas: baseFeePerGas,
}

// Set extraData
w.extra = blkMeta.ExtraData

env, err := w.prepareWork(params)
if err != nil {
return nil, err
Expand Down
Loading