zjubfd
7a1262ca14
validator only write database state when enough distance ( #116 )
2021-03-19 13:42:26 +08:00
zjubfd
f8faf7faaa
[R4R]apply max commit tx time for miner worker ( #112 )
...
* apply max commit tx time for miner worker
* update to 200 ms
2021-03-19 13:23:44 +08:00
zjubfd
e55e9cdd76
change the fork waring to debug to avoid confusion ( #73 )
2021-02-09 11:49:53 +08:00
Guillaume Ballet
e74bd587f7
consensus: remove seal verification from the consensus engine interface ( #22274 )
2021-02-05 20:44:34 +02:00
ucwong
83e4c49e2b
trie : use trie.NewStackTrie instead of new(trie.Trie) ( #22246 )
...
The PR makes use of the stacktrie, which is is more lenient on resource consumption, than the regular trie, in cases where we only need it for DeriveSha
2021-02-02 13:09:23 +01:00
Martin Holst Swende
681618275c
core: speed up header import ( #21967 )
...
This PR implements the following modifications
- Don't shortcut check if block is present, thus avoid disk lookup
- Don't check hash ancestry in early-check (it's still done in parallel checker)
- Don't check time.Now for every single header
Charts and background info can be found here: https://github.com/holiman/headerimport/blob/main/README.md
With these changes, writing 1M headers goes down to from 80s to 62s.
2021-01-26 12:17:11 +01:00
Marius van der Wijden
2aaff0ad76
consensus/ethash: increase seal timeout for tests ( #22162 )
...
It seems that the 2 second timeout is not enough for Travis CI:
--- FAIL: TestTestMode (2.00s)
ethash_test.go:53: sealing result timeout
2021-01-13 11:44:20 +01:00
zjubfd
b605f1f913
Merge pull request #63 from binance-chain/secure_patch
...
[R4R] security patch from go-ethereum
2021-01-11 16:43:45 +08:00
fudongbai
24dc208170
avoid false warn log
2021-01-11 14:42:06 +08:00
fudongbai
60606d3919
support fork id in header; elegant upgrade
2021-01-11 13:54:35 +08:00
Slava Karpenko
2a79ac1622
consensus/ethash: use 64bit indexes for the DAG generation ( #21793 )
...
* Bit boundary fix for the DAG generation routine
* Fix unnecessary conversion warnings
Co-authored-by: Sergey Pavlov <spavlov@gmail.com >
2021-01-11 11:20:54 +08:00
Mr-Leshiy
c49aae9870
consensus: refactor FinalizeAndAssemble to use Finalize ( #21993 )
2020-12-11 15:49:44 +01:00
Martin Holst Swende
efe6dd2904
consensus/ethash: implement faster difficulty calculators ( #21976 )
...
This PR adds re-written difficulty calculators, which are based on uint256. It also adds a fuzzer + oss-fuzz integration for the new fuzzer. It does differential fuzzing between the new and old calculators.
Note: this PR does not actually enable the new calculators.
2020-12-11 11:06:44 +01:00
Alex Prut
810f9e057d
all: remove redundant conversions and import names ( #21903 )
2020-11-25 21:00:23 +01:00
Preston Van Loon
844485ec6a
consensus/ethash: fix usage of *reflect.SliceHeader ( #21372 )
...
* consensus/ethash: only use *reflect.SliceHeader, not reflect.SliceHeader. See comment here: https://github.com/golang/go/issues/40397\#issuecomment-663748689
* consensus/ethash: pr feedback from @mdempsky, makes a copy of dest such that is not mutated
* consensus/ethash: remove noop assign
* consensus/ethash: apply same fix to another location
Co-authored-by: Péter Szilágyi <peterke@gmail.com >
Co-authored-by: Martin Holst Swende <martin@swende.se >
2020-11-17 11:35:58 +02:00
Slava Karpenko
d990df909d
consensus/ethash: use 64bit indexes for the DAG generation ( #21793 )
...
* Bit boundary fix for the DAG generation routine
* Fix unnecessary conversion warnings
Co-authored-by: Sergey Pavlov <spavlov@gmail.com >
2020-11-11 21:13:12 +01:00
Martin Holst Swende
81ff700077
consensus/ethash: fix the percentage progress report
2020-11-09 11:56:29 +01:00
mr_franklin
94d1f5888a
consensus/clique: unexport calcDifficulty and improve comment ( #21619 )
2020-10-13 11:00:42 +02:00
mr_franklin
66c3eb2f1a
accouts, consensus, core: fix some comments ( #21617 )
2020-10-12 15:02:38 +02:00
Hyunsik Lee
cb1afd2b14
Hide some smart contract tracing logs from parlia consensus engine
2020-09-30 02:43:10 +09:00
Hyunsik Lee
7bd1c1f23d
Disable noisy log from consensus engine
2020-09-30 02:43:09 +09:00
gary rong
87c0ba9213
core, eth, les, trie: add a prefix to contract code ( #21080 )
2020-08-21 15:10:40 +03:00
Martin Holst Swende
493100ba4d
consensus/ethash: less lookups of block data
2020-08-21 13:55:39 +02:00
fudongbai
c399c88e08
fix not return error when blockTimeVerifyForRamanujanFork failed
2020-08-11 15:13:10 +08:00
fudongbai
4f431e0843
fix index out of range
2020-08-10 11:27:36 +08:00
fudongbai
c4f4377cfd
fix deplay check
2020-08-09 12:38:02 +08:00
HaoyangLiu
650d066757
resolve comment
2020-08-07 17:16:39 +08:00
zjubfd
a8c9e53eb0
enforce backoff time for out-turn validator ( #23 )
2020-08-07 17:06:29 +08:00
HaoyangLiu
8124e60e9d
resolve best practice advice
2020-08-04 13:56:13 +08:00
Robert Zaremba
37564ceda6
miner: refactor helper functions in worker.go ( #21044 )
...
This reduces complexity of some lengthy functions in worker.go,
making the code easier to read.
2020-07-28 18:16:49 +02:00
gary rong
28c5a8a54b
les: implement new les fetcher ( #20692 )
...
* cmd, consensus, eth, les: implement light fetcher
* les: address comment
* les: address comment
* les: address comments
* les: check td after delivery
* les: add linearExpiredValue for error counter
* les: fix import
* les: fix dead lock
* les: order announces by td
* les: encapsulate invalid counter
* les: address comment
* les: add more checks during the delivery
* les: fix log
* eth, les: fix lint
* eth/fetcher: address comment
2020-07-28 18:02:35 +03:00
gary rong
6eef141aef
les: historical data garbage collection ( #19570 )
...
This change introduces garbage collection for the light client. Historical
chain data is deleted periodically. If you want to disable the GC, use
the --light.nopruning flag.
2020-07-13 11:02:54 +02:00
zjubfd
f4816ee8b7
add chain id into sign bytes to avoid replay attack ( #18 )
2020-07-09 15:46:37 +08:00
zjubfd
6f46fc0589
allow slash failed ( #15 )
2020-06-30 20:22:57 +08:00
fudongbai
ef1e8746d6
add cross chain contract to system contract
2020-06-30 08:38:15 +00:00
fudongbai
6a19c9803c
remove redundant gaslimit check
2020-06-24 16:17:22 +08:00
fudongbai
4bd4469151
add gas limit check in parlia implement
2020-06-18 00:26:27 +08:00
zjubfd
e83397e26a
Merge pull request #4 from binance-chain/issue3
...
[R4R]fix validator failed to sync a block produced by itself, resolve #3
2020-06-15 17:16:35 +08:00
fudongbai
ed9b28fe7b
fix validator failed to sync a block produced by itself
2020-06-02 16:41:48 +08:00
sixdays
b2c59e297b
consensus/clique: make internal error private ( #21132 )
...
Co-authored-by: linjing <linjingjing@baidu.com >
2020-05-27 17:12:13 +03:00
meowsbits
befecc9fdf
consensus/ethash: fix flaky test by reading seal results ( #21085 )
2020-05-25 18:01:03 +02:00
yutianwu
25a661e0c2
consensus/clique: remove redundant pair of parentheses ( #21104 )
2020-05-25 12:00:18 +02:00
Martin Michlmayr
4f2784b38f
all: fix typos in comments ( #21118 )
2020-05-25 10:21:28 +02:00
fudongbai
4909842097
add gov init transaction
2020-05-22 10:38:14 +08:00
fudongbai
39c80ce175
more strick condition for system transaction
2020-05-22 10:21:57 +08:00
fudongbai
2ac4ae8395
add consensus engine Parlia implement
2020-05-20 12:19:24 +08:00
Martin Holst Swende
4535230059
cmd, core, eth: background transaction indexing ( #20302 )
...
* cmd, core, eth: init tx lookup in background
* core/rawdb: tiny log fixes to make it clearer what's happening
* core, eth: fix rebase errors
* core/rawdb: make reindexing less generic, but more optimal
* rlp: implement rlp list iterator
* core/rawdb: new implementation of tx indexing/unindex using generic tx iterator and hashing rlp-data
* core/rawdb, cmd/utils: fix review concerns
* cmd/utils: fix merge issue
* core/rawdb: add some log formatting polishes
Co-authored-by: rjl493456442 <garyrong0905@gmail.com >
Co-authored-by: Péter Szilágyi <peterke@gmail.com >
2020-05-11 18:58:43 +03:00
Hanjiang Yu
8f05cfa122
cmd, consensus: add option to disable mmap for DAG caches/datasets ( #20484 )
...
* cmd, consensus: add option to disable mmap for DAG caches/datasets
* consensus: add benchmarks for mmap with/with lock
2020-03-31 11:44:04 +03:00
Guillaume Ballet
c49a4165d0
consensus/ethash: fix a typo and error message ( #20503 )
2020-01-07 18:19:21 +01:00
Martin Holst Swende
bc01593afb
consensus/ethash, params: eip-2384: bump difficulty bomb ( #20347 )
...
* consensus/ethash, params: implement eip-2384: bump difficulty bomb
* params: EIP 2384 compat checks
* consensus, params: add Muir Glacier block number (mainnet,ropsten) + official name
* core/forkid: forkid tests for muir glacier
* params/config: address review concerns
* params, core/forkid: review nitpicks
* cmd/geth,eth,les: add override option for muir glacier
* params: nit fix
2019-12-06 11:36:40 +02:00