* [slash] Remove dead interface, associated piping
* [slash] Expand out structs
* [consensus] Write to a chan when find a case of double-signing, remove dead code
* [slash] Broadcast the noticing of a double signing
* [rawdb] CRUD for slashing candidates
* [slashing][node][proto] Broadcast the slash record after receive from consensus, handle received proto message, persist in off-chain db while pending
* [slash][node][propose-block] Add verified slashes proposed into the header in block proposal
* [slash][shard] Factor out external validator as method on shard state, add double-signature field
* [slash][engine] Apply slash, name boolean expression for sorts, use stable sort
* [slash] Abstract Ballot results so keep track of both pre and post double sign event
* [slash] Fix type errors on test code
* [slash] Read from correct rawdb
* [slash] Add epoch based guards in CRUD of slashing
* [slash] Write to correct cache for slashing candidates
* [shard] Use explicit named type of BLS Signature, use convention
* [slash] Fix mistake done in refactor, improper header used. Factor out fromSlice to set
* [slash][node] Restore newblock to master, try again minimial change
* [cx-receipts] Break up one-liner, use SliceStable, not Slice
* [network] Finish refactor that makes network message headers once
* [network] Simplify creation further of headers write
* [slash] Adjust data structure of slash after offline discussion with RJ, Chao
* [slash] Still did need signature of the double signature
* [consensus] Prepare message does not have block header
* [consensus] Soft reset three files to 968517d~1
* [consensus] Begin factor consensus network intended message out with prepare first
* [consensus] Factor out Prepared message
* [consensus] Factor out announce message creation
* [consensus] Committed Message, branch on verify sender key for clearer log
* [consensus] Committed Message Factor out
* [consensus] Do jenkins MVP of signatures adjustment
* [main][slash] Provide YAML config as webhook config for double sign event
* [consensus] Adjust signatures, whitespace, lessen GC pressure
* [consensus] Remove dead code
* [consensus] Factor out commit overloaded message, give commit payload override in construct
* [consensus] Fix travis tests
* [consensus] Provide block bytes in SubmitVote(quorum.Commit)
* [consensus] Factor out noisy sanity checks in BFT, move existing commit check earlier as was before
* [quorum] Adjust signatures in quorum
* [staking] Adjust after merge from master
* [consensus] Finish refactor of consensus
* [node] Fix import
* [consensus] Fix travis
* [consensus] Use origin/master copy of block, fix mistake of pointer to empty byte
* [consensus] Less verbose bools
* [consensus] Remove unused trailing mutation hook in message construct
* [consensus] Address some TODOs on err, comment out double sign
* add retries to process state sync where failed peer config is excluded on the next try
* Updated per @fxfactorial 's review comments.
* use anonymous function as a callback for iteration
When block verification fails during syncing, the last 99 blocks are to
be rolled back. Originally we called bc.Rollback() once for each block
being rolled back; a change introduced in e75b4a4 tried to batch this by
calling bc.Rollback() once with 99 hashes, but the hash list
construction had a bug which caused the same tip hash to be added 99
times, instead of the last 99 hashes.
Revert to the old logic, which at least functions correctly, albeit
slower than batched rollback.
Previously, networkinfo used a global context was being used with a
3-minute timeout. This caused all networkinfo discovery/advertisement
activities to stop working 3 minutes after the node startup.
Fix this by eliminating the global 3-minute context and making its
consumers use locally created contexts:
* New uses a context that does not time out;
* Init uses a context that times out in 3 minutes;
* DoService (the service “body”) uses a context that does not time out;
* findPeers accept a context from its caller, DoService.
* [committee] Move core.ShardingSchedule to shard.Schedule
* [consensus] Remove redundant PublicKeys field of Consensus as Decider maintains that
* [committee] Use committee package to pick PublicKeys
* [committee] Use committee inplace of CalculateShardState
* [committee] Remove core/resharding.go, complete usage of committee as implementation replacement
* [committee] Address PR comments
this is solve the problem of validators in different network connected
with each others.
* mainet is still using the original harmony prefix to keep backward
compatibility
* pangaea uses "pangaea" as network prefix
* testnet uses "testnet" as network prefix
All nodes in Pangaea and Testnet need to restart to re-connect with each
other. Mainnet nodes have no changes.
Signed-off-by: Leo Chen <leo@harmony.one>