Giter Site home page Giter Site logo

crash & p2p question about lotion HOT 6 CLOSED

ericbets avatar ericbets commented on August 27, 2024
crash & p2p question

from lotion.

Comments (6)

keppel avatar keppel commented on August 27, 2024

awesome, thanks for creating this issue, Eric! looks like this is a bug I added in a recent release, caused by two nodes on the same machine trying to use the same tendermint home. will fix this now.

I'm also just about to push some stuff that'll make your nodes discover and peer with each other automatically, no need to think about /dial_seeds. I'll ping you here as soon as that's published to double check that everything's working as expected!

🙌

from lotion.

ericbets avatar ericbets commented on August 27, 2024

Regarding the auto node discovery / peering stuff, I get the possibly erroneous impression that you want apps to use the same global chain? Though I can guess why you might go there (cosmos), it seems like a controversial engineering decision. From my efficiency minded perspective, it would be nice if there was a way to segment state machines simply. One approach to do this in Tendermint core without introducing deliberate namespaces would be for clusters to agree on a random 1Kb string at the start of a chain. Then if two clusters clash they can easily maintain their respective chains without worrying about a phat bandwidth bill.

from lotion.

keppel avatar keppel commented on August 27, 2024

nah, no global chain, just peer discovery for your own chain through the bittorrent DHT and multicast DNS (through this module).

you can also specify your own initial seed peers like

let app = require('lotion')({ peers: ['localhost:46658'] })

but there's no way to set the p2p port to use at the moment. that'll also be added in the next published version.

cosmos is all about independent, application-specific blockchains that can interoperate through common protocols. it's not about forcing your app to use any particular blockchain. you could even use Lotion for a completely private blockchain.

from lotion.

keppel avatar keppel commented on August 27, 2024

hey @ericbets, have another look at the example now! should work if you run node app and node peer

😊

from lotion.

ericbets avatar ericbets commented on August 27, 2024

I got a crash before I was able to start a 3rd peer to see if 2 nodes was buggy.

app.js https://gist.github.com/ericbets/18eb514190bc02066a62c1112d087fd8
peer.js https://gist.github.com/ericbets/dd271a22ff513cf61fa98adcdc0e5547

from lotion.

keppel avatar keppel commented on August 27, 2024

ah, sorry about that, looks like when you ran it, it connected to the node I had running as well as starting a new chain, and since my node uses the same private key as yours for this example, it looks like a double-sign / fork to tendermint.

I updated the example so that now your nodes will only peer with each other, should be pretty straight forward to extend the example to include more peers if that's what you're interested in testing!

thanks @ericbets!

from lotion.

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.