Giter Club home page Giter Club logo

Comments (4)

RoanBrand avatar RoanBrand commented on July 17, 2024

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.

RoanBrand avatar RoanBrand commented on July 17, 2024

@andrecronje

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.

RoanBrand avatar RoanBrand commented on July 17, 2024

@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.

andrecronje avatar andrecronje commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.