aboutsummaryrefslogtreecommitdiffstats
path: root/tests/transaction_test_util.go
Commit message (Collapse)AuthorAgeFilesLines
* tests: update tests and implement general state tests (#14734)Felix Lange2017-07-111-166/+72
| | | | | | | | | | | | | | 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.
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-5/+5
|
* tests: updatedJeffrey Wilcke2016-11-141-14/+13
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-9/+4
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-2/+1
| | | | | | | | | | | | | | | 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: added basic chain configurationJeffrey Wilcke2016-04-011-4/+3
| | | | | | | | | 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.
* tests: updated homestead testsJeffrey Wilcke2016-02-181-2/+15
|
* parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-2/+2
| | | | | | | | * 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
* 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
|
* core/types: make transactions immutableFelix Lange2015-06-301-23/+22
|
* Add --skip option to CLITaylor Gerring2015-06-191-10/+17
| | | | | Disassociates hardcoded tests to skip when running via CLI. Tests still skipped when running `go test`
* Add stdin optionTaylor Gerring2015-06-191-5/+34
|
* Cleanup loggingTaylor Gerring2015-06-191-2/+3
|
* DRY file loadingTaylor Gerring2015-06-191-1/+1
|
* More consistent test interfaces + test skippingTaylor Gerring2015-06-191-9/+18
|
* Separate and identify tests runnersTaylor Gerring2015-06-191-1/+1
|
* Add bcTotalDifficultyTest and unskip now working tx testsGustav Simonsson2015-05-071-1/+1
|
* Explicitly skip TransactionTests/tt10mbDataField.jsonGustav Simonsson2015-04-231-1/+1
|
* Add block tests wrapper and fixes for tx testsGustav Simonsson2015-04-201-62/+81
| | | | | | | | | * Add fixes to parsing and converting of fields in tx tests * Correct logic in tx tests; validation of fields and correct logic for when RLP decoding works/fails and when this is expected or not * Rename files for consistency * Add block tests wrapper to run block tests with go test
* tests: hopefully improve test conversion helpersFelix Lange2015-04-191-5/+5
| | | | (cherry picked from commit 035a30acbefb5eeadc1fc8dbd567775d5688f8a9)
* Fixes for TransactionTestsGustav Simonsson2015-04-161-6/+13
| | | | | | | | | * Include tests which now has consistent HEX encodings * Comment out two failing tests: " "TransactionWithHihghNonce" due to wrong nonce size "TransactionWithSvalueHigh" due to wrong ECDSA s range * Cleanup conversion functions and fix expected encodings for tests validation fields
* Enable more tx tests by expecting most common encoding of valuesGustav Simonsson2015-04-101-6/+6
|
* Add TransactionTests wrapped as Go testsGustav Simonsson2015-04-101-0/+134
* Add initial go wrapping for TransactionTests with some tests disabled in lieu of consistent HEX encodings and a few other pending bugfixes * TODO: Consider better way of perhaps modelling each test in the JSON files as a single Go test, instead of one Go test per JSON file