Update t8n test vectors after EIP-7610 update (#2169)
* Skip call family gas cost overflow check if refund is negative * Update t8n test vectors after EIP-7610 update
This commit is contained in:
parent
54f784bef1
commit
d29c9fae17
|
@ -508,9 +508,10 @@ template gasCosts(fork: EVMFork, prefix, ResultGasCostsName: untyped) =
|
||||||
raise newException(TypeError, "GasInt Overflow (" & $gasParams.kind & ") " & $gasParams.c_contractGas)
|
raise newException(TypeError, "GasInt Overflow (" & $gasParams.kind & ") " & $gasParams.c_contractGas)
|
||||||
result.gasRefund = gasParams.c_contractGas.truncate(GasInt)
|
result.gasRefund = gasParams.c_contractGas.truncate(GasInt)
|
||||||
|
|
||||||
if result.gasCost.u256 + result.gasRefund.u256 > high(GasInt).u256:
|
if result.gasRefund > 0: # skip check if gasRefund is negative
|
||||||
raise newException(TypeError, "GasInt overflow, gasCost=" &
|
if result.gasCost.u256 + result.gasRefund.u256 > high(GasInt).u256:
|
||||||
$result.gasCost & ", gasRefund=" & $result.gasRefund)
|
raise newException(TypeError, "GasInt overflow, gasCost=" &
|
||||||
|
$result.gasCost & ", gasRefund=" & $result.gasRefund)
|
||||||
|
|
||||||
result.gasCost += result.gasRefund
|
result.gasCost += result.gasRefund
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,40 @@
|
||||||
{
|
{
|
||||||
"alloc": {
|
"alloc": {
|
||||||
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
|
||||||
"balance": "0x142b84"
|
|
||||||
},
|
|
||||||
"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f": {
|
"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f": {
|
||||||
"storage": {
|
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000020",
|
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000112233"
|
|
||||||
},
|
|
||||||
"balance": "0x0",
|
"balance": "0x0",
|
||||||
"nonce": "0x2"
|
"storage": {
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
||||||
|
"balance": "0x6400000000"
|
||||||
},
|
},
|
||||||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
"balance": "0x63ffebd47c",
|
"balance": "0x0",
|
||||||
"nonce": "0x1"
|
"nonce": "0x1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"stateRoot": "0xe0cfa6916b126d6a08639aa0b928a053b7bba1390535e166c1f5d41068a4fc45",
|
"stateRoot": "0x5c909919be50eb74177909035f65aaeebd416d956f0b6bc2fbd4e6c15daa889f",
|
||||||
"txRoot": "0xa9ba46978e16fd6192f2d3f12f1bc7d7a7f92684452c0783378fc17539729c6b",
|
"txRoot": "0xa9ba46978e16fd6192f2d3f12f1bc7d7a7f92684452c0783378fc17539729c6b",
|
||||||
"receiptsRoot": "0xe385c544fafdddffbf18a71d9c746174b861551d96d534f9d64885158bea37ad",
|
"receiptsRoot": "0x97fe59b8004de685658f61c2939be1892eb8593c1ce622c392dd985946712e06",
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [
|
"receipts": [
|
||||||
{
|
{
|
||||||
"root": "0x",
|
"root": "0x",
|
||||||
"status": "0x1",
|
"status": "0x0",
|
||||||
"cumulativeGasUsed": "0x2045a",
|
"cumulativeGasUsed": "0xa00000000",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"logs": null,
|
"logs": null,
|
||||||
"transactionHash": "0xdbb728ec3bb0b37eb49274b839b556865bf27a654f91ef7787ef05e97d1fb15c",
|
"transactionHash": "0xdbb728ec3bb0b37eb49274b839b556865bf27a654f91ef7787ef05e97d1fb15c",
|
||||||
"contractAddress": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
|
"contractAddress": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
|
||||||
"gasUsed": "0x2045a",
|
"gasUsed": "0xa00000000",
|
||||||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"transactionIndex": "0x0"
|
"transactionIndex": "0x0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x2045a"
|
"gasUsed": "0xa00000000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,40 @@
|
||||||
{
|
{
|
||||||
"alloc": {
|
"alloc": {
|
||||||
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
|
||||||
"balance": "0x13d300"
|
|
||||||
},
|
|
||||||
"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f": {
|
"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f": {
|
||||||
"storage": {
|
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000020",
|
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000112233"
|
|
||||||
},
|
|
||||||
"balance": "0x0",
|
"balance": "0x0",
|
||||||
"nonce": "0x2"
|
"storage": {
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
||||||
|
"balance": "0x63e700000a"
|
||||||
},
|
},
|
||||||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
"balance": "0x63ffec2d00",
|
"balance": "0x18fffff6",
|
||||||
"nonce": "0x1"
|
"nonce": "0x1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"stateRoot": "0xd9dac0bdb42187224bd22799fb6d74ee60b019cab5f07e7d6e986d8a05685517",
|
"stateRoot": "0xa90981ea96b4654da0da00c9e30e340e8dc644333d05bcbeeef3035aa4a727f5",
|
||||||
"txRoot": "0x6b6b3de330c8f068c4e72c00440dfba319a4aff53a124121f89e0a1875488cb4",
|
"txRoot": "0x6b6b3de330c8f068c4e72c00440dfba319a4aff53a124121f89e0a1875488cb4",
|
||||||
"receiptsRoot": "0xf1e764ea6c4f95e27ff8e8e36afa8ef4485d98393f2831f522085fc4e86eae7c",
|
"receiptsRoot": "0x87fd847f6f94482827f1f719603c9a6f081bfc73256b0a70b515a084987b797b",
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [
|
"receipts": [
|
||||||
{
|
{
|
||||||
"root": "0x",
|
"root": "0x",
|
||||||
"status": "0x1",
|
"status": "0x0",
|
||||||
"cumulativeGasUsed": "0x1fb80",
|
"cumulativeGasUsed": "0x9fd800001",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"logs": null,
|
"logs": null,
|
||||||
"transactionHash": "0x57ffa2f9cb76c8a72f602a26f2d11774788f38b9424094136d75baaef5f1404e",
|
"transactionHash": "0x57ffa2f9cb76c8a72f602a26f2d11774788f38b9424094136d75baaef5f1404e",
|
||||||
"contractAddress": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
|
"contractAddress": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
|
||||||
"gasUsed": "0x1fb80",
|
"gasUsed": "0x9fd800001",
|
||||||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"transactionIndex": "0x0"
|
"transactionIndex": "0x0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x1fb80"
|
"gasUsed": "0x9fd800001"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,49 +1,50 @@
|
||||||
{
|
{
|
||||||
"alloc": {
|
"alloc": {
|
||||||
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
|
||||||
"balance": "0x1e4e02"
|
|
||||||
},
|
|
||||||
"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f": {
|
"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f": {
|
||||||
"balance": "0x0",
|
"balance": "0x0",
|
||||||
"nonce": "0x2"
|
|
||||||
},
|
|
||||||
"0x7b9f5332c245e5c60923427eeb34e5adfba6470e": {
|
|
||||||
"storage": {
|
"storage": {
|
||||||
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
||||||
},
|
}
|
||||||
"balance": "0x0",
|
|
||||||
"nonce": "0x1"
|
|
||||||
},
|
},
|
||||||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
|
||||||
"balance": "0xe8d486c1fe",
|
"balance": "0x1e8480"
|
||||||
"nonce": "0x1"
|
|
||||||
},
|
},
|
||||||
"0xdea0000000000000000000000000000000000000": {
|
"0xdea0000000000000000000000000000000000000": {
|
||||||
"code": "0x6001600155600060015560016002556000600255600160035560006003556001600455600060045560016005556000600555600160065560006006556001600755600060075560016008556000600855600160095560006009556001600a556000600a556001600b556000600b556001600c556000600c556001600d556000600d556001600e556000600e556001600f556000600f5560016010556000601055600160015500",
|
"code": "0x6001600155600060015560016002556000600255600160035560006003556001600455600060045560016005556000600555600160065560006006556001600755600060075560016008556000600855600160095560006009556001600a556000600a556001600b556000600b556001600c556000600c556001600d556000600d556001600e556000600e556001600f556000600f5560016010556000601055600160015500",
|
||||||
"balance": "0x0"
|
"balance": "0x0"
|
||||||
|
},
|
||||||
|
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
|
||||||
|
"balance": "0xe8d4868b80",
|
||||||
|
"nonce": "0x1"
|
||||||
|
},
|
||||||
|
"0x7b9f5332c245e5c60923427eeb34e5adfba6470e": {
|
||||||
|
"balance": "0x0",
|
||||||
|
"storage": {
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"stateRoot": "0x16d0fd49f5ee712bdad56326e859088ee949b87666b8a1aa6d146ae62f00d879",
|
"stateRoot": "0x5cd4060c604cd171d89098685e46d32c29a0cd2e9ce4b9b9575fd7d3b567211b",
|
||||||
"txRoot": "0x875c38cccd9ebeab40d7ff716a3010ede2b215f530a341271d7312d8f444c3b2",
|
"txRoot": "0x875c38cccd9ebeab40d7ff716a3010ede2b215f530a341271d7312d8f444c3b2",
|
||||||
"receiptsRoot": "0x43be55e1ef1e34ceaa4be0c9515bb0a672b25ab41fa9a781d41379777113119b",
|
"receiptsRoot": "0xea5b87d12423d7570eb418dcdbb9f547f8fcc0577bd026d2189fd8fb550b85cf",
|
||||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"receipts": [
|
"receipts": [
|
||||||
{
|
{
|
||||||
"root": "0x",
|
"root": "0x",
|
||||||
"status": "0x1",
|
"status": "0x0",
|
||||||
"cumulativeGasUsed": "0x307cd",
|
"cumulativeGasUsed": "0x30d40",
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"logs": null,
|
"logs": null,
|
||||||
"transactionHash": "0x96cc2aefef7009d456429678da71afdbd182f7e9d4a133b1c74c547083ef11b0",
|
"transactionHash": "0x96cc2aefef7009d456429678da71afdbd182f7e9d4a133b1c74c547083ef11b0",
|
||||||
"contractAddress": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
|
"contractAddress": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
|
||||||
"gasUsed": "0x307cd",
|
"gasUsed": "0x30d40",
|
||||||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
"transactionIndex": "0x0"
|
"transactionIndex": "0x0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentDifficulty": "0x20000",
|
"currentDifficulty": "0x20000",
|
||||||
"gasUsed": "0x307cd"
|
"gasUsed": "0x30d40"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue