Comments (6)
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.
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.
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.
hey @ericbets, have another look at the example now! should work if you run node app
and node peer
😊
from lotion.
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.
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)
- Malformed JSON while it's not HOT 1
- Light client unique ID?
- `lotion state <GCI>` times out
- lotion install error HOT 4
- IBC configuration?
- Block times
- UnhandledPromiseRejectionWarning (Node 8.10.0) HOT 1
- app.use((state, tx)) still returns initial state
- transactionHandler is invoked twice
- Android app for blockchain messenger
- Block info missing HOT 1
- opts.keyPath and opts.genesisPath
- Project Status HOT 2
- UnhandledPromiseRejectionWarning: Error: invalid wire type 7 at offset 88 HOT 2
- Error when launching server HOT 2
- TypeError: app.listen is not a function HOT 2
- How to run lotion with multiple peers?
- Trouble installing on m1 HOT 2
- Can there be an better explanation with the new way of doing things with axios?
- Current status
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 lotion.