Leo Chen
24a7922970
[p2p] use right client group for communication
...
each node will communicate in 3 pubsub topics:
* group, exchange the consensus group messages
* client, exchange the client messages, like transactions
* global, exchange global messages, like cross-shard tx, or communicate
with beacon chain (not enabled for now)
Signed-off-by: Leo Chen <leo@harmony.one>
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
97e5c9efa9
Merge pull request #730 from lvyelin/master
...
Add dockerfile to build docker image
6 years ago
Yelin Lu
ff3510d229
[script] Add docker files
6 years ago
Yelin Lu
d4bae2bd22
[script] Count rev count in current branch only
6 years ago
Leo Chen
9d11ed79d5
[sc] enable faucet for all shards
...
this is to enable wallet demo on testnet.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
42cf3d59ac
[crash] fix nil pointer deference
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
85b1f5001d
Merge pull request #717 from LeoHChen/set_init_consensus_id
...
Set init consensus ID
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
chao
fefcbd4ca3
fix deploy.sh not work on ubuntu bash environment
6 years ago
Leo Chen
0ff3c9ae0a
[build] set GO111MODULE in deploy.sh
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
67688fc1dd
[consensus] set init consensus ID
...
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
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
Leo Chen
daf6aa1e5d
[node] get ipv4 address only
...
This is based on the feedback from one of our foundation node runners.
Since we only support IPv4 address at this stage, we should just
retrieve the IPv4 address if both IPv6 and IPv4 addresses exist.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
450f5dec97
Merge pull request #713 from u5surf/issue-708
...
Issue 708
6 years ago
u5surf
a835435b4a
[lint] fix ineffassign #708
6 years ago
u5surf
8d38f12425
[lint] fix misspell #708
6 years ago
u5surf
d25daf2ef2
[lint] fix golint #708
6 years ago
u5surf
4d09b63dff
[lint] fix gofmt #708
6 years ago
Yelin Lu
bdbae9e23f
update node.sh to avoid adding config multiple times
...
Also fix a message to use "pkill" instead of "kill" to terminate harmony
6 years ago
Leo Chen
620433fce2
[debug] add debug option in build
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
a98ead38fa
[crash] fix issue #703
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
5446f751b2
Merge pull request #688 from harmony-one/ricl-peers
...
change to libp2p.ID for nodeID in /shard
6 years ago
Leo Chen
3608611399
Merge pull request #697 from LeoHChen/wallet_fix_on_multi_shards
...
Wallet fix on multi shards
6 years ago
Leo Chen
8dda71c662
[crash] fix index out of range crash
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
147ce51a76
[wallet] send getFreeToken calls to all shards
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
dc113de26d
[wallet] fix fetch balance error
...
it should display the right balance even though some shard may not be
available.
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
d88e898617
Merge pull request #693 from harmony-one/rj_branch
...
Make beacon chain broadcast shard state
6 years ago
Rongjian Lan
d26daa861c
Remove bnkey
6 years ago
Rongjian Lan
22d605a2fc
Only process shard state if non-beacon node
6 years ago
Rongjian Lan
73d863cf63
Disable program restart
6 years ago
Rongjian Lan
75d0463426
Merge branch 'master' of github.com:harmony-one/harmony into rj_branch
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
Leo Chen
886f7ca191
Merge pull request #689 from LeoHChen/wallet_config_file
...
Wallet config file
6 years ago
Leo Chen
ff24b19051
[wallet] add a default wallet.ini
...
default section is for testnet
local section is for local test
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Leo Chen
eae636fe57
[bootnode] add a default bootnode key locally
...
Signed-off-by: Leo Chen <leo@harmony.one>
6 years ago
Rongjian Lan
4b018ec276
Broadcast epoch shard state after beacon consensus
6 years ago
Eugene Kim
5d19a8ebb5
Merge pull request #686 from harmony-ek/fix_out-of-range_index_#676
...
Fix out-of-range index
6 years ago
Rongjian Lan
25dbb3fa58
Merge pull request #681 from harmony-one/rj_branch
...
Separate functionality and genesis block between beacon and shard chain
6 years ago
Rongjian Lan
f6c1230d49
Reorg genesis block for normal shards
6 years ago
Eugene Kim
9685d5b114
Treat .go files in "mock" dir as generated
6 years ago
Eugene Kim
bb3fcdd6f2
Add log15-compatible, context-aware error facility
6 years ago
Eugene Kim
fc0ddebc1a
Hold SyncConfig mutex for accessing peers
...
Use read/write (shared/exclusive) lock to enable concurrent read access
for most of the times. Also fold a few methods from StateSync to
SyncConfig, to avoid accessing SyncConfig mutex from outside.
Ensure that the methods that lock sc.mtx on its own aren't called
with sc.mtx already locked, because Go mutexes are not reentrant.
6 years ago
Eugene Kim
4011ede7ea
Make GetBlockHashesConsensusAndCleanUp a SyncConfig method
...
This is possible because we have eliminated peer count variables in
StateSync.
6 years ago
Eugene Kim
d9eb985c36
Now that client cannot be nil, remove nil checks
6 years ago
Eugene Kim
acd0351e9d
Simplify peer count processing
...
That is, now that peerNumber == activePeerNumber ==
len(syncConfig.peers), remove the peer count variables.
Also remove CleanupNilPeers(), whose purpose was solely to update
activePeerNUmber.
6 years ago
Eugene Kim
943081e2f5
Add only peerConfigs with non-nil clients
...
This makes peerNumber == activePeerNumber == len(syncConfig.peers).
6 years ago