Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | params: core, core/vm, miner: 64bit gas instructions | Jeffrey Wilcke | 2017-02-14 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test | ||||
* | Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)" | Jeffrey Wilcke | 2017-02-13 | 1 | -1/+1 |
| | | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757. | ||||
* | params: core, core/vm, miner: 64bit gas instructions (#3514) | Jeffrey Wilcke | 2017-02-02 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test | ||||
* | all: fix ineffectual assignments and remove uses of crypto.Sha3 | Felix Lange | 2017-01-09 | 1 | -1/+1 |
| | | | | | go get github.com/gordonklaus/ineffassign ineffassign . | ||||
* | core/types: remove redundant SignECDSA wrappers, rename to SignTx | Felix Lange | 2017-01-05 | 1 | -1/+1 |
| | |||||
* | core/types, params: EIP#155 | Jeffrey Wilcke | 2016-11-13 | 1 | -1/+2 |
| | |||||
* | core, core/state, trie: EIP158, reprice & skip empty account write | Jeffrey Wilcke | 2016-11-13 | 1 | -1/+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> | ||||
* | cmd, eth: added light client and light server modes | zsfelfoldi | 2016-11-09 | 1 | -1/+1 |
| | |||||
* | eth/downloader: reduce fast sync block requirements, fix test | Péter Szilágyi | 2016-10-31 | 1 | -10/+21 |
| | |||||
* | core/state, eth/downloader, trie: reset fast-failure on progress | Péter Szilágyi | 2016-10-31 | 1 | -141/+180 |
| | |||||
* | trie, core/state: improve memory usage and performance (#3135) | Felix Lange | 2016-10-15 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trie: store nodes as pointers This avoids memory copies when unwrapping node interface values. name old time/op new time/op delta Get 388ns ± 8% 215ns ± 2% -44.56% (p=0.000 n=15+15) GetDB 363ns ± 3% 202ns ± 2% -44.21% (p=0.000 n=15+15) UpdateBE 1.57µs ± 2% 1.29µs ± 3% -17.80% (p=0.000 n=13+15) UpdateLE 1.92µs ± 2% 1.61µs ± 2% -16.25% (p=0.000 n=14+14) HashBE 2.16µs ± 6% 2.18µs ± 6% ~ (p=0.436 n=15+15) HashLE 7.43µs ± 3% 7.21µs ± 3% -2.96% (p=0.000 n=15+13) * trie: close temporary databases in GetDB benchmark * trie: don't keep []byte from DB load around Nodes decoded from a DB load kept hashes and values as sub-slices of the DB value. This can be a problem because loading from leveldb often returns []byte with a cap that's larger than necessary, increasing memory usage. * trie: unload old cached nodes * trie, core/state: use cache unloading for account trie * trie: use explicit private flags (fixes Go 1.5 reflection issue). * trie: fixup cachegen overflow at request of nick * core/state: rename journal size constant | ||||
* | ethereum, ethclient: add SyncProgress API endpoint | Péter Szilágyi | 2016-09-06 | 1 | -32/+32 |
| | |||||
* | eth, eth/downloader: better remote head tracking | Péter Szilágyi | 2016-07-25 | 1 | -3/+14 |
| | |||||
* | eth, eth/downloader, eth/fetcher: delete eth/61 code | Felix Lange | 2016-07-22 | 1 | -118/+4 |
| | | | | | The eth/61 protocol was disabled in #2776, this commit removes its message handlers and hash-chain sync logic. | ||||
* | accounts, core, eth: pass chain config for chain maker to test DAO | Péter Szilágyi | 2016-07-15 | 1 | -1/+1 |
| | |||||
* | eth/downloader: fix occasional fast sync critical section test fails | Péter Szilágyi | 2016-06-13 | 1 | -1/+3 |
| | |||||
* | eth/downloader: adaptive quality of service tuning | Péter Szilágyi | 2016-06-06 | 1 | -4/+54 |
| | |||||
* | eth/downloader: make fast sync resilient to critical section fails | Péter Szilágyi | 2016-06-02 | 1 | -12/+58 |
| | |||||
* | eth/downloader: ensure cancel channel is closed post sync | Péter Szilágyi | 2016-05-30 | 1 | -1/+11 |
| | |||||
* | eth/downloader: stream partial skeleton filling to processor | Péter Szilágyi | 2016-05-17 | 1 | -0/+1 |
| | |||||
* | eth/downloader: implement concurrent header downloads | Péter Szilágyi | 2016-05-17 | 1 | -23/+24 |
| | |||||
* | eth/downloader: bound fork ancestry and allow heavy short forks | Péter Szilágyi | 2016-05-13 | 1 | -32/+144 |
| | |||||
* | eth: various typos | Leif Jurvetson | 2016-03-16 | 1 | -3/+3 |
| | |||||
* | eth/downloader: bump the download queue size to prevent starvation | Péter Szilágyi | 2016-02-23 | 1 | -0/+5 |
| | |||||
* | eth, eth/downloader, jsre: surface state sync progress through the API | Péter Szilágyi | 2016-02-10 | 1 | -16/+16 |
| | |||||
* | core, eth/downloader: ensure state presence in ancestor lookup | Péter Szilágyi | 2016-01-04 | 1 | -3/+14 |
| | |||||
* | eth/downloader: throttling tests are time-sensitive, don't run parallel | Péter Szilágyi | 2015-12-30 | 1 | -3/+1 |
| | |||||
* | eth/downloader: fix negative balance issue in tests | Felix Lange | 2015-12-18 | 1 | -2/+5 |
| | | | | | | | | | | The test chain generated by makeChainFork included invalid uncle headers, crashing the generator during the state commit. The headers were invalid because they used the iteration counter as the block number, even though makeChainFork uses a block with number > 0 as the parent. Fix this by introducing BlockGen.Number, which allows accessing the actual number of the block being generated. | ||||
* | eth/downloader: run tests in parallel | Felix Lange | 2015-11-19 | 1 | -0/+29 |
| | |||||
* | eth/downloader: don't hang for spurious deliveries | Felix Lange | 2015-11-19 | 1 | -34/+72 |
| | | | | | | | | | | | | | | | | Unexpected deliveries could block indefinitely if they arrived at the right time. The fix is to ensure that the cancellation channel is always closed when the sync ends, unblocking any deliveries. Also remove the atomic check for whether a sync is currently running because it doesn't help and can be misleading. Cancelling always seems to break the tests though. The downloader spawned d.process whenever new data arrived, making it somewhat hard to track when block processing was actually done. Fix this by running d.process in a dedicated goroutine that is tied to the lifecycle of the sync. d.process gets notified of new work by the queue instead of being invoked all the time. This removes a ton of weird workaround code, including a hairy use of atomic CAS. | ||||
* | core, eth, trie: fix data races and merge/review issues | Péter Szilágyi | 2015-10-21 | 1 | -210/+254 |
| | |||||
* | core, eth: roll back uncertain headers in failed fast syncs | Péter Szilágyi | 2015-10-19 | 1 | -1/+77 |
| | |||||
* | eth/downloader: concurrent receipt and state processing | Péter Szilágyi | 2015-10-19 | 1 | -2/+2 |
| | |||||
* | core, eth, trie: direct state trie synchronization | Péter Szilágyi | 2015-10-19 | 1 | -34/+89 |
| | |||||
* | core, eth: receipt chain reconstruction | Péter Szilágyi | 2015-10-19 | 1 | -92/+133 |
| | |||||
* | eth/downloader: add fast and light sync strategies | Péter Szilágyi | 2015-10-19 | 1 | -287/+452 |
| | |||||
* | eth/downloader: match capabilities when querying idle peers | Péter Szilágyi | 2015-10-02 | 1 | -3/+46 |
| | |||||
* | eth/downloader: header-chain order and ancestry check | Péter Szilágyi | 2015-09-15 | 1 | -4/+61 |
| | |||||
* | eth, rpc: standardize the chain sync progress counters | Péter Szilágyi | 2015-09-15 | 1 | -4/+337 |
| | |||||
* | core: split out TD from database and all internals | Péter Szilágyi | 2015-09-11 | 1 | -13/+31 |
| | |||||
* | eth: port the synchronisation algo to eth/62 | Péter Szilágyi | 2015-08-25 | 1 | -78/+259 |
| | |||||
* | eth: kill off protocol eth/60 in preparation for eth/62 | Péter Szilágyi | 2015-08-24 | 1 | -378/+2 |
| | |||||
* | eth, eth/downloader: don't report stall if fetcher filled the block | Péter Szilágyi | 2015-07-29 | 1 | -32/+42 |
| | |||||
* | all: fix license headers one more time | Felix Lange | 2015-07-24 | 1 | -1/+1 |
| | | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a. | ||||
* | all: update license headers to distiguish GPL/LGPL | Felix Lange | 2015-07-23 | 1 | -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". | ||||
* | eth/downloader: drop peer if advertised TD but won't delvier | Péter Szilágyi | 2015-07-09 | 1 | -99/+36 |
| | |||||
* | all: update license information | Felix Lange | 2015-07-07 | 1 | -0/+16 |
| | |||||
* | eth/downloader: fix a rare test race on the OSX CI | Péter Szilágyi | 2015-07-03 | 1 | -1/+7 |
| | |||||
* | eth, eth/downloader: transition to eth 61 | Péter Szilágyi | 2015-07-01 | 1 | -37/+200 |
| | |||||
* | eth, eth/downloader: pass the eth protocol version through | Péter Szilágyi | 2015-07-01 | 1 | -32/+38 |
| | |||||
* | eth/downloader, eth/fetcher: use core.GenerateChain in tests | Felix Lange | 2015-06-30 | 1 | -156/+97 |
| | | | | | | TestMadeupParentBlockChainAttack has been deleted because it was too hard to port and the attack that it checks the prevention of is being averted in a different way (through a protocol change). | ||||
* | core/types: make blocks immutable | Felix Lange | 2015-06-30 | 1 | -1/+4 |
| | |||||
* | eth/fetcher: fix timer reset bug, add initial tests | Péter Szilágyi | 2015-06-18 | 1 | -3/+5 |
| | |||||
* | eth/downloader: extend slow test to fix even slower CI server... | Péter Szilágyi | 2015-06-18 | 1 | -1/+1 |
| | |||||
* | eth/downloader: always reenter processing if not exiting | Péter Szilágyi | 2015-06-18 | 1 | -16/+15 |
| | |||||
* | eth, eth/downloader: fix processing interrupt caused by temp cancel | Péter Szilágyi | 2015-06-18 | 1 | -2/+2 |
| | |||||
* | eth/downloader: fix #1280, overlapping (good/bad) delivery hang | Péter Szilágyi | 2015-06-17 | 1 | -0/+34 |
| | |||||
* | eth, eth/downloader: do async block fetches, add dl tests | Péter Szilágyi | 2015-06-15 | 1 | -3/+45 |
| | |||||
* | eth/downloader: sanity test for multi peer syncs | Péter Szilágyi | 2015-06-15 | 1 | -0/+31 |
| | |||||
* | eth, eth/downloader: move block processing into the downlaoder | Péter Szilágyi | 2015-06-15 | 1 | -122/+130 |
| | |||||
* | eth/downloader: add valid peer during attacks (check interference) | Péter Szilágyi | 2015-06-15 | 1 | -93/+140 |
| | |||||
* | eth/downloader: instreument and test the sync peer drop | Péter Szilágyi | 2015-06-15 | 1 | -4/+57 |
| | |||||
* | eth/downloader: support individual peers in the test suite | Péter Szilágyi | 2015-06-15 | 1 | -112/+113 |
| | |||||
* | eth/downloader: remove uneeded testing functions | Péter Szilágyi | 2015-06-15 | 1 | -7/+2 |
| | |||||
* | eth, eth/downloader: move peer removal into downloader | Péter Szilágyi | 2015-06-15 | 1 | -16/+16 |
| | |||||
* | eth/downloader: test registration rejection on head ban | Péter Szilágyi | 2015-06-08 | 1 | -2/+10 |
| | |||||
* | eth/downloader: cap the hash ban set, add test for it | Péter Szilágyi | 2015-06-08 | 1 | -0/+43 |
| | |||||
* | eth/downloader: fix throttling test to be less timing dependent | Péter Szilágyi | 2015-06-08 | 1 | -3/+7 |
| | |||||
* | eth/downloader: preallocate the block cache | Péter Szilágyi | 2015-06-08 | 1 | -1/+1 |
| | |||||
* | eth/downloader: update test for shitty travis | Péter Szilágyi | 2015-06-08 | 1 | -1/+1 |
| | |||||
* | eth/downloader: accumulating hash bans for reconnecting attackers | Péter Szilágyi | 2015-06-08 | 1 | -0/+35 |
| | |||||
* | eth/downloader: clean up tests and unused variables | Péter Szilágyi | 2015-06-08 | 1 | -114/+75 |
| | |||||
* | eth/downloader: add a basic block download congestion control | Péter Szilágyi | 2015-06-03 | 1 | -11/+11 |
| | |||||
* | eth, eth/downloader: surface downloaded block origin, drop on error | Péter Szilágyi | 2015-05-26 | 1 | -4/+4 |
| | |||||
* | Merge pull request #1064 from karalabe/downloader-attacks | Jeffrey Wilcke | 2015-05-22 | 1 | -2/+59 |
|\ | | | | | Fix two additional download vulnerabilities | ||||
| * | eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K | Péter Szilágyi | 2015-05-21 | 1 | -1/+1 |
| | | |||||
| * | eth/downloader: circumvent a forged block chain with known parent attack | Péter Szilágyi | 2015-05-21 | 1 | -1/+35 |
| | | |||||
| * | eth/downloader: prevent a peer from dripping bad hashes | Péter Szilágyi | 2015-05-21 | 1 | -1/+24 |
| | | |||||
* | | eth/downloader: fix test to it doesn't time out on a slow machine | Péter Szilágyi | 2015-05-20 | 1 | -1/+1 |
|/ | |||||
* | eth/downloader: fix #992, where tests may time out on a slow machine | Péter Szilágyi | 2015-05-16 | 1 | -0/+6 |
| | |||||
* | eth/downloader: circumvent a fake blockchain attack | Péter Szilágyi | 2015-05-15 | 1 | -15/+49 |
| | |||||
* | eth, eth/downloader: detect and handle madeup hash attacks | Péter Szilágyi | 2015-05-15 | 1 | -6/+39 |
| | |||||
* | eth/downloader: circumvent hash reordering attacks | Péter Szilágyi | 2015-05-15 | 1 | -28/+62 |
| | |||||
* | eth/downloader: check sync after failed attacks | Péter Szilágyi | 2015-05-15 | 1 | -6/+18 |
| | |||||
* | eth/downloader: add a test for detecting missing blocks | Péter Szilágyi | 2015-05-15 | 1 | -5/+23 |
| | |||||
* | eth, eth/downloader: prevent hash repeater attack | Péter Szilágyi | 2015-05-15 | 1 | -0/+29 |
| | |||||
* | eth/downloader: fixed test | obscuren | 2015-05-15 | 1 | -1/+3 |
| | |||||
* | eth/downloader: add a small additional check to the test | Péter Szilágyi | 2015-05-14 | 1 | -0/+3 |
| | |||||
* | eth, eth/downloader: remove parent verification from the downlaoder | Péter Szilágyi | 2015-05-14 | 1 | -17/+9 |
| | |||||
* | eth, eth/downloader: handle a potential unknown parent attack | Péter Szilágyi | 2015-05-14 | 1 | -17/+83 |
| | |||||
* | eth/downloader: fix active peer shadowing, polish func names | Péter Szilágyi | 2015-05-13 | 1 | -4/+4 |
| | |||||
* | eth/downloader: fix #910, thread safe peers & polishes | Péter Szilágyi | 2015-05-11 | 1 | -1/+2 |
| | |||||
* | eth: added a cancel method for the downloader | obscuren | 2015-05-10 | 1 | -0/+43 |
| | | | | | | | | | Added a cancel method to the downloader which gracefully shuts down any active syncing process (hash fetching or block downloading) and resets the queue and remove any pending blocks. Issue with the downloader which would stall because of an active ongoing process when an invalid block was found. | ||||
* | eth, eth/downloader: handle sync errors a bit more gracefully | Péter Szilágyi | 2015-05-08 | 1 | -3/+3 |
| | |||||
* | eth, eth/downloader: make synchronize thread safe | Péter Szilágyi | 2015-05-08 | 1 | -1/+1 |
| | |||||
* | eth/downloader: fix priority queue reset, add throttling test | Péter Szilágyi | 2015-05-07 | 1 | -0/+48 |
| | |||||
* | eth/downloader: prioritize block fetch based on chain position, cap memory use | Péter Szilágyi | 2015-05-07 | 1 | -2/+2 |
| | |||||
* | downloader: hash downloading recovery | obscuren | 2015-05-03 | 1 | -10/+17 |
| | | | | | | If a peer fails to respond (disconnect, etc) during hash downloading switch to a different peer which has it's current_hash in the queue's peer set. | ||||
* | eth/downloader: added additional tests | obscuren | 2015-05-03 | 1 | -4/+11 |
| | |||||
* | eth, eth/downloader: Moved block processing & graceful shutdown | obscuren | 2015-05-01 | 1 | -20/+35 |
| | | | | | | | The downloader is no longer responsible for processing blocks. The eth-protocol handler now takes care of this instead. Added graceful shutdown during block processing. Closes #846 | ||||
* | core: fixed tetst to reflect (int, error) return by insertChain | obscuren | 2015-04-29 | 1 | -2/+2 |
| | |||||
* | eth/downloader: fixed tests | obscuren | 2015-04-24 | 1 | -12/+8 |
| | |||||
* | eth, eth/downloader: don't require td on downloader. Fixed tests | obscuren | 2015-04-24 | 1 | -17/+17 |
| | |||||
* | downloader: fixed tests with low ttl | obscuren | 2015-04-19 | 1 | -0/+1 |
| | |||||
* | downloader: moved chunk ignoring. Fixes issue with catching up | obscuren | 2015-04-19 | 1 | -2/+4 |
| | |||||
* | downloader: added missing blocks catchup functionality | obscuren | 2015-04-13 | 1 | -5/+32 |
| | | | | | When a parent is missing in the block list an attempt should be made to fetch the missing parent and grandparents. | ||||
* | downloader: implemented new downloader | obscuren | 2015-04-12 | 1 | -0/+128 |