Giter Club home page Giter Club logo

sora-xor / sora2-parachain Goto Github PK

View Code? Open in Web Editor NEW
13.0 20.0 4.0 24.23 MB

SORA is a new economic system aimed at creating a supranational, world economic system with built-in tools for decentralized finance (DeFi). The SORA network implements a new way of parachain architecture on Polkadot and Kusama network, with the capability to bridge external blockchains (like Ethereum) to the Polkadot ecosystem.

License: The Unlicense

Rust 93.91% Dockerfile 0.25% Shell 4.00% Makefile 0.24% Handlebars 1.60%
parachain kusama polkadot substrate sora sorachain

sora2-parachain's Introduction

SORA logo

Overview

This is FRAME-based Substrate node of SORA2. This repo contains code of node, pallets, runtime.

Quick start

Build

For Kusama:

make kusama

For Polkadot:

make polkadot

For Rococo:

make rococo

Test

For Kusama:

make test-kusama

For Polkadot:

make test-polkadot

For Rococo:

make test-rococo

Rust Analyzer

Since project can only be compiled with features it would be convenient to set feature in rust analyzer

.vscode/settings.json may look like

{
    "rust-analyzer.cargo.features": [
        "rococo"
    ]
}

sora2-parachain's People

Contributors

alexey-n-chernyshov avatar c4twithshell avatar cre-ed avatar davidrhodus avatar dependabot[bot] avatar f33r0 avatar johnwhitton avatar joshorndorff avatar juniuszhou avatar kalitaalexey avatar kftygy4aquzoi avatar marat-biriushev avatar n1ghtstorm avatar nikania avatar nuke-web3 avatar riusricardo avatar satoshi-kusumoto avatar sorabot avatar stanly-johnson avatar tieumsan avatar vovac12 avatar wer1st avatar whalelephant avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sora2-parachain's Issues

[Tech]: Remove XCMApp root extrinics

Problem statement

Now there are some root exstrinics that are not necessary for production.

Description

No response

Definition of Done

Remove current debug functions from extriniscs

Requirements

No response

[Tech]: Create correct Currency implementation for outbound channels

Problem statement

Now we have this implementation:

<Balances as Currency<AccountId>>::transfer(

But it can cause problems with asset transfer when an account does not have balance on parachain

Description

The outbound channel requires balances on account whom assets are transferred, otherwise assets could not be sended to mainnet through the bridge

Definition of Done

  1. Discuss the problem and find the best way to solve this problem
  2. Implement the Currency type for outbound channel

Requirements

No response

[DevOps]: Metrics - Parachain Health Monitoring

Problem statement

We want to determine the set of metrics to monitor the health of the parachain.

Description

We want to communicate with the DevOps team to determine a set of metrics to monitor the health of the parachain(s).

We have a Telegram group with other participants of the Dotsama ecosystem to define a set of metrics for solo chains, relay chains, and parachains. We can use this chat to help defining the set of metrics.

Definition of Done

  • Determine the metrics to monitor the health of the parachain
  • Determine the data sources to feed the metrics

Requirements

No response

Polkadot Parachain Slot - Prepare for Slot Auction

We want to prepare for slot auction.
parachain id: 81

We need to define:

  • Crowdloan strategy
  • Slot auction target

Rewards Policy:


Parachain Auction Slot

There are two cases when extending our parachain slot:

  • Extension w/ overlapping slot
  • Extension w/o overlapping slot

With overlapping slot

  1. Register a new parachain id (paraId)
  2. Win an auction slot with that new paraId.
  3. Swap the parachain IDs with registar::swap (submitting extrinsic on Kusama polkadot.js)

Without overlapping slot
If we apply for slots that don't overlap, then we can bid with the same paraId.


Register parachain on Kusama/Polkadot - Guide

Bid for Kusama parachain: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/auctions

USEFUL INFO
SORA Kusama parachain slots: #19 - #26 (2023-01-24 05:29)
Ongoing Kusama Auction: No ongoing auction (although according to Kusama Auction it should be the 64th (ends in ~1.5 day, at block 15651000))
Kusama auction 65th should start in ~6 days (at block 15724800)
Kusama auction winners for auctions 64th to 67th will be onboarded for lease periods #26 - #33

Ongoing Polkadot Auction: 34th (10/12). Next one (35th): 16/12 - 22/12

1 lease period = 6 weeks

Sources
Parachain Lease Extension - Kusama Guide
SORA Kusama Parachain Lease Timeline - Subscan
Parachains info

[Tech]: Return XCMApp XCM transfer status to SubstrateApp

Problem statement

SORA 2 does not get any information about transaction status on the parachain

Description

No response

Definition of Done

  1. Make a function that sends message for successful status
    2.Make a function that sends message for error status and sends tokens back

Requirements

No response

[Investigation]: Parachain Block Production

Problem statement

Our parachain on Rococo stopped producing blocks. We need to investigate the reason why and fix it.
We need our parachain to produce blocks to be able to communicate with the Kusama ecosystem on Rococo (testnet).

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.parachain-collator-1.c1.stg1.sora2.soramitsu.co.jp#/explorer

According to the DevOps team, the reason is that our collator stopped producing blocks.

Definition of Done

  • Root cause of the block production stop identified
  • Proposed solution to fix it established

Methodology

  • Investigate the parachain collators
  • Investigate the parachain code
  • Ask xDimon if help/info is required on the parachain
  • Ask the DevOps team if info is required on the health of the parachain

Useful resources

No response

PR on Polkadot.js

Make PR to register SORA parachain on Rococo and Kusama Parachain

[Tech]: Deploy the rococo collator node as archive and with offchain indexing enabled

Problem statement

Substrate bridge requires a node with these parameters.
The binary could be build from rococo_v3 branch (https://github.com/sora-xor/sora2-parachain/tree/rococo_v3)

Description

No response

Definition of Done

  1. Prepare to start the second node with additional parameters --pruning=archive --enable-offchain-indexing true
  2. Start and sync the node, the parachain must be creating blocks
  3. Switch off the old node

Requirements

No response

Aha! Link: https://soramitsucoltd.aha.io/features/SKP-9

[SPIKE] Bridge SORA Mainnet <-> SORA Parachain

What do other projects use ?

Common solution - Parity bridge ?

Update doc: https://soramitsu.atlassian.net/wiki/spaces/PLS/pages/2213347329/Substrate+-+Relay-chain+bridge

Update with sora network—sora kusama parachain bridge

parity bridge commons pallet

Study: https://github.com/paritytech/parity-bridges-common

Investigate what networks use this

3 cases:

  • asset created on the sora network, move it back and forth to the kusama parachain
  • asset created on the sora kusama parachain and move it back and forth to the sora network
  • asset created on another network and moved to the sora kusama parachain via xcm and move it back and forth to the sora network (highest priority)

Move assets from SORA parachain to SORA Mainnet

As a user I want to move assets from the SORA parachain to the SORA mainnet so that I can use my assets from the Kusama ecosystem in the SORA ecosystem.

Additional context
Add any other context or screenshots about the feature request here.

[Spike]: Add SORA to the list of parachains on DeFi website

Problem Statement

We have a Kusama parachain producing blocks and connected to the Kusama ecosystem. We want people to be able to see that we are part of the ecosystem.
For that reason, we need to investigate on which websites we should be referenced so that users could easily find us.

Definition of Done

  1. Build a list of website that we want to be referenced on
  2. Send information to the websites from the list so that they can add us to the list of parachain

Methodology

  • Research DeFi websites
  • Gather parachain information
  • Communicate to website teams

Useful resources

https://defillama.com/chains/Parachain

Aha! Link: https://soramitsucoltd.aha.io/features/SKP-13

Add Karura assets to SORA Parachain

  1. Start with Rococo

  2. Once we validated functionality on Rococo, repeat on Kusama parachain

Karura assets

Asset Name: Karura Native Token
Asset Symbol: KAR
Decimals: 12
existentialDeposit: 0.1
Multiloaction: { parents: 1, interior: { X2: [ {Parachain: 2000}, {GeneralKey: 0x0080} ]}}

Asset Name: Acala Dollar
Asset Symbol: AUSD
Decimals: 12
existentialDeposit: 0.01
Multiloaction: { parents: 1, interior: { X2: [ {Parachain: 2000}, {GeneralKey: 0x0081} ]}}

Asset Name: Liquid KSM
Asset Symbol: LKSM
Decimals: 12
existentialDeposit: 0.0005
Multiloaction: { parents: 1, interior: { X2: [ {Parachain: 2000}, {GeneralKey: 0x0083} ]}}

Aha! Link: https://soramitsucoltd.aha.io/features/SKP-15

[Tech]: Disable any direct access to the XCM Executor via extrisics

Problem statement

Since our parachain does not have tokens we should ensure that there is no access to xcm executor directly through extrinsics

Description

No response

Definition of Done

Check that no pallet like orml_xtokens and pallet_xcm give such access

Requirements

No response

Add SORA assets to SORA Parachain

  1. Start with Rococo
  2. When successful, repeat on Kusama

SORA assets

Asset Name: SORA
Asset Symbol: XOR
Decimals: 18
existentialDeposit: 0
Multilocation: Don't use yet

Asset Name: Polkaswap
Asset Symbol: PSWAP
Decimals: 18
existentialDeposit: 0
Multilocation: Don't use yet

Asset Name: SORA Validator Token
Asset Symbol: VAL
Decimals: 18
existentialDeposit: 0
Multilocation: Don't use yet

Asset Name: SORA Synthetics
Asset Symbol: XST
Decimals: 18
existentialDeposit: 0
Multilocation: Don't use yet

Asset Name: SORA Synthetic USD
Asset Symbol: XSTUSD
Decimals: 18
existentialDeposit: 0
Multilocation: Don't use yet

Aha! Link: https://soramitsucoltd.aha.io/features/SKP-14

[Tech]: Add Kusama and Rococo runtime features

Problem statement

Parachain runtime for kusama must be different from rococo runtime

  1. XCMAppSudoWrapper must be excluded
  2. Some types should be changed

Description

No response

Definition of Done

Create features for kusama and rococo

Requirements

No response

[Tech]: Implement XCM Comissions on the parachain

Problem statement

Due to #25 now Dummy trader is used

Description

No response

Definition of Done

  1. Make investigations how other parachain implement the trader
  2. Implement trader for Sora

Requirements

No response

Kusama Parachain Slot - Prepare Slot Auction

Current Lease Period: 26/06/2022 15:13 ~ 26/01/2023 11:37

Previous crowdloan: https://kusama.subscan.io/parachain/2011?tab=crowdloan

From https://kusama.network/auctions/:
"After the lease is over, the slot will go up for auction again and the team will need to bid again if they wish to retain a slot"

"Each auction allocates a parachain slot for a total deployment period of 48 weeks. Teams are not required to bid for the full 48-week period, but can specify a contiguous range from 6 weeks to 48 weeks. This means that two or more teams may win one particular slot auction if they each bid on different, non-overlapping lease periods within the full 48-week deployment period. For example, one team may bid on the first 24 weeks, and another team could bid on the second 24 weeks. The winner selection algorithm is designed to maximize the amount of KSM held over the entire 48-week period, and will pick the best combination of non-overlapping bids to achieve that objective."


Guide

There are two cases when extending our parachain slot:

  • Extension w/ overlapping slot
  • Extension w/o overlapping slot

With overlapping slot

  1. Register a new parachain id (paraId)
  2. Win an auction slot with that new paraId.
  3. Swap the parachain IDs with registar::swap (submitting extrinsic on Kusama polkadot.js)

Without overlapping slot
If we apply for slots that don't overlap, then we can bid with the same paraId.


Register parachain on Kusama/Polkadot - Guide

Bid for Kusama parachain: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/auctions

USEFUL INFO
SORA Kusama parachain slots: #19 - #26 (2023-01-24 05:29)
Ongoing Kusama Auction: No ongoing auction (although according to Kusama Auction it should be the 64th (ends in ~1.5 day, at block 15651000))
Kusama auction 65th should start in ~6 days (at block 15724800)
Kusama auction winners for auctions 64th to 67th will be onboarded for lease periods #26 - #33

Ongoing Polkadot Auction: 34th (10/12). Next one (35th): 16/12 - 22/12

1 lease period = 6 weeks

Sources
Parachain Lease Extension - Kusama Guide
SORA Kusama Parachain Lease Timeline - Subscan
Parachains info

[Tech]: Refactor parachain from tabs to spaces

Problem statement

It seems like in parachain repo we have tabs for indents, but on mainnet we have spaces.

Description

No response

Definition of Done

Change config and refactor to spaces

Requirements

No response

[Tech]: Add events for XCM error scenarios on the SORA Parachain

Problem statement

Some error eents emited by xcm are not quite descriptive, so it would be more convenient to add our custom events on error scenarios

Description

No response

Definition of Done

  1. Add an error for scenario where some assets that do not have valid mapping in XCMApp
  2. Add an error for scenario where error occurs while adding message to outbound channel

Requirements

No response

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.