- Apr 03, 2020
-
-
Luke Champine authored
This removes a bunch of weird code around the counter overflow check in concatKDF and makes it actually work for different hash output sizes. The overflow check worked as follows: concatKDF applies the hash function N times, where N is roundup(kdLen, hashsize) / hashsize. N should not overflow 32 bits because that would lead to a repetition in the KDF output. A couple issues with the overflow check: - It used the hash.BlockSize, which is wrong because the block size is about the input of the hash function. Luckily, all standard hash functions have a block size that's greater than the output size, so concatKDF didn't crash, it just generated too much key material. - The check used big.Int to compare against 2^32-1. - The calculation could still overflow before reaching the check. The new code in concatKDF doesn't check for overflow. Instead, there is a new check on ECIESParams which ensures that params.KeyLen is < 512. This removes any possibility of overflow. There are a couple of miscellaneous improvements bundled in with this change: - The key buffer is pre-allocated instead of appending the hash output to an initially empty slice. - The code that uses concatKDF to derive keys is now shared between Encrypt and Decrypt. - There was a redundant invocation of IsOnCurve in Decrypt. This is now removed because elliptic.Unmarshal already checks whether the input is a valid curve point since Go 1.5. Co-authored-by:
Felix Lange <fjl@twurst.com>
-
- Apr 02, 2020
- Apr 01, 2020
-
-
Marius van der Wijden authored
-
ucwong authored
-
ucwong authored
-
Paweł Bylica authored
- Dump stats also for --bench flag. - From memory stats only show number and size of allocations. This is what `test -bench` shows. I doubt others like number of GC runs are any useful, but can be added if requested. - Now the mem stats are for single execution in case of --bench.
-
ucwong authored
-
- Mar 31, 2020
-
-
Jeff Wentworth authored
* add istanbul and muirGlacier to genesis states in README * remove muirGlacier, relocate istanbul
-
Gary Rong authored
* les: move execqueue into utilities package execqueue is a util for executing queued functions in a serial order which is used by both les server and les client. Move it to common package. * les: move randselect to utilities package weighted_random_selector is a helpful tool for randomly select items maintained in a set but based on the item weight. It's used anywhere is LES package, mainly by les client but will be used in les server with very high chance. So move it into a common package as the second step for les separation. * les: rename to utils
-
Martin Holst Swende authored
The test failed due to what appears to be fluctuations in time.Sleep, which is not the actual method under test. This change modifies it so we compare the metered Max to the actual time instead of the desired time.
-
Martin Holst Swende authored
-
Adam Schmideg authored
-
Wenbiao Zheng authored
This new API allows reading accounts and their content by address range. Co-authored-by:
Martin Holst Swende <martin@swende.se> Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Martin Holst Swende authored
* cmd/clef: add newaccount command * cmd/clef: document clef_New, update API versioning * Update cmd/clef/intapi_changelog.md Co-Authored-By:
ligi <ligi@ligi.de> * Update signer/core/uiapi.go Co-Authored-By:
ligi <ligi@ligi.de> Co-authored-by:
ligi <ligi@ligi.de>
-
Hanjiang Yu authored
* cmd, consensus: add option to disable mmap for DAG caches/datasets * consensus: add benchmarks for mmap with/with lock
-
Martin Holst Swende authored
* core/state/snapshot: basic trie-to-hash implementation * tests: validate snapshot after test * core/state/snapshot: fix review concerns
-
- Mar 30, 2020
-
-
Péter Szilágyi authored
core: bump txpool tx max size to 128KB
-
Martin Holst Swende authored
-
- Mar 27, 2020
-
-
Ha ĐANG authored
-
Gary Rong authored
-
Felix Lange authored
* eth: improve shutdown synchronization Most goroutines started by eth.Ethereum didn't have any shutdown sync at all, which lead to weird error messages when quitting the client. This change improves the clean shutdown path by stopping all internal components in dependency order and waiting for them to actually be stopped before shutdown is considered done. In particular, we now stop everything related to peers before stopping 'resident' parts such as core.BlockChain. * eth: rewrite sync controller * eth: remove sync start debug message * eth: notify chainSyncer about new peers after handshake * eth: move downloader.Cancel call into chainSyncer * eth: make post-sync block broadcast synchronous * eth: add comments * core: change blockchain stop message * eth: change closeBloomHandler channel type
-
rene authored
-
- Mar 26, 2020
-
-
Felix Lange authored
Turns out the way RDATA limits work is documented after all, I just didn't search right. The trick to make it work is to count UPSERTs twice. This also adds an additional check to ensure TTL changes are applied on existing records.
-
Felix Lange authored
-
Felix Lange authored
* cmd/devp2p: tweak DNS TTLs * cmd/devp2p: bump treeNodeTTL to four weeks
-
Péter Szilágyi authored
metrics: disable CPU stats (gosigar) on iOS
-
Péter Szilágyi authored
-
- Mar 23, 2020
-
-
Martin Holst Swende authored
Prior to this change, eth_call changed the balance of the sender account in the EVM environment to 2^256 wei to cover the gas cost of the call execution. We've had this behavior for a long time even though it's super confusing. This commit sets the default call gasprice to zero instead of updating the balance, which is better because it makes eth_call semantics less surprising. Removing the built-in balance assignment also makes balance overrides work as expected.
-
Martin Holst Swende authored
-