Code Monkey home page Code Monkey logo

pendulum's Issues

Launch on public Rococo testnet

See Parity docs for more information

  • Create a new chainspec in Pendulum, that uses the same Amplitude runtime
  • Create new test accounts (with subkey or polkadotjs)
  • Post the keypairs in Notion so everyone can test
  • Generate chain spec raw json file, publish it under res/rococo.json
  • Generate new genesis and wasm files
  • Upload parathread
  • Open an issue in this repo. Use the same ParaId as Amplitude: 2124

Upgrade to polkadot v0.9.35

In order to add the spacewalk pallets to the amplitude runtime we first need to update all other Polkadot dependencies to v0.9.35 (since that's the version the spacewalk pallets are using).

Democratization rollout

  1. Remove sudo pallet
  2. Unlock token transfer transactions
  3. Change default pallet weights
  4. Update to latest Polkadot version
  5. Update the democracy cycle times to:
    1. 5 days launch period
    2. 5 days voting period
    3. 2 days enactment period
    4. 7 days cool off period
  6. Add pallets:
    1. ZenLink pallet
      1. Mandatory / Basic parameters:
        1. set_fee_point - 0.5%
        2. set_fee_to - Address
        3. pool currency symbol limit = 50
    • DIA pallet
    • pallet-contracts
    • identity-pallet

Crete a Dockerfile to build specified runtimes

We should have a dockerfile per runtime that we want to share, name it amplitude and testnet, so collator nodes can be easily run in either bare metal or virtual machines. This is the first step for putting CI in place.
The Dockerfile to take as an example is in scripts/Dockerfile.
Let's see if it can be used out of the box or if it needs to be tweaked.

Add and configure Spacewalk pallets for Foucoco runtime

Since we want to launch Spacewalk on Amplitude, we need to include and configure the pallets in the Amplitude runtime. Before taking this step on Amplitude it might make sense however to first test the changes and upgrade on Foucoco.

This issue is about adding all the pallets included in spacewalk/pallets to the foucoco and amplitude runtime. Since they are not merged to main, it makes sense to declare the dev/milestone-3 branch in the 'Cargo.toml' files. Eventually, we would probably create an extra polkadot-v0.9.35 branch in the spacewalk repository, but only after merging it to main. Inspiration for the appropriate configuration of the pallets can be drawn from the mock.rs files of each pallet in the spacewalk repository.

Upgrade to v0.9.17

Not required for internal testnet

Apparently this version fixes #17, so we might want to upgrade at some point.

Create Chain Spec for Rococo

  • Create a new chain spec for Rococo (same runtime as Amplitude)
  • Generate the json raw file and upload it into res. Call it rococo-raw.json
  • Generate new keypairs and upload them to Notion

Implement runtime upgrade #2, part 1

Remove insecure configuration from genesis config

Redefine the chain-spec in order to remove insecure configuration for the mainnet chain. Particularly, there should not be any default account (such as Alice, Bob, ...) that receive some initial token allocation.

  • Create Amplitude chain spec boilerplate
  • Remove unnecessary parts from it
  • Define authority set (public keys)
  • Configure pallet_aura
  • Configure pallet_session
  • Determine Polkadot version to use

Create a branch and plug the AMM pallet into Pendulum

Motivation
As per request of SBP M2 reviewers, to provide an example of how can we test the AMM pallet.

What to do

  • Create a branch from master
  • Include in the runtime the latest AMM pallet from /pendulum-amm,
  • Configure it
  • Write some documentation on how to use it

Note: the branch should not be merged into master.

Integrate Zenlink on Foucoco

As we learned from the Zenlink research that integration is low effort. We should get started with integrating Zenlink on Foucoco.

Bump cargo nightly version to the latest working version

Right now for compatibility purposes we were using the following nightly channel in rust-toolchain.toml.

[toolchain]
channel = "nightly-2021-12-12"
components = ["rustfmt", "rls"]
targets = ["wasm32-unknown-unknown"]

Change rust-toolchain.toml to use a latest working version of nightly, I am for example aiming to 1.63.0-nightly.

Create `testnet` runtime

The runtime of our testnet resides in the branch pendulum-legacy.
The aim of this issue is to include this runtime in the main branch, under the folder runtime/testnet.
Of course that besides the runtime itself, we need to include dependencies and related files.
Also, bump dependencies to version 0.9.24

Update README

It's been a while since we don't update the README with the more recent changes, and since the repo will have more visibility, we should create a proper introductory file and steps to build/run/use. We can link to our docs.pendulumchain.org too.

Collator node down

Due to lack of space in one of our gcloud VMs, our collator node and one of our validators stopped and so, our prototype.pendulumchain.org is not working properly.

We need to:

  • Add a new disk
  • Attach it to the VM
  • Mount the disk
  • Create a volume and point it from the docker-compose.yml file or docker-run command
  • Re run node

Implement Democracy Launch

See discussion on Polkassembly.

This change comprises:

  • remove pallet-sudo
  • remove token transfer transactions from call filter
  • change default pallet weights
  • update the democracy cycle times to:
    • 5 days launch period
    • 5 days voting period
    • 2 days enactment period
    • 7 days cool off period

Add and configure spacewalk pallet for runtime

We need to add and configure the spacewalk pallet for our pendulum chain. This includes the following tasks:

  • Add the spacewalk pallet to the Cargo.toml. Since it is not published to crates.io just specify the repository in Cargo.toml and maybe specify a proper tag (that has to be created first) or a commit hash to make it stick to a specific version even if the main branch of the spacewalk repo changes.
  • Configure the pallet in the runtime. Have a look at how this is done in the spacewalk testchain.
  • Check if calling the pallets extrinsic works. To do so, run the pendulum parachain locally after adding the pallet, (a guide on how to do this with pendulum-launch is here). For the report_stellar_transaction extrinsic you might have to write a small Rust script that takes a Stellar transaction, converts it to the xdr and prints out the bytes in hexadecimal (some inspiration might be drawn from the vaults deposit.rs code). For the redeem extrinsic you might have to use the address conversion tool from https://prototype.pendulumchain.org/balances to get the binary representation for the stellar_vault_pub_key field.

Define thresholds for Stellar assets

We need to define the collateralization thresholds for the Stellar assets that we want to allow to be bridged. For this, we of course need to know which assets are to be bridged in the first place.

On Foucoco it might be enough to use one or two assets on Stellar's testnet. On Amplitude and Pendulum however, we need to use mainnet assets, and define the parameters for each of them separately.

While we can define and change these parameters anytime with an extrinsic call from the root account it might be a good idea to configure them in the genesis config already.

Remove the development runtime

Feedback from SBP Milestone 3 review: The development runtime name is a bit misleading, as it seems that this is not merely a runtime for developers to use locally, but the Pendulum runtime intended for future deployment on Polkadot.

New Description

Let us just remove the development runtime all together.

Fix RollingSessionWindow error

After upgrading to polkadot v.0.9.16, and plugin the new collator's runtime in Rococo, I observe the following error messages:

2022-02-11 16:22:01 [Relaychain] error=RollingSessionWindow(SessionsUnavailable { kind: RuntimeApi(Execution { runtime_api_name: "SessionInfo", source: FailedToDecodeReturnValue { function: "session_info", error: Error { cause: Some(Error { cause: Some(Error { cause: Some(Error { cause: Some(Error { cause: None, desc: "Not enough data to fill buffer" }), desc: "Could not decode `Public.0`" }), desc: "Could not decode `Public.0`" }), desc: "Could not decode `SessionInfo::validators`" }), desc: "Could not decode `Option::Some(T)`" } } }), info: Some(SessionsUnavailableInfo { window_start: 0, window_end: 0, block_hash: 0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897 }) })
2022-02-11 16:22:01 [Relaychain] Received msg before first active leaves update. This is not expected - message will be dropped. msg=ActiveDisputes(Sender { complete: false })
2022-02-11 16:22:01 [Relaychain] error=Sender(AskActiveDisputesCanceled) ctx="on FromOverseer"
2022-02-11 16:22:01 [Relaychain] Received msg before first active leaves update. This is not expected - message will be dropped. msg=ActiveDisputes(Sender { complete: false })
2022-02-11 16:22:01 [Relaychain] error=Sender(AskActiveDisputesCanceled) ctx="on FromOverseer"
2022-02-11 16:22:03 [Relaychain] Failed to request addresses of authorities: CallingRuntime(RuntimeApiError(Application(UnknownBlock("State already discarded for BlockId::Hash(0x19957b7151fdd00a875d05233d788703952481976fdb4948422e80509fe6c1ac)")))) 

Apparently as other users commented on Element we're not the only ones experiencing this.
Testing branch for this issue is legacy-bridge.

Include bootnodes in rococo chain spec

bootnodes: [
	"/dns4/penboot-roc-00.pendulumchain.tech/tcp/30335/p2p/12D3KooWERQvnnatnnBUqKf4Hsggm13Kfy8YbWZPsqNFfWJzFSyA",
	"/dns4/penboot-roc-01.pendulumchain.tech/tcp/30335/p2p/12D3KooWERQvnnatnnBUqKf4Hsggm13Kfy8YbWZPsqNFfWJzFSyA"
]

Connect the spacewalk vault client to pendulum

The vault client is a core part of spacewalk. We need to make sure that it can connect to and communicate with the Pendulum chain.
Therefore, we should test if the vault client can connect to a locally running Pendulum chain. It might be that the extrinsic calls of the vault fail because of an error similar to what is described in this ticket. If this is the case, we should be able to fix them with the findings of that ticket.

  • Run local Pendulum chain and connect a vault client to it (check README for instructions on how to run the vault)
  • Test if issue/redeem works properly. Follow the steps in the docs to execute issue and redeem requests and see if that works without error.

Add chain extensions for pallet-contract

smart contracts need to be able to interact with native assets as if the were erc-20 tokens. A wrapper contract can be created around native assets, but needs some chain extensions to be able to work.

Include pallet-democracy

Replace pallet-sudo with pallet-democracy and other pallets that are required for pallet-democracy (e.g., collectives, scheduler, ...).

Also define a reasonable initial configuration for these pallets.

Implement runtime upgrade #2, part 2

  • direct all transaction fees on network to treasury
  • set parachain-staking as the session manager of pallet-session
  • remove pallet-collator-selection

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.