-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to send transactions from a non-existent account
Closing: #1286
- Loading branch information
Showing
12 changed files
with
88,826 additions
and
0 deletions.
There are no files selected for viewing
23,522 changes: 23,522 additions & 0 deletions
23,522
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccount.json
Large diffs are not rendered by default.
Oops, something went wrong.
14,114 changes: 14,114 additions & 0 deletions
14,114
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccount1559.json
Large diffs are not rendered by default.
Oops, something went wrong.
23,522 changes: 23,522 additions & 0 deletions
23,522
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccountCreate.json
Large diffs are not rendered by default.
Oops, something went wrong.
14,114 changes: 14,114 additions & 0 deletions
14,114
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccountCreate1559.json
Large diffs are not rendered by default.
Oops, something went wrong.
4,066 changes: 4,066 additions & 0 deletions
4,066
GeneralStateTests/stTransactionTest/NoSrcAccount.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,479 changes: 2,479 additions & 0 deletions
2,479
GeneralStateTests/stTransactionTest/NoSrcAccount1559.json
Large diffs are not rendered by default.
Oops, something went wrong.
4,066 changes: 4,066 additions & 0 deletions
4,066
GeneralStateTests/stTransactionTest/NoSrcAccountCreate.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,479 changes: 2,479 additions & 0 deletions
2,479
GeneralStateTests/stTransactionTest/NoSrcAccountCreate1559.json
Large diffs are not rendered by default.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
src/GeneralStateTestsFiller/stTransactionTest/NoSrcAccount1559Filler.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Send type 2 (EIP-1559) transactions from a non existent address | ||
|
||
NoSrcAccount1559: | ||
env: | ||
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba | ||
currentDifficulty: '0x020000' | ||
currentGasLimit: '89128960' | ||
currentBaseFee: '10' | ||
currentNumber: '1' | ||
currentTimestamp: '1000' | ||
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6 | ||
|
||
pre: | ||
# The empty address is a94f5374fce5edbc8e2a8697c15331677e6ebf0b. | ||
|
||
# Just a random address to call | ||
d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0: | ||
balance: 0 | ||
code: :raw 0x00 | ||
nonce: 0 | ||
storage: {} | ||
|
||
transaction: | ||
# Regardless of access list, these fields specify this is type 2 (EIP-1559) | ||
maxPriorityFeePerGas: 10 | ||
maxFeePerGas: 2000 | ||
data: | ||
# Empty access list | ||
- data: :raw 0x00 | ||
accessList: [] | ||
# Access list, but no storage keys | ||
- data: :raw 0x00 | ||
accessList: | ||
- address: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
storageKeys: [] | ||
# Access list with a storage key | ||
- data: :raw 0x00 | ||
accessList: | ||
- address: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
storageKeys: | ||
- 0x00 | ||
- 0x01 | ||
gasLimit: | ||
- 21000 # Minimum | ||
- 210000 # Higher than minimum | ||
- 0 # We have enough ETH for this one | ||
nonce: 0 | ||
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8 | ||
to: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
value: | ||
- 0 | ||
- 1 | ||
|
||
expect: | ||
# Transaction type 2 starts at London | ||
|
||
# Not enough ETH for executing the transaction | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: !!int -1 | ||
gas: 0-1 | ||
value: !!int -1 | ||
expectException: | ||
">=London" : "Transaction without funds" | ||
"<London" : "TR_TypeNotSupported" | ||
result: {} | ||
|
||
|
||
# Not enough ETH for the value we transfer | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: !!int -1 | ||
gas: !!int 2 | ||
value: !!int 1 | ||
expectException: | ||
">=London" : "Transaction without funds" | ||
"<London" : "TR_TypeNotSupported" | ||
result: {} | ||
|
||
|
||
|
||
# Gas limit of zero, should be at least 21000 | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: !!int -1 | ||
gas: !!int 2 | ||
value: !!int 0 | ||
expectException: | ||
">=London" : "IntrinsicGas" | ||
"<London" : "TR_TypeNotSupported" | ||
result: {} | ||
|
94 changes: 94 additions & 0 deletions
94
src/GeneralStateTestsFiller/stTransactionTest/NoSrcAccountCreate1559Filler.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Send type 2 (EIP-1559) transactions from a non existent address | ||
# in an attempt to create a new contract | ||
|
||
NoSrcAccountCreate1559: | ||
env: | ||
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba | ||
currentDifficulty: '0x020000' | ||
currentGasLimit: '89128960' | ||
currentBaseFee: '10' | ||
currentNumber: '1' | ||
currentTimestamp: '1000' | ||
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6 | ||
|
||
pre: | ||
# The empty address is a94f5374fce5edbc8e2a8697c15331677e6ebf0b. | ||
bad0000000000000000000000000000000000000: | ||
balance: 0 | ||
nonce: 0x60A7 | ||
code: 0x | ||
storage: {} | ||
|
||
transaction: | ||
# Regardless of access list, these fields specify this is type 2 (EIP-1559) | ||
maxPriorityFeePerGas: 10 | ||
maxFeePerGas: 2000 | ||
data: | ||
# Empty access list | ||
- data: :raw 0x00 | ||
accessList: [] | ||
# Access list, but no storage keys | ||
- data: :raw 0x00 | ||
accessList: | ||
- address: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
storageKeys: [] | ||
# Access list with a storage key | ||
- data: :raw 0x00 | ||
accessList: | ||
- address: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
storageKeys: | ||
- 0x00 | ||
- 0x01 | ||
gasLimit: | ||
- 21000 # Minimum | ||
- 210000 # Higher than minimum | ||
- 0 # We have enough ETH for this one | ||
nonce: 0 | ||
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8 | ||
to: "" # Account creation txn | ||
value: | ||
- 0 | ||
- 1 | ||
|
||
expect: | ||
# Transaction type 2 starts at London | ||
|
||
# Not enough ETH for executing the transaction | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: !!int -1 | ||
gas: 0-1 | ||
value: !!int -1 | ||
expectException: | ||
">=London" : "Transaction without funds" | ||
"<London" : "TR_TypeNotSupported" | ||
result: {} | ||
|
||
|
||
# Not enough ETH for the value we transfer | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: !!int -1 | ||
gas: !!int 2 | ||
value: !!int 1 | ||
expectException: | ||
">=London" : "Transaction without funds" | ||
"<London" : "TR_TypeNotSupported" | ||
result: {} | ||
|
||
|
||
|
||
# Gas limit of zero, should be at least 21000 | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: !!int -1 | ||
gas: !!int 2 | ||
value: !!int 0 | ||
expectException: | ||
">=London" : "IntrinsicGas" | ||
"<London" : "TR_TypeNotSupported" | ||
result: {} | ||
|
138 changes: 138 additions & 0 deletions
138
src/GeneralStateTestsFiller/stTransactionTest/NoSrcAccountCreateFiller.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# Send transactions where the source address is empty (no nonce, no eth). | ||
# These are contract creation transactions | ||
# Should always fail | ||
|
||
NoSrcAccountCreate: | ||
env: | ||
currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba | ||
currentDifficulty: '0x020000' | ||
currentGasLimit: '89128960' | ||
currentBaseFee: '10' | ||
currentNumber: '1' | ||
currentTimestamp: '1000' | ||
previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6 | ||
|
||
pre: | ||
# The empty address is a94f5374fce5edbc8e2a8697c15331677e6ebf0b. | ||
|
||
# Just a random address to call | ||
d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0: | ||
balance: 0 | ||
code: :raw 0x00 | ||
nonce: 0 | ||
storage: {} | ||
|
||
transaction: | ||
data: | ||
# Nothing | ||
- 0x | ||
# Some junk data | ||
- :raw 0xDEAD60A7 | ||
|
||
# The accessList makes this transaction type 1. | ||
# Empty access list | ||
- data: :raw 0x00 | ||
accessList: [] | ||
# Access list, but no storage keys | ||
- data: :raw 0x00 | ||
accessList: | ||
- address: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
storageKeys: [] | ||
# Access list with a storage key | ||
- data: :raw 0x00 | ||
accessList: | ||
- address: 0xd0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0 | ||
storageKeys: | ||
- 0x00 | ||
- 0x01 | ||
gasLimit: | ||
- 21000 # Minimum | ||
- 210000 # Higher than minimum | ||
- 0 # We have enough ETH for this one | ||
gasPrice: 100 | ||
nonce: 0 | ||
secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8 | ||
to: "" | ||
value: | ||
- 0 | ||
- 1 | ||
|
||
expect: | ||
# Not enough ETH for executing the transaction | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: 0-1 | ||
gas: 0-1 | ||
value: !!int -1 | ||
expectException: | ||
">=Frontier" : "Transaction without funds" | ||
result: {} | ||
|
||
|
||
# Not enough ETH for the value we transfer | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: 0-1 | ||
gas: !!int 2 | ||
value: !!int 1 | ||
expectException: | ||
">=Frontier" : "Transaction without funds" | ||
result: {} | ||
|
||
|
||
|
||
# Gas limit of zero, should be at least 21000 | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: 0-1 | ||
gas: !!int 2 | ||
value: !!int 0 | ||
expectException: | ||
">=Frontier" : "IntrinsicGas" | ||
result: {} | ||
|
||
|
||
# Transaction type 1 starts at Berlin | ||
|
||
# Not enough ETH for executing the transaction | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: 2-4 | ||
gas: 0-1 | ||
value: !!int -1 | ||
expectException: | ||
">=Berlin" : "Transaction without funds" | ||
"<Berlin" : "TR_TypeNotSupported" | ||
result: {} | ||
|
||
|
||
# Not enough ETH for the value we transfer | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: 2-4 | ||
gas: !!int 2 | ||
value: !!int 1 | ||
expectException: | ||
">=Berlin" : "Transaction without funds" | ||
"<Berlin" : "TR_TypeNotSupported" | ||
result: {} | ||
|
||
|
||
|
||
# Gas limit of zero, should be at least 21000 | ||
- network: | ||
- '>=Frontier' | ||
indexes: | ||
data: 2-4 | ||
gas: !!int 2 | ||
value: !!int 0 | ||
expectException: | ||
">=Berlin" : "IntrinsicGas" | ||
"<Berlin" : "TR_TypeNotSupported" | ||
result: {} | ||
|
Oops, something went wrong.