Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to send transactions from a non-existent account #1290

Merged
merged 4 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23,522 changes: 23,522 additions & 0 deletions BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccount.json

Large diffs are not rendered by default.

14,114 changes: 14,114 additions & 0 deletions BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccount1559.json

Large diffs are not rendered by default.

23,522 changes: 23,522 additions & 0 deletions BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccountCreate.json

Large diffs are not rendered by default.

14,114 changes: 14,114 additions & 0 deletions BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccountCreate1559.json

Large diffs are not rendered by default.

4,066 changes: 4,066 additions & 0 deletions GeneralStateTests/stTransactionTest/NoSrcAccount.json

Large diffs are not rendered by default.

2,479 changes: 2,479 additions & 0 deletions GeneralStateTests/stTransactionTest/NoSrcAccount1559.json

Large diffs are not rendered by default.

4,066 changes: 4,066 additions & 0 deletions GeneralStateTests/stTransactionTest/NoSrcAccountCreate.json

Large diffs are not rendered by default.

2,479 changes: 2,479 additions & 0 deletions GeneralStateTests/stTransactionTest/NoSrcAccountCreate1559.json

Large diffs are not rendered by default.

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: {}

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: {}

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: {}

Loading