Skip to content

Commit

Permalink
fix blockchain test vectors for Shanghai
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Feb 28, 2023
1 parent f06217a commit af695aa
Show file tree
Hide file tree
Showing 46 changed files with 115 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ badUncles:
gasLimit: 10230000
expectException:
'London': InvalidGasLimit2
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty

# Excessively high gasLimit in uncle
- transactions: []
Expand All @@ -69,7 +70,8 @@ badUncles:
gasLimit: 10250000
expectException:
'London': InvalidGasLimit2
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty


# Acceptable gasLimit (same as the previous one)
Expand All @@ -81,7 +83,8 @@ badUncles:
- populateFromBlock: 1
gasLimit: 10240000
expectException:
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty


# Acceptable gasLimit (almost too low)
Expand All @@ -93,7 +96,8 @@ badUncles:
- populateFromBlock: 1
gasLimit: 10230001
expectException:
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty


# Acceptable gasLimit (almost too high)
Expand All @@ -105,7 +109,8 @@ badUncles:
- populateFromBlock: 1
gasLimit: 10249999
expectException:
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty

# Wrong baseFee
- transactions: []
Expand All @@ -115,7 +120,8 @@ badUncles:
baseFeePerGas: 670
expectException:
'London': 1559BlockImportImpossible_BaseFeeWrong
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty

# Wrong baseFee
- transactions: []
Expand All @@ -125,7 +131,8 @@ badUncles:
baseFeePerGas: 672
expectException:
'London': 1559BlockImportImpossible_BaseFeeWrong
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty


# Correct baseFee
Expand All @@ -146,7 +153,8 @@ badUncles:
- populateFromBlock: 2
baseFeePerGas: 671
expectException:
'>=Merge': 3675PreMerge1559BlockRejected
'Merge': 3675PreMerge1559BlockRejected
'>=Shanghai': PostMergeUncleHashIsNotEmpty



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ timestampPerBlock:

expect:
- network:
- "Merge"
- ">=Merge"
result:
# Timestamps for each block mined.
0xCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"blockHeader" : {
"difficulty" : "0x00",
"mixHash" : "0x00001f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"baseFeePerGas" : "0x11",
"baseFeePerGas" : "0x0f",
"withdrawalsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"blockHeader" : {
"difficulty" : "0x00",
"mixHash" : "0x00001f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"baseFeePerGas" : "0x11",
"baseFeePerGas" : "0x0f",
"withdrawalsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"blockHeader" : {
"difficulty" : "0x00",
"mixHash" : "0x0000000000000000000000000000000000000000000000000000000000020000",
"baseFeePerGas" : "0x10",
"baseFeePerGas" : "0x0e",
"withdrawalsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"blockHeader" : {
"difficulty" : "0x00",
"mixHash" : "0x0000000000000000000000000000000000000000000000000000000000020000",
"baseFeePerGas" : "0x10",
"baseFeePerGas" : "0x0e",
"withdrawalsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"Istanbul" : "InvalidDifficulty",
"Berlin" : "InvalidDifficulty",
"London" : "InvalidDifficulty",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeDifficultyIsNot0"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"Istanbul" : "InvalidUnclesHash",
"Berlin" : "InvalidUnclesHash",
"London" : "InvalidUnclesHash",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
}
},
"expectException" : {
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"Istanbul" : "InvalidDifficulty",
"Berlin" : "InvalidDifficulty",
"London" : "InvalidDifficulty",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidDifficulty",
"Berlin" : "InvalidDifficulty",
"London" : "InvalidDifficulty",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidDifficulty",
"Berlin" : "InvalidDifficulty",
"London" : "InvalidDifficulty",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"Istanbul" : "TooMuchGasUsed",
"Berlin" : "TooMuchGasUsed",
"London" : "TooMuchGasUsed",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidGasLimit2",
"Berlin" : "InvalidGasLimit2",
"London" : "InvalidGasLimit2",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidGasLimit2",
"Berlin" : "InvalidGasLimit2",
"London" : "InvalidGasLimit2",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidGasLimit2",
"Berlin" : "InvalidGasLimit2",
"London" : "InvalidGasLimit2",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"Istanbul" : "InvalidGasLimit2",
"Berlin" : "InvalidGasLimit2",
"London" : "InvalidGasLimit2",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"blockHeader" : {
"stateRoot" : "0x97f6417d2209a00290a009ee15e307a3e77fac623c7d301580c661c0ec2f1f5a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"Istanbul" : "InvalidGasLimit2",
"Berlin" : "InvalidGasLimit2",
"London" : "InvalidGasLimit2",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidGasLimit2",
"Berlin" : "InvalidGasLimit2",
"London" : "InvalidGasLimit2",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"Istanbul" : "InvalidNumber",
"Berlin" : "InvalidNumber",
"London" : "InvalidNumber",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"Istanbul" : "InvalidNumber",
"Berlin" : "InvalidNumber",
"London" : "InvalidNumber",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"Istanbul" : "InvalidNumber",
"Berlin" : "InvalidNumber",
"London" : "InvalidNumber",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"Istanbul" : "InvalidStateRoot",
"Berlin" : "InvalidStateRoot",
"London" : "InvalidStateRoot",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"Istanbul" : "InvalidDifficulty",
"Berlin" : "InvalidDifficulty",
"London" : "InvalidDifficulty",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
}
},
"expectException" : {
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
}
},
"expectException" : {
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidTimestampOlderParent",
"Berlin" : "InvalidTimestampOlderParent",
"London" : "InvalidTimestampOlderParent",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"Istanbul" : "InvalidTimestampOlderParent",
"Berlin" : "InvalidTimestampOlderParent",
"London" : "InvalidTimestampOlderParent",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
}
},
"expectException" : {
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
}
},
"expectException" : {
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"Istanbul" : "InvalidUncleParentHash",
"Berlin" : "InvalidUncleParentHash",
"London" : "InvalidUncleParentHash",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"Istanbul" : "InvalidUncleParentHash",
"Berlin" : "InvalidUncleParentHash",
"London" : "InvalidUncleParentHash",
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
}
},
"expectException" : {
">=Merge" : "3675PreMerge1559BlockRejected"
"Merge" : "3675PreMerge1559BlockRejected",
">=Shanghai" : "PostMergeUncleHashIsNotEmpty"
},
"transactions" : [
{
Expand Down
Loading

0 comments on commit af695aa

Please sign in to comment.