Skip to content

Documents of Recommended Practices. - #51

Open
kithminisg wants to merge 6 commits into
mainfrom
documents
Open

Documents of Recommended Practices.#51
kithminisg wants to merge 6 commits into
mainfrom
documents

Conversation

@kithminisg

Copy link
Copy Markdown
Contributor
  • Keeping anchor nodes
  • Monitoring contract health

Comment thread evernode/reference-anchor-nodes.md Outdated
@@ -0,0 +1,138 @@
## Creating Anchor Nodes.

Once you deploy a contract to Evernode instance cluster, you do not have direct access to the data of the smart contract. Hence, if you face to a data recovery requirement there may be a hassle. Hence, Evernode foundation recommend you to use anchor nodes when deploying smart contracts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need to recover your data, Evernode foundation recommends you to use anchor nodes when deploying smart contracts.

Comment thread evernode/reference-anchor-nodes.md Outdated

Mainly there are two methods that you can adhere to when creating an anchor node for your cluster.

### First Method : Create the anchor node when starting a create cluster.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an anchor node before creating the contract cluster

Comment thread evernode/reference-anchor-nodes.md Outdated
There,you have to run your own HotPocket contract on your machine.

Here we are using a Docker container to setup our anchor node.
You can define your own `Docker image` for this process with other additional command line tools for your ease.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are pre-packaged HotPocket docker images that support nodejs and c contracts (evernodedev/hotpocket:0.6.0-ubt.20.04, evernodedev/hotpocket:0.6.0-ubt.20.04-njs.16)

Then we need to create the Docker container by binding an external volume.

```docker
docker container create --name anchor_node --privileged -v ~/evernode/anchor/contract_data:/home/mnt/contract/contract_fs/seed/state -p 8080:8080 --restart unless-stopped --mount type=volume,src=hp_default_vol,dst=/home/mnt/ evernode-anchor-node:0.1.0-hp.0.6.0 run /home/mnt/contract

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we keep whole contract directory in the volume mount

@shortthefomo

Copy link
Copy Markdown
Collaborator

question around the anchor node here, is this also possibly for a way for a entity deploying a contract also to have the ability to have a node in their contracts network? I could see that those deploying contracts would also want to have a node they run as part of the consens, to have at least some way to validate their contract has in no way diverged from the results they expect? Similarly as a participant on the XRPL I run my own node in the network for that vary reason.

@kithminisg

Copy link
Copy Markdown
Contributor Author

@lathanbritz, The purpose of this document is to provide guidance on maintaining an anchor node when a user lacks access to any relevant Evernode instances. These approaches allow users to refer to logs and maintain a replica of the state data. We suggest two methods. Firstly, we propose starting the cluster from the anchor node. Secondly, the anchor node can be joined to an existing cluster as an observer. In this observer role, the node does not impact the consensus.

It is important to note that this is not a mandatory action but rather a helpful tip. Also, we may enhance this document further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants