Giter Site home page Giter Site logo

dhiway / cord Goto Github PK

View Code? Open in Web Editor NEW
121.0 8.0 99.0 12.99 MB

CORD - Enterprise Blockchain Framework

Home Page: https://cord.network

License: GNU General Public License v3.0

Handlebars 0.41% Dockerfile 0.09% Rust 98.54% Shell 0.95%
blockchain cord rust substrate dhiway trustoverip did verifiable-credentials

cord's Introduction

This repository contains the Rust implementation of a CORD Network node based on the Substrate framework.

CORD

CORD is a global public utility and trust framework designed to address trust gaps, manage transactions, and facilitate the exchange of value at scale.

It simplifies the management of information, making it easier for owners to control their data. Agencies and businesses can discover, access, and use this data to deliver networked public services. CORD provides a transparent history of information, protecting it from unauthorized tampering both inside and outside the system.

Building on the modular approach of the Substrate framework, CORD defines a rich set of primitives to foster exceptional innovation across various industries. These innovations support transactions and record maintenance in sectors such as finance, trade, health, energy, water resources, agriculture, and many more.

CORD now supports multiple runtimes, each tailored to different types of networks:

  • Braid: Optimized for enterprise networks, Braid functions without on-chain governance. It’s ideal for private, high-performance environments where speed and efficiency are crucial.
  • Loom: Designed for ecosystem-level networks, Loom incorporates on-chain governance. It excels at managing and coordinating multi-party networks, making it suitable for sectors that require robust governance and regulatory compliance.
  • Weave: Targeted at permissionless networks, Weave is intended for open and decentralized environments where anyone can participate without prior authorization. Please note that Weave is currently a work in progress, with ongoing development to enhance its capabilities.

By offering these distinct runtimes, CORD provides a versatile foundation tailored to meet the specific needs of various industries and applications, enhancing its ability to deliver effective networked public services.

Get Started

The first step in becoming a blockchain developer with CORD is to learn how to compile and launch a single local blockchain node. In this tutorial, you'll build and start a single node blockchain using the CORD framework.

The CORD repository provides everything you need to set up a fully functional single-node blockchain that you can run locally in your development environment. This setup includes several predefined components—such as user accounts, assets, smart-contracts, governance, identifiers, statements, chain-space—allowing you to experiment with common tasks right away. You can build and run the node as-is to produce blocks and facilitate transactions immediately.

Prerequisites

Before you begin, ensure you have the necessary packages to locally run CORD.

Compile a CORD node

If you have already compiled the node on the local computer, you can skip this section and continue to Start the local node.

To compile the node :

  1. Open a terminal shell on your computer.

  2. Clone the cord node repository by running the following command:

    git clone https://github.com/dhiway/cord.git

    This command clones the develop branch.

  3. Change to the root of the CORD node directory by running the following command:

    cd cord

    Create a new branch to contain your work:

    git switch -c my-branch-yyyy-mm-dd

    Replace yyyy-mm-dd with any identifying information that you desire, but we recommend a numerical year-month-day format. For example:

    git switch -c my-branch-2024-06-01
  4. Compile the node by running the following command:

    cargo build --release

    You should always use the --release flag to build optimized artifacts. The first time you compile this, it takes some time to complete.

    It should complete with a line something like this:

    Finished release [optimized] target(s) in 5m 23s

Start the local node

To get your local CORD node up and running, follow these steps:

  1. Start the node in development mode:

    In the terminal where you compiled your node, run the following command:

    ./target/release/cord --dev

    This command starts the node in development mode using the predefined loom development chain specification. The --dev option ensures the node runs in a clean working state each time you restart it, deleting all active data such as keys, the blockchain database, and networking information. If you don't specify a runtime, the loom runtime is used by default.

  2. Start the Braid node in development mode:

    If you want to run the Braid runtime, use the following command:

    ./target/release/cord braid --dev
  3. Start the Loom node in development mode:

    To run the Loom runtime, use this command:

    ./target/release/cord loom --dev
  4. Verify your node is up and running successfully by reviewing the output displayed in the terminal.

    The terminal should display output similar to this:

    2024-06-11 16:22:52 Dhiway CORD
    2024-06-11 16:22:52 ✌️  version 0.9.3-5cd85df03fb
    2024-06-11 16:22:52 ❤️   by Dhiway Networks <[email protected]>, 2019-2024
    2024-06-11 16:22:52 📋 Chain specification: Loom Development
    2024-06-11 16:22:52 🏷  Node name: low-pull-3415
    2024-06-11 16:22:52 👤 Role: AUTHORITY
    2024-06-11 16:22:52 💾 Database: ParityDb at /var/folders/ww/gtrj_81s6hj7p_6bd0b3qgb00000gn/T/substrateyVRCDn/chains/loom-dev/paritydb/full
    2024-06-11 16:22:55 🔨 Initializing Genesis block/state (state: 0x717a…e54e, header-hash: 0x1ae3…3314)
    2024-06-11 16:22:55 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
    2024-06-11 16:22:55 👶 Creating empty BABE epoch changes on what appears to be first startup.
    2024-06-11 16:22:55 🏷  Local node identity is: 12D3KooWButjQ1xjMkDM8BDLrJipvqBNcGhLnRWJTR5MbU1YaMUN
    ...
    ...
    ...
    ...
    2024-06-11 16:23:05 💤 Idle (0 peers), best: #3 (0x3a75…1901), finalized #1 (0x1ab2…ff17), ⬇ 0 ⬆ 0
    

    If the number after finalized is increasing, your blockchain is producing new blocks and reaching consensus about the state they describe.

  5. Keep the terminal that displays the node output open to continue.

These steps will help you set up and experiment with different runtimes supported by CORD, each tailored to specific network requirements. Enjoy exploring the versatile capabilities of the CORD framework!

Using Docker

Install Docker

If Docker is not installed on your system, you can check by running: which docker. To install Docker, follow the official installation documentation.

  1. First, let's check the version of CORD. The first time you run this command, the CORD Docker image will be downloaded. This may take some time and bandwidth, so please be patient:

    docker run --rm dhiway/cord --version

    You can also pass any argument or flag that CORD supports:

    docker run --name "CordDocker" --rm dhiway/cord --dev
  2. Once you are done experimenting and picking the best node name, you can start CORD as a daemon, exposing the necessary ports and mounting a volume to store your blockchain data locally. Make sure to create a Docker volume for mounting or pass a separate mount (disk) for the process.

    Create a Docker volume:

    docker volume create cord
  3. To start a CORD node with the default RPC port 9933, default P2P port 30333, and default Prometheus port 9615, use the following command:

    docker run -d -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615 -v cord:/data dhiway/cord:develop --dev --rpc-external --rpc-cors all
  4. If you want to specify a custom node name, add the arg --name "YourName" to the command:

    docker run --name "CordDocker" -d -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615 -v cord:/data dhiway/cord --dev --rpc-external --rpc-cors all

Note on Using Braid and Loom Runtimes

CORD supports multiple runtimes, including Braid and Loom. To specify a runtime, you can add the runtime name before the --dev flag. For example:

  • To start a Braid runtime node:

    docker run --name "CordDocker" -d -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615 -v cord:/data dhiway/cord:develop braid --dev --rpc-external --rpc-cors all
  • To start a Loom runtime node:

    docker run --name "CordDocker" -d -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615 -v cord:/data dhiway/cord:develop loom --dev --rpc-external --rpc-cors all

Other projects of interest

This repository contains the complete code for the CORD blockchain framework. To effectively interact with the chain, you may need several additional components:

  • CORD.js: This SDK is essential for building applications that use CORD. It provides methods to interact with the CORD node, enabling seamless integration and interaction with the network.

  • Apps UI: This user interface project is managed through the apps repository, providing an intuitive way to interact with the network.

  • Telemetry: Monitor the network through this telemetry interface.

  • GraphQL Interface: Currently in beta, this interface facilitates advanced data queries and is under development in the cord-subql repository.

  • Demo Scripts: Explore these demo scripts to connect and interact with the CORD Chain pallets/modules. They utilize the cord.js SDK to facilitate chain interactions.

Contributing

If you would like to contribute, please fork the repository, follow the contributions guidelines, introduce your changes and submit a pull request. All pull requests are warmly welcome.

Before submitting the PR

There are 3 tests which run as part of PR validation.

  • Build - cargo build --release

  • Clippy - cargo clippy --all --no-deps --all-targets --features=runtime-benchmarks -- -D warnings

  • Test - cargo test --release --locked --features=runtime-benchmarks --no-fail-fast --verbose --color always --all --all-targets

Note that each of these would take significant time to run, and hence, if you are working on a specific pallet, you can use -p <pallet-name> --lib instead of --all. That should be faster than normal full test locally.

License

The code in this repository is licensed under the terms of the GPL 3.0 licensed.

cord's People

Contributors

adi-a11y avatar amarts avatar atreyasuraj avatar daevmithran avatar exar04 avatar hardik-pratap-singh avatar hardiksharma11 avatar harsh1s avatar jhanvi528 avatar niranjanap avatar omahs avatar pranshurastogi avatar pratik-050 avatar priyashankarbanerjee avatar rithwik0480 avatar rohibhan avatar roynrishingha avatar sankarshanmukhopadhyay avatar shashank-iitbhu avatar shashankiitbhu avatar siddharthteli12 avatar smohan-dw avatar sriramkashyapks avatar vatsa287 avatar vjgaur avatar zeel991 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cord's Issues

[C4GT] Chain-Space: Add tests for `InvalidIdentifierLength`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for InvalidIdentifierLength for pallet/chain-space

Expected Outcome

  • Test should assert for InvalidIdentifierLength being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

Pick one of [Low]

Category

[Test]

Sub Category

[Beginner friendly]

Need help to create a ChainSpec file for deployment

Steps I followed

Create new accounts for every node

Generate Sr25519 keys

./target/release/cord key generate --scheme Sr25519 --password-interactive

Generate ED25519 keys from Sr25519 keys

./target/release/cord key inspect --password-interactive --scheme Ed25519 "<seed phrase of the Sr25519 key>"

Choosing sidney-cord-dhiway as the first and main node (sudo)

All Sr25519 SS58 keys

  1. sidney-cord: 5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb
  2. europe-cord: 5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA
  3. usa-cord: 5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU

Ed25519 keys for Grandpa

  1. sidney-cord: 5FaP17pFGGtbFrzwVz3z4L6iJawnrtWsgKGzjJxMtEdH3ZG7
  2. europe-cord: 5Dq3ZQKMscCsS5MCxaMDzdYVAfikJejkrksQ3kJQL6u54XLr
  3. usa-cord: 5Ep9R2CPbNZXiqiEe8xZqRqUcZj9fs5pG67Hm1YZE1PH74DM

NOTE: I have also written down all the account details like seed phrase, passwords in a separate doc

Create chain spec file

./target/release/cord build-spec --disable-default-bootnode --chain local > cordV2.json

Make the chain spec in Raw

./target/release/cord build-spec --chain=cordV2.json --raw --disable-default-bootnode > cordV2Raw.json

The content of the ChainSpec file

{
  "name": "CORD-Builder-Net",
  "id": "cord_builder_net",
  "chainType": "Live",
  "bootNodes": [],
  "telemetryEndpoints": [
    [
      "/dns/telemetry.dway.io/tcp/443/x-parity-wss/%2Fsubmit%2F",
      0
    ]
  ],
  "protocolId": "cord",
  "properties": {
    "ss58Format": 29,
    "tokenDecimals": 12,
    "tokenSymbol": "WAY"
  },
  "forkBlocks": null,
  "badBlocks": null,
  "lightSyncState": null,
  "codeSubstitutes": {},
  "genesis": {
    "runtime": {
      "system": {
        "code": "0x52bc... ATTENTION: this is too long to paste here"
       },
       "babe": {
        "authorities": [
          [
            "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
            1
          ],
          [
            "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
            1
          ],
          [
            "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU",
            1
          ]
        ],
        "epochConfig": {
          "c": [
            1,
            4
          ],
          "allowed_slots": "PrimaryAndSecondaryVRFSlots"
        }
      },
      "indices": {
        "indices": []
      },
      "balances": {
        "balances": [
          [
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
            50000000000000000
          ],
          [
            "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
            50000000000000000
          ],
          [
            "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
            50000000000000000
          ],
          [
            "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY",
            50000000000000000
          ],
          [
            "5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc",
            50000000000000000
          ],
          [
            "5EYCAe5ijiYdgPDdEpLxUAJvfRBELy6M1gTZF5P2qVPKncWn",
            50000000000000000
          ]
        ]
      },
      "authorityManager": {
        "authorities": [
          "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
          "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
          "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
        ]
      },
      "session": {
        "keys": [
          [
            "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
            {
              "grandpa": "5FaP17pFGGtbFrzwVz3z4L6iJawnrtWsgKGzjJxMtEdH3ZG7",
              "babe": "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
              "im_online": "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
              "authority_discovery": "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb"
            }
          ],
          [
            "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
            {
              "grandpa": "5Dq3ZQKMscCsS5MCxaMDzdYVAfikJejkrksQ3kJQL6u54XLr",
              "babe": "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
              "im_online": "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
              "authority_discovery": "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA"
            }
          ],
          [
            "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU",
            {
              "grandpa": "5Ep9R2CPbNZXiqiEe8xZqRqUcZj9fs5pG67Hm1YZE1PH74DM",
              "babe": "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU",
              "im_online": "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU",
              "authority_discovery": "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
            }
          ]
        ]
      },
      "grandpa": {
        "authorities": [
          [
            "5FaP17pFGGtbFrzwVz3z4L6iJawnrtWsgKGzjJxMtEdH3ZG7",
            1
          ],
          [
            "5Dq3ZQKMscCsS5MCxaMDzdYVAfikJejkrksQ3kJQL6u54XLr",
            1
          ],
          [
            "5Ep9R2CPbNZXiqiEe8xZqRqUcZj9fs5pG67Hm1YZE1PH74DM",
            1
          ]
        ]
      },
      "imOnline": {
        "keys": [
          "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
          "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
          "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
        ]
      },
      "authorityDiscovery": {
        "keys": [
          "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
          "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
          "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
        ]
      },
      "democracy": {
        "phantom": null
      },
      "council": {
        "phantom": null,
        "members": [
          "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
          "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
          "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
        ]
      },
      "technicalCommittee": {
        "phantom": null,
        "members": [
          "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
          "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
          "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
        ]
      },
      "technicalMembership": {
        "members": [
          "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
          "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
          "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU"
        ],
        "phantom": null
      },
      "treasury": null,
      "transactionPayment": {
        "multiplier": "1000000000000000000"
      },
      "extrinsicAuthorship": {
        "authors": [
          [
            "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb",
            null
          ],
          [
            "5EHonjewVo5BdCXmuQvX5FKTziCTL6Po56LN8LJnKHj2GZxA",
            null
          ],
          [
            "5DP59Md5jM1FGzcLQV6EyJffW568KqR9s3gEwv7rkmiAu1rU",
            null
          ]
        ]
      },
      "sudo": {
        "key": "5EX237TZo8zbSxTa4ehDoNYgsCxS2o57NiJB7jfb1NNyfnJb"
      }
    }
  }
}

What else I did

  • I have open all inbound and outbound requests in EC2 machine.
  • Used the public ip and Node Id to connect with the Node running on EC2 - but no luck
  • Failed to Transpile this Chainspec into RawChainspec to further use to run nodes.

I'm currently able to simulate 3-4 node CORD network with predefined accounts on my local machine. I'm trying to use the accounts I have just created to run a 3 Node CORD chain on 3 EC2 on different regions.

[C4GT] Network-Score: Add tests for 'RatingIdentifierAlreadyAdded'

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for RatingIdentifierAlreadyAdded for pallet/network-score

Expected Outcome

  • Test should assert for RatingIdentifierAlreadyAdded being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Membership: Add tests for `MembershipRenewalAlreadyRequested`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-membership after adding it in the code.

Goals

  • Add tests for MembershipRenewalAlreadyRequested for pallet/network-membership

Expected Outcome

  • Test should assert for MembershipRenewalAlreadyRequested being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for 'InvalidIdentifierLength'

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for InvalidIdentifierLength for pallet/network-score

Expected Outcome

  • Test should assert for InvalidIdentifierLength being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

CORD v0.8.0 Release checklist

Release Checklist

This is the release checklist for CORD v0.8.0. All following checks should be completed before publishing a new release. The current release candidate can be checked out with git checkout release-v0.8.0

All Releases

These checks should be performed on the codebase prior to forking to a release-candidate branch.

  • Verify spec_version has been incremented since the last release. If the runtime was published (release or pre-release), either the spec_version or impl must be bumped.
  • Verify previously completed migrations are removed.
  • Verify pallet and extrinsic ordering has stayed the same. Bump transaction_version if not.
  • Verify benchmarks have been updated for any modified runtime logic.
  • Verify builds are done using the production profile

The following checks can be performed after we have forked off to the release-candidate branch or started an additional release-candidate branch (rc-2, rc-3, etc)

  • Verify new migrations complete successfully, and the runtime state is correctly updated.
  • Verify CORD SDK & API are up to date with the latest runtime changes.
  • Push runtime upgrade to Sprintnet and verify network stability.
  • Verify Docker images are published

[C4GT] Comeup with a elaborate steps on recovery / best practise on handling lagging finality

Description

In case of finality lagging (can happen when 1/3rd of validators are down), we need a set of instruction to handle the chain, and its continuity.
The validators would be having logs like below in that case..
2023-08-15 17:11:03 Backing off claiming new slot for block authorship: finality is lagging.
2023-08-15 17:11:04 💤 Idle (23 peers), best: #151637 (0xee66…81e1), finalized #151158 (0x28a6…91f8), ⬇ 1.6kiB/s ⬆ 1.6kiB/s

Goals

  • List of steps needs to recover

Expected Outcome

  • Should be able to recover from the situation without having to reset

Acceptance Criteria

  • Following the above steps, recovery should be possible without a reset

Implementation Details

NA

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts @NiranjanAP

Complexity

[High]

Category

Feature

Sub Category

Support

[C4GT] Chain-Space: Add tests for `InvalidIdentifier`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for InvalidIdentifier for pallet/chain-space

Expected Outcome

  • Test should assert for InvalidIdentifier being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Identity: Add tests for `RegistrarAlreadyExists`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-identity after adding it in the code.

Goals

  • Add tests for RegistrarAlreadyExists for pallet/identity

Expected Outcome

  • Test should assert for RegistrarAlreadyExists being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: uninvited_judgement_should_work which validates error code RegistrarNotFound

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for `ReferenceIdentifierNotFound`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for ReferenceIdentifierNotFound for pallet/network-score

Expected Outcome

  • Test should assert for ReferenceIdentifierNotFound being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

Docker push is failing

release-docker-image / release-docker-image
Failed in 3 seconds

invalid argument "cord:/develop" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
Error: Process completed with exit code 125.

[C4GT] ] Collective: Add tests for `DelegateNotFound`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-collective after adding it in the code.

Goals

  • Add tests for DelegateNotFound for pallet/collective

Expected Outcome

  • Test should assert for DelegateNotFound being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: motions_ignoring_non_collective_proposals_works which validates error code NotMember

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Chain-Space: Add tests for `SpaceDelegatesLimitExceeded`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for SpaceDelegatesLimitExceeded for pallet/chain-space

Expected Outcome

  • Test should assert for SpaceDelegatesLimitExceeded being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for 'InvalidRatingValue'

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for InvalidRatingValue for pallet/network-score

Expected Outcome

  • Test should assert for InvalidRatingValue being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Agree]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] DID: Add tests for `InvalidDidAuthorizationCall`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-did after adding it in the code.

Goals

  • Add tests for InvalidDidAuthorizationCall for pallet/did

Expected Outcome

  • Test should assert for InvalidDidAuthorizationCall being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: check_invalid_signature_format_call_error which validates error code InvalidSignatureFormat

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for `RatingIdentifierNotFound`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for RatingIdentifierNotFound for pallet/network-score

Expected Outcome

  • Test should assert for RatingIdentifierNotFound being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

pallet_asset: implement revoke() call

refer to revoke call in statement, and bring similar functionality in asset.

Expectation: revoke an asset or an instance (if its already active, and owner is matching).

About static cord binary's dependency

Below is the error I got when I ran the cord binary build on ubuntu-22.04 (in ec2) on a debian machine on GCP.

amar@cord-test-1:~$ ./cord-static-x86-ubuntu key generate-node-key --file ./data/node-key
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./cord-static-x86-ubuntu)
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./cord-static-x86-ubuntu)
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cord-static-x86-ubuntu)
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./cord-static-x86-ubuntu)
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./cord-static-x86-ubuntu)

Highlight is, we surely need libc to be of same version on machines where it is build. Hence when we publish artefacts, we should make sure to name it properly with arch used, and also libc version.

[C4GT] Chain-Space: Add tests for `TypeCapacityOverflow`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for TypeCapacityOverflow for pallet/chain-space

Expected Outcome

  • Test should assert for TypeCapacityOverflow being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

understand the logs and find remedy

Sometimes after restart of the nodes (on validator) see below logs:

2023-08-15 17:07:38 Ignoring request to disconnect reserved peer 12D3KooWExU7gjGWPPPhUSHfRw2VNeej5wB4hQBkpomvYiMntrj1 from SetId(2).    
2023-08-15 17:07:39 Trying to disconnect unknown peer 12D3KooWBJktXVM6URUUoDKUxdU2hTxq5d57BzRWt4VCf5ivh4CP from SetId(0).    
2023-08-15 17:07:39 Ignoring request to disconnect reserved peer 12D3KooWBJktXVM6URUUoDKUxdU2hTxq5d57BzRWt4VCf5ivh4CP from SetId(1).    
2023-08-15 17:07:39 Ignoring request to disconnect reserved peer 12D3KooWBJktXVM6URUUoDKUxdU2hTxq5d57BzRWt4VCf5ivh4CP from SetId(2).    

Need to understand when and why these logs come up.

[C4GT] Chain-Space: Add tests for `DelegateAlreadyAdded`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for DelegateAlreadyAdded for pallet/chain-space

Expected Outcome

  • Test should assert for DelegateAlreadyAdded being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

error on 'archive' nodes

Found the below issues when running the latest image as archive node.

Error: Service(Client(RuntimeApiError(Application(Execution(Other("Exported method AuraApi_slot_duration is not found"))))))

NOTE: a bootnode successfully started with the same image.

[C4GT] Network-Score: Add tests for `ReferenceNotDebitIdentifier`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for ReferenceNotDebitIdentifier for pallet/network-score

Expected Outcome

  • Test should assert for ReferenceNotDebitIdentifier being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for `EntityMismatch`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for EntityMismatch for pallet/network-score

Expected Outcome

  • Test should assert for EntityMismatch being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Identity: Add tests for `TooManyFields`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-identity after adding it in the code.

Goals

  • Add tests for TooManyFields for pallet/identity

Expected Outcome

  • Test should assert for TooManyFields being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: uninvited_judgement_should_work which validates error code RegistrarNotFound

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] - Integrate with Sunbird RC

Project Details

Like Bitcoin, Ethereum, and Polkadot, CORD refers at once to a network protocol and the
primary federated public network that runs this protocol. CORD is a free and open project, with
the code being placed under a FLOSS license. The project is developed in an open manner
and accepts contributions where ever they are helpful.
The implementation of the CORD Layer-1 Framework (CLF), known as CORD and includes a full
protocol implementation together with API bindings and SDK. CORD is designed to be a
general-purpose blockchain technology stack, neither uniquely for a federated network nor
public/private network operation. This paper nonetheless describes CORD under the context
of a federated network.

More on the project @ https://cord.network

Features to be implemented

  • Integrate ability to anchor schemas through APIs
  • Integrate ability to create 'registry' on chain
  • Integrate APIs to create credentials, or entries on to this registry

What exists

  • CORD Blockchain
  • API interfaces, API service code (issuer-agent)
  • An attempt done earlier on the similar lines, but need a revisit now, with new API set and DID based logic

What needs to be built

Sunbird RC project should get a support for anchoring the credentials, and registry entries on to CORD Blockchain for immutability.

Complexity

Medium

Skills Required

Typescript, REST APIs, basic understanding of Sunbird RC, Rust

Name of Mentors:

@amarts, @smohan-dw, @vjgaur, @rohibhan, @Vikastc

Project size

8 Weeks

Product Set Up

docker run -p 9944:9944 -it dhiway/cord:dev-0.8.0 --dev --unsafe-ws-external --unsafe-rpc-external
cd issuer-agent ; docker compose up Issuer Agent repo

Acceptance Criteria

  • The integration should be able to demonstrate an event being generated on CORD chain, and the document/data-identifier should get anchored on chain.

Milestones

  • Understanding the requirements
  • Setup CORD locally, and run the demos locally.
  • Setup the API server and run the APIs given in documentation
  • Setup Sunbird RC, and run the integration steps
  • Demonstrate events from Sunbird RC gets anchored on CORD chain

C4GT

This issue is nominated for Code for GovTech (C4GT) 2023 edition.
C4GT is India's first annual coding program to create a community that can build and contribute to global Digital Public Goods. If you want to use Open Source GovTech to create impact, then this is the opportunity for you! More about C4GT here: https://codeforgovtech.in/

Switch to using distroless in Dockerfiles

We currently use a full blown ubuntu:20.04 for Cord release images. While useful for debugging, an Ubuntu image contains packages that are not required to run a Cord node.
Using a fat Docker image:

  1. increases the network bandwidth as larger image needs to be pulled. It is especially important in orchestrated environments when pulls happen often
  2. widens the attack surface due to a larger number of dependencies in a resulting image
  3. decreases noise/signal ratio of security scanners as it should scan through more packages

comeup with a elaborate steps on recovery / best practise on handling lagging finality

In case of finality lagging (can happen when 1/3rd of validators are down), we need a set of instruction to handle the chain, and its continuity.

The validators would be having logs like below in that case..

2023-08-15 17:11:03 Backing off claiming new slot for block authorship: finality is lagging.    
2023-08-15 17:11:04 💤 Idle (23 peers), best: #151637 (0xee66…81e1), finalized #151158 (0x28a6…91f8), ⬇ 1.6kiB/s ⬆ 1.6kiB/s    

[C4GT] Network-Membership: Add tests for `MaxMembersExceededForTheBlock`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-membership after adding it in the code.

Goals

  • Add tests for MaxMembersExceededForTheBlock for pallet/network-membership

Expected Outcome

  • Test should assert for MaxMembersExceededForTheBlock being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

Fix static cord binary's dependency

Description

Below is the error I got when I ran the cord binary build on ubuntu-22.04 (in ec2) on a debian machine on GCP.

amar@cord-test-1:~$ ./cord-static-x86-ubuntu key generate-node-key --file ./data/node-key
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.30' not found (required by ./cord-static-x86-ubuntu) ./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.29' not found (required by ./cord-static-x86-ubuntu)
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by ./cord-static-x86-ubuntu) ./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by ./cord-static-x86-ubuntu)
./cord-static-x86-ubuntu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./cord-static-x86-ubuntu)

Highlight is, we surely need libc to be of same version on machines where it is build. Hence when we publish artefacts, we should make sure to name it properly with arch used, and also libc version.

Goals

  • Publish artefacts with proper naming having architecture details, and also libc version.

Expected Outcome

  • Publish artefacts with proper naming having architecture details, and also libc version.

Acceptance Criteria

  • Publish artefacts with proper naming having architecture details, and also libc version.

Implementation Details

NA

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Infrastructure, Build tools

Mentor(s)

@amarts @NiranjanAP

Complexity

Medium

Category

Deployment

Sub Category

Technical Debt

[C4GT] Network-Score: Add tests for 'MessageIdAlreadyExists'

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for MessageIdAlreadyExists for pallet/network-score

Expected Outcome

  • Test should assert for MessageIdAlreadyExists being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for 'InvalidEntryOrRatingType'

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for InvalidEntryOrRatingType for pallet/network-score

Expected Outcome

  • Test should assert for InvalidEntryOrRatingType being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] DID: Add tests for `MaxKeyAgreementKeysExceeded`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-did after adding it in the code.

Goals

  • Add tests for MaxKeyAgreementKeysExceeded for pallet/did

Expected Outcome

  • Test should assert for MaxKeyAgreementKeysExceeded being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: check_invalid_signature_format_call_error which validates error code InvalidSignatureFormat

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Collective: Add tests for `PrimeAccountNotMember`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-collective after adding it in the code.

Goals

  • Add tests for PrimeAccountNotMember for pallet/collective

Expected Outcome

  • Test should assert for PrimeAccountNotMember being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: motions_ignoring_non_collective_proposals_works which validates error code NotMember

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Agree]

Category

[Test]

Sub Category

[Beginner friendly]

[C4GT] Network-Score: Add tests for 'UnauthorizedOperation'

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-score after adding it in the code.

Goals

  • Add tests for UnauthorizedOperation for pallet/network-score

Expected Outcome

  • Test should assert for UnauthorizedOperation being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: In pallets/network-membership check method test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

failed to start the Babe based chain with `staging` option, when chainspec was used.

ubuntu@ip-172-31-20-24:~$ docker run --name cord -v /data:/data -v /home/ubuntu/:/home/ubuntu --network host -detach dhiway/cord:fc67f65c661e7a4dd95006bdfbaec0dfdeea80a4 --base-path /data --chain=/home/ubuntu/raw-4.json --node-key-file /home/ubuntu/node-key --prometheus-external --ws-external --rpc-external --rpc-methods Safe --rpc-cors all --pruning 256
059cd96c269a265f27ef9a7045532fb87ff70ea2d5a64c3c3ca96b3670032978
ubuntu@ip-172-31-20-24:~$ docker logs -f cord
2022-07-18 18:41:06 Dhiway CORD    
2022-07-18 18:41:06 ✌️  version 0.7.4-unknown    
2022-07-18 18:41:06 ❤️  by Dhiway Networks <[email protected]>, 2019-2022    
2022-07-18 18:41:06 📋 Chain specification: CORD Staging Testnet    
2022-07-18 18:41:06 🏷  Node name: rural-beginner-9350    
2022-07-18 18:41:06 👤 Role: FULL    
2022-07-18 18:41:06 💾 Database: RocksDb at /data/chains/cord_staging_testnet/db/full    
2022-07-18 18:41:06 ⛓  Native runtime: cord-7040 (dhiway-cord-0.tx1.au0)    
2022-07-18 18:41:10 Essential task `txpool-background` failed. Shutting down service.    
2022-07-18 18:41:10 Essential task `transaction-pool-task-0` failed. Shutting down service.    
2022-07-18 18:41:10 Essential task `transaction-pool-task-1` failed. Shutting down service.    
Error: Service(Client(VersionInvalid("Unsupported or invalid BabeApi version")))

[C4GT] Understand the logs and find remedy

Description

Sometimes after restart of the nodes (on validator) see below logs:

2023-08-15 17:07:38 Ignoring request to disconnect reserved peer 12D3KooWExU7gjGWPPPhUSHfRw2VNeej5wB4hQBkpomvYiMntrj1 from SetId(2).
2023-08-15 17:07:39 Trying to disconnect unknown peer 12D3KooWBJktXVM6URUUoDKUxdU2hTxq5d57BzRWt4VCf5ivh4CP from SetId(0).
2023-08-15 17:07:39 Ignoring request to disconnect reserved peer 12D3KooWBJktXVM6URUUoDKUxdU2hTxq5d57BzRWt4VCf5ivh4CP from SetId(1).
2023-08-15 17:07:39 Ignoring request to disconnect reserved peer 12D3KooWBJktXVM6URUUoDKUxdU2hTxq5d57BzRWt4VCf5ivh4CP from SetId(2).
Need to understand when and why these logs come up.

Goals

  • Understand the reason for the logs and report, suggest a remedy

Expected Outcome

  • Report the reason for the logs
  • Suggest a remedy

Acceptance Criteria

  • Remedy should be tried out and demonstrated to be working fine

Implementation Details

NA

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts @NiranjanAP

Complexity

Low

Category

Bug

Sub Category

Beginner friendly

[C4GT] Chain-Space: Add tests for `DelegateNotFound`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for DelegateNotFound for pallet/chain-space

Expected Outcome

  • Test should assert for DelegateNotFound being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.
    ## Acceptance Criteria
    NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

pallet_asset: implement a restore() call

After #267 is implemented, there would be a need to restore the revoked asset / instance.

This may help in a 'suspension' of asset to see if the particular transfer query would come on the revoked asset.

RFE: Provide a mechanism to check all transactions on a given identifier

Usecase: Anyone using 'chain' should be able to query the chain to see all transactions on the identifier. This would enhance the trust factor by multiple factor.

Can be implemented through pallet storage, or through a rpc method.

Right now, the projects like subql which can aggregate all events on the chain build a query for such things, but still, that becomes a request served from an entity outside of the chain, and hence outside the purview of chain governance. This is key in 'verification' of any data.

Replace mentions of the `ci-linux:production` image tag with the `ci-unified:latest`

Hello everyone!

I see that your project uses one of the paritytech CI images. Just FYI, the paritytech/ci-linux:production image has been deprecated in favor of the paritytech/ci-unified image. Please use the paritytech/ci-unified:latest image in your workflows, pipelines or docs, or use the specific tag (e.g. paritytech/ci-unified:bullseye-1.70.0) for granularity and versioning, but you will still need to check upstream for new releases.

Docker Build fails locally on M1

docker build -t local/cord:dev-0.8.0 .

[+] Building 152.6s (12/14)
 => [internal] load build d  0.0s
 => => transferring doc 74B  0.0s
 => [internal] load .docker  0.0s
 => => transferring con 72B  0.0s
 => [internal] load metadat  3.7s
 => [internal] load metadat  3.7s
 => [auth] library/ubuntu:p  0.0s
 => [auth] paritytech/ci-li  0.0s
 => [builder 1/4] FROM dock  0.0s
 => CACHED [stage-1 1/3] FR  0.0s
 => [internal] load build c  0.0s
 => => transferring 16.32kB  0.0s
 => CACHED [builder 2/4] WO  0.0s
 => CACHED [builder 3/4] CO  0.0s
 => ERROR [builder 4/4] R  148.7s
------
 > [builder 4/4] RUN cargo build --locked --profile production:
#12 0.284 info: syncing channel updates for 'nightly-2023-03-20-x86_64-unknown-linux-gnu'
#12 1.568 info: latest update on 2023-03-20, rust version 1.70.0-nightly (da7c50c08 2023-03-19)
#12 1.572 info: downloading component 'cargo'
#12 3.629 info: downloading component 'clippy'
#12 4.292 info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
#12 10.03 info: downloading component 'rust-std'
#12 21.48 info: downloading component 'rustc'
#12 43.73 info: downloading component 'rustfmt'
#12 44.62 info: installing component 'cargo'
#12 45.97 info: installing component 'clippy'
#12 46.49 info: installing component 'rust-std' for 'wasm32-unknown-unknown'
#12 50.13 info: installing component 'rust-std'
#12 55.62 info: installing component 'rustc'
#12 65.54 info: installing component 'rustfmt'
#12 67.35     Updating crates.io index
#12 67.35     Updating git repository `https://github.com/dhiway/substrate`
#12 148.7 Killed
------
executor failed running [/bin/sh -c cargo build --locked --profile ${PROFILE}]: exit code: 137

[C4GT] Network-Membership: Add tests for `MembershipNotFound`

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-network-membership after adding it in the code.

Goals

  • Add tests for MembershipNotFound for pallet/network-membership.

Expected Outcome

  • Test should assert for MembershipNotFound being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: test_duplicate_member_request which validates error code MembershipAlreadyAcquired

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Medium]

Category

[Test]

Sub Category

[Beginner friendly]

Issue with CI

Looks like the version of paritytech CI and debian:buster-slim are now different.

Step 12/16 : RUN ldd /usr/local/bin/cord && 	/usr/local/bin/cord --version
 ---> Running in d19059caca19
/usr/local/bin/cord: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bin/cord)
/usr/local/bin/cord: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/local/bin/cord)
	linux-vdso.so.1 (0x00007ffd825f4000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe7632b3000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe763299000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe763278000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe7630f5000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe7630f0000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe762f2f000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe76638c000)
/usr/local/bin/cord: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bin/cord)
/usr/local/bin/cord: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/local/bin/cord)
The command '/bin/sh -c ldd /usr/local/bin/cord && 	/usr/local/bin/cord --version' returned a non-zero code: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.