Skip to content

Commit

Permalink
GitBook: No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Cere Network authored and gitbook-bot committed May 23, 2022
1 parent f61d5a1 commit a656071
Show file tree
Hide file tree
Showing 57 changed files with 866 additions and 0 deletions.
Binary file added .gitbook/assets/0 (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/0 (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/0 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/0 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/0 (5).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/1 (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/2 (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/candidates.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/cere-extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/currentcouncil.PNG
Binary file added .gitbook/assets/payoutall.png
Binary file added .gitbook/assets/submit council.PNG
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: Welcome to Cere DDC Wiki!
---

# Introduction to Cere DDC

Cere Decentralized Data Cloud is the world’s first blockchain-based storage solution that is optimized to capture interactions between users, (NFT) assets, and application which are individually signed and encrypted, along with potential value transfers, to be stored in a tamper-proof and time-capsuled data scheme.

This guide covers the technical details of the blockchain behind DDC. For more information on Cere Network, visit [https://cere.network/](https://cere.network/).

#### Cere Tools

{% hint style="info" %}
[**Cere Explorer**](https://explorer.cere.network), **an app to manage accounts/transfers/governance/smart contracts/other.**
{% endhint %}

{% hint style="info" %}
[**Cere Bridge**](https://bridge.cere.network)**, an app to transfer CERE tokens from Ethereum to Cere Mainnet.**
{% endhint %}
51 changes: 51 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Table of contents

* [Introduction to Cere DDC](README.md)

## Mainnet

* [Network details](mainnet/network-details.md)

## Testnet

* [Test Network details](testnet/network-details.md)

## Blockchain Node <a href="#node" id="node"></a>

* [Install and update](node/install-and-update/README.md)
* [Start a Node](node/install-and-update/start-a-node.md)
* [Become a Validator](node/install-and-update/become-a-validator.md)
* [Become a Full / Archive Node](node/install-and-update/become-a-full-archive-node.md)
* [Update a Validator Node](node/install-and-update/update-a-validator-node.md)
* [Install & Configure Network Time Protocol (NTP) Client](node/install-and-update/install-and-configure-network-time-protocol-ntp-client.md)
* [How to fix environment errors](node/install-and-update/how-to-fix-environment-errors.md)
* [Node logs](node/install-and-update/node-logs.md)

***

* [Other](other/README.md)
* [Linux Best Practises](other/linux-best-practises.md)
* [Hardware Recommendations](other/hardware-recommendations.md)
* [Other Notes](other/other-notes.md)

## DDC Smart Contracts <a href="#ddc" id="ddc"></a>

* [Intro](ddc/intro.md)
* [How to add DDC Node to the Smart Contract](ddc/how-to-add-ddc-node-to-the-smart-contract.md)
* [How to add an Inspector to the Smart Contract](ddc/how-to-add-a-reporter-to-the-smart-contract.md)
* [How to configure DDC Inspectors](ddc/how-to-configure-reporter-ocw.md)

## tools

* [Cere Explorer](tools/cere-explorer/README.md)
* [Prepare a browser to work with Cere Explorer](tools/cere-explorer/prepare-a-browser-to-work-with-cere-explorer.md)
* [How to connect to your Node with Cere Explorer](tools/cere-explorer/how-to-connect-to-your-node-with-cere-explorer.md)
* [How to create an account by using Cere Explorer](tools/cere-explorer/how-to-create-an-account-by-using-cere-explorer.md)
* [Cere Bridge](tools/cere-bridge.md)

## Learn

* [Governance](learn/governance.md)
* [Staking/Slashing](learn/slashing.md)
* [Treasury](learn/treasury.md)
* [Council](learn/council.md)
27 changes: 27 additions & 0 deletions ddc/how-to-add-a-reporter-to-the-smart-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: >-
This section is supposed to be used to describe the process on how to add a
reporter to the DDC Smart Contract
---

# How to add an Inspector to the Smart Contract

### Prerequisites

* You should be a Smart Contract Admin.
* You should have enough CERE tokens to pay fees.

### Steps

1. Open [Block Viewer](https://block-viewer.cere.network/?rpc=wss%3A%2F%2Frpc.testnet.dev.cere.network%3A9945#/staking): `Developer` -> `Contracts`
2. Find method: `addReporter`
3. Click on `exec`
4. Specify `reporter`

![](<../.gitbook/assets/Screenshot from 2021-06-03 12-48-24.png>)

5\. Click `Execute` then sign the tx and you should be able to see check if reported added using the `isReporter` function. Select the reporter you just added:

![](<../.gitbook/assets/Screenshot from 2021-06-03 12-50-42.png>)

Congrats! You should be able to see `true` in the response, if reported added successfully.
31 changes: 31 additions & 0 deletions ddc/how-to-add-ddc-node-to-the-smart-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: >-
This section is supposed to be used to describe the process on how to add a
new node to the DDC Smart Contract
---

# How to add DDC Node to the Smart Contract

### Prerequisites

* You should be a Smart Contract Admin.
* You should have enough CERE tokens to pay fees.

### Steps

1. Open [Block Viewer](https://block-viewer.cere.network/?rpc=wss%3A%2F%2Frpc.testnet.dev.cere.network%3A9945#/staking): `Developer` -> `Contracts`
2. Find method: `addDdcNode`
3. Click on `exec`
4. Specify parameters:
1. `p2p_id` found in the logs of the DDN.
2. `p2p_addr` similar to p2p\_id but also includes an IP address.
3. `url` where the HTTP API of the node is reachable.
4. `permissions` 1 for trusted nodes (e.g., run by Cere), 0 for untrusted nodes.

![](<../.gitbook/assets/Screenshot from 2021-06-03 12-39-01.png>)

5\. Click `Execute` then sign the tx and you should be able to see the newly added node in the `getAllDdcNodes` function:

![](<../.gitbook/assets/Screenshot from 2021-06-03 12-40-32.png>)

Congrats! You have just added a new DDC Node to the contract.
74 changes: 74 additions & 0 deletions ddc/how-to-configure-reporter-ocw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
description: >-
This section is supposed to be used to describe the process on how to
configure reporter (OCW)
---

# How to configure DDC Inspectors

### Prerequisites

* You have installed [subkey](https://github.com/paritytech/substrate/tree/master/bin/utils/subkey) util
* You have a DDC Smart Contract address. In our case: `5F7hDxFwMobL3mofGVUL4QwwZTmygwPE7T1ikPy5YT8Nizf8`
* You are [connected to a Node via Cere Block Viewer](https://cere-network.gitbook.io/cere-network/tools/block-viewer/how-to-connect-to-your-node-with-block-viewer) directly.

### Steps

By default reporter functionality already included in the Validator Node. This section described how to enable and configure the reporter.&#x20;

#### 1. Prepare reporter account

Create a new account using `subkey` util using the command: `subkey generate --scheme sr25519`:

```
~$ subkey generate --scheme sr25519
Secret phrase `ivory alpha language juice pyramid enforce kitchen cake galaxy ankle error aspect` is account:
Secret seed: 0xfdd8ddf960c0ebf8b6970728780cd8210b0494b50ceb8823025efff519e1f6dd
Public key (hex): 0xae4ef92049ef164f44b08da3f14e120a79cf6425ca5d8cdca655a4c7d6cf0978
Account ID: 0xae4ef92049ef164f44b08da3f14e120a79cf6425ca5d8cdca655a4c7d6cf0978
SS58 Address: 5G1Feba7v4dPBU4rVZxmooKQiHoY9JYibz8JNPMmgFzyPsGK
```

Send some amount of native tokens to this account (in our case - `5G1Feba7v4dPBU4rVZxmooKQiHoY9JYibz8JNPMmgFzyPsGK`) to be able to pay for transactions.

#### 2. Add a reporter to the Smart Contract

* Open [Block Viewer](https://block-viewer.cere.network/#/explorer)
* Open `Developer` -> `Contracts`
* Select `DDC SC` -> `addInspector`
* Insert `Public key (hex)` to the `inspector` field
* Press `Execute`

#### 3. Configure interval

* Update the `ddc-metrics-offchain-worker::block_interval` in Developer -> RPC -> offchain - localStorageSet. The block number value should be in the Fixed Width Little Endian format. Examples: 5 - 0x05000000, 600 - 0x58020000, 10 - 0x0A000000.

#### 4. Configure the Smart Contract address

* Open [Block Viewer](https://block-viewer.cere.network/) which points to your Validator Node.&#x20;
* Go to `Developer` -> `RPC calls`
* Select `offchain` -> `localStorageSet` and specify the Smart Contract address mentioned in prerequisites section:
* key: `ddc-metrics-offchain-worker::sc_address`
* value: `5F7hDxFwMobL3mofGVUL4QwwZTmygwPE7T1ikPy5YT8Nizf8`
* Click `Submit RPC call`

![](<../.gitbook/assets/Screenshot from 2021-06-03 13-25-21.png>)

You are done with the Smart Contract address configuration!

#### 5. Configure your reporter account

* Use the same section (`Developer` -> `RPC calls`)
* Select `author` -> `insertKey`
* Specify params:
* keyType: `ddc1`
* suri: \<Secret phrase from the first step> (in our case - `ivory alpha language juice pyramid enforce kitchen cake galaxy ankle error aspect`)
* publicKey: \<Public key from the first step> (in our case - `0xae4ef92049ef164f44b08da3f14e120a79cf6425ca5d8cdca655a4c7d6cf0978`)
* Click `Submit RPC call`

![](<../.gitbook/assets/Screenshot from 2021-06-03 13-29-03.png>)

You are done with the reporter configuration!

Congrats, you have just configured OCW for your Validator Node! Your reporter will be triggered after the next block generated!
11 changes: 11 additions & 0 deletions ddc/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Intro

DDC node is a core component of DDC that is responsible for storing and retrieving the data. It’s written in Go and consists of a large set of components and modules, which are shown in the high level architecture diagram below.

DDC nodes operations are coordinated and rewarded through smart contracts running on the Cere test/main blockchains.

This section covers the configuration of DDC Smart Contracts and DDC Inspector nodes.

{% hint style="info" %}
**For more details on DDC Storage nodes, see the DDC book:** [**https://cerebellum-network.github.io/ddc-storage-node/**](https://cerebellum-network.github.io/ddc-storage-node/)****
{% endhint %}
31 changes: 31 additions & 0 deletions learn/council.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Council

### Council

Cere Network's Council serves as an elected body of network participants that are intended to represent the passive stakeholders of the greater Cere Network. The Council serves two primary tasks in the Cere Network governance process: proposing referenda and vetoing malicious or dangerous referenda.

### Submitting Candidacy

In order to join the Cere Network Council, the submission request requires a small amount of Cere Tokens to be bonded. The bond will be forfeited if the candidacy submission does not win or becomes a runner-up. If you are elected to the Council, the bond will remain kept.

If you intend to run for a spot on the Council, it is a good idea to announce your intentions in one of Cere's public forums(Telegram, Twitter, etc.) prior to your submission, so that your supporters will know when to vote for you.

### Submission

Navigate to the Cere Network Council tab [here](https://explorer.cere.network/#/council). Click on the "Submit candidacy" button.

![](<../.gitbook/assets/submit council.PNG>)

After completing the transaction, you will see your account appear in the "Candidates" row.

![](../.gitbook/assets/candidates.PNG)

Once your submission is in, we recommend kicking off the voting process by giving yourself the first vote. Click on the "Vote" button to initiate the transaction.

![](<../.gitbook/assets/submit council.PNG>)

If you were selected to join the council during the voting period, you will have won the council election and your account will now display under the "Members" section.

![](../.gitbook/assets/currentcouncil.PNG)

Congratulations on being elected! Now you are able to participate by making motions or voting on proposals.
119 changes: 119 additions & 0 deletions learn/governance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Governance

The system by which entities are directed and controlled. It is concerned with structure and processes for decision making, accountability, control and behaviour at the top of an entity.\


### Mechanism

Public and Council can make changes to the network via referenda which will go through the referendum where all CERE holders, weighted by stake, make the decision.\


### Referenda

Referenda are simple, inclusive, stake-based voting schemes. For instance, Upgrading the number of validators from 600 to 700. They are discrete events with fixed voting periods. They are binary, the only option in voting is "aye" or "nay" or abstaining entirely.

### Type

There are several types of proposals:

* Publicly submitted proposals;
* Proposals submitted by the council, either through a majority or unanimously;
* Proposals submitted as part of the enactment of a prior referendum;
* Emergency proposals submitted by the Technical Committee and approved by the Council.

Enactment time — 28 days.

Note: For emergency proposals, the enactment period will be shorter.\


### Proposing a Referendum

#### Public Referenda

Who: Anyone can propose

How: Depositing the minimum amount of tokens for a certain period (number of blocks).

What happens Next:

1. If someone agrees with the proposal, they may deposit the same amount of tokens to support it - this action is called seconding.
2. The referendum with the highest number of bonding will be selected for next voting cycle.
3. Only the number of tokens will be considered for moving to voting irrespective of the number of accounts contributed.

Maximum of 100 public proposals in the proposal queue.

#### Council Referenda

Unanimous Council - All members of the council agree on a proposal

Majority Council - Agreement from only a simple majority of council members only be one active referendum at any given time, except when there is also an emergency referendum in progress.

#### Voting Timetable

2 Queues

Public referenda

Council referenda

The referendum to be voted upon alternates between the top proposal in the two queues.

The "top" proposal is determined by the amount of stake bonded behind it

#### Voting on a referendum

To vote, a voter generally must lock their tokens up for at least the enactment delay period (28 days) beyond the end of the referendum.

It is possible to vote without locking at all, but your vote is worth a small fraction of a normal vote, given your stake.

#### Tallying

approve - the number of aye votes against - the number of nay votes turnout - the total number of voting tokens (does not include conviction) electorate - the total number of CERE tokens issued in the network

#### Super-Majority Approve

![](<../.gitbook/assets/Screenshot from 2021-03-05 14-26-09.png>)

#### Super-Majority Against

![](<../.gitbook/assets/Screenshot from 2021-03-05 14-26-13.png>)

#### Simple Majority

Approve > Against

### Submit public referenda

#### &#x20;How to submit a proposal for the Network?

In order to submit a proposal:

1. Go to the [Cere Explorer](https://explorer.cere.network/#/democracy): Governance -> Democracy
2. Click on Submit Pre-image and fill in the form. Let’s say you want to propose to increase the amount of validators:

![](https://lh4.googleusercontent.com/\_1cArZLMCjvmsBQgsdzvSQiz3loqP66yoaJi8oMmd-tUBu1FoJJrqBdkjVhtC-UjAfhLA0YoGY6m4wGU5YKbzqCeX9dmy2mdAdP4\_XHVKNgJdwJRpMJrPSmNA-eQHWA766Z-jaAd)

1. Copy preimage hash to the Clipboard
2. Click “Submit preimage”, then “Sign and Submit”
3. Click “Submit proposal”
4. Specify “preimage hash” and “locked balance”:

![](https://lh3.googleusercontent.com/sov452bEOsT7zzHL8\_uI1w8Zo1TxY\_1BipIOI-Y\_\_gdDO8PRU2-g5geJAs\_vFB1ZzO62jOzDoMW7OgGYk8Z6Yv\_vLNbr0sGI9qGM\_vZ3cgLVg-sEQzeIQ4kW0kJzHPU5Wbr4rld0)

1. Click “Submit proposal” button then “Sign and Submit”

Now you should be able to see it in “proposals” section:

![](https://lh4.googleusercontent.com/0cvr0kuFO\_4hypk8w2GLa9xBuJn8LABvUjp5yDGic1CuL8jBARznRvAWIyjHTmfXhMhPQl4qFfo7G4\_kQs-hAoAkjn-OGkoMvfk2l2zbYmg1YegL6QbspfHMy5xQ9lZRJOHXjw6Q)

#### How to vote for the proposal?

Wait until the end of each launch period for example for the current proposal you will need to wait about 22 days:

![](https://lh3.googleusercontent.com/NBN9yEsYzJQNhI1AJBiFlk7o11\_Z35YXRL1sSXIRIpxl8Md1G\_7pREsF2LAbqjIa86XEHli0KIbTrycp\_WeLlT03mY21HmFk5elCC1O8DXLRB4BwbjjvsrL8kDWPOm0l6K\_H6Bgc)

After this, the most seconded proposal will move to a referendum. After that others can vote for the changed param.

#### How does the proposal get applied?

Once all participants voted the change will be applied.\
Loading

0 comments on commit a656071

Please sign in to comment.