| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* core, rawdb, dex: improve gov state for syncing
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* dex: remove node table
Node table is not so useful, go back to rely on kademlia
* p2p: fix direct dial still have resolve delay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Send non-finalized blocks to notary set only
* Update randomness field for blocks in cache upon receiving agreement
result
* Filter AgreementResult by its position
* Avoid overwriting finalized blocks with non-finalized ones
* Add blocks to finalized cache when pulling
* Update to finalized cache when we have corresponding element in
non-finalized one.
|
|
|
|
|
|
|
|
| |
* vendor: sync to latest core
* dex, core: fix conflict
x
|
| |
|
| |
|
|
|
|
|
| |
* dex: rebuild connection if dkg reset
* core: vm: fix governance contract
|
|
|
|
|
|
|
|
| |
* vendor: sync to latest core
* core: merge notarySet and dkgSet
* dex: optimize network traffic for finalized block
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dex: backport f6193ad
* dex/downloader: backport accc0fa accc0fab 174083c3
* dex: backport 434dd5b
* dex: backport 42a914a 0983d02
* dex: backport 48b70ec 31b3334 and some modification
* dex/downloader: backport 5f251a6
* dex/downloader: backport 81c3dc7
* dex, dex/downloader: fix typos
|
|
|
|
|
|
| |
* dex: don't panic when we don't have gov state peer requested
* dex: use correct head block
Since we are fast syncing, we probably don't have body, receipt, state
|
|
|
|
| |
Start blockproposer only after fast sync is completed (received
ChainHead event), so watchcat is not falsely triggered.
|
|
|
|
|
|
|
|
|
|
| |
Our network topology is different from ethereum, the nodes in notary set will
connect each other directly. So there is a waste for flooding tx msgs
in notary set. And nodes in notary set are more likely to propose block
successfully, it is not useful to broadcast tx msgs to non notary set
nodes.
This PR will increase some tx confirm latency, but can reduce waste tx
msgs a lot.
|
| |
|
| |
|
|
|
| |
also modify some debug log
|
| |
|
| |
|
|
|
|
| |
Stop blockproposer in the Stop() method of node service so the process
doens't hang.
|
|
|
|
|
|
| |
Fill in dmoment as genesis block timestamp. This allow us to remove
dMoment check from protocol handshake since genesis block hash itself
will protect us against different dMoment.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* vendor: sync to latest core
* fix for single chain
|
|
|
|
|
|
| |
* Add Yilan network
* Fixup: remove dummy log
|
|
|
|
|
|
|
|
|
|
| |
* dex: improve some msg propagation
* dex: support send a batch of lattice blocks, votes, randomnesses
To reduce msgs number of PullBlocks, PullVotes, PullRandomness
* dex: minor improvement
|
|
|
|
|
|
|
|
|
| |
* dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg
So that we can dispatch the response msg to fetcher or downloader
easily.
* fixup! dex: Add a flag to GetBlockHeadersMsg and GetBlockBodiesMsg
|
|
|
|
|
|
| |
* p2p, dex: rework connection management
* dex: refresh our node record periodically
* dex: don't send new record event if no new record
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* fixup! app: use gcp storage instead of azure for builds (#81)
* dex: remove unused log
|
| |
|
|
|
|
|
| |
* vendor: sync to latest core
* dex: Add PullRandomness
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dex, internal: block proposer syncing (first iteration)
* core: find block from db if not in memory
This fix handles stopping proposing and then restarting
* core: no need to reorg when reset
Dexon will not fork. This commit also fix when a block confirm but
its parent is not in db yet, during restarting proposing.
* dex: always accept NewBlockMsg, NewBlockHashesMsg
We need to accept NewBlockMsg, NewBlockHashesMsg to sync current block with
other peers in block proposer mode when syncing lattice data. It's a waste
when the node is synced and start proposing.
Todo: control msg processing on/off more granular, accept NewBlockMsg,
NewBlockHashesMsg when syncing, but stop when synced.
|
|
|
|
|
|
| |
- Implement new methods in db to cache DKG
private key.
- Implement new methods in db to cache compaction
chain tip.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Broadcasting blocks at chain head event is not correct when the full
node is not running in block proposer mode. Introduce NewFinalizedBlockEvent,
this event is post by the full node which runs in block proposer mode when a
block is witnessed and resulting in some blocks are considered finalized.
- Non block proposer node will still broadcast blocks
at the following moment (same as ethereum):
1. a sync with a peer is terminated successfully
2. a block passes the fetcher's header check during inserting blocks
3. a block is successfully inserted by fetcher
- Don't trigger a sync when we are not behind other peers more than
acceptable distance. Fetcher is able to cover this.
|
|
|
|
|
|
|
| |
In dexon, we don't "mine" and the blockchain won't and shouldn't fork, so
there is no difficulty concept, just replace it with block number.
Note: this commit only replace total difficulty related logic and code
in dex, dex/downloader package.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also rename InsertChain2, insertChain2, InsertHeaderChain2,
ValidateHeaderChain2
|
|
|
|
|
|
|
|
|
|
|
| |
We need governance state to verify block's signature (randomness),
but in ethereum fast sync mode, eth downloader only downloads the whole
state of pivot block, so we don't have governance state to verify the
downloaded block that is before pivot block if we don't processing
transaction.
To avoid running transactions, dex downloader also downloads the
governance state (merkle proof and storage) at snapshot height of each round,
so that we can verify blocks in fast sync mode.
|
|
|
|
|
| |
To compatible with ethereum code base, make Downloader a
interface in internal/ethapi
|
|
|
|
|
| |
From the go trace result, the bottleneck hides in the lock of
StoreTxCache. To improve this, we update the cache in a batched fassion.
|
|
|
|
|
|
|
| |
* dex: Add a tx queue in broadcast
* Modify queue parameter
* Priority select all messages except tx
* Batch process TouchSenders
|
|
|
|
|
|
|
|
| |
* dex: Add a tx queue in broadcast
* Modify queue parameter
* Priority select all messages except tx
|
|
|
|
|
| |
InsertChain() need to record the correct roundHeight mapping in order to
process snapshotRoundHeight() governance method correctly.
|
|
|
|
|
|
|
|
| |
Remove custom Dexon validator by adding a new `ValidateWitnessData`
method into the validator interface. This allow us to properly detect
know blocks. This also allow other gdex "light" client to sync
compaction chain. Also, setup a standalone RPC node for handling RPC
reqeusts.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
BuildConnection builds notary and dkg connections together
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Let p2p server support direct connection and group connection.
- Introduce node meta table to maintain IP of all nodes in node set,
in memory and let nodes in the network can sync this table.
- Let peerSet able to manage direct connections to notary set and dkg set.
The mechanism to refresh the network topology when configuration round
change is not done yet.
|
| |
|
| |
|
| |
|
| |
|
|
|