Getting Started
IntroductionVision and MissionFor Users
Nodle IoTNodle AppNodle ClientNodle on zkSync EraNodle PortalNODL TokenNFT Minting ToolNodle ExplorerParticipateFor Developers
SubQuery IndexerNodle APIsNodle ParachainParachain ModulesNodle SDKNodle Android SDKNodle iOS SDKSmart MissionsMore Info
AppendixGlossaryIntroduction to Nodle Parachain
The Nodle Chain is Polkadot's 11th Parachain powering the Nodle Network. It is used to settle network incentives and contracts in the form of Nodle Cash ($NODL), as well as run some upcoming decentralized applications building atop the Network. It is built with the Parity Substrate framework is available under an open source license.
Due to its permissionless nature, anybody can run a Nodle Chain full-node in order to help make it available and distribute its state. In order to further increase its decentralization and security, it will soon be possible to run a collator node. Token holders of Nodle Cash will also be able to use their holdings in order to participate in the governance of the Nodle Chain, and thus assume its decentralized ownership.
Types of Nodes
Nodes are key elements in the Nodle Chain architecture as they participate in securing, decentralizing, and maintaining the network.
Two kinds of nodes are supported: full nodes and collators.
Full Nodes
Introduction
A full node simply stores, verifies, and provides blocks or transactions. It does not have an active part in the Nodle Chain's consensus functions, unlike collators.
System Requirements
Hardware
When choosing your hardware configuration we recommend at least the following requirements:
- CPU: the nodes run best on an Intel CPU with at least 4 cores.
- Memory: make sure to have at least 6 Gb of RAM.
- Storage: a full node will need at least 500 Gb of storage on a fast SSD, for collators prepare some buffer.
System
The nodes run best on a Linux-based system like Ubuntu and other Debian-based distributions, or Fedora. Make sure to install docker as well as this is the fastest way to get started.
Running a Full Node
Setting up the data volume
A node takes a bit of time to synchronize the Blockchain, so you want to store the data locally in order to not have to re-synchronize every time you restart your node. To do so, simply create a folder on your local machine and make sure our docker container can access it:
mkdir nodle && sudo chown -R 1000:1000 nodle
Run it
Assuming you are in the same folder where you created the nodle
volume, simply go ahead and use docker to start your new node:
docker run -v $(pwd)/nodle:/data -p 9944:9944 -p 30333:30333 -it ghcr.io/nodlecode/chain:master -d /data
This will start a node and start syncing our test network while saving the blocks and transactions in the nodle
folder. If you want to run a full node for our parachain mainnet then use the following command:
docker run -v $(pwd)/nodle:/nodle-chain -p 9944:9944 -p 30333:30333 -p 9945:9945 -p 30334:30334 -it nodlecode/chain:master --chain eden --rpc-cors all --ws-port 9944 --rpc-port 30333 --database paritydb -- --rpc-cors all --ws-port 9945 --rpc-port 30334 --chain polkadot --database paritydb
Starting the Node in Archive Mode
By default, the full node will prune some of its data to save space on the disk. If you would like to keep this data (maybe you are hosting a public node and want to keep the complete data) you can add the flag --pruning=archive
, we typically use it on our own public nodes, however, you will want to increase your storage size to at least 100 Gb.
Syncing Faster
On some machines, you can use the flag --wasm-execution compiled
to synchronize with the chain networks faster (we often have a 10x boost when using it!). This is typically available and well supported on machines with a x86_64
architecture like Intel or AMD chips. We didn't include it in the previously listed commands to avoid any potential bugs or crashes as it may not work as well with less traditional servers, but if you can use it you definitely should!
Choosing a Name for your Node
By default, a name for your node is chosen randomly, if you'd like to personalize it you can use the --name
flag. For instance, you could use --name "not a teapot"
.
Telemetry
You can view the currently running nodes and their names on the Polkadot Telemetry Portal.
Collator Nodes
Introduction
Collators are the Nodle Parachain block producers. They are responsible for creating new blocks and adding them to the chain.
In other words, collators are parachain nodes with special responsibility to aggregate parachain transactions into blocks and then propose them to the relay chain validators for finalization.
Collators do not contribute to network security and only fill the role of a proposer and aggregator. Collators in theory have a power to censor transactions by not including them in their block proposals. However, they cannot stop other collators to include any transactions. One main motivation for running a collator node is to collect transaction fees and optional tips.
System Requirements
Reference Hardware
The transaction weights are benchmarked on a reference hardware. Our reference hardware is a c2d-highcpu-8 VM instance of the Google Cloud Platform. The transaction weights are then used for calculating the base fees for those transactions. It is recommended that the hardware you use to run the collators at least matches the specs of the reference hardware in order to ensure they are able to process all blocks in time.
If you want to use your own machine then consider the following specs as a best practice suggestion:
CPU
x86-64 compatible; Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen); 4 physical cores @ 3.4GHz; Simultaneous multi-threading disabled (Hyper-Threading on Intel, SMT on AMD); Since block production is almost entirely single threaded, single-threaded performance is more important than a higher core count, as this application is not able to utilize the extra resources.
Storage
Currently (Apr 2023), nodle collator have archived near 300 G and this will grow. So an NVMe SSD of 1 TB is a right choice. The other option could be cloud storage that you can size it to deal with Blockchain growth.
Memory
16GB DDR4 ECC. System Linux Kernel 5.16 or newer.
Network
The minimum symmetric networking speed is set to 500 Mbit/s (= 62.5 MB/s).
Running a Collator Node
Run Your Node
Check the official release of the Nodle code at https://github.com/NodleCode/chain/releases. Take the latest release (at the time of writing this doc it was 2.0.29). Give whatever name that you want to your collator (Here we go with my-collator-1). You can go with the same or different name for the side of your collator that is interacting with the relay chain (Here we go with my-relay-1). We’d suggest using docker with a command similar to the following for the initial setup:
docker run -p 9944:9944 -it nodlecode/chain:2.2.3 --chain eden --collator \ --force-authoring --rpc-cors all --ws-port=9944 \ --name my-collator-1 \ -- \ --ws-port 9955 --name=my-relay-1 --chain=polkadot
Wait For Sync
Syncing is when your node retrieves the previous blocks of the chain from the discovered peers. Every parachain collator needs to be synced with both the parachain blocks and relaychain blocks before it can collate a new block itself. A collator needs to have all the history which means syncing could take a long time (a matter of few days). Some Node As A Service providers such as OnFinality may offer lightning sync which means they use a backed up storage of a node to bring up another node very quickly. Here is an example of log lines you would see from the output console of you node when its fully synced on both the parachain and the relay chain side:
2023-04-19 08:01:40 [Parachain] 💤 Idle (11 peers), best:
#2503390 (0x50f9…907d), finalized #2503389 (0x58c2…4abc), ⬇ 0.1kiB/s ⬆ 0.3kiB/s
2023-04-19 08:01:41 [Relaychain] 💤 Idle (40 peers), best:
#15155998 (0xfb05…51b0), finalized #15155996 (0x7256…473a), ⬇ 377.5kiB/s ⬆ 444.5kiB/s
Connect To Your Node
To be able to connect to your need for the special operations that we talk about in the next section, you need to stop your node and bring it up again by adding the following switch to your run command temporarily --rpc-methods=Unsafe -unsafe-ws-external
. This means your run command would look like:
docker run -p 9944:9944 -it nodlecode/chain:2.2.3 --chain=eden \ --collator --force-authoring \ --rpc-cors=all --rpc-methods=Unsafe --unsafe-ws-external --ws-port=9944 \ --name my-collator-1 \ -- \ --chain=polkadot --ws-port 9955 --name=my-relay-1
Then if you are running your node locally, you can connect to it using either Nodle Portal or Polkadot/Substrate Portal . But if you are using a cloud based platform, you’d need to find out the API endpoint to your node through your service provider and use that as a custom development endpoint inside Nodle Portal or Polkadot/Substrate Portal.
Insert Author Key
Every collator needs to sign the blocks they create. To give a signature to your collator or in other words assign a wallet to it, you need to have created an account for your node. As an example the secret phrase for the public address of 4myqFaYtCpdy7dkXnJk8rDqPSARgfwYt7CvjBP9jXs2hWXSm
is “caution juice atom organ advance problem want pledge someone senior holiday very”. This public address maps to 0xd6a3105d6768e956e9e5d41050ac29843f98561410d3a47f9dd5b3b227ab8746
in hex. To assign this account to your node (Warning: never assign this actual address to your node, always create a fresh one), use the step to connect to your node and then go to to RPC Calls under the Developer menu and select the author
endpoint to insertKey
.
--rpc-methods=Unsafe -unsafe-ws-external
from the run command.Register As Candidate
For this stage, the account that you created for your collator node must hold at least 3M NODL tokens plus a bit more to pay for the transaction fees. This amount is currently required to be used as a bond when registering as a collator. This amount may change in the future through the chain’s governance. You can always check what is this amount by using Nodle Portal and then go to chain state under the Developer menu. Then select collatorSelection > candidacyBond.
wss://nodle-parachain.api.onfinality.io/public-ws
or a light client connection.If your node’s account has the above amount then you can use that wallet to register as a candidate through Nodle Portal. Then go to the Extrinsics under the Developer menu and submit a registerAsCandidate transaction from collatorSelection pallet.
If the above transaction succeeds then the candidacy bond will be reserved in your account and you can not use that amount for any other purpose until you decide you don’t want to run a collator and you want to finish it. The reasons for a failure of registration include but is not limit to:
- Not having enough fund in your account.
- There has been no candidacy vacancy left on the chain. In other words there have been many candidates before you.
2023-04-19 08:06:18 [Parachain] Starting collation. relay_parent=0x1b48ba8d4194225690c4e404fa6f9a422643a2731f898c018ea9e31ac45ea393 at=0xa5ad4188e87907fa1d8deca4029cc5ffbb49404e947f34a830394879d51c4e202023-04-19 08:06:18 [Parachain] 🙌 Starting consensus session on top of parent 0xa5ad4188e87907fa1d8deca4029cc5ffbb49404e947f34a830394879d51c4e202023-04-19 08:06:18 [Parachain] 🎁 Prepared block for proposing at 2503415 (1 ms) [hash: 0xa197996f68bcc588f924e9861e0dd50d64baf70c488355e25eb306aea27f8f04; parent_hash: 0xa5ad…4e20; extrinsics (2): [0x83d2…5a0e, 0xaac4…4518]]2023-04-19 08:06:18 [Parachain] 🔖 Pre-sealed block for proposal at 2503415. Hash now 0xc5411df05378d123b339787bb666aa8ec16a414192c828d5fa750b90e66fa049, previously 0xa197996f68bcc588f924e9861e0dd50d64baf70c488355e25eb306aea27f8f04.2023-04-19 08:06:18 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 4.638671875kb, storage_proof: 16.2548828125kb }2023-04-19 08:06:18 [Parachain] Produced proof-of-validity candidate. block_hash=0xc5411df05378d123b339787bb666aa8ec16a414192c828d5fa750b90e66fa049
Leave Intent
If you intend to terminate your service, the best practice is to explicitly unregister your node before stopping your collator. This is both good for you, because you would then free your bond immediately and for the chain because there wouldn’t be any turn given to a collator which is off. To do that, use your node’s account and submit an extrinsic called leaveIntent
.
← Previous
Next →
On this page
- Introduction to Nodle Parachain
- Types of Nodes
- Full Nodes
- Introduction
- System Requirements
- Hardware
- System
- Running a Full Node
- Setting up the data volume
- Run it
- Starting the Node in Archive Mode
- Syncing Faster
- Choosing a Name for your Node
- Telemetry
- Collator Nodes
- Introduction
- System Requirements
- Reference Hardware
- CPU
- Storage
- Memory
- Network
- Running a Collator Node
- Run Your Node
- Wait For Sync
- Connect To Your Node
- Insert Author Key
- Register As Candidate
- Leave Intent