Rongjian Lan
819500aa70
cherrypick log level change
5 years ago
Rongjian Lan
ea2347fa5e
Cherrypick crosslink related fixes from t3 to master. ( #3045 )
...
* Optimize crosslink verification logic and add more cache (#3032 )
* make crosslink broadcast smarter and more efficient (#3036 )
* adjust catch up speed to be a sane number
* Fix crosslink broadcast condition (#3041 )
5 years ago
Rongjian Lan
2538a85f5c
add nil check on getHeader
5 years ago
Jacky Wang
9f6e09dce9
Code formatting fix based on `staticcheck` ( #3023 )
...
* fix some static check issues
* more fixes according to staticcheck
5 years ago
Rongjian Lan
32dfea43a5
Make leader commit m1payload itself ( #2997 )
...
* Make leader commit m1payload itself
* remove test code
5 years ago
Rongjian Lan
1dad435291
fix crash on parsed block ( #2993 )
5 years ago
Rongjian Lan
3a32fedb1d
Fix commit payload ( #2986 )
...
* Always use block data for commit payload
* remove the misleading consensus.epoch
* Fix lint and test
* Remove consensus.String(); fix slash test
5 years ago
Edgar Aroutiounian
c2f089f618
[node] Throttle acceptance of incoming messages ( #2970 )
...
* [node] Throttle acceptance of incoming messages
* [p2p] Add sampled logger
* [go.mod] Bump libs
* [p2p][node] More sampled logs
* [p2p] Disable auto relay, force public reachability, fix bandwidth reporter, enable NAT service
* [p2p] Turn off some options
* [node] Remove noisy and incorrect impl p2p log
* [node] Sample bump to 24 second
* [p2p] Remove linger of metric
* [consenus] Fix race condition
* [consensus] Race condition for grace period
* [node] Less noisy closure
* [node] Less noisy closure
* [node] Bump context timeout on message, explicit cancel of context
* [node] Cost back to 1 when reach threshold back of being fine
* [node] Sync race condition
* [node] toStart buf chan 1
* [p2p] Turn options on again
* [node][p2p] Lower throttle point for test, remove noisy log, make time delay throttle small
* [consensus] Fix nil pointer
* [node] Remove noisy log, increase infrequency of Burst topic log
* [blockchain] Nil pointer check
* [node] Fix threshold, lessen log
* [node] Bump throttle
* [node] Nil to verify new block
* [node] Keep threshold at half
5 years ago
Rongjian Lan
7c292f64be
Fix viewID issue on prepared block during view change ( #2972 )
...
* Fix viewID issue on prepared block during view change
* Add more checks and remove comments
* Fix lint
* update rlp encode pointer
* Revert go gen changes
* add go gen code
* [api] Fix proto to pass travis
Co-authored-by: Edgar Aroutiounian <edgar.factorial@gmail.com>
5 years ago
Rongjian Lan
211ed79888
Avoid duplicate bls as harmony nodes; Fix epoch gap issue ( #2964 )
5 years ago
Ganesha Upadhyaya
78eee0962d
don't sign the block that is not verified ( #2929 )
...
* don't sign the block that is not verified
* need to skip genesis block otherwise mode will be switched to syncing
5 years ago
Ganesha Upadhyaya
3d0f5c1f34
fix super-committee total-raw-staked bug ( #2932 )
5 years ago
Rongjian Lan
2ccc20be2b
Fix slash verify to avoid potential duplicate slashes exploit ( #2914 )
...
* Remove timestamp in slash record
* Fix potential exploits of reporting duplicate slashes
* fix import
* dedup swapped votes
5 years ago
Edgar Aroutiounian
d4b8c11a8c
Add raw stake and median to super committee ( #2880 )
...
* [rpc][votepower] Add hack
* [consensus] Use hack, change from one addr to bls key
* update super committee rpc to add rawstake and median to output
* only retrieve total delegation once
* better name
* nil pointer check
Co-authored-by: Ganesha Upadhyaya <ganeshrvce@gmail.com>
5 years ago
Daniel Van Der Maden
451d16c14d
Add viewID to block signed content ( #2877 )
...
* [consensus] Add ConstructCommitPayload for consensus signatures
* [internal/engine] verify consensus sigs on hash+blockNum+viewID
* [consensus] Add ConstructCommitPayload for consensus signatures
* [internal/engine] verify consensus sigs on hash+blockNum+viewID
* [consensus] verify consensus sigs on hash+blockNum+viewID
* [node] verify consensus sigs for explorer on hash+blockNum+viewID
* [crosslink] Add viewID & tie break by viewID last on sort
* [api] Update crosslink constructor for viewID addition
* [staking] Verify consensus sigs on hash+blockNum+viewID
* [slash] update tests
* [engine] Fix VerifyHeaderWithSignature commit signature payload
* [crosslink] Make NewCrossLink return a pointer to CrossLink
* [node] update ConstructCrossLinkMessage to reflect NewCrossLink change
* [debug] Remove debugging logs
5 years ago
Rongjian Lan
3808f5317b
Make commit sig committed along with the block ( #2875 )
...
* Make commit sig committed along with the block
* Fix type len check
5 years ago
Ganesha Upadhyaya
d9045590ef
[consensus][view-change] onViewChange set keys and add signatures for all keys in case of multi-key new leader ( #2826 )
5 years ago
Ganesha Upadhyaya
9d54a638f2
Revert "[consensus][viewchange] fix total power of signers in IsQuorumAchieved for view change" ( #2823 )
...
This reverts commit 3fd5ea170b
.
5 years ago
Edgar Aroutiounian
2afd8a54c4
[p2p] Throttle receive with constant cost function ( #2819 )
...
* [node] Unused package level big.Int
* [p2p] Throttle receives to a max of 100
* [project] Remove msgq
* [node][p2p] Only allow 100 max message handling at time
* [node][p2p] Throttle max message handler with Weighted Semaphore - init w/ uniform weight
* [node] Use go routine for passing handled block
* [p2p] Leftover commented out
* [node] Add log for when cannot pay semaphore cost
* [node] Bump max message handlers
* [internal] Remove file_embed
* [project] Remove unused file, unused function
* [consensus] Unused values
* [config] Unused field & function
* [internal] Unused address & hash
* [project] More unused tests, values, types
* [project] Move conn logger just to bootnode
* [rpc] Remove dead functions
* [internal] More unused functions
* [project] Remove dead keystore dir package
* [p2p] Need lock to grab all Topics
* [node] Force side effect of topic join, give each topic own weighted semaphore
5 years ago
Edgar Aroutiounian
82b71619d2
[node] Redundant field removed - dead files & scripts , update deprecated libp2p package names, fold p2p code ( #2817 )
...
* [project] Remove unused test script
* [project] Remove stale testplan
* [project] Remove stale test configs
* [internal] Unused code
* [node] Remove redundnat peer count field
* [p2p] Remove leftover idea code, fix deprecated warnings
* [project] Remove .gitmodule
* [internal] Fix travis, update deprecated package usage
* [node] Remove ineffective test
* [p2p] Update deprecated package names & func usage
* [p2p] Make error explicit, remove unidiomatic return signature
* [p2p] Remove dead code, lower max p2p message size max limit
* [project][p2p] Remove dead p2p code, fold all p2p code into one file
* [p2p] Remove unsed function parameter
* [node] Add log in bootstrap
* [node] Unnecessary pointer usage
* [p2p] Unused errors.go
* [node] Log out when next consensus check in bootstrap
5 years ago
Rongjian Lan
e9e1a37cc7
Remove elected validator list and make sure validator list addrs are unique ( #2806 )
...
* Try all messages on committed msg
* Remove elected validator list and make sure validator list is unique
5 years ago
Rongjian Lan
f8922a957f
Try all messages on committed msg ( #2804 )
5 years ago
Ganesha Upadhyaya
4524e1b7ba
[node] move self address to node, make it updatable every epoch ( #2799 )
...
* [node] move self address to node, make it updatable every epoch
* golint issues
* making thread-safe, better naming, handling nil cases better
* golint
* correct locking, return on nil
5 years ago
Jong Hyuck Won
a37074c7d3
Updating all sources of block.Transactions and do the corresponding work for block staking txns ( #2655 )
...
* Updating all sources of block.Transactions and do the corresponding work for block staking txns
* remove usages of uncle in accessors_chain_test
* fix bug in core/blockchain.go where incorrect receipt data was generated in SetReceiptsData
5 years ago
Edgar Aroutiounian
2836f0f620
[project] Remove over complicated packages, useless tests, dead functions ( #2780 )
...
* [project] Dead test
* [node] If fields always same, then just use the constant
* [project] Remove overcomplicated ctxerror
* [project] Remove more dead tests, adjust error replacing ctxerror
* [project] More dead tests, fix travis complaint on Errorf
* [node.sh] Remove is-genesis
5 years ago
Ganesha Upadhyaya
7178eabbf1
rejecting malformed messages before processing ( #2776 )
...
handling malformed messages locally
minor
5 years ago
Edgar Aroutiounian
a1c8156afc
[project] Endless tech debt ( #2777 )
...
* [internal] Remove dead RPC/wallet
* [rpc] Reduce API surface area for dead RPC
* [node] Remove dead flags, unused setters
* [project] Unused logger, too many loggers
* [core] staticcheck fixes, remove unused db keys
* [project] More dead code through, now in param and genesis
* [internal] Useless test
5 years ago
Rongjian Lan
e484b556ae
optimize leader signature collection strategy; Clean up logs ( #2775 )
...
* Clean up logs
* remove log
* Refactor block period logic; wait for 100% sig before timeout
* logic fixes
* optimize now init
* always wait for 2s for grace period
5 years ago
Edgar Aroutiounian
520332931b
[proto] Undo protobuf change, annotate with deprecated ( #2773 )
...
* [consensus] staticcheck fixes
* [proto] Remove unused file
* [proto] Undo changes to proto, annotate fields with deprecated for future reference
* [api] Make entire dir as was a7b7961~1
* [api] Remove dead tests
* [proto] Add deprecate tags
* [api] Autogen update since add deprecation tags, it just generated comments
* [api] Remove manager test again
* [api] Remove dead functions
* [api] Whitespace
* [api] Whitespace
* [api] Whitespace
* [p2p] Remove noisy log
5 years ago
Rongjian Lan
70a4272fa3
fix block proposal ordering; other offchain commits change ( #2761 )
...
* fix block proposal ordering; other offchain commits change
* remove div by 0 checks
* Fix imports
5 years ago
Ganesha Upadhyaya
054c3cbb8e
[consensus][viewchange] fix total power of signers in IsQuorumAchieved for view change ( #2758 )
5 years ago
Edgar Aroutiounian
45135b21d6
[project] Remove unused internal memprofiling, profiling, metrics service ( #2679 )
...
* [project] Remove unused internal memprofiling, profiling
* [internal] Unused attack package
* [internal] More dead metrics related code
5 years ago
Edgar Aroutiounian
551513c74f
[reward][rpc] Extend ValidatorStats with earning per key, implement tracking rewards in payout, expose network wide ( #2656 )
...
* [reward] Implement tracking rewards for beacon & shardchain (via crosslinks)
* [reward][rpc] Track reward given out per key for validator stats, compose to expose in validator RPC
5 years ago
Edgar Aroutiounian
f8cbd880bb
[project] Bls -> BLS & remove dead Stake solidity contract ( #2652 )
5 years ago
Edgar Aroutiounian
26241bb9cf
[quorum] Expose external slot count for JSON of Decider ( #2642 )
5 years ago
Rongjian Lan
40ea951ab5
Return if potential double sign
5 years ago
Ganesha Upadhyaya
a3c511325f
moving delay out of loop
5 years ago
Ganesha Upadhyaya
1e03507f92
fixing minor things in view change
5 years ago
Rongjian Lan
0d07861c68
fix redundant var
5 years ago
Rongjian Lan
eb54d32e2c
refactor slashing code and fix audit todos
5 years ago
Rongjian Lan
be25f35810
fix peckshield audit issues on slashing
5 years ago
Rongjian Lan
ae19b26787
Fix comments on log/errors
5 years ago
Rongjian Lan
4e150779d3
Fix APR's nill header issue; Compute APR based on last epoch
5 years ago
Ganesha Upadhyaya
bc75a4687f
adding log to print out the current view id
...
adding additional check to make sure that current view id is not zero
reset the current.viewID to block height
5 years ago
Rongjian Lan
1b380383fa
Fix nil pointer error
5 years ago
Rongjian Lan
2cbb3fb2e1
Fix node sync issue which caused failure to sign and node being kicked out ( #2564 )
...
* Only rollup last crosslink for beacon chain
* Fix node sync'ing issue
* add more log
* Fix sync loop
* Remove prepared check during sync'ing
* update debug info
5 years ago
Edgar Aroutiounian
2962d3ea4a
[consensus] Remove now unnecessary log ( #2537 )
5 years ago
Rongjian Lan
22de132fd1
Add shard config for harmony/external voting power ( #2517 )
...
* Add shard config for harmony/external voting power
* remove fixe voting power
* fix import
5 years ago
Rongjian Lan
6953a1a7f8
fix import
5 years ago
Rongjian Lan
d3262998fc
remove fixe voting power
5 years ago