-
Notifications
You must be signed in to change notification settings - Fork 72
RPC instead of client / server design #29
Comments
Just to be clear:
|
I see the current stateHash isn't being used by the node: 06bbb03#diff-fe72219e854ef7d912a53b4f7dea56afL604 Will the stateHash only be sent from an EVM once at first connect? Or each time the node sends a block (commit block)? If the statehash is not needed when sending blocks it would be quite trivial to finish the websocket subscribe model where the node would just send out blocks to each currently connected EVM. The problem comes in where the EVM needs to send back an associated stateHash with a received block. This is a request-response model that is more suited for rpc. (the node would need extra layer of logic to distinguish between incoming tx's and statehashes, etc. And it would need to keep track of which hash for which block previously sent) If you want to use 1 connection between a node and evm and want to use websockets we could try something like: |
@andrecronje
Do you agree with all that? |
We can remove the stateHash logic. |
Is your feature request related to a problem? Please describe.
Current architecture for Lachesis to EVM interaction is client server design.
A Lachesis nodes specifies a downstream client. An EVM node exposes a proxy server to receive responses.
This design tightly couples a Lachesis node with an EVM node. The design is supposed to allow for join/drop participation. So a Lachesis node can not have awareness of an EVM node. Although EVM nodes should have awareness of Lachesis nodes.
Describe the solution you'd like
New EVM joins
The EVM genesis file creates a stateHash. This hash must be sent to the Lachesis node. This stateHash is used to see which blockstream is appropriate. The node needs to go into FastSync mode and synchronize missing blocks until the state matches.
From here nodes can either subscribe to WS for blocks, or simply use incremental catchup calls with their attached node. Alternatively block propagation could occur via standard gossip based communication protocols and the lachesis network needs to keep track of the evm network.
The text was updated successfully, but these errors were encountered: