Mel is a new public blockchain focused on security, performance, and long-term stability. melnode
is Mel's reference implementation in Rust.
For security reasons, until we have reliable reproducible build infrastructure, the only official distribution channel for melnode
is its source code package on crates.io.
Fortunately, installing melnode
from source is extremely easy. First, make sure cargo is installed on your machine. Then, simply run
$ cargo install --locked melnode
This produces an executable melnode
in ~/.cargo/bin/
, which should already be in your $PATH
.
Full nodes replicate every consensus-confirmed block, validating its contents and ensuring network security while providing a local cache of the entire blockchain state. Running a full node helps contribute to the security and (read) performance of the network.
There are two kinds of full nodes:
To run an replica on the “mainnet” (which at the moment is far from stable, but does have a persistent history), just run:
$ melnode
melnode
will then beginning synchronizing all the blocks in the blockchain. This will take quite a while (a day or so) and store a bunch of data in in ~/.melnode/
.
To run the replica on the non-persistent testnet, where most covenant development and testing will happen during the betanet period, run instead
$ melnode --bootstrap tm-1.themelio.org:11814 --testnet
Note that two things were needed to connect to the testnet:
You can change the configuration of an replica node with the following flags:
```
--bootstrap
--database
--listen
--testnet Use testnet validation rules
--override-genesis
Note: there will soon be a tool to automatically generate these configurations.
We can configure a simnet --- a "fake" network local to our computer --- by the combination of three options:
--bootstrap 127.0.0.1:11814
to bootstrap only with ourselves instead of any remote node--override-genesis network-config.yaml
, where custom-config.yaml
contains configuration for a custom network of the following form:
```yaml network: custom02 # anything from custom02..custom08
init_coindata:
covhash: t5xw3qvzvfezkb748d3zt929zkbt7szgt6jr3zfxxnewj1rtajpjx0
value: 1000000
denom: MEL
additional_data: ""
stakes: deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef: pubkey: 4ce983d241f1d40b0e5b65e0bd1a6877a35acaec5182f110810f1276103c829e estart: 0 epostend: 100000 # essentially never end the stake symsstaked: 10000 # does not matter
initfeepool: 10000
initfeemultplier: 1 ```
--staker-cfg staker-config.yaml
must contain a staker configuration like this:
```yaml
signing_secret: 5b4c8873cbdb089439d025e9fa817b1df1128231699131c245c0027be880d4d44ce983d241f1d40b0e5b65e0bd1a6877a35acaec5182f110810f1276103c829e
listen: 127.0.0.1:20000
bootstrap: 127.0.0.1:20000
payout_addr: t5xw3qvzvfezkb748d3zt929zkbt7szgt6jr3zfxxnewj1rtajpjx0
targetfeemultiplier: 10000 ```
A more detailed explanation of --staker-cfg
requires explaining the staker and consensus system, as follows:
WIP
WIP
WIP
Thank you for considering contributing to the Mel source code! We welcome all contributions from absolutely anyone on the internet.
For minor changes, simply fork, fix, and submit a pull request. If you want to propose a larger change, be sure to get in touch with our dev team on Discord to make sure your change aligns with Mel's overarching philosophy. This will likely save you a significant amount of time and effort, as well as speed up the review process of your change.
Finally, make sure your code adheres to the following guidelines:
master
branchThe license of the project is the Mozilla Public License, version 2.