Skip to content

Commit

Permalink
Preparing main & release branch jobs (#1001)
Browse files Browse the repository at this point in the history
* Preparing main & release branch jobs

* change docs
  • Loading branch information
mikiquantum authored Sep 24, 2022
1 parent be3aeb7 commit 5baf806
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Please describe the tests that you ran to verify your changes. Provide instructi
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] I rebased on the latest `parachain` branch
- [ ] I rebased on the latest `main` branch
2 changes: 1 addition & 1 deletion .github/workflows/build-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: nix-build
on:
pull_request:
push:
branches: [parachain]
branches: [main, parachain, 'release-v**']
jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [master, parachain]
branches: [main, parachain, 'release-v**']
pull_request:
name: Build
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-nix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: docker
on:
push:
branches: [parachain]
branches: [main, parachain, 'release-v**']
jobs:
docker:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: docker
on:
push:
branches: [master, parachain]
branches: [main, parachain, 'release-v**']
workflow_dispatch:
inputs:
docker_tag:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Rustdoc
on:
push:
branches:
- parachain
branches: [main, parachain]
jobs:
docs:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [master, parachain]
branches: [main, parachain, 'release-v**']
pull_request:
name: Tests
jobs:
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,40 @@ Centrifuge is the infrastructure that facilitates the decentralized financing of
## Building blocks
On top of the [Substrate FRAME](https://docs.substrate.io/reference/frame-pallets/) framework, Centrifuge Chain is composed of custom pallets which can be found inside the `pallets` folder. The following list gives a brief overview, and links to the corresponding documentation.

- [**pools**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/pools) ([docs](https://reference.centrifuge.io/pallet_pools/index.html)): Creating and managing investment pools. It is bundling loans, slicing pools into tranches, and controlling investment epochs.
- [**pools**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/pools) ([docs](https://reference.centrifuge.io/pallet_pools/index.html)): Creating and managing investment pools. It is bundling loans, slicing pools into tranches, and controlling investment epochs.

- [**loans**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/loans) ([docs](https://reference.centrifuge.io/pallet_loans/index.html)): Locking a collateral NFT into a pool. The loans pallet is also used for bookkeeping loan values and outstanding debt.
- [**loans**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/loans) ([docs](https://reference.centrifuge.io/pallet_loans/index.html)): Locking a collateral NFT into a pool. The loans pallet is also used for bookkeeping loan values and outstanding debt.

- [**anchors**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/anchors) ([docs](https://reference.centrifuge.io/pallet_anchors/index.html)): Storing hashes of documents on-chain. The documents are stored in the Private Off-chain Data (POD) node network.
- [**anchors**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/anchors) ([docs](https://reference.centrifuge.io/pallet_anchors/index.html)): Storing hashes of documents on-chain. The documents are stored in the Private Off-chain Data (POD) node network.

- [**bridge**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/bridge) ([docs](https://reference.centrifuge.io/pallet_bridge/index.html)): Connecting [ChainBridge](https://github.com/centrifuge/chainbridge-substrate) to transfer tokens to and from Ethereum.
- [**bridge**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/bridge) ([docs](https://reference.centrifuge.io/pallet_bridge/index.html)): Connecting [ChainBridge](https://github.com/centrifuge/chainbridge-substrate) to transfer tokens to and from Ethereum.

- [**bridge-mapping**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/bridge-mapping) ([docs](https://reference.centrifuge.io/pallet_bridge_mapping/index.html)): Setting and tracking allowed paths for assets to be transferred across chains.
- [**bridge-mapping**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/bridge-mapping) ([docs](https://reference.centrifuge.io/pallet_bridge_mapping/index.html)): Setting and tracking allowed paths for assets to be transferred across chains.

- [**claims**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/claims) ([docs](https://reference.centrifuge.io/pallet_claims/index.html)): Processing claims of liquidity rewards acquired through Tinlake investments.
- [**claims**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/claims) ([docs](https://reference.centrifuge.io/pallet_claims/index.html)): Processing claims of liquidity rewards acquired through Tinlake investments.

- [**collator-allowlist**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/collator-allowlist) ([docs](https://reference.centrifuge.io/pallet_collator_allowlist/index.html)): Tracking active collators, and allows the root account to manage this list.
- [**collator-allowlist**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/collator-allowlist) ([docs](https://reference.centrifuge.io/pallet_collator_allowlist/index.html)): Tracking active collators, and allows the root account to manage this list.

- [**crowdloan-claim**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/crowdloan-claim) ([docs](https://reference.centrifuge.io/pallet_crowdloan_claim/index.html)): Claiming user rewards for their crowdloan funding support.
- [**crowdloan-claim**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/crowdloan-claim) ([docs](https://reference.centrifuge.io/pallet_crowdloan_claim/index.html)): Claiming user rewards for their crowdloan funding support.

- [**crowdloan-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/crowdloan-reward) ([docs](https://reference.centrifuge.io/pallet_crowdloan_reward/index.html)): Calculating the reward amounts for crowdloan contributors. This is used by the `crowdloan-claim` pallet which handles the actual claims.
- [**crowdloan-rewards**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/crowdloan-reward) ([docs](https://reference.centrifuge.io/pallet_crowdloan_reward/index.html)): Calculating the reward amounts for crowdloan contributors. This is used by the `crowdloan-claim` pallet which handles the actual claims.

- [**fees**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/fees) ([docs](https://reference.centrifuge.io/pallet_fees/index.html)): Taking fees from accounts and sending this to the treasury, to the author, or burning them.
- [**fees**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/fees) ([docs](https://reference.centrifuge.io/pallet_fees/index.html)): Taking fees from accounts and sending this to the treasury, to the author, or burning them.

- [**interest-accrual**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/interest-accrual) ([docs](https://reference.centrifuge.io/pallet_interest_accrual/index.html)): Keeping account of the outstanding debt through interest accrual calculations.
- [**interest-accrual**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/interest-accrual) ([docs](https://reference.centrifuge.io/pallet_interest_accrual/index.html)): Keeping account of the outstanding debt through interest accrual calculations.

- [**keystore**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/keystore) ([docs](https://reference.centrifuge.io/pallet_keystore/index.html)): Linking public keys to accounts. Supporting the operations of the offchain document consensus layer through the Centrifuge POD (Private Offchain Data) Node.
- [**keystore**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/keystore) ([docs](https://reference.centrifuge.io/pallet_keystore/index.html)): Linking public keys to accounts. Supporting the operations of the offchain document consensus layer through the Centrifuge POD (Private Offchain Data) Node.

- [**nft**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/nft) ([docs](https://reference.centrifuge.io/pallet_nft/index.html)): Validating a mint request that needs to be transfered through the bridge layer to Ethereum.
- [**nft**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/nft) ([docs](https://reference.centrifuge.io/pallet_nft/index.html)): Validating a mint request that needs to be transfered through the bridge layer to Ethereum.

- [**nft-sales**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/nft-sales) ([docs](https://reference.centrifuge.io/pallet_nft_sales/index.html)): Providing a place for digital art creators and owners to offer their NFTs for sale and for potential buyers to browse and buy them.
- [**nft-sales**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/nft-sales) ([docs](https://reference.centrifuge.io/pallet_nft_sales/index.html)): Providing a place for digital art creators and owners to offer their NFTs for sale and for potential buyers to browse and buy them.

- [**permissions**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/permissions) ([docs](https://reference.centrifuge.io/pallet_permissions/index.html)): Linking roles to accounts. It is adding and removing relationships between roles and accounts on chain.
- [**permissions**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/permissions) ([docs](https://reference.centrifuge.io/pallet_permissions/index.html)): Linking roles to accounts. It is adding and removing relationships between roles and accounts on chain.

- [**restricted-tokens**](https://github.com/centrifuge/centrifuge-chain/tree/parachain/pallets/restricted-tokens) ([docs](https://reference.centrifuge.io/pallet_restricted_tokens/index.html)): Transferring tokens and setting balances. It is wrapping `orml-tokens` with the addition of checking for permissions.
- [**restricted-tokens**](https://github.com/centrifuge/centrifuge-chain/tree/main/pallets/restricted-tokens) ([docs](https://reference.centrifuge.io/pallet_restricted_tokens/index.html)): Transferring tokens and setting balances. It is wrapping `orml-tokens` with the addition of checking for permissions.

## Developing
Instructions for building, testing, and developing Centrifuge Chain can be found in [`docs/DEVELOPING.md`](docs/DEVELOPING.md).

## License
This codebase is licensed under [GNU Lesser General Public License v3.0](https://github.com/centrifuge/centrifuge-chain/blob/parachain/LICENSE).
This codebase is licensed under [GNU Lesser General Public License v3.0](https://github.com/centrifuge/centrifuge-chain/blob/main/LICENSE).
15 changes: 6 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
nightly-date = pkgs.lib.strings.removePrefix "nightly-" rustToolChainTOML.toolchain.channel;
# This is the hash of the Rust toolchain at nightly-date, required for reproducibility.
nightly-sha256 = "sha256-CNMj0ouNwwJ4zwgc/gAeTYyDYe0botMoaj/BkeDTy4M=";

# This is the git short commit of the current version of the program.
shortCommit = builtins.substring 0 7 (inputs.self.rev or "dirty");

# This instantiates a new Rust version based on nightly-date.
nightlyRustPlatform = pkgs.makeRustPlatform {
Expand All @@ -49,13 +50,8 @@
# It is called when the build process calls git. Instead of the real git,
# it will find this one.
git-mock =
let
# This evaluates to the first 7 digits of the git hash of this repo's HEAD
# commit, or to "dirty" if there are uncommitted changes.
commit-substr = builtins.substring 0 7 (inputs.self.rev or "dirty");
in
pkgs.writeShellScriptBin "git" ''
echo ${commit-substr}
echo ${shortCommit}
'';

# srcFilter is used to keep out of the build non-source files,
Expand Down Expand Up @@ -86,6 +82,7 @@
defaultPackage = nightlyRustPlatform.buildRustPackage {
pname = name;
inherit version;
inherit shortCommit;

# This applies the srcFilter function to the current directory, so
# we don't include unnecessary files in the package.
Expand Down Expand Up @@ -121,7 +118,7 @@
# Docker image package doesn't work on Darwin Archs
packages.dockerImage = pkgs.dockerTools.buildLayeredImage {
name = "centrifugeio/${name}";
tag = "${version}-nix-do-not-use"; # todo remove suffix once verified
tag = "${version}-${shortCommit}-nix-do-not-use"; # todo remove suffix once verified
# This uses the date of the last commit as the image creation date.
created = builtins.substring 0 8 inputs.self.lastModifiedDate;

Expand All @@ -144,7 +141,7 @@
};

packages.dockerImageFastRuntime = packages.dockerImage.overrideAttrs (base: {
tag = "test-${version}-nix-do-not-use"; # todo remove suffix once verified
tag = "test-${version}-${shortCommit}-nix-do-not-use"; # todo remove suffix once verified
contents = [
pkgs.busybox
packages.fastRuntime
Expand Down

0 comments on commit 5baf806

Please sign in to comment.