* [reward] Factor out interface for block-reward
* [reward] Use factored out block rewarder which is actually same object as quorum.Decider
* [quorum] Fix type error because of silly internal/common.Address vs common.Address of ethereum
* [testing] Somehow this port being in tandem with previously used one fixes a build timing issue
* [quorum] Factor out single vote & provide for staked quorum vote
* [quorum] Pass ShardID to decider via cb
* [quorum] Move ShardIDProvider higher, fix nil mistake
* [quorum] ReadAllSignatures optimization
* [quorum] Safer way to read over map, then to slice
* [quorum] Address PR comments - naming changes
* [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
* Revert "remove old design code"
This reverts commit 58448f6b23.
* fix revert conflicts
* change blspubkey type as 48 bytes for easily serialization
* WIP
* remove redelegate txType
* update delegator and validatorWrapper data structure
* fix golang test
* move txType into message creation
* remove validatorMap on statedb; move validatprMap update logic up to higher level of codes and from onchain to offchain.
* [consensus] Factor out enums to core/values, begin factor out of consensus mechanisms
* [consensus] Make Mechanism explicit
* [consensus] Add ViewChange to QuorumPhase
* Update core/values/consensus.go
Co-Authored-By: Eugene Kim <ek@harmony.one>
* Update core/values/consensus.go
Co-Authored-By: Eugene Kim <ek@harmony.one>
* [mainnet-release] Address code comments
* [staking][consensus][project] Remove txgen, factor out consensus
* [consensus] Factor out PublicKeys
* [txgen] Bring back txgen
* [project] Undo prior consolidation of error values under core
* [consensus] Update tests using quorum decider
* [consensus] Fix overlooked resets during refactor
* [consensus] Fix wrong check of quorum phase
* [consensus] Address leftover TODO for prepare count
* [consensus] Simplfy reset switch
* [consensus] Fix mistake of wrong ReadSignature in ViewChange, need sender, not node PubKey
* [staking] Factor some project errors into values core/pkg. Thread stking Txs through Finalize
* [staking] Incorporate Chao code from PR 1700
* [staking] Remove dead staking code, create const values, factor out dec from staking
* [staking] Remove voting power for now till discussion, factor out more error values
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>
block.Header is now a lightweight wrapper around an embedded
HeaderInterface value, which is implemented by both v0 and v1 headers.
It inherits all methods from the wrapped HeaderInterface, except it
overrides EncodeRLP, DecodeRLP, and Hash to handle tagged-RLP
encoding/decoding. (block.HeaderRegistry is the tagged RLP registry for
versioned headers.)
A ripple effect is that header instance creation now requires knowledge
of epoch. This logic is handled by blockfactory. blockfactory.Factory
is the interface, implemented by blockfactory.factory type. It uses a
chain config to pull in the right epoch for the right type.
As a convenience, blockfactory.NewTestHeader creates a new test-purpose
headers. Use this in contexts where the implied chain config is
TestChainConfig or the chain config does not matter.
Miscellaneous changes:
- block.HeaderFieldSetter now lives in its own file.
- The functionality of block.NewHeaderWith has been replaced by the
(*block.Header).With method.
The accompanying unit tests for (*block.Header).EncodeRLP and
(*block.Header).DecodeRLP() are the cross-sectional unit tests for the
functionality added by this. They make sure that v0 header is
encoded/decoded without tagged RLP envelope (compatibility mode), and v1
header is encoded/decoded with one. See comments of the RLP byte
sequence for differences.
Also introduce NewHeader and NewHeaderWith functions. The latter is
friendlier for create-and-initialize expressions, and can be used
in place of the old &Header{field: value, ...} syntax.