Commit graph

251 commits

Author SHA1 Message Date
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
atvanguard
1651575805 remove page param 2020-05-20 14:15:41 +05:30
atvanguard
2675dc59e9 fetch state events with from_id/to_time 2020-05-20 13:43:40 +05:30
atvanguard
2526aa8530 wip 2020-05-20 10:08:30 +05:30
atvanguard
200472dfdc update bytecode in genesis 2020-05-20 08:54:46 +05:30
atvanguard
3236e423d2 dont return a pointer from LastStateSyncTime 2020-05-19 21:42:32 +05:30
Arpit Agarwal
89248d7116
Update consensus/bor/bor.go
Co-authored-by: Jaynti Kanani <jdkanani@gmail.com>
2020-05-19 21:34:35 +05:30
atvanguard
742c2104af alter the fetch logic a bit 2020-05-19 21:16:37 +05:30
atvanguard
fa52ce61f7 sort state events acc to id 2020-05-19 12:05:29 +05:30
atvanguard
ba70b74fb7 fetch events from [lastSync, (block-sprint).Time) 2020-05-19 09:47:54 +05:30
atvanguard
0e8b5ca4b7 minor: separate path, query params with FetchWithRetry 2020-05-18 23:36:16 +05:30
atvanguard
8f47b3945e test: Handle 204 and add test for new deposit mechanism 2020-05-18 19:26:42 +05:30
atvanguard
fa0266a347 merge develop into mew-deposits 2020-05-18 18:51:29 +05:30
atvanguard
bda638d974 Merge branch 'develop' into mew-deposits 2020-05-18 11:03:13 +05:30
Jaynti Kanani
c5a015a8a4 fix: make data fetch more robust 2020-05-18 11:02:43 +05:30
atvanguard
8dea9114e8 dev: update changes in StateReceiver contract 2020-05-17 17:44:44 +05:30
atvanguard
9a56de6d84 dev: cleanup isValidatorAction logic 2020-05-17 17:33:59 +05:30
atvanguard
4be5477f64 dev: cleanup comments 2020-05-17 17:28:55 +05:30
atvanguard
868dc81c8a new: New fetch State sync logic 2020-05-17 17:24:09 +05:30
atvanguard
71c3bf757c refactor: Tests + add test for OutOfTurnSign 2020-05-14 16:28:45 +05:30
atvanguard
c27b8b7801 new: Add wiggle to block time 2020-05-14 16:28:45 +05:30
atvanguard
9f6df9ade0 dev: Remove concurrent seal check 2020-05-13 20:11:13 +05:30
Arpit Agarwal
0f8d3b1006
fix: Check validator bytes at first block of sprint (MAT-1311) (#56)
* Check validator bytes at first block of sprint

* not required to get parent again

* fix tests

* fix build error
2020-05-13 14:08:21 +05:30
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
Arpit Agarwal
d1ea515af1
chg: Cancel active sealing op when a new chain segment is received (MAT-1116) (#54)
* dev: Fix out-of-turn signing log statement

* dev: Cancel active sealing op when a new chain segment is received

* remove debug statement and return value

* minor: no need to use a channel

* Fix race condition in shouldSeal channel

* Info -> Debug statement
2020-05-11 17:00:33 +05:30
atvanguard
67c29d7ce3 chg: Add GetRootHash to ethClient / use uint64 2020-05-07 20:17:15 +05:30
atvanguard
50c0b662cf Remove once.do 2020-05-06 17:14:53 +05:30
atvanguard
54bbdff1e4 Initialize apiCache in once.do 2020-05-06 16:35:12 +05:30
atvanguard
bbe6522f35 new: Add GetRootHash to api backend 2020-05-05 14:45:56 +05:30
atvanguard
5bd72779d5 new: Add GetRootHash bor api method 2020-05-05 09:45:57 +05:30
atvanguard
f02da00855 chg: dev: errMismatchingSprintValidators 2020-04-29 10:55:27 +05:30
atvanguard
7e4e2b722c test: Add tests for GetSignerSuccessionNumber 2020-04-28 11:01:37 +05:30
atvanguard
52dbf54808 refactor: Fix minor issues from audit (2.36/37/40/41) 2020-04-27 08:57:03 +05:30
atvanguard
54609b6168 refactor: Bubble up error in updateTotalVotingPower instead of panic (2.29) 2020-04-27 08:56:55 +05:30
atvanguard
18266b0d7a minor: Throw error if proposer/signer are not in the validator set (2.28) 2020-04-22 12:42:03 +05:30
atvanguard
bfab1d932d dev: rename CompareProposerPriority to Cmp, add nil check (2.27) 2020-04-21 11:31:45 +05:30
atvanguard
48d6d76d18 minor: Remove the redundant validator.Bytes() func, fix comments (2.26) 2020-04-21 10:29:59 +05:30
atvanguard
b00299ca13 fix: Validator list could be invalid making the node crash (2.13) 2020-04-21 09:50:44 +05:30
atvanguard
122a2304db minor: Run gofmt -w . 2020-04-20 20:34:58 +05:30
Arpit Agarwal
d8c07f302a
fix: Check block delay in verifyHeaders / remove empty chainId check (MAT-1080, MAT-1089) (#49)
* fix: Check block delay in verifyHeaders

* Pull block time check out of if condition

* fix: Always check chainId equality in heimdall response
2020-04-20 11:53:05 +05:30
Arpit Agarwal
4401581ef1
dev: Provide Heimdall URL as flag instead of in genesis (#46) 2020-04-07 10:56:29 +05:30
Arpit Agarwal
7183e217c0
fix: ethClient.SubscribeNewDeposit should accept StateData channel (#44)
* ethClient.SubscribeNewDeposit should accept StateData channel

* remove redundant function

* Fix compilation error
2020-04-06 11:40:14 +05:30
Sayli Patil
260243cf88
MAT-865: Add subscribe deposit event filter (#21)
* add eth_depositById rpc method

* add sample depositById test

* change ethereum to bor

* add subscription for new deposit data

* create channel to listen new state change

* push state data to subcribed channel

* apply filter on deposit events sub

* remove unused methods

* Fix: no filter

* Remove unused method

* revert changes

* Fix: RPC port

* refactor and cleanup

* Fix: SubscribeStateEvent

* remove unused import

* Resolve comments

Co-authored-by: Arpit Agarwal <93arpit@gmail.com>
2020-04-06 09:52:21 +05:30
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
Jaynti Kanani
ae82c4cd37
fix polluted path and check data length for validation action 2020-03-25 18:41:16 +05:30
Jaynti Kanani
1a360aeb9e
fix build once and for all + go mod tidy 2020-03-20 19:09:19 +05:30
atvanguard
d56c75d90a Test isValidatorAction after span changes 2020-03-18 14:48:57 +05:30
atvanguard
2ea69833dd Cleanup debug statements 2020-03-18 14:48:57 +05:30
atvanguard
e6de60b80e TestCommitSpan finally works 2020-03-18 14:48:57 +05:30
atvanguard
2d0b9ea63d try to use same statedb 2020-03-18 14:48:57 +05:30
atvanguard
9dd4e4b0f9 Refactor HeimdallClient + commitSpan test 🚧 2020-03-18 14:48:57 +05:30
atvanguard
57ccdb5482 Revert unintended changes 2020-03-18 14:48:57 +05:30
atvanguard
f7e58d6030 Test for IsValidatorAction 2020-03-18 14:48:57 +05:30
atvanguard
1d5b263362 WIP 2020-03-18 14:48:57 +05:30
atvanguard
a3e01638a4 Test isValidatorAction 🚧 2020-03-18 14:48:57 +05:30
atvanguard
27fc66ef24 Add bor.isValidatorAction and call it while validating underpriced tx 2020-03-18 14:48:57 +05:30
atvanguard
5f96b06add Send key while logging error msg 2020-03-06 16:00:04 +05:30
Jaynti Kanani
14ffde834c
Merge pull request #20 from maticnetwork/develop
Develop
2020-02-17 19:52:49 +05:30
atvanguard
04f5abcc13 Expose API methods 2020-02-17 18:56:23 +05:30
atvanguard
4037b09968 Add GetCurrentProposer API call 🚧 2020-02-17 11:32:15 +05:30
Jaynti Kanani
cfac491edb
check bor chain id for commit span and state 2020-02-15 15:36:53 +05:30
Jaynti Kanani
b343bd10c6
fix log for retry 2020-02-10 19:30:09 +05:30
Jaynti Kanani
e36fb38183
remove unwanted comments 2020-02-08 02:48:02 +05:30
Guillaume Ballet
c49a4165d0 consensus/ethash: fix a typo and error message (#20503) 2020-01-07 18:19:21 +01:00
Jaynti Kanani
36ff50845e
use hex encoding for record bytes 2020-01-01 17:12:34 +05:30
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
Jaynti Kanani
bd9cd503a1
fix merge conflict 2019-12-04 22:28:21 +05:30
vaibhavchellani
039c932fc7 removed conflicts 2019-12-04 18:29:51 +05:30
vaibhavchellani
088b57ebea removed fmt log from snapshot 2019-12-04 14:21:12 +05:30
vaibhavchellani
783d094a28 log usage standardised 2019-12-04 14:18:25 +05:30
Jaynti Kanani
2f0b5ce143
increase backup limit 2019-12-03 22:55:30 +05:30
Jaynti Kanani
29e8a42df6
verify before validator set change at sprint end 2019-12-03 18:50:30 +05:30
Jaynti Kanani
4b452d8a3a
retry span and states in bor 2019-12-03 16:47:28 +05:30
Felix Lange
a91b704b01
consensus/ethash: refactor remote sealer (#20335)
The original idea behind this change was to remove a use of the
deprecated CancelRequest method. Simply removing it would've been an
option, but I couldn't resist and did a bit of a refactoring instead.

All remote sealing code was contained in a single giant function. Remote
sealing is now extracted into its own object, remoteSealer.
2019-11-28 10:51:57 +01:00
Felix Lange
c5c5e0dbe8
consensus/clique: fix struct tags for status API (#20316)
Also unexport the status struct.
2019-11-18 18:14:59 +01:00
Martin Holst Swende
3f4a875bf6 consensus/clique: add clique_status API method (#20103)
This PR introduces clique_status which gives info about the health of
the clique network.

It's currently a bit PITA to find out how a clique network is
performing, and it can easily happen that sealers drop off -- and
everything is 'fine' until one more signer drops off, and the network
suddenly halts.

The new method provides the following stats:

- Which signers are currently active, and have signed blocks in the last
  N (set to 64) blocks?
- How many blocks has each signer signed?
- What is the difficulty in the last N blocks, compared to the
  theoretical maximum?
2019-11-18 17:03:57 +01:00
Jaynti Kanani
0f172fd0eb
change package name 2019-11-12 13:17:12 -05:00
Guillaume Ballet
de2259d27c travis: enable test suite on ARM64 (#20219)
* travis: Enable ARM support

* Include fixes from 20039

* Add a trace to debug the invalid lookup issue

* Try increasing the timeout to see if the arm test passes

* Investigate the resolver issue

* Increase arm64 timeout for clique test

* increase timeout in tests for arm64

* Only test the failing tests

* Review feedback: don't export epsilon

* Remove investigation tricks+include fjl's feeback

* Revert the retry ahead of using the mock resolver

* Fix rebase errors
2019-11-08 10:58:57 +02:00
Jaynti Kanani
dc16740906
fix errors and refactoring 2019-11-05 12:12:10 +05:30
Guillaume Ballet
72617a0742 consensus: fix possessives in comments. (#20209) 2019-10-28 09:57:34 +02:00
Jaynti Kanani
0d86eed2c3
add method to commit states 2019-10-27 01:50:57 +05:30
Jaynti Kanani
a4d92f8e30
span sync done right 2019-10-25 20:11:07 +05:30
Jaynti Kanani
521e7e295a
commit span WIP 2019-10-25 15:02:04 +05:30
Jaynti Kanani
26ce6db06d
WIP span sync 2019-10-24 13:07:50 +05:30
Jaynti Kanani
dae44a2a9c
add more logs 2019-09-26 14:42:33 +05:30
Jaynti Kanani
374e438f42
use wiggle as 2*period 2019-09-26 13:54:12 +05:30
Jaynti Kanani
6cc7e88e94
remove log 2019-09-26 12:49:35 +05:30
Jaynti Kanani
48c0745964
fix :) 2019-09-25 19:16:36 +05:30
venkatesh mankena
0edf50b540 initial span size condition change 2019-09-20 17:54:01 +05:30
venkatesh mankena
ee77e5bd0f removing unwanted logs 2019-09-20 17:51:21 +05:30
venkatesh mankena
ad215df33b fix first_end_block 2019-09-20 17:33:59 +05:30
venkatesh mankena
a4be27641a udpated bor.go to fetch firstEndBlock 2019-09-20 14:39:09 +05:30
Jaynti Kanani
3e8e4dfe88
bor changes 2019-09-04 19:20:28 +05:30
Felix Lange
54b271a86d
crypto: add SignatureLength constant and use it everywhere (#19996)
Original change by @jpeletier
2019-08-22 15:14:06 +02:00
Péter Szilágyi
1a83114c74
all: update author list and licenses 2019-07-22 12:17:27 +03:00
Jaynti Kanani
cc9b230fc0
merge release/1.9 2019-07-14 15:55:04 +05:30
Jaynti Kanani
73d080c125
fix difficulty 2019-06-26 15:08:02 +05:30