Gustav Simonsson
be303ba186
Update ethash Godep (again)
2015-06-17 00:56:25 +02:00
Gustav Simonsson
a9d6846f92
Update ethash Godep
2015-06-16 12:09:39 +02:00
Gustav Simonsson
8f372c867d
Update Ethereum JSON test files
2015-06-16 12:09:25 +02:00
Gustav Simonsson
6e3b58e491
Remove unneeded if check on EC recover padding
2015-06-09 16:03:05 +02:00
Gustav Simonsson
15166f880b
Skip BlockTests/bcValidBlockTests SimpleTx3
2015-06-09 15:53:31 +02:00
Gustav Simonsson
ad5b5a4895
Pad precompiled EC recover input and add validations
2015-06-09 15:41:15 +02:00
Gustav Simonsson
d8e55a5cc3
Skip VMTests RandomTests temporarily until they are fixed
2015-06-09 15:40:43 +02:00
Gustav Simonsson
e885a2912b
Update Ethereum JSON test files
2015-06-09 15:39:24 +02:00
Gustav Simonsson
edbd902a1b
Initialise curve N value in package init
2015-06-03 14:44:29 +02:00
Gustav Simonsson
0fa9d2431f
Add new 0th gen uncle test
2015-06-02 14:47:23 +02:00
Gustav Simonsson
8a76b45253
Use older version of stSpecialTest until JUMPDEST fix is merged
2015-06-02 12:25:43 +02:00
Gustav Simonsson
8962af2e42
Update Ethereum JSON test files
2015-06-02 12:15:25 +02:00
Gustav Simonsson
55bf5051ad
Unsupport bruncles
2015-06-01 22:43:05 +02:00
Gustav Simonsson
5a692ba4f6
Update Ethereum JSON test files
2015-06-01 22:34:44 +02:00
Gustav Simonsson
147a699c65
Add missing err checks on From() (skip RPC for now)
2015-06-01 22:12:03 +02:00
Gustav Simonsson
32e1b104f8
Add EC signature validations before call to libsecp256k1
2015-06-01 21:06:52 +02:00
Gustav Simonsson
b4818a003a
Update Ethereum JSON test files
2015-05-29 13:12:54 +02:00
Gustav Simonsson
9138955ba5
Validate account length and avoid slicing in logging
2015-05-28 15:20:05 +02:00
Gustav Simonsson
bf5f0b1d0c
Update ValidateHeader comments
2015-05-27 13:30:24 +02:00
Gustav Simonsson
14955bd454
Revert "core: block.gasLimit - parent.gasLimit <= parent.gasLimit / GasLimitBoundDivisor"
...
This reverts commit be2b0501b5 .
2015-05-27 13:01:06 +02:00
Gustav Simonsson
6ad817e17b
Add StateTests/RandomTests and VMTests/RandomTests
2015-05-21 23:04:46 +02:00
Gustav Simonsson
6a72cd45e2
Add wrapper for BlockTests/bcWalletTest.json
2015-05-18 16:28:54 +02:00
Gustav Simonsson
1d51cada3c
Handle call depth exception for CREATE
2015-05-18 16:23:20 +02:00
Gustav Simonsson
36419defd1
Update Ethereum JSON test files
2015-05-18 12:45:24 +02:00
Gustav Simonsson
619e8a4f03
Add StateTests/RandomTests but skip for now
2015-05-15 19:17:40 +02:00
Gustav Simonsson
32276e8b01
Update StateTests and nil create return on failed code deposit
2015-05-15 18:49:31 +02:00
Gustav Simonsson
830bdb1cfd
Update Ethereum JSON tests
2015-05-15 16:08:00 +02:00
Gustav Simonsson
dadf01de60
unskip StateTests/stTransactionTest and use test tx nonce
2015-05-15 16:05:11 +02:00
Gustav Simonsson
b24f16fa53
Make read of ethash hashrate atomic and update ethash godep
2015-05-14 04:05:49 +02:00
Gustav Simonsson
56a5592ea0
Update keystore code comments
2015-05-13 18:33:31 +02:00
Gustav Simonsson
b5b53d8b32
Fix hex conversion in --unlock and log when successful
2015-05-13 01:11:17 +02:00
Gustav Simonsson
e389585f1f
Change default keystore dir
2015-05-12 18:33:04 +02:00
Gustav Simonsson
231fe04f03
Fix address type in js test
2015-05-12 17:48:21 +02:00
Gustav Simonsson
037772fc07
fix hex conversion bug in RPC for byte slices
2015-05-12 17:22:17 +02:00
Gustav Simonsson
8001e48115
Fix natspec test (again x2) types
2015-05-12 17:22:17 +02:00
Gustav Simonsson
2c1b0ff17e
Update key store to new spec but keep address field for now
...
* Also fix address types post-rebase
2015-05-12 17:22:17 +02:00
Gustav Simonsson
fe9e95a3fd
Fix natspec e2e test accounts type (again)
2015-05-12 17:22:17 +02:00
Gustav Simonsson
940952f757
Fix HEX hack in xeth accounts()
2015-05-12 17:22:17 +02:00
Gustav Simonsson
f98e002d98
Address pull request comments; key header and hex encoding
...
* Remove key header from unencrypted key file format and replace
it with a version field
* Change encoding of bytes in key files from base64 to hex
2015-05-12 17:22:17 +02:00
Gustav Simonsson
313eec33ad
Revert "Add key header to unencrypted key file"
...
This reverts commit a94d4ba0b53c4558ab838aaed635a2ff66ddfa53.
2015-05-12 17:19:39 +02:00
Gustav Simonsson
8754f2b768
Fix common.Address / []byte type conversions
2015-05-12 17:19:39 +02:00
Gustav Simonsson
cd88295f5a
Add key header to unencrypted key file
2015-05-12 17:19:39 +02:00
Gustav Simonsson
29a5a92d13
Add key header to encrypted keys
...
* Add key header containing key version, kdf and kdf params
* Store key header as JSON in the key file
* Read in KDF params from key header
* Include key header in MAC calculation and MAC verification
2015-05-12 17:19:39 +02:00
Gustav Simonsson
ac3371bcb6
Correct accounts hex in XETH API
2015-05-12 17:19:39 +02:00
Gustav Simonsson
da9fe951da
Use common.Address type for accounts.Address
2015-05-12 17:19:39 +02:00
Gustav Simonsson
6b23094cff
Improve key store passphrase crypto
...
* Change MAC-then-Encrypt to Encrypt-then-MAC
* Change AES256 to AES128
* Use first 16 bytes of KDF derived key for AES and
remaining 16 for MAC
2015-05-12 17:18:30 +02:00
Gustav Simonsson
9918b6c84e
Remove the awesome, ever misunderstood entropy mixing
2015-05-12 17:18:30 +02:00
Gustav Simonsson
3593662b0c
Update ethash deps (more build fixes, tests)
2015-05-07 19:39:55 +02:00
Gustav Simonsson
79eb40fc9f
Add bcTotalDifficultyTest and unskip now working tx tests
2015-05-07 13:03:22 +02:00
Gustav Simonsson
2b716aec54
Update JSON test files
2015-05-07 12:44:29 +02:00
Gustav Simonsson
7bc1f487b8
Unskip now working tests, remove debug print
2015-05-06 23:25:44 +02:00
Gustav Simonsson
2808409fbd
Add genesis block total difficulty in tests
2015-05-06 23:22:49 +02:00
Gustav Simonsson
054947def7
Add ethash linux & windows build fixes
2015-05-06 17:38:28 +02:00
Gustav Simonsson
f4341c7b7f
Unskip working blocktests following ethash cache reusage
2015-05-05 08:34:29 +02:00
Gustav Simonsson
b1cc9cdc74
Integrate new ethash API and change geth makedag cmd
2015-05-05 08:24:15 +02:00
Gustav Simonsson
50659f4b48
Update ethash Godeps files
2015-05-05 07:50:04 +02:00
Gustav Simonsson
34c94d5fcd
Add loading of block test privkey if present
2015-04-27 20:30:26 +02:00
Gustav Simonsson
2a61611c4f
Update JSON tests
2015-04-27 19:09:20 +02:00
Gustav Simonsson
b0bf12ec87
Remove unneeded allocation
2015-04-24 19:40:28 +02:00
Gustav Simonsson
4d1887093d
Use make instead of new for allocation
2015-04-24 17:41:38 +02:00
Gustav Simonsson
9d2a156453
Fix ignore of unexpected files in key dir
2015-04-23 05:52:41 +02:00
Gustav Simonsson
7a223721a5
Add block header validations for block tests
2015-04-23 05:32:56 +02:00
Gustav Simonsson
49da462e92
Include ZeroByteAtTheEnd and RandomByteAtTheEnd tests
2015-04-22 23:16:19 +02:00
Gustav Simonsson
4e0a2c8e8c
Validate block header UncleHash against calculated hash
2015-04-22 23:16:19 +02:00
Gustav Simonsson
ec6acacc53
Unskip BlockTests/bcInvalidHeaderTest.json wrongUncleHash
2015-04-22 23:16:19 +02:00
Gustav Simonsson
9834f855fa
Finally, glorious HEX
2015-04-22 23:16:19 +02:00
Gustav Simonsson
24de35ef09
Add StateTests/stMemoryStressTest.json but skip for now
2015-04-22 23:16:19 +02:00
Gustav Simonsson
5c70333a12
Exclude TransactionWithSvalue0 as it expects invalid s value to be valid
2015-04-22 23:16:18 +02:00
Gustav Simonsson
8ec8bff11c
Update github.com/ethereum/tests files
2015-04-22 23:16:18 +02:00
Gustav Simonsson
573bc3e05e
Explicitly skip TransactionTests/tt10mbDataField.json
2015-04-22 23:16:17 +02:00
Gustav Simonsson
7254278c09
Add test wrapper for VMTests/vmInputLimits1.json
2015-04-22 23:16:17 +02:00
Gustav Simonsson
b448390889
Further fixes to block test wrapper
...
* Move go test wrapper for block tests from cmd/geth to tests
* Fix logic for when tests are valid or not, by adding correct
validations for expected valid/invalid blocks
* Change block insertion helper to work on single blocks
* Add one test case for each file in BlockTests and comment out
the tests which are currently failing
* Add Skip call in all block tests in lieu of performance fixes
around ethash cache which are needed before it will be fast enough
to start / stop the node between each test
2015-04-21 05:23:10 +02:00
Gustav Simonsson
805345d135
Add block tests wrapper and fixes for tx tests
...
* 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
2015-04-20 17:46:35 +02:00
Gustav Simonsson
c617a6ec79
Fixes for TransactionTests
...
* 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
2015-04-15 22:37:16 +02:00
Gustav Simonsson
2d8a2d0c99
Update JSON tests
2015-04-15 22:36:33 +02:00
Gustav Simonsson
6d20d634ca
Enable more tx tests by expecting most common encoding of values
2015-04-10 12:34:55 +02:00
Gustav Simonsson
6dc2146ed7
Remove unneeded map assignments for working tx RLP tests
2015-04-10 12:03:46 +02:00
Gustav Simonsson
9ac5671c18
Add TransactionTests wrapped as Go tests
...
* 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
2015-04-10 11:55:31 +02:00
Gustav Simonsson
1e18f4544b
Update JSON test files
2015-04-10 11:52:31 +02:00
Gustav Simonsson
aa4ff52d84
Add IsOnCurve check to EC unmarshalling in ECIES decryption
2015-04-07 23:50:04 +02:00
Gustav Simonsson
941f051358
libsecp256k1 #define NDEBUG
2015-04-07 18:09:58 +02:00
Gustav Simonsson
2591883a18
Use logger.Error instead of 0 with glog
2015-04-07 12:48:19 +02:00
Gustav Simonsson
3f306f63d4
Forward and log EC recover err and remove dup pubkey len check
2015-04-07 12:48:19 +02:00
Gustav Simonsson
d9b37b6da7
Update Go wrapper around libbsecp256k1
2015-04-07 12:40:31 +02:00
Gustav Simonsson
f4d4f1ccb2
Update bitcoin secp256k1 lib
2015-04-07 12:14:05 +02:00
Gustav Simonsson
c26c8d3a44
Read most protocol params from common/params.json
...
* Add params package with exported variables generated from
github.com/ethereum/common/blob/master/params.json
* Use params package variables in applicable places
* Add check for minimum gas limit in validation of block's gas limit
* Remove common/params.json from go-ethereum to avoid
outdated version of it
2015-04-02 06:22:32 +02:00
Gustav Simonsson
9feed3f61e
Correct gas limit validation according to new algorithm
...
* Use absolute value of (block's gas limit) - (parent's gas limit)
in comparison with diff limit.
* Ensure the diff is strictly smaller than the allowed size.
2015-03-30 16:07:24 +02:00
Gustav Simonsson
b0c4dc8df8
Update ethash lib
2015-03-24 15:51:51 +01:00
Gustav Simonsson
becc503230
Correct difficulty calculation to use new difficulty minimum
2015-03-23 16:32:20 +01:00
Gustav Simonsson
5d31a475e9
Fix new types for blocktests and comment out non-working log level setter
2015-03-23 16:32:20 +01:00
Gustav Simonsson
60de4d6dd1
gofmt
2015-03-23 16:32:20 +01:00
Gustav Simonsson
08bb472c91
Add validation of post state accounts to block tests
2015-03-23 16:32:20 +01:00
Gustav Simonsson
33c5186fd0
In blocktest cmd, disable network and add RPC flag
2015-03-23 16:32:20 +01:00
Gustav Simonsson
27c42ea934
Add empty total difficulty to test blocks and clean up stopping the node
2015-03-09 18:03:35 +01:00
Gustav Simonsson
bc45e5c6de
Integrate eth_accounts and eth_transact to use new account manager
...
* Add from to eth_transact / xeth.Transact and add static pass in lieu
of integrating with native Mist window for user passphrase entry
* Make eth_accounts return AccountManager.Accounts()
* Add a Generate Key menu item in Mist
2015-03-06 13:10:42 +00:00
Gustav Simonsson
871dfd399b
Add initial implementation of block tests
...
* Add blocktest cmd and support for block tests files in
tests/BlockTests , the launched node does not connect to
network, resets state with a genesis block from the test file
and starts the RPC API
2015-03-04 20:27:09 +01:00
Gustav Simonsson
260ab73969
Validate block header gas limit
...
* Add block header gas limit validation in ValidateBlock function,
see eq 39 and 45 in yellow paper. Before it was calculated _for_
the block instead of validated.
* Use the block header gas limit when setting the gas pool instead
of calculating the value for the block.
2015-02-25 20:00:32 +01:00
Gustav Simonsson
23f2658091
Remove unneeded initialisation of mutex
2015-02-25 19:30:57 +01:00
Gustav Simonsson
d1311c53ee
Address pull request comments
...
* Use RWMutex instead of Mutex
* Use time.Duration instead of int for unlock time
* Use time.After with select instead of time.Sleep
2015-02-25 18:40:59 +01:00
Gustav Simonsson
b296b36d2b
Add automatic locking / unlocking of accounts
...
* Change account signing API to two sign functions;
Sign without passphrase - works if account is unlocked
Sign with passphrase - always works and unlocks the account
* Account stays unlocked for X ms and is then automatically locked
2015-02-25 17:37:12 +01:00