aboutsummaryrefslogtreecommitdiffstats
path: root/tests/state_test.go
Commit message (Collapse)AuthorAgeFilesLines
* core: remove stray account creations in state transition (#16470)Felix Lange2018-04-101-1/+0
| | | | | | | | | | | | | | | | The 'from' and 'to' methods on StateTransitions are reader methods and shouldn't have inadvertent side effects on state. It is safe to remove the check in 'from' because account existence is implicitly checked by the nonce and balance checks. If the account has non-zero balance or nonce, it must exist. Even if the sender account has nonce zero at the start of the state transition or no balance, the nonce is incremented before execution and the account will be created at that time. It is safe to remove the check in 'to' because the EVM creates the account if necessary. Fixes #15119
* core/state: rework dirty handling to avoid quadratic overheadMartin Holst Swende2018-03-281-6/+0
|
* all: update license information (#16089)Felix Lange2018-02-141-1/+1
|
* tests: update to upstream commit 2bb0c3da3b (#15806)Felix Lange2018-01-041-8/+5
| | | | Also raise traceLimit once again and print the VM error and output on failure.
* tests: add ethash difficulty tests (#15191)Martin Holst Swende2017-09-271-8/+10
|
* params: Updated finalized gascosts for ECMUL/MODEXP (#15135)Martin Holst Swende2017-09-141-1/+9
| | | | | | | | | | | | * params: Updated finalized gascosts for ECMUL/MODEXP * core,tests: Updates pending new tests * tests: Updated with new tests * core: revert state transition bugfix * tests: Add expected failures due to #15119
* cmd/evm: adds ability to run individual state test file (#14998)Martin Holst Swende2017-09-051-1/+2
| | | | | | | | * cmd/evm: adds ability to run individual state test file * cmd/evm: Fix statetest runner to be more json friendly * cmd/evm, tests: minor polishes, dump state on fail
* core/vm: Make MaxCodesize non-retroactive (#15072)Martin Holst Swende2017-09-041-2/+0
| | | | | | * core/vm: Make max_codesize only applicable post Spurious Dragon/158/155/161/170 * tests: Remove expected failure
* core, tests: implement Metropolis EIP 684Péter Szilágyi2017-08-251-2/+0
|
* tests: enable Byzantium state tests for CIPéter Szilágyi2017-08-221-2/+2
|
* tests: skip the bad tests from colliding account touchesPéter Szilágyi2017-08-171-0/+3
|
* tests: update tests, use blockchain test "network" fieldFelix Lange2017-08-111-5/+3
| | | | | | | | | Blockchain tests now include the "network" which determines the chain config to use. Remove config matching based on test name and share the name-to-config index with state tests. Byzantium/Constantinople tests are still skipped because most of them fail anyway.
* tests: update tests and implement general state tests (#14734)Felix Lange2017-07-111-955/+57
| | | | | | | | | | | | | | Tests are now included as a submodule. This should make updating easier and removes ~60MB of JSON data from the working copy. State tests are replaced by General State Tests, which run the same test with multiple fork configurations. With the new test runner, consensus tests are run as subtests by walking json files. Many hex issues have been fixed upstream since the last update and most custom parsing code is replaced by existing JSON hex types. Tests can now be marked as 'expected failures', ensuring that fixes for those tests will trigger an update to test configuration. The new test runner also supports parallel execution and the -short flag.
* params: remove redundant consts, disable metro on AllProtocolChangesPéter Szilágyi2017-07-041-23/+23
|
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-131-1/+1
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-0/+1
| | | | | | | | | | | | | | | The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
* core, core/state: fixed consensus issue added touch revertJeffrey Wilcke2016-11-251-23/+23
| | | | | Implemented proper touch revert journal entries and copied a Parity consensus bug in order to remain in sync with the current longest chain.
* tests: updatedJeffrey Wilcke2016-11-141-1/+1
|
* tests: added new EIP158 testsJeffrey Wilcke2016-11-131-11/+290
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-148/+177
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* core, core/vm: added gas price variance tableJeffrey Wilcke2016-10-151-0/+235
| | | | | | | | | | | | | This implements 1b & 1c of EIP150 by adding a new GasTable which must be returned from the RuleSet config method. This table is used to determine the gas prices for the current epoch. Please note that when the CreateBySuicide gas price is set it is assumed that we're in the new epoch phase. In addition this PR will serve as temporary basis while refactorisation in being done in the EVM64 PR, which will substentially overhaul the gas price code.
* tests: update test files from github.com/ethereum/tests @ 45bc1d21d3c1Felix Lange2016-10-061-21/+32
| | | | | | Two new tests are skipped because they're buggy. Making some newer random state tests work required implementing the 'compressed return value encoding'.
* core: added basic chain configurationJeffrey Wilcke2016-04-011-88/+139
| | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-0/+9
| | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests
* tests: updated homestead testsJeffrey Wilcke2016-02-181-14/+191
|
* parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-0/+21
| | | | | | | | * change gas cost for contract creating txs * invalidate signature with s value greater than secp256k1 N / 2 * OOG contract creation if not enough gas to store code * new difficulty adjustment algorithm * new DELEGATECALL op code
* tests: add test for StateTests/stCallCodes.jsonGustav Simonsson2015-09-211-0/+7
|
* cmd/evm, core/vm, tests: changed DisableVm to EnableVmJeffrey Wilcke2015-08-121-3/+2
|
* core/vm, tests: implemented semi-jit vmJeffrey Wilcke2015-08-071-0/+17
| | | | * changed stack and removed stack ptr. Let go decide on slice reuse.
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* Add --skip option to CLITaylor Gerring2015-06-191-17/+17
| | | | | Disassociates hardcoded tests to skip when running via CLI. Tests still skipped when running `go test`
* Cleanup/reorgTaylor Gerring2015-06-191-2/+0
|
* Return error up stack instead of passing testing var downTaylor Gerring2015-06-191-17/+51
|
* Separate and identify tests runnersTaylor Gerring2015-06-191-17/+17
|
* Fix pathsTaylor Gerring2015-06-191-18/+24
|
* Split tests from helper codeTaylor Gerring2015-06-191-0/+96