tintfoundation / bitboot Goto Github PK
View Code? Open in Web Editor NEWBootstrap a distributed p2p network
License: MIT License
Bootstrap a distributed p2p network
License: MIT License
can you please tell me the both systems should run on different networks or same network(LAN)?
should i run both machines with the same magic name ?
what are the settings i have to do in my system?
if i ran the example.js file in my system it is not finding any peers
and moreover iam new to this technology
after ran the example.js file it was giving some log messages here:
bitboot function
Using rally point bitboot (f659ba883e49be3891deccd12b7c7bf96343bcad)
bootstrap function
Joining network with id f65902e716dca34fe8ed55b7a708225b7b5cbcad (distance to rally 1.6066485897541828e+43)
I have a new node id: f65902e716dca34fe8ed55b7a708225b7b5cbcad
onready function
search function
Searching for nodes near rally point
finished function
I found peers: []
Waddling closer to the rally point destroying old DHT connection
restart function
Joining network with id f659b2e716dca34fe8ed55b7a708225b7b5cbcad (distance to rally 7.34723573552025e+41)
I have a new node id: f659b2e716dca34fe8ed55b7a708225b7b5cbcad
onready function
sayhi function
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
node -v
v11.14.0
yarn init -y
yarn add bitboot
nano index.js
// index.js
var Bitboot = require('bitboot')
// The rally point name can be any string and should be unique
// to your peer network
var bb = new Bitboot('bitboot test network')
// this is called whenever the node selects a new ID and rejoins
// the BitTorrent mainline DHT network
bb.on('rejoin', function (nodeId) {
console.log('I have a new node id:', nodeId.toString('hex'))
})
// this is called whenever a search is made for peers
// peers will be the result of that search (and may be empty)
bb.on('peers', function (peers) {
console.log('I found peers:', peers)
})
bb.on('error', function (err) {
console.error(err)
})
DEBUG=bitbootnode index.js
bitboot Joining network with id 9bfe8cd199e4d134ea5834c088d8b66056157a24 (distance to rally 2.341762075932748e+42) +8ms
I have a new node id: 9bfe8cd199e4d134ea5834c088d8b66056157a24
bitboot Searching, and creating interval for future searches +3s
bitboot Searching for nodes near rally point +1ms
/Users/parweb/Sites/atmosfear/node_modules/bitboot/index.js:101
var closestdist = KBucket.distance(closest[0].id, this.rallyId)
^
TypeError: Cannot read property 'id' of undefined
at Bitboot._attemptCommunication (/Users/parweb/Sites/atmosfear/node_modules/bitboot/index.js:101:49)
at finished (/Users/parweb/Sites/atmosfear/node_modules/bitboot/index.js:93:15)
at done (/Users/parweb/Sites/atmosfear/node_modules/k-rpc/index.js:240:5)
at processTicksAndRejections (internal/process/task_queues.js:79:9)```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.