Files
evm/core/TrieStressTest.bin
7e0b73c670 Trie stress test (#981)
* Add TrieStreeTest

This smart contract will append N new elements to a vector, this is a stress
test to our implementation of the trie structure

* Expose internal database?

* Rewrite bench

Make bench more generic and simpler to bootstrap

* Reuse functions

* Deploy contract once and reuse it

* Write full blocks

* Allow callee to deploy N contracts

Remove gas calculation from benchmarks, gas is still calculated to make sure
all contracts are deployed.

stressTestTrieDb takes 3 arguments. The number of contracts to deploy, the
calls for each block and the numbers of elements to append to the vector on
each call

* Remove all gas control

* Added AddTxOrFail()

This function will treat execution errors as errors as well, useful for
testing.

ApplyTransaction has been modified to return the ExecutionResult

* Move changes to the test

Breaking API changes should be avoided

* Improve error handling in benchmark

* Call many contracts per block

* Removed duplicate code

Use existing code instead, reading the receipt from the last execution instead
of returning the exceutionresult struct

* Use NewTx instead of NewTransaction

* Better organization for files

* rename & move files

* Update core/trie_stress_bench_test.go

Co-authored-by: aaronbuchwald <[email protected]>
Signed-off-by: Cesar <[email protected]>

---------

Signed-off-by: Cesar <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
2023-11-29 11:37:30 -05:00

1 line
1.8 KiB
Plaintext

608060405234801561000f575f80fd5b506103938061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80630178fe3f14610043578063514a19d614610073578063be1c766b1461008f575b5f80fd5b61005d600480360381019061005891906101c0565b6100ad565b60405161006a9190610203565b60405180910390f35b61008d600480360381019061008891906101c0565b610117565b005b61009761017e565b6040516100a4919061022b565b60405180910390f35b5f808054905082106100f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100eb9061029e565b60405180910390fd5b5f8281548110610107576101066102bc565b5b905f5260205f2001549050919050565b5f60603373ffffffffffffffffffffffffffffffffffffffff16901b5f1b90505f5b82811015610179575f82908060018154018082558091505060019003905f5260205f20015f9091909190915055808061017190610316565b915050610139565b505050565b5f8080549050905090565b5f80fd5b5f819050919050565b61019f8161018d565b81146101a9575f80fd5b50565b5f813590506101ba81610196565b92915050565b5f602082840312156101d5576101d4610189565b5b5f6101e2848285016101ac565b91505092915050565b5f819050919050565b6101fd816101eb565b82525050565b5f6020820190506102165f8301846101f4565b92915050565b6102258161018d565b82525050565b5f60208201905061023e5f83018461021c565b92915050565b5f82825260208201905092915050565b7f496e646578206f7574206f6620626f756e6400000000000000000000000000005f82015250565b5f610288601283610244565b915061029382610254565b602082019050919050565b5f6020820190508181035f8301526102b58161027c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6103208261018d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610352576103516102e9565b5b60018201905091905056fea26469706673582212206a77a7e1e9aaf41a68d7c07cec79019e175a15c152db425e1c143d7cfd7da65e64736f6c63430008150033