what is a physical node in a blockchain network? - networking

If I want to create a website using blockchain, I will store blockchain data in a node, right? But what is a node?
Is a node a small server that I need to buy to run code and save data?
Is a node a miner?
Is a node the client device like a laptop, phone, tablet that visits my website?
A node is probably not the server that hosts the website
To sum up, what is a blockchain node? what is a blockchain network?

"Node" refers to a running piece of client software. A client is an implementation of Ethereum that verifies all transactions in each block, keeping the network secure and the data accurate.
Becoming a Blockchain Node , means your participating in the Blockchain Network :>
There are 3 types of node
Full Node ( Being a Miner )
Light Node ( Useful for low capacity devices )
Archive Node ( Quick Querying )
Resource
https://ethereum.org/en/developers/docs/nodes-and-clients/

Related

How a blockchain node knows when a new node is added?

If bloackchain is designed to be decentralized, how a node can know the IP of at least one node of the blockchain in order to start communicating.
For example, if a bloackchain still does not have any node, and you add the first node of the network, when the second node is added, how does that node know the IP of the first node and vice versa?
Nodes can broadcast their presence on a predefined port and in a predefined message format. Other nodes can be listening on this port, so that they "catch" the message from a new node (broadcasting their presence).
Some clients also have a predefined list of trusted nodes that are usually maintained by the network core development team or some other trusted groups, so that the client doesn't have to wait for other nodes to broadcast their presence and can communicate with these trusted nodes right away.

How corda network is designed

Corda doc says
"Admission to the network
Unlike traditional blockchain, Corda networks are semi-private. To join a network, a node must obtain a certificate from the network operator. This certificate maps a well-known node identity to:"
I have a few questions about how corda netowrk is desined.
How network is partitioned.
Can all corda instance form one network? Or, are there several networks that can be connected?
Who is network operator?
Is it one party? Can that operator dominate network arbitrary?
Is Notary included in network?
Is Notary a component of network, or can notary notrize several corda netowrks?
Does network operator authorize notary, or trust notary?
A Corda network is a set of well identified legal entities. When you want to join a network you sign a legal document (participation terms of use) and then you submit something called Certificate Signing Request; once it's approved your node automatically downloads the required certificates that identify it on that network and allows it to become discoverable by other nodes so it can interact with them.
Corda network is an example, and I recommend that you go through their website: https://corda.network
In the case of Corda network, the operator is a consortium; not one organization.
That link I shared, will answer all of your questions:
Participation: https://corda.network/participation/index
Governance: https://corda.network/governance/index
Types of networks in Corda network: https://corda.network/participation/network-choice
Notary: https://corda.network/participation/notary-considerations

Is there a way to know the status of a node using the network map service?

Looking through the documentation I can't find a way to get the current status of the nodes (online/offline) using the network map service.
Is this already implemented?
I can find this information using OS tools but I would like to know if there is a Corda way for this task.
Thanks in advance.
This feature is not implemented as of Corda V3. However, you can implement this functionality yourself. For example, see the Ping Pong sample here that allows you to ping other nodes.
In the future, it is expected that the network map will regularly poll each node on the network. Nodes that did not respond for a certain period of time (as defined by the network operator) would be evicted from the network map. However, this period of time is expected to be long (e.g. a month).
Please also note that:
In Corda, communication between nodes uses message acknowledgments. If a node is offline when you send it a message, no acknowledgment will be received, and the node will store the message to disk and retry delivery later. It will continue to retry until the counterparty acknowledges receipt of the message
Corda is designed with "always-on" nodes in mind. A node being offline will generally correspond to a disaster scenario, and the situation should not be long-lasting

Chord (Distributed Hash Table)

I want to create my own Chord implementation for P2P file sharing
I followed an article which explained that every node has it's ID (hash of the IP for example)
my questions are:
how a new client join the network? there must be a server to manage it. right?
how you set for the new client the finger table?
Chord authors have their own implementation published:
http://pdos.csail.mit.edu/chord/#downloads
You can check how they manage those questions.
how a new client join the network?
By advertising its presence to other peers.
there must be a server to manage it. right?
Either a server or a location (URL) where peers can fetch IP addresses of other peers. This location is updated by peers themselves with fresh data.
If you dig deeper in this issue, you'll face the NAT traversal issue.
how you set for the new client the finger table?
By knowing/fetching other peers' id and computing the 'finger' order.

p2p simulation and distributed hash table

I am learning the p2p architecture through a simulation within a single machine. For that I was told that I can use named pipes. I am in the design phase of the simulation. Here is how I plan to move forward:
Create a peer program that is able to join the p2p 'network'. The network is a collection of such peers. The peer is identified via the process id in the machine.
When a peer is created i.e., joins the network, it announces it's arrival through bootstrapping itself to a 'master-node' or tracker. When the peer announces its arrival, the master-node updates its list of peers (process ids), and returns the list of peers available in the network to the new peer.
Once in the network, the peer can now download a file from the network or upload a file to an incoming request for a file that s/he has. The files that the peer receives through the network automatically becomes available for upload.
To download a file, the peer calls a location algorithm that locates the peer with the file that the current peer is seeking to download.
As you can see, there is a gap in my understanding of the design. From my naive approach, I see #2 and #3 as different steps. However, I have a feeling that they must somehow be related. I guess my understanding lacks in knowing how a distributed hash table and algorithm like Chord or CAN works. I need help in rounding up these scattered ideas that will help me actually implement the simulation.
To begin, my first question is: where and how do I initiate the location algorithm? Or where is the distributed hash table created in the steps listed above?
You have a choice of either implementing a tracker server a la Napster. Or you can implement DHT-capable nodes - Bit torrent style.
In the former case, the tracker keeps track of all the nodes and the files they are hosting.
And in the latter, each node keeps track of the information (at least one peer in the network assumed in this case). A new peer will then contact one of the DHT - capable peer and get information about the node that is hosting the file that it requires.

Resources