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
b75896f534
Make {Read,Write}ShardState take epoch number
...
Previously it was taking a block number/hash, which was untenable in the
long term facing the variable-length epoch logic for regular shards.
6 years ago
Eugene Kim
9043ec6ddf
Add epoch block number storage
6 years ago
Eugene Kim
38b4faa6de
Add block logger
6 years ago
Eugene Kim
fac1f3ca41
Remove unused GetShardStateByHash
6 years ago
Eugene Kim
c4338ad890
Remove ShardState and ShardStateHash from genesis
...
They now belong to epoch-last blocks.
6 years ago
Eugene Kim
abdfb5e048
Add epoch block number storage in rawdb
6 years ago
Eugene Kim
8308c4d0ff
Verify non-beacon end-of-epoch proposal
...
It should equal the one in the master copy found on beacon chain, except
if the master table doesn't have the shard (shard disowned), the local
leader should acknowledge this and signal the end of the shard by having
a committee proposal with empty leader and zero members.
6 years ago
Eugene Kim
5e356054ab
Add GetLastBlockNumberFromEpoch
...
Given an epoch number, it returns the last block number for it.
Admittedly, this is a hack until we have adaptive epoch logic.
6 years ago
Eugene Kim
4cbc6ba048
Move ValidNewShardState to node level
...
This is because regular chain validation requires access to beacon
chain.
6 years ago
Eugene Kim
65df03bc9d
Add Epoch to block header
6 years ago
Eugene Kim
e02f4caade
Validate shard state in proposed blocks
...
For now, validators simply wait until the leader proposes something.
Going forward though, validators would have to deal with a leader
intentionally delaying resharding:
- A beacon leader should send resharding proposal as soon as DRand is
finished.
- A regular leader should send a local resharding proposal as soon as it
sees a master proposal from the beacon chain (received via syncing).
In both cases, there should be some sort of grace period to allow for a
short delay inserted by the leader's discretion (so that it can wait for
most nodes to catch up with DRand or beacon chain syncing).
6 years ago
Eugene Kim
abaef8725d
Tidy imports in stdlib-external-internal order
6 years ago
Eugene Kim
c04b94858d
Add ShardState
6 years ago
Eugene Kim
18bf30e6c8
Use uint32 as shard ID type instead of [4]byte
...
This does not change RLP encoding.
6 years ago
Eugene Kim
7991a56519
goimports
6 years ago
Eugene Kim
efc57c47ed
Make ShardState comparable (recursively)
...
Rename existing CompareNodeID as CompareNodeIDByBLSKey to better reflect
what it does and to make room for the full node ID compare function.
6 years ago
Eugene Kim
828f2d0f41
Factor []NodeID type as NodeIDList
6 years ago
Richard Liu
fe217ad2b7
more rpc APIs. ( #863 )
...
* added readme
* more RPC APIs
* update for comments; fix travis issues
* update auto-generated host_mock.go
6 years ago
Richard Liu
d4bc279d88
sendTx rpc ( #852 )
...
* separate files
* send tx
6 years ago
Yelin Lu
0d83532785
new rpc framework
...
1. Remove eth rpc code and unnecessary changes from
7a0f18f92b
. Import the package instead.
2. Move HmyAPIBackend into core package so it has more access to core.
3. Add API interface for services.
4. Start RPC for all roles, for both HTTP (baseport+10) and WS (baseport+20).
3. Keep implemented APIs but move to internal/hmyapi package.
6 years ago
Leo Chen
d5aa127d73
[crash] fix index out of range #744
...
print out an error if index out of range is found.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
f5d8eea764
Increase epoch blocks to large number:
6 years ago
Eugene Kim
0a498ea735
Add conversion methods to BlsPublicKey
6 years ago
Eugene Kim
5c74aa5899
Colocate the Hex method with the receiver
6 years ago
Richard Liu
7a0f18f92b
Ricl web3 ( #720 )
...
* port
* update
* add APIs
* added rpc service
* added tx count apis
* added get tx apis
* added getTxByHash
* clean code
* fix lint issues
* clean code
* added backend; added APIs
* fix comments
* fix comments
* added readme for reference
6 years ago
Leo Chen
94ee340720
[crash] fix index out of range #744
...
print out an error if index out of range is found.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
86ab59d389
Finish up resharding
6 years ago
Rongjian Lan
c20cd8a8d4
resharding on new nodes
6 years ago
chao
c4cf98cbc6
debug beacon sync not stable issue
6 years ago
chao
61acdc41cb
beacon syncing; use p2p to broadcast new blocks
6 years ago
Leo Chen
6d0ee0ac60
[crash] fix integer divide by zero crash #675
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
81abaaa922
[log] disable huge debug log in leader
...
the excessive logs have caused leader node out of space only after 8k
consensuses.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
u5surf
d25daf2ef2
[lint] fix golint #708
6 years ago
Rongjian Lan
73d863cf63
Disable program restart
6 years ago
Rongjian Lan
19be79a48f
Restart program after resharding
6 years ago
Rongjian Lan
847bd8d83f
Broadcast shard state from beacon chain
6 years ago
Rongjian Lan
4b018ec276
Broadcast epoch shard state after beacon consensus
6 years ago
Rongjian Lan
4b7c5801c2
restore 50 shard size
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
41e70f425d
make 1+3 sharded network work locally with deploy.sh
6 years ago
Rongjian Lan
cd5f2d9845
Increase shard size to 50
6 years ago
Rongjian Lan
f89f81c804
Fix typo on init shard state calcualtion
6 years ago
Rongjian Lan
f72cb43b83
make 1+3 sharded network work locally with deploy.sh
6 years ago
Eugene Kim
2876ac5d99
Add UTs
...
Suggested-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
f847162e3f
revert mistakenly commited change
6 years ago
Rongjian Lan
64d6ee80d3
add public key into consensus/drand message
6 years ago
Rongjian Lan
8077352426
Bump up genesis beaconchain size to 50
6 years ago
Rongjian Lan
1dbb1a9250
remove validator IDs
6 years ago