Comments (4)
Just to be clear:
- Many EVMs will be able to join a single node.
- When do you want the evm to send the stateHash to the node as you mention: Is this the same stateHash the node currently receives from rpc calls to the EVM
State.CommitBlock
? If so, doesn't that only happen when the node syncs with the EVM?
from go-lachesis.
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:
https://gist.github.com/mowings/dad4917b6fc21e6e5ffe2da3b16e7ef9
from go-lachesis.
@andrecronje
Minor stuff left:
- Test when client disconnects gracefully from node that node deletes connection
- After WS ping-pong timeout also disconnect and delete.
- VM must retry connecting to node indefinitely if not currently connected
- Remove lachesis node -c flag and the evm -lachesis.client_addr flags
Do you agree with all that?
One thing still unclear: When blocks are sent to VMs, each block send request returns a statehash. Now we receive multiple statehashes from each connected vm. What will the consequences/policy be around that?
Currently I return the last client's one.
from go-lachesis.
We can remove the stateHash logic.
Agreed on all items.
Are you working on the EVM implementation as well?
from go-lachesis.
Related Issues (20)
- P2P communication failure for new Lachesis nodes HOT 5
- Wrong delegation numbers (?) HOT 1
- Deployment of smart contracts to Opera testnet fails with Truffle error "unknown account" HOT 2
- Trying to run a private testnet manually. Crashing when reaching block in MaxEpochBlocks or cannot change epochs. HOT 5
- Dependabot can't parse your go.mod
- Some questions about the mainnet FTM HOT 1
- failed RPC connection to node1 HOT 2
- Error: No such object: node1 HOT 1
- Syncing stuck at block 614958 HOT 4
- lachesis --your-favourite-flags dumpconfig can not work HOT 2
- can not find other validators HOT 5
- How can I increase the number of block packaging transactions? HOT 1
- How can I increase the number of block packaging transactions?
- Modified the parameter block package transaction of Lachesis.Emitter.EmitIntervals to decrease
- is there fast syncmode to sync data, it is very hard to catchup HOT 1
- codahale/hdrhistogram repo url has been transferred under the github HdrHstogram umbrella
- Lost Fonda HOT 1
- FetchError: request to https://rpc.testnet.fantom.network/ failed, reason: Client network socket disconnected before secure TLS connection was established
- Node out of sync HOT 2
- read-only go-opera node HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-lachesis.