Skip to content

Commit

Permalink
feat(DiffPlaces): Fixed the four top DiffPlaces tests
Browse files Browse the repository at this point in the history
The ones that aren't bad opcodes, which I missed when I did #1099
  • Loading branch information
qbzzt authored and winsvega committed Nov 20, 2022
1 parent 8c0bd85 commit a16217c
Show file tree
Hide file tree
Showing 14 changed files with 6,408 additions and 7,266 deletions.
2,905 changes: 1,400 additions & 1,505 deletions BlockchainTests/GeneralStateTests/stBadOpcode/invalidDiffPlaces.json

Large diffs are not rendered by default.

2,905 changes: 1,400 additions & 1,505 deletions BlockchainTests/GeneralStateTests/stEIP1559/baseFeeDiffPlaces.json

Large diffs are not rendered by default.

3,053 changes: 1,474 additions & 1,579 deletions BlockchainTests/GeneralStateTests/stEIP1559/gasPriceDiffPlaces.json

Large diffs are not rendered by default.

2,905 changes: 1,400 additions & 1,505 deletions BlockchainTests/GeneralStateTests/stSelfBalance/diffPlaces.json

Large diffs are not rendered by default.

365 changes: 146 additions & 219 deletions GeneralStateTests/stBadOpcode/invalidDiffPlaces.json

Large diffs are not rendered by default.

365 changes: 146 additions & 219 deletions GeneralStateTests/stEIP1559/baseFeeDiffPlaces.json

Large diffs are not rendered by default.

365 changes: 146 additions & 219 deletions GeneralStateTests/stEIP1559/gasPriceDiffPlaces.json

Large diffs are not rendered by default.

365 changes: 146 additions & 219 deletions GeneralStateTests/stSelfBalance/diffPlaces.json

Large diffs are not rendered by default.

109 changes: 36 additions & 73 deletions src/GeneralStateTestsFiller/stBadOpcode/invalidDiffPlacesFiller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -579,122 +579,86 @@ invalidDiffPlaces:
transaction:
data:
# Run the code snippet normally
- data: :label normal :abi f(uint) 0x00
accessList: []
- :label normal :abi f(uint) 0x00

# Single level call stack
# CALL
- data: :label normal :abi f(uint) 0xf1
accessList: []
- :label normal :abi f(uint) 0xf1
# CALLCODE
- data: :label normal :abi f(uint) 0xf2
accessList: []
- :label normal :abi f(uint) 0xf2
# DELEGATECALL
- data: :abi f(uint) 0xf4
accessList: []
- :abi f(uint) 0xf4
# STATICCALL
- data: :abi f(uint) 0xfa
accessList: []
- :abi f(uint) 0xfa

# Two level call stack
# CALL CALL
- data: :abi f(uint) 0xf1f1
accessList: []
- :abi f(uint) 0xf1f1
# CALLCODE CALL
- data: :abi f(uint) 0xf2f1
accessList: []
- :abi f(uint) 0xf2f1
# DELEGATECALL CALL
- data: :abi f(uint) 0xf4f1
accessList: []
- :abi f(uint) 0xf4f1
# STATICCALL CALL
- data: :abi f(uint) 0xfaf1
accessList: []
- :abi f(uint) 0xfaf1
# CALL CALLCODE
- data: :abi f(uint) 0xf1f2
accessList: []
- :abi f(uint) 0xf1f2
# CALLCODE CALLCODE
- data: :abi f(uint) 0xf2f2
accessList: []
- :abi f(uint) 0xf2f2
# DELEGATECALL CALLCODE
- data: :abi f(uint) 0xf4f2
accessList: []
- :abi f(uint) 0xf4f2
# STATICCALL CALLCODE
- data: :abi f(uint) 0xfaf2
accessList: []
- :abi f(uint) 0xfaf2
# CALL DELEGATECALL
- data: :abi f(uint) 0xf1f4
accessList: []
- :abi f(uint) 0xf1f4
# CALLCODE DELEGATECALL
- data: :abi f(uint) 0xf2f4
accessList: []
- :abi f(uint) 0xf2f4
# DELEGATECALL DELEGATECALL
- data: :abi f(uint) 0xf4f4
accessList: []
- :abi f(uint) 0xf4f4
# STATICCALL DELEGATECALL
- data: :abi f(uint) 0xfaf4
accessList: []
- :abi f(uint) 0xfaf4
# CALL STATICCALL
- data: :abi f(uint) 0xf1fa
accessList: []
- :abi f(uint) 0xf1fa
# CALLCODE STATICCALL
- data: :abi f(uint) 0xf2fa
accessList: []
- :abi f(uint) 0xf2fa
# DELEGATECALL STATICCALL
- data: :abi f(uint) 0xf4fa
accessList: []
- :abi f(uint) 0xf4fa
# STATICCALL STATICCALL
- data: :abi f(uint) 0xfafa
accessList: []
- :abi f(uint) 0xfafa

# Call after something fails
# REVERT
- data: :abi f(uint) 0xfd
accessList: []
- :abi f(uint) 0xfd
# Out of gas
- data: :abi f(uint) 0xfe
accessList: []
- :abi f(uint) 0xfe
# SELFDESTRUCT
- data: :abi f(uint) 0xff
accessList: []
- :abi f(uint) 0xff


# Combined with creation of contracts
# CREATE (run code in the constructor)
- data: :abi f(uint) 0xf0
accessList: []
- :abi f(uint) 0xf0
# CREATE2 (run code in the constructor)
- data: :abi f(uint) 0xf5
accessList: []
- :abi f(uint) 0xf5
# CREATE and then CALL
- data: :abi f(uint) 0xf0f1
accessList: []
- :abi f(uint) 0xf0f1
# CREATE2 and then CALL
- data: :abi f(uint) 0xf5f1
accessList: []
- :abi f(uint) 0xf5f1
# CREATE and then CALLCODE
- data: :abi f(uint) 0xf0f2
accessList: []
- :abi f(uint) 0xf0f2
# CREATE2 and then CALLCODE
- data: :abi f(uint) 0xf5f2
accessList: []
- :abi f(uint) 0xf5f2
# CREATE and then DELEGATECALL
- data: :abi f(uint) 0xf0f4
accessList: []
- :abi f(uint) 0xf0f4
# CREATE2 and then DELEGATECALL
- data: :abi f(uint) 0xf5f4
accessList: []
- :abi f(uint) 0xf5f4
# CREATE and then STATICCALL
- data: :abi f(uint) 0xf0fa
accessList: []
- :abi f(uint) 0xf0fa
# CREATE2 and then STATICCALL
- data: :abi f(uint) 0xf5fa
accessList: []
- :abi f(uint) 0xf5fa


# Recurse almost until the limit
- data: :abi f(uint) 0x60BACCFA57
accessList: []

- :abi f(uint) 0x60BACCFA57


gasLimit:
Expand All @@ -704,8 +668,7 @@ invalidDiffPlaces:
value:
- 0
secretKey: "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
maxPriorityFeePerGas: 0
maxFeePerGas: 2000
gasPrice: 2000


expect:
Expand Down
109 changes: 36 additions & 73 deletions src/GeneralStateTestsFiller/stEIP1559/baseFeeDiffPlacesFiller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,122 +593,86 @@ baseFeeDiffPlaces:
transaction:
data:
# Run the code snippet normally
- data: :label normal :abi f(uint) 0x00
accessList: []
- :label normal :abi f(uint) 0x00

# Single level call stack
# CALL
- data: :label normal :abi f(uint) 0xf1
accessList: []
- :label normal :abi f(uint) 0xf1
# CALLCODE
- data: :label normal :abi f(uint) 0xf2
accessList: []
- :label normal :abi f(uint) 0xf2
# DELEGATECALL
- data: :abi f(uint) 0xf4
accessList: []
- :abi f(uint) 0xf4
# STATICCALL
- data: :abi f(uint) 0xfa
accessList: []
- :abi f(uint) 0xfa

# Two level call stack
# CALL CALL
- data: :abi f(uint) 0xf1f1
accessList: []
- :abi f(uint) 0xf1f1
# CALLCODE CALL
- data: :abi f(uint) 0xf2f1
accessList: []
- :abi f(uint) 0xf2f1
# DELEGATECALL CALL
- data: :abi f(uint) 0xf4f1
accessList: []
- :abi f(uint) 0xf4f1
# STATICCALL CALL
- data: :abi f(uint) 0xfaf1
accessList: []
- :abi f(uint) 0xfaf1
# CALL CALLCODE
- data: :abi f(uint) 0xf1f2
accessList: []
- :abi f(uint) 0xf1f2
# CALLCODE CALLCODE
- data: :abi f(uint) 0xf2f2
accessList: []
- :abi f(uint) 0xf2f2
# DELEGATECALL CALLCODE
- data: :abi f(uint) 0xf4f2
accessList: []
- :abi f(uint) 0xf4f2
# STATICCALL CALLCODE
- data: :abi f(uint) 0xfaf2
accessList: []
- :abi f(uint) 0xfaf2
# CALL DELEGATECALL
- data: :abi f(uint) 0xf1f4
accessList: []
- :abi f(uint) 0xf1f4
# CALLCODE DELEGATECALL
- data: :abi f(uint) 0xf2f4
accessList: []
- :abi f(uint) 0xf2f4
# DELEGATECALL DELEGATECALL
- data: :abi f(uint) 0xf4f4
accessList: []
- :abi f(uint) 0xf4f4
# STATICCALL DELEGATECALL
- data: :abi f(uint) 0xfaf4
accessList: []
- :abi f(uint) 0xfaf4
# CALL STATICCALL
- data: :abi f(uint) 0xf1fa
accessList: []
- :abi f(uint) 0xf1fa
# CALLCODE STATICCALL
- data: :abi f(uint) 0xf2fa
accessList: []
- :abi f(uint) 0xf2fa
# DELEGATECALL STATICCALL
- data: :abi f(uint) 0xf4fa
accessList: []
- :abi f(uint) 0xf4fa
# STATICCALL STATICCALL
- data: :abi f(uint) 0xfafa
accessList: []
- :abi f(uint) 0xfafa

# Call after something fails
# REVERT
- data: :abi f(uint) 0xfd
accessList: []
- :abi f(uint) 0xfd
# Out of gas
- data: :abi f(uint) 0xfe
accessList: []
- :abi f(uint) 0xfe
# SELFDESTRUCT
- data: :abi f(uint) 0xff
accessList: []
- :abi f(uint) 0xff


# Combined with creation of contracts
# CREATE (run code in the constructor)
- data: :abi f(uint) 0xf0
accessList: []
- :abi f(uint) 0xf0
# CREATE2 (run code in the constructor)
- data: :abi f(uint) 0xf5
accessList: []
- :abi f(uint) 0xf5
# CREATE and then CALL
- data: :abi f(uint) 0xf0f1
accessList: []
- :abi f(uint) 0xf0f1
# CREATE2 and then CALL
- data: :abi f(uint) 0xf5f1
accessList: []
- :abi f(uint) 0xf5f1
# CREATE and then CALLCODE
- data: :abi f(uint) 0xf0f2
accessList: []
- :abi f(uint) 0xf0f2
# CREATE2 and then CALLCODE
- data: :abi f(uint) 0xf5f2
accessList: []
- :abi f(uint) 0xf5f2
# CREATE and then DELEGATECALL
- data: :abi f(uint) 0xf0f4
accessList: []
- :abi f(uint) 0xf0f4
# CREATE2 and then DELEGATECALL
- data: :abi f(uint) 0xf5f4
accessList: []
- :abi f(uint) 0xf5f4
# CREATE and then STATICCALL
- data: :abi f(uint) 0xf0fa
accessList: []
- :abi f(uint) 0xf0fa
# CREATE2 and then STATICCALL
- data: :abi f(uint) 0xf5fa
accessList: []
- :abi f(uint) 0xf5fa


# Recurse almost until the limit
- data: :abi f(uint) 0x60BACCFA57
accessList: []

- :abi f(uint) 0x60BACCFA57


gasLimit:
Expand All @@ -718,8 +682,7 @@ baseFeeDiffPlaces:
value:
- 0
secretKey: "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
maxPriorityFeePerGas: 0
maxFeePerGas: 2000
gasPrice: 2000


expect:
Expand Down
Loading

0 comments on commit a16217c

Please sign in to comment.