mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
t8n: do not omit requests when empty
This commit is contained in:
parent
46a6482d19
commit
7ecda7d054
20 changed files with 52 additions and 34 deletions
|
|
@ -70,11 +70,11 @@ type ExecutionResult struct {
|
||||||
CurrentExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas,omitempty"`
|
CurrentExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas,omitempty"`
|
||||||
CurrentBlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed,omitempty"`
|
CurrentBlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed,omitempty"`
|
||||||
RequestsHash *common.Hash `json:"requestsHash,omitempty"`
|
RequestsHash *common.Hash `json:"requestsHash,omitempty"`
|
||||||
Requests [][]byte `json:"requests,omitempty"`
|
Requests [][]byte `json:"requests"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type executionResultMarshaling struct {
|
type executionResultMarshaling struct {
|
||||||
Requests []hexutil.Bytes `json:"requests,omitempty"`
|
Requests []hexutil.Bytes `json:"requests"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ommer struct {
|
type ommer struct {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ func (e ExecutionResult) MarshalJSON() ([]byte, error) {
|
||||||
CurrentExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas,omitempty"`
|
CurrentExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas,omitempty"`
|
||||||
CurrentBlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed,omitempty"`
|
CurrentBlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed,omitempty"`
|
||||||
RequestsHash *common.Hash `json:"requestsHash,omitempty"`
|
RequestsHash *common.Hash `json:"requestsHash,omitempty"`
|
||||||
Requests []hexutil.Bytes `json:"requests,omitempty"`
|
Requests []hexutil.Bytes `json:"requests"`
|
||||||
}
|
}
|
||||||
var enc ExecutionResult
|
var enc ExecutionResult
|
||||||
enc.StateRoot = e.StateRoot
|
enc.StateRoot = e.StateRoot
|
||||||
|
|
@ -74,7 +74,7 @@ func (e *ExecutionResult) UnmarshalJSON(input []byte) error {
|
||||||
CurrentExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas,omitempty"`
|
CurrentExcessBlobGas *math.HexOrDecimal64 `json:"currentExcessBlobGas,omitempty"`
|
||||||
CurrentBlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed,omitempty"`
|
CurrentBlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed,omitempty"`
|
||||||
RequestsHash *common.Hash `json:"requestsHash,omitempty"`
|
RequestsHash *common.Hash `json:"requestsHash,omitempty"`
|
||||||
Requests []hexutil.Bytes `json:"requests,omitempty"`
|
Requests []hexutil.Bytes `json:"requests"`
|
||||||
}
|
}
|
||||||
var dec ExecutionResult
|
var dec ExecutionResult
|
||||||
if err := json.Unmarshal(input, &dec); err != nil {
|
if err := json.Unmarshal(input, &dec); err != nil {
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/1/exp.json
vendored
3
cmd/evm/testdata/1/exp.json
vendored
|
|
@ -40,6 +40,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x5208"
|
"gasUsed": "0x5208",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/13/exp2.json
vendored
3
cmd/evm/testdata/13/exp2.json
vendored
|
|
@ -37,6 +37,7 @@
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x109a0",
|
"gasUsed": "0x109a0",
|
||||||
"currentBaseFee": "0x36b"
|
"currentBaseFee": "0x36b",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/14/exp.json
vendored
3
cmd/evm/testdata/14/exp.json
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
"currentDifficulty": "0x2000020000000",
|
"currentDifficulty": "0x2000020000000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/14/exp2.json
vendored
3
cmd/evm/testdata/14/exp2.json
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"currentDifficulty": "0x1ff8020000000",
|
"currentDifficulty": "0x1ff8020000000",
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/14/exp_berlin.json
vendored
3
cmd/evm/testdata/14/exp_berlin.json
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"currentDifficulty": "0x1ff9000000000",
|
"currentDifficulty": "0x1ff9000000000",
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/19/exp_arrowglacier.json
vendored
3
cmd/evm/testdata/19/exp_arrowglacier.json
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
"currentDifficulty": "0x2000000200000",
|
"currentDifficulty": "0x2000000200000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
23
cmd/evm/testdata/19/exp_grayglacier.json
vendored
23
cmd/evm/testdata/19/exp_grayglacier.json
vendored
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
"result": {
|
"result": {
|
||||||
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc",
|
||||||
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"currentDifficulty": "0x2000000004000",
|
"currentDifficulty": "0x2000000004000",
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
}
|
"requests": null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
3
cmd/evm/testdata/19/exp_london.json
vendored
3
cmd/evm/testdata/19/exp_london.json
vendored
|
|
@ -8,6 +8,7 @@
|
||||||
"currentDifficulty": "0x2000080000000",
|
"currentDifficulty": "0x2000080000000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/23/exp.json
vendored
3
cmd/evm/testdata/23/exp.json
vendored
|
|
@ -21,6 +21,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x520b"
|
"gasUsed": "0x520b",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/24/exp.json
vendored
3
cmd/evm/testdata/24/exp.json
vendored
|
|
@ -51,6 +51,7 @@
|
||||||
],
|
],
|
||||||
"currentDifficulty": null,
|
"currentDifficulty": null,
|
||||||
"gasUsed": "0x10306",
|
"gasUsed": "0x10306",
|
||||||
"currentBaseFee": "0x500"
|
"currentBaseFee": "0x500",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/25/exp.json
vendored
3
cmd/evm/testdata/25/exp.json
vendored
|
|
@ -34,6 +34,7 @@
|
||||||
],
|
],
|
||||||
"currentDifficulty": null,
|
"currentDifficulty": null,
|
||||||
"gasUsed": "0x5208",
|
"gasUsed": "0x5208",
|
||||||
"currentBaseFee": "0x460"
|
"currentBaseFee": "0x460",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/26/exp.json
vendored
3
cmd/evm/testdata/26/exp.json
vendored
|
|
@ -15,6 +15,7 @@
|
||||||
"currentDifficulty": null,
|
"currentDifficulty": null,
|
||||||
"gasUsed": "0x0",
|
"gasUsed": "0x0",
|
||||||
"currentBaseFee": "0x500",
|
"currentBaseFee": "0x500",
|
||||||
"withdrawalsRoot": "0x4921c0162c359755b2ae714a0978a1dad2eb8edce7ff9b38b9b6fc4cbc547eb5"
|
"withdrawalsRoot": "0x4921c0162c359755b2ae714a0978a1dad2eb8edce7ff9b38b9b6fc4cbc547eb5",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/28/exp.json
vendored
3
cmd/evm/testdata/28/exp.json
vendored
|
|
@ -42,6 +42,7 @@
|
||||||
"currentBaseFee": "0x9",
|
"currentBaseFee": "0x9",
|
||||||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"currentExcessBlobGas": "0x0",
|
"currentExcessBlobGas": "0x0",
|
||||||
"blobGasUsed": "0x20000"
|
"blobGasUsed": "0x20000",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/29/exp.json
vendored
3
cmd/evm/testdata/29/exp.json
vendored
|
|
@ -40,6 +40,7 @@
|
||||||
"currentBaseFee": "0x9",
|
"currentBaseFee": "0x9",
|
||||||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"currentExcessBlobGas": "0x0",
|
"currentExcessBlobGas": "0x0",
|
||||||
"blobGasUsed": "0x0"
|
"blobGasUsed": "0x0",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/3/exp.json
vendored
3
cmd/evm/testdata/3/exp.json
vendored
|
|
@ -34,6 +34,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x521f"
|
"gasUsed": "0x521f",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/30/exp.json
vendored
3
cmd/evm/testdata/30/exp.json
vendored
|
|
@ -59,6 +59,7 @@
|
||||||
"currentBaseFee": "0x7",
|
"currentBaseFee": "0x7",
|
||||||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"currentExcessBlobGas": "0x0",
|
"currentExcessBlobGas": "0x0",
|
||||||
"blobGasUsed": "0x0"
|
"blobGasUsed": "0x0",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
3
cmd/evm/testdata/33/exp.json
vendored
3
cmd/evm/testdata/33/exp.json
vendored
|
|
@ -60,6 +60,7 @@
|
||||||
"gasUsed": "0x15fa9",
|
"gasUsed": "0x15fa9",
|
||||||
"currentBaseFee": "0x7",
|
"currentBaseFee": "0x7",
|
||||||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||||
|
"requests": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
cmd/evm/testdata/5/exp.json
vendored
3
cmd/evm/testdata/5/exp.json
vendored
|
|
@ -18,6 +18,7 @@
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [],
|
"receipts": [],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x0"
|
"gasUsed": "0x0",
|
||||||
|
"requests": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue