node-blockchain | Blockchain Cryptocurrency Implemented with Node & TypeScript | Blockchain library
kandi X-RAY | node-blockchain Summary
kandi X-RAY | node-blockchain Summary
Blockchain Cryptocurrency Implemented with Node & TypeScript
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-blockchain
node-blockchain Key Features
node-blockchain Examples and Code Snippets
Community Discussions
Trending Discussions on node-blockchain
QUESTION
I am looking at this Blockchain from firebase. https://github.com/fireship-io/node-blockchain/blob/main/index.ts
The Blockchain is simple enough. There are many similar examples of blockchain implementations, but I don't really see any that are actually used in a network. I am trying to get some footing for implementing this, at least with 2 users to start.
The thing I'm confused about at the moment is what actually gets shared between users? Is it the chain itself? Just new transactions? When a user does Wallet.sendMoney(5, satoshi.publicKey)
, it would update the local wallet, but then what? I'm guessing send the transaction to others on the network, but then each copy of the blockchain adds/verifies independently. This seems problematic because some of the transactions could get lost (internet outage or whatever), which makes me wonder if the whole blockchain gets sent, yet this seems unwieldy.
ANSWER
Answered 2022-Mar-07 at 01:23The thing I'm confused about at the moment is what actually gets shared between users?
You meant between nodes
not "users". All the nodes should have the same chain and transactions. So you have to implement a pub-sub system to listen for certain events and also publish the transaction and chain. Using redis, you can create a class. I explained on code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-blockchain
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page