Eugene Kim
cd7d5056f6
Disable DRand processing
...
Suggested-by: Rongjian Lan <rongjian@harmony.one>
6 years ago
Eugene Kim
f1fb9291ff
Fix confusing naming
...
(I got confused myself...)
6 years ago
chao
7cd24dae6c
modify the naming of variables to make code cleaner
...
address pr comments
6 years ago
chao
69cfe9b633
* add view changing logic
...
* add view change message handler
* modify view change message constructor
6 years ago
chao
2ba6d2018b
* cleanup consensus codes
...
* add view change status variables
* add view change message constructor
6 years ago
Eugene Kim
04ba5a3adf
Retrieve parent block by hash, not by number
...
Weird that only hash works; add a TODO.
6 years ago
Eugene Kim
497bba1f77
Fix goimports
6 years ago
Eugene Kim
d43820a797
Fix test compile errors after lint
6 years ago
Eugene Kim
2202782ab8
Add long-term feedback as TODOs
6 years ago
Eugene Kim
7445699909
More fixes/improvements
...
* Log the right shard number for wallet/getFreeToken
* Don't try to use empty commit bitmap from genesis block
* Fail hard if block reward or finalization fails
* Log the public key if message sig verification fails
* Extract and save chain state from received blocks in order to
eliminate deep tail recursion
* Properly deep copy chain config (previously ChainID was being shared
among chains)
* Eliminate chain use-before-init window in node.New()
* Save genesis epoch shard state in new blockchain database
* Do not check epoch of the received shard state message (temp
workaround – we should introduce the check elsewhere)
* Propose an empty block if no transactions have been received for 10
seconds
6 years ago
Eugene Kim
664c6c1513
A cumulative collection of fixes/improvements:
...
* Manage shard chains as first class citizen
* Bring core.BlockChain's read/write semantics cleaner
* Reimplement the block reward in terms of on-chain committee info, not
hardcoded genesis committee.
6 years ago
Eugene Kim
cca34560b0
Reorg imports into stdlib–external–internal format
6 years ago
Eugene Kim
65df03bc9d
Add Epoch to block header
6 years ago
Eugene Kim
d0d130bc4b
Make BlockVerifier return an error on failure
6 years ago
Eugene Kim
bca1e3522f
Verify proposed block contents
6 years ago
Eugene Kim
c04b94858d
Add ShardState
6 years ago
Eugene Kim
3f74e9fc91
Fix UT – the canonical RLP encoding does change
6 years ago
Eugene Kim
b245557d08
Split blockBytes into annotated fields
6 years ago
Minh Doan
ba9493859b
use single source of truth instead having is_leader truth in 2 objects
6 years ago
chaosma
b53d8fb5bf
pbft normal path ( #851 )
...
* PBFT view change framework added
* timeout class and pbft_log class added for view change
* consensus protocol worked under PBFT normal mode
6 years ago
chaosma
e029b7e622
basic framework for view change ( #827 )
...
* factor consensus functions into consensus_utils, make consensus.go cleaner
* add minimum pbft view change structure
add timeout class for pbft view change
* add version to distinguish existing and new consensus
6 years ago
Eugene Kim
485127cfba
Change block reward 0.001 → 0.1 HRX/sig
...
Suggested-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
0364fa422b
Log who earns how much for signing what block
6 years ago
Eugene Kim
2647b3101d
Reward foundational nodes for signing blocks
6 years ago
Eugene Kim
9796df0dd9
Add a simple StakeInfo finder covering genesis nodes
6 years ago
Eugene Kim
1bd5a8d606
Teach consensus about stake info finder
...
StakeInfoFinder is a simple interface that makes it possible to look up
a node's staking information by its consensus (BLS) or account (ECDSA)
key.
6 years ago
chao
994aba8b07
add minimum pbft view change structure
...
add timeout class for pbft view change
add README for PBFT process including view change protocol
6 years ago
chao
f9071da236
factor consensus functions into consensus_utils, make consensus.go cleaner
6 years ago
Rongjian Lan
c20cd8a8d4
resharding on new nodes
6 years ago
Leo Chen
cd8f1cea8e
[cleanup] remove offline peer handler
...
In libp2p context, there is no easy way to detect offline peers, that's
why we have removed the offline peer handling for now.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
9a785f9638
[consensus] add set consensus ID function
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
d31ee7d366
[cleanup] remove peers variable from consensus New function
...
we don't do static peers initialization in consensus anymore
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
u5surf
a835435b4a
[lint] fix ineffassign #708
6 years ago
Rongjian Lan
f6c1230d49
Reorg genesis block for normal shards
6 years ago
Richard Liu
bcb608109e
update /shard to return libp2p.ID
6 years ago
Richard Liu
c0b691cefc
add api /shard for explorer. ( #667 )
...
* update balance output
* add /shard API.
6 years ago
Richard Liu
7e2bcf6413
add /shard API.
6 years ago
johnwhitton
6e5c3e7264
Handle NewMask errors
6 years ago
Rongjian Lan
6044b76068
migrate bls identity from address to public key
...
Use shard info for committee pub keys rather than pong message
Make code backward compatible
6 years ago
Rongjian Lan
f72cb43b83
make 1+3 sharded network work locally with deploy.sh
6 years ago
Leo Chen
53317c5204
[log] print a message in validator if consensus reached
...
This will help node runners check the status in the validator's local log.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
313ddac6ca
[utils] move GetAddressHex to utils module
...
* add test cases for GetAddressHex
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
chao
0d5dcfcae3
refactor state syncing; unify state sync and beacon sync (i.e. depends
...
on whether node needs to join consensus after fully synced)
6 years ago
Leo Chen
78bcab7356
[pong] actively sending pong message
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Eugene Kim
9fc97e43b0
Store group sigs in the real header, not in a copy
...
(*Block) Header() returns a (shallow) copy of the header, where we were
storing group signatures and signer bitmaps. This had no effect, and
the on-chain block was still missing these signatures.
6 years ago
Rongjian Lan
64d6ee80d3
add public key into consensus/drand message
6 years ago
Minh Doan
beaa0a84fe
clean up technical debt
6 years ago
Leo Chen
16c526af34
[misc] reduce number of logs
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
1dbb1a9250
remove validator IDs
6 years ago
Richard Liu
cb066b9edd
add /nodes API for explorer ( #585 )
...
* add /nodes API for explorer
* Remove comment.
* pass pubkeys array pointer instead.
* pass function pointer to get nodeCount.
* rename to GetNumPeers
6 years ago