Giter Club home page Giter Club logo

bitgreen-node's Introduction

Bitgreen Parachain

This repository contains the core logic and associated tools to issue and manage verified carbon credit units on the Bitgreen parachain.

1. Introduction

Bitgreen is an open and permissionless blockchain built to meet the needs of NGOs, corporate ESG groups, and purpose-driven innovation in Web3. Bitgreen makes it easy to finance, originate and purchase high quality, transparent Carbon Credits that conserve nature, remove atmospheric CO2 and send financial benefits to local communities.

2. Overview

Bitgreen provides a convenient and easy-to-use platform for the aforementioned Carbon Credit management processes and the Bitgreen Impact Investment Platform delivers the first blockchain marketplace for discovering and buying digital green bonds.

2.1. Carbon Credits Pallet

Each Carbon Credits represents a reduction or removal of one tonne of carbon dioxide equivalent (CO2e) achieved by a project. Carbon Creditss are characterized by a number of quality assurance principles which are confirmed through the project validation and verification process. Carbon Credits are ultimately purchased and retired by an end user as a means of offsetting their emissions. The Carbon Credits pallet manages the creation and retirement of Carbon Credits units for the bitgreen runtime. Credits in a project are represented in terms of batches, these batches are usually seperated in terms of 'vintages'. The vintage refers to the age of the credit. For more details, see the pallet documentation

2.2. Carbon Credits Pool

The Carbon Credits Pool pallet lets users create and manage Carbon Credits pools. A Carbon Credits pool is a collection of Carbon Credits tokens of different types represented by a common pool token. A user holding any Carbon Credits tokens (subject to the Carbon Credits pool config) can deposit Carbon Credits tokens to the pool and receive equivalent pool tokens in return. These pool tokens can be transferred freely and can be retired. When retire function is called, the underlying Carbon Credits credits are retired starting from the oldest in the pool. For more details, see the pallet documentation

2.3. Cache Engine

We developed a light cache engine to query the transactions by account date/time limits and transaction id (txhash).
It's reachable at: https://testnet.bitgreen.org:9443. You can install in your node as from instructions here

3. Building

Follow these steps to get started with the BitGreen parachain:

Install Rust:

curl https://sh.rustup.rs -sSf | sh

You may need additional dependencies, checkout substrate.io for more info

sudo apt-get install -y git clang curl libssl-dev llvm libudev-dev

You can build without launching:

git clone https://github.com/bitgreen/bitgreen-node
cd bitgreen-node
cargo build --release -p bitgreen-parachain

4. Run local testnet

Since Bitgreen is a parachain, you can only run it alongside a relaychain, the following steps describe how to get the parachain and relaychain running with polkadot-launch

  1. Install polkadot-launch npm i polkadot-launch -g

  2. Clone the polkadot repo and build the relaychain, follow instructions in cumulus repo

  3. Ensure the relaychain build path matches the path insde polkadot-launch/config.json

  4. Run polkadot-launch ./polkadot-launch/config.json

5. Development

Bitgreen is following the Substrate code style.

In addition, we incorporate several tools to improve code quality. These are integrated into our CI and are expected to pass before a PR is considered mergeable. They can also be run locally.

  • clippy - run with cargo clippy --release --workspace
  • rustfmt - run with cargo fmt -- --check
  • dprint - run with dprint fmt

Directory Structure

The following is a list of directories of interest in development.

Directory Purpose
doc/ High level documentation
cache-engine/ Cache engine source (js)
parachain/ Bitgreen's main node (rust)
pallets/ Bitgreen's Substrate runtime pallets (rust)
primitives/ Base types used in runtime
runtime/ Bitgreen's runtime (on-chain) code (rust, compiled to WASM)
scripts/ Utilities for launching and interacting with a Bitgreen chain (typescript)
tools/ Various tools generally related to development (typescript)

Build the node

git clone https://github.com/bitgreen/bitgreen-node
cd bitgreen-node

# Build the node (The first build will be long (~30min))
cargo build --release

Run tests

(Run tests for entire chain)
cargo test

(Run tests for pallet)
cargo test -p <pallet-name>

Run benchmark tests

(Run benchmark tests for entire chain)
cargo test --features runtime-benchmarks

(Run benchmark tests for pallet)
cargo test -p <pallet-name>  --features runtime-benchmarks

6. Run a collator

Collators aggregate transactions on parachains into blocks and then propose these 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.

The Bitgreen network is a parachain and therefore only requires collators as it is secured by the Polkadot relay chain validators. You can build and run a bitgreen parachain collator, for detailed instructions, refer collator guide.

7. Bugs Reporting

For bug reporting, please open an issue in our repo : https://github.com/bitgreen/bitgreen-node/issues. For security issues, kindly report issues to [email protected].

8. Contribute

Bitgreen is open source under the terms of the MIT. We welcome contributions. Please review our CONTRIBUTIONS.md document for more information.

bitgreen-node's People

Contributors

abhath-labs avatar allanperlee avatar ashi20192020 avatar atlaspilotpuppy avatar dependabot[bot] avatar mmacedoeu avatar morgueye4 avatar needs avatar patedetomates avatar poseidon-aisland avatar rappix avatar samuelelandi avatar ssdbkey avatar xezzor 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

Watchers

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

bitgreen-node's Issues

Following the Collator guide leads to build errors due to conflicting runtimes

I've followed the steps in the collator guide to build the binaries from latest master or from tag v1.1.5, both cases however fail with "conflicting implementation for 'Runtime'" because the build tries to build the bitgreen-rococo-runtime and the bitgreen-runtime when using the official command:
# cargo build --release -p bitgreen-parachain

Ideally please provide pre-built binaries or docker containers so people don't need to fight with your messy rust build setups.

(I've btw also tried building it using the provided Dockerfile which fails with the same error)

See full log:

# cargo build --release
   Compiling pallet-timestamp v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-balances v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
⚡ Found 3 strongly connected components which includes at least one cycle each
cycle(001) ∈ α: ApprovalVoting ~~{"DisputeCoordinatorMessage"}~~> DisputeCoordinator ~~{"ApprovalVotingMessage"}~~>  *
cycle(002) ∈ β: CandidateBacking ~~{"CollatorProtocolMessage"}~~> CollatorProtocol ~~{"CandidateBackingMessage"}~~>  *
cycle(003) ∈ γ: NetworkBridgeRx ~~{"GossipSupportMessage"}~~> GossipSupport ~~{"NetworkBridgeRxMessage"}~~>  *
   Compiling bitgreen-primitives v0.0.1 (/root/bitgreen-node/primitives)
   Compiling pallet-assets v0.0.1 (/root/bitgreen-node/pallets/assets)
   Compiling pallet-transaction-pause v0.0.1 (/root/bitgreen-node/pallets/transaction-pause)
   Compiling bitgreen-rococo-runtime v0.1.0 (/root/bitgreen-node/runtime/rococo)
   Compiling pallet-session v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-aura v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling cumulus-pallet-aura-ext v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d79)
   Compiling pallet-treasury v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-offences v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-kyc v0.0.1 (/root/bitgreen-node/pallets/kyc)
   Compiling pallet-vesting-contract v0.0.1 (/root/bitgreen-node/pallets/vesting-contract)
   Compiling pallet-carbon-credits v0.0.1 (/root/bitgreen-node/pallets/carbon-credits)
   Compiling pallet-bounties v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-tips v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-child-bounties v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e)
   Compiling pallet-dex v0.0.1 (/root/bitgreen-node/pallets/dex)
   Compiling pallet-carbon-credits-pool v0.0.1 (/root/bitgreen-node/pallets/carbon-credits-pool)
error: failed to run custom build command for `bitgreen-rococo-runtime v0.1.0 (/root/bitgreen-node/runtime/rococo)`

Caused by:
  process didn't exit successfully: `/root/bitgreen-node/target/release/build/bitgreen-rococo-runtime-eb491e97185275dd/build-script-build` (exit status: 1)
  --- stdout
  Information that should be included in a bug report.
  Executing build command: "/root/.rustup/toolchains/nightly-2022-12-26-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/root/bitgreen-node/target/release/wbuild/bitgreen-rococo-runtime/Cargo.toml" "--color=always" "--profile" "release"
  Using rustc version: rustc 1.68.0-nightly (8dfb33954 2022-12-25)


  --- stderr
     Compiling bitgreen-rococo-runtime v0.1.0 (/root/bitgreen-node/runtime/rococo)
  error[E0428]: the name `BasicDeposit` is defined multiple times
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ `BasicDeposit` redefined here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- previous definition of the type `BasicDeposit` here
      |
      = note: `BasicDeposit` must be defined only once in the type namespace of this module
      = note: this error originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0428]: the name `FieldDeposit` is defined multiple times
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ `FieldDeposit` redefined here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- previous definition of the type `FieldDeposit` here
      |
      = note: `FieldDeposit` must be defined only once in the type namespace of this module
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0428]: the name `SubAccountDeposit` is defined multiple times
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ `SubAccountDeposit` redefined here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- previous definition of the type `SubAccountDeposit` here
      |
      = note: `SubAccountDeposit` must be defined only once in the type namespace of this module
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0428]: the name `MaxSubAccounts` is defined multiple times
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ `MaxSubAccounts` redefined here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- previous definition of the type `MaxSubAccounts` here
      |
      = note: `MaxSubAccounts` must be defined only once in the type namespace of this module
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0428]: the name `MaxAdditionalFields` is defined multiple times
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ `MaxAdditionalFields` redefined here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- previous definition of the type `MaxAdditionalFields` here
      |
      = note: `MaxAdditionalFields` must be defined only once in the type namespace of this module
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0428]: the name `MaxRegistrars` is defined multiple times
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ `MaxRegistrars` redefined here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- previous definition of the type `MaxRegistrars` here
      |
      = note: `MaxRegistrars` must be defined only once in the type namespace of this module
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `sp_core::Get<_>` for type `BasicDeposit`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `BasicDeposit`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `sp_core::Get<_>` for type `FieldDeposit`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `FieldDeposit`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `sp_core::Get<_>` for type `SubAccountDeposit`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `SubAccountDeposit`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `sp_core::Get<_>` for type `MaxSubAccounts`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `MaxSubAccounts`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `sp_core::Get<_>` for type `MaxAdditionalFields`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `MaxAdditionalFields`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `sp_core::Get<_>` for type `MaxRegistrars`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `MaxRegistrars`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `TypedGet` for type `BasicDeposit`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `BasicDeposit`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `TypedGet` for type `FieldDeposit`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `FieldDeposit`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `TypedGet` for type `SubAccountDeposit`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `SubAccountDeposit`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `TypedGet` for type `MaxSubAccounts`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `MaxSubAccounts`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `TypedGet` for type `MaxAdditionalFields`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `MaxAdditionalFields`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `TypedGet` for type `MaxRegistrars`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:687:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_- first implementation here
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_^ conflicting implementation for `MaxRegistrars`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0119]: conflicting implementations of trait `pallet_identity::Config` for type `Runtime`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:697:1
      |
  672 | impl pallet_identity::Config for Runtime {
      | ---------------------------------------- first implementation here
  ...
  697 | impl pallet_identity::Config for Runtime {
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Runtime`

  error[E0592]: duplicate definitions with name `get`
     --> /root/bitgreen-node/runtime/rococo/src/lib.rs:662:1
      |
  662 | / parameter_types! {
  663 | |     // Minimum 4 CENTS/byte
  664 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  665 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  669 | |     pub const MaxRegistrars: u32 = 20;
  670 | | }
      | |_^ duplicate definitions for `get`
  ...
  687 | / parameter_types! {
  688 | |     // Minimum 4 CENTS/byte
  689 | |     pub const BasicDeposit: Balance = deposit(1, 258);
  690 | |     pub const FieldDeposit: Balance = deposit(0, 66);
  ...   |
  694 | |     pub const MaxRegistrars: u32 = 20;
  695 | | }
      | |_- other definition for `get`
      |
      = note: this error originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

  Some errors have detailed explanations: E0119, E0428, E0592.
  For more information about an error, try `rustc --explain E0119`.
  error: could not compile `bitgreen-rococo-runtime` due to 25 previous errors
warning: build failed, waiting for other jobs to finish...

Info about validators

:warning: **Running a validator on a live network is a lot of responsibility! You will be accountable for not only your own stake, but also the stake of your current nominators. If you make a mistake and get slashed, your money and your reputation will be at risk. However, running a validator can also be very rewarding, knowing that you contribute to the security of a decentralized network while growing your stash. It is highly recommended that you have significant system administration experience before attempting to run your own validator. You must be able to handle technical issues and anomalies with your node which you must be able to tackle yourself. Being a validator involves more than just executing the Bitgreen binary.**

Please review the paragraph since it's writing about validators in the documents for the collators.

bitg-transfer-testnet.js

A double fast submission generate an alert:
1014: Priority is too low (The transaction has too low priority to replace another transaction already in the pool.)

tokio-runtime-worker panic

When calling createBundleAgv with the following input:
{“description”:“test”,“agvs”:[{“accountid”,“5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty”,“id”:1}],assetId:100005}
causes a repeatable error (below) but does not crash the node.

Error:
Thread ‘tokio-runtime-worker’ panicked at ‘called Result::unwrap()on anErr value: ParseIntError { kind: Empty }’, /polkadot/bitg-node/pallets/vcu/src/lib.rs:972

Remote relay chain setup does not work with more than one argument

Hello,

when I try to use --relay-chain-rpc-url one flag works nice, but when providing 2 flags like this it gives an error:

error: The argument '--relay-chain-rpc-url <RELAY_CHAIN_RPC_URL>' was provided more than once, but cannot be used multiple times

for the remote relay chain setup to be safe it is necessary to provide more rpc server addresses so if one of them goes down it doesn't crash all the parachains connected. is it possible to fix this please?
for many other parachains it works well with more than one --relay-chain-rpc-url flag

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.