Skip to content

Commit

Permalink
upgrade codec and types to support dencun
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <pranay.valson@gmail.com>
  • Loading branch information
noslav committed Mar 13, 2024
1 parent fc58a5e commit f71d555
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
24 changes: 24 additions & 0 deletions codec/block-ethereum.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@
"string"
],
"default":"null"
},
{
"name":"blobGasUsed",
"type":[
"null",
"int"
],
"default":"null"
},
{
"name":"excessBlobGas",
"type":[
"null",
"int"
],
"default":"null"
},
{
"name":"parentBeaconBlockRoot",
"type":[
"null",
"string"
],
"default":"null"
}
]
}
Expand Down
37 changes: 20 additions & 17 deletions internal/types/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,26 @@ type BlockNonce [8]byte
type Bloom [BloomByteLength]byte

type Header struct {
ParentHash common.Hash `json:"parentHash"`
UncleHash common.Hash `json:"sha3Uncles"`
Coinbase common.Address `json:"miner"`
Root common.Hash `json:"stateRoot"`
TxHash common.Hash `json:"transactionsRoot"`
ReceiptHash common.Hash `json:"receiptsRoot"`
Bloom Bloom `json:"logsBloom"`
Difficulty *BigInt `json:"difficulty"`
Number *BigInt `json:"number"`
GasLimit uint64 `json:"gasLimit"`
GasUsed uint64 `json:"gasUsed"`
Time uint64 `json:"timestamp"`
Extra []byte `json:"extraData"`
MixDigest common.Hash `json:"mixHash"`
Nonce BlockNonce `json:"nonce"`
BaseFee *BigInt `json:"baseFeePerGas"`
WithdrawalsHash *common.Hash `json:"withdrawalsRoot" rlp:"nil,optional"`
ParentHash common.Hash `json:"parentHash"`
UncleHash common.Hash `json:"sha3Uncles"`
Coinbase common.Address `json:"miner"`
Root common.Hash `json:"stateRoot"`
TxHash common.Hash `json:"transactionsRoot"`
ReceiptHash common.Hash `json:"receiptsRoot"`
Bloom Bloom `json:"logsBloom"`
Difficulty *BigInt `json:"difficulty"`
Number *BigInt `json:"number"`
GasLimit uint64 `json:"gasLimit"`
GasUsed uint64 `json:"gasUsed"`
Time uint64 `json:"timestamp"`
Extra []byte `json:"extraData"`
MixDigest common.Hash `json:"mixHash"`
Nonce BlockNonce `json:"nonce"`
BaseFee *BigInt `json:"baseFeePerGas"`
WithdrawalsHash *common.Hash `json:"withdrawalsRoot" rlp:"nil,optional"`
BlobGasUsed *uint64 `json:"blobGasUsed" rlp:"optional"`
ExcessBlobGas *uint64 `json:"excessBlobGas" rlp:"optional"`
ParentBeaconRoot *common.Hash `json:"parentBeaconBlockRoot" rlp:"optional"`
}

type Transaction struct {
Expand Down

0 comments on commit f71d555

Please sign in to comment.