diff --git a/.env.sample b/.env.sample index d6a358a..c739ba9 100644 --- a/.env.sample +++ b/.env.sample @@ -1,8 +1,8 @@ RUST_TOOLCHAIN=nightly RELAY_CHAIN_SPEC=./resources/paseo-local.json -PARA_CHAIN_CONFIG=frequency-paseo-local -RAW_PARACHAIN_CHAIN_SPEC=./res/genesis/local/paseo-local-frequency-2000-raw.json +PARA_CHAIN_CONFIG=recurrency-paseo-local +RAW_PARACHAIN_CHAIN_SPEC=./res/genesis/local/paseo-local-recurrency-2000-raw.json PARA_ID=2000 DOCKER_ONBOARD=false -PARA_DOCKER_IMAGE_TAG="frequency-latest" +PARA_DOCKER_IMAGE_TAG="recurrency-latest" SRT_TOOL_VERSION=1.60.0 diff --git a/.github/workflows/benchmarks-run.yml b/.github/workflows/benchmarks-run.yml index d016338..7770e75 100644 --- a/.github/workflows/benchmarks-run.yml +++ b/.github/workflows/benchmarks-run.yml @@ -17,7 +17,7 @@ on: jobs: run-benchmarks: - if: github.repository == 'frequency-chain/frequency' + if: github.repository == 'rustadot/recurrency' name: Run Benchmarks runs-on: [self-hosted, Linux, X64, benchmark] permissions: diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml index a380f53..c5a53b4 100644 --- a/.github/workflows/check-migrations.yml +++ b/.github/workflows/check-migrations.yml @@ -12,7 +12,7 @@ jobs: name: Check Migrations on Paseo continue-on-error: false runs-on: ubicloud-standard-8 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Checkout sources uses: actions/checkout@v4 @@ -21,5 +21,5 @@ jobs: uses: ./.github/workflows/common/try-runtime-migrations with: github-token: ${{ secrets.GITHUB_TOKEN }} - runtime-package: "frequency-runtime" + runtime-package: "recurrency-runtime" runtime-uri: ${{ vars.E2E_TESTNET_PASEO_RPC }} diff --git a/.github/workflows/check-polkadot-releases.yml b/.github/workflows/check-polkadot-releases.yml index 240c6e7..b5996ff 100644 --- a/.github/workflows/check-polkadot-releases.yml +++ b/.github/workflows/check-polkadot-releases.yml @@ -37,6 +37,6 @@ jobs: uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 with: commit_message: "Record new Polkadot release version" - commit_user_name: Frequency CI [bot] + commit_user_name: Recurrency CI [bot] commit_user_email: do-not-reply@users.noreply.github.com - commit_author: Frequency CI [bot] + commit_author: Recurrency CI [bot] diff --git a/.github/workflows/common/codecov/action.yml b/.github/workflows/common/codecov/action.yml index e557e08..9ea48c8 100644 --- a/.github/workflows/common/codecov/action.yml +++ b/.github/workflows/common/codecov/action.yml @@ -12,7 +12,7 @@ runs: run: cargo install --locked grcov - name: Build shell: bash # Limited to 10 threads max - run: cargo build -j 10 --features frequency-lint-check + run: cargo build -j 10 --features recurrency-lint-check env: RUSTC_BOOTSTRAP: 1 CARGO_INCREMENTAL: "0" @@ -20,7 +20,7 @@ runs: RUSTDOCFLAGS: "-Cpanic=abort" - name: Test shell: bash # Limited to 10 threads max - run: cargo test -j 10 --features frequency-lint-check + run: cargo test -j 10 --features recurrency-lint-check env: RUSTC_BOOTSTRAP: 1 CARGO_INCREMENTAL: "0" diff --git a/.github/workflows/common/try-runtime-migrations/action.yml b/.github/workflows/common/try-runtime-migrations/action.yml index 5d07186..41c21e2 100644 --- a/.github/workflows/common/try-runtime-migrations/action.yml +++ b/.github/workflows/common/try-runtime-migrations/action.yml @@ -1,4 +1,4 @@ -name: "Check Migrations for Frequency Runtime" +name: "Check Migrations for Recurrency Runtime" description: "An action to check runtime migrations" inputs: github-token: diff --git a/.github/workflows/e2e-testnet.yml b/.github/workflows/e2e-testnet.yml index 3853e20..89e8f1b 100644 --- a/.github/workflows/e2e-testnet.yml +++ b/.github/workflows/e2e-testnet.yml @@ -18,7 +18,7 @@ jobs: run-e2e: name: Run E2E Tests runs-on: ubuntu-22.04 - container: ghcr.io/frequency-chain/frequency/ci-base-image:latest + container: ghcr.io/rustadot/recurrency/ci-base-image:latest steps: - name: Validate shell: bash @@ -46,7 +46,7 @@ jobs: cache: "npm" cache-dependency-path: e2e/package-lock.json - name: Install Built api-augment - run: npm install @frequency-chain/api-augment@${{ env.API_AUGMENT_VERSION }} + run: npm install @rustadot/api-augment@${{ env.API_AUGMENT_VERSION }} working-directory: e2e - name: Run e2e Tests working-directory: e2e diff --git a/.github/workflows/merge-pr.yml b/.github/workflows/merge-pr.yml index 0425c69..daf24ad 100644 --- a/.github/workflows/merge-pr.yml +++ b/.github/workflows/merge-pr.yml @@ -12,13 +12,13 @@ jobs: publish-js-api-augment-rc: name: Merge - Publish JS API Augment Release Candidate runs-on: ubicloud-standard-4 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 - name: Output Metadata # Run the cargo command and ignore any extra lines outside of the json result - run: CARGO_INCREMENTAL=0 RUSTFLAGS="-D warnings" cargo run --features frequency-local -- export-metadata --chain=frequency-paseo-local --tmp ./js/api-augment/metadata.json + run: CARGO_INCREMENTAL=0 RUSTFLAGS="-D warnings" cargo run --features recurrency-local -- export-metadata --chain=recurrency-paseo-local --tmp ./js/api-augment/metadata.json - name: Set up NodeJs uses: actions/setup-node@v4 with: @@ -49,7 +49,7 @@ jobs: calc-code-coverage: name: Merge - Calculate Code Coverage runs-on: ubicloud-standard-8 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20a2209..a305733 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,23 +153,23 @@ jobs: arch: [amd64] include: - network: dev - spec: frequency-no-relay + spec: recurrency-no-relay build-profile: release - release-file-name-prefix: frequency-dev + release-file-name-prefix: recurrency-dev - network: local - spec: frequency-local + spec: recurrency-local build-profile: release - release-file-name-prefix: frequency-local + release-file-name-prefix: recurrency-local - network: testnet - spec: frequency-testnet + spec: recurrency-testnet build-profile: release - release-file-name-prefix: frequency-testnet + release-file-name-prefix: recurrency-testnet - network: mainnet - spec: frequency + spec: recurrency build-profile: release - release-file-name-prefix: frequency + release-file-name-prefix: recurrency runs-on: ubicloud-standard-8 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 env: SIGNING_SUBKEY_FINGERPRINT: B6327D1474C6392032870E8EFA4FD1E73A0FE707 steps: @@ -180,7 +180,7 @@ jobs: - name: Set Env Vars run: | echo "BIN_DIR=target/${{matrix.build-profile}}" >> $GITHUB_ENV - echo "BUILT_BIN_FILENAME=frequency" >> $GITHUB_ENV + echo "BUILT_BIN_FILENAME=recurrency" >> $GITHUB_ENV echo "RELEASE_BIN_FILENAME=${{matrix.release-file-name-prefix}}.${{matrix.arch}}" >> $GITHUB_ENV - name: Compile for ${{matrix.network}} run: | @@ -203,13 +203,13 @@ jobs: id: import-gpg uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 with: - gpg_private_key: ${{secrets.FREQUENCY_PGP_SECRET_SUBKEYS}} - passphrase: ${{secrets.FREQUENCY_PGP_MASTER_KEY_PASSWORD}} + gpg_private_key: ${{secrets.RECURRENCY_PGP_SECRET_SUBKEYS}} + passphrase: ${{secrets.RECURRENCY_PGP_MASTER_KEY_PASSWORD}} fingerprint: ${{env.SIGNING_SUBKEY_FINGERPRINT}} - name: List GPG Keys run: gpg -k; gpg -K # The error in this step may be due to expired signing subkey - # See https://github.com/frequency-chain/frequency/issues/1695 + # See https://github.com/rustadot/recurrency/issues/1695 - name: Generate Binary Signature working-directory: ${{env.BIN_DIR}} run: | @@ -217,7 +217,7 @@ jobs: gpg --local-user ${{env.SIGNING_SUBKEY_FINGERPRINT}} \ --sign --armor \ --pinentry-mode=loopback \ - --passphrase="${{secrets.FREQUENCY_PGP_MASTER_KEY_PASSWORD}}" \ + --passphrase="${{secrets.RECURRENCY_PGP_MASTER_KEY_PASSWORD}}" \ --detach-sig \ ${{env.RELEASE_BIN_FILENAME}} - name: Verify Binary @@ -246,33 +246,33 @@ jobs: fail-fast: true matrix: # Remember, runtimes are separate for each relay chain - # We do not release frequency-*-local runtimes however + # We do not release recurrency-*-local runtimes however network: [dev, paseo, mainnet] include: - network: dev build-profile: release - package: frequency-runtime - runtime-dir: runtime/frequency - built-wasm-file-name-prefix: frequency_runtime - release-wasm-file-name-prefix: frequency-dev_runtime - features: frequency-no-relay - wasm-core-version: frequency-testnet + package: recurrency-runtime + runtime-dir: runtime/recurrency + built-wasm-file-name-prefix: recurrency_runtime + release-wasm-file-name-prefix: recurrency-dev_runtime + features: recurrency-no-relay + wasm-core-version: recurrency-testnet - network: paseo build-profile: release - package: frequency-runtime - runtime-dir: runtime/frequency - built-wasm-file-name-prefix: frequency_runtime - release-wasm-file-name-prefix: frequency-paseo_runtime - features: frequency-testnet - wasm-core-version: frequency-testnet + package: recurrency-runtime + runtime-dir: runtime/recurrency + built-wasm-file-name-prefix: recurrency_runtime + release-wasm-file-name-prefix: recurrency-paseo_runtime + features: recurrency-testnet + wasm-core-version: recurrency-testnet - network: mainnet build-profile: release - package: frequency-runtime - runtime-dir: runtime/frequency - built-wasm-file-name-prefix: frequency_runtime - release-wasm-file-name-prefix: frequency_runtime - features: frequency - wasm-core-version: frequency + package: recurrency-runtime + runtime-dir: runtime/recurrency + built-wasm-file-name-prefix: recurrency_runtime + release-wasm-file-name-prefix: recurrency_runtime + features: recurrency + wasm-core-version: recurrency runs-on: ubicloud-standard-8 steps: - name: Check Out Repo @@ -338,7 +338,7 @@ jobs: needs: version-code name: Build Rust Developer Docs runs-on: ubicloud-standard-4 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 @@ -348,7 +348,7 @@ jobs: uses: actions/configure-pages@v5 - name: Build Docs run: | - RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --workspace --features frequency + RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --workspace --features recurrency - name: Fix file permissions shell: sh run: | @@ -368,10 +368,10 @@ jobs: NETWORK: local BUILD_PROFILE: release BIN_DIR: target/release - RELEASE_FILENAME_PREFIX: frequency-local + RELEASE_FILENAME_PREFIX: recurrency-local ARCH: amd64 runs-on: ubuntu-22.04 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Set Env Vars run: | @@ -409,7 +409,7 @@ jobs: mv ${{env.RELEASE_BIN_FILENAME}} ${{env.BIN_DIR}} chmod 755 ${{env.BIN_DIR}}/${{env.RELEASE_BIN_FILENAME}} - name: Output Metadata - run: ${{env.BIN_DIR}}/${{env.RELEASE_BIN_FILENAME}} export-metadata --chain=frequency-paseo-local --tmp ./js/api-augment/metadata.json + run: ${{env.BIN_DIR}}/${{env.RELEASE_BIN_FILENAME}} export-metadata --chain=recurrency-paseo-local --tmp ./js/api-augment/metadata.json - name: Build run: npm run build working-directory: js/api-augment @@ -430,9 +430,9 @@ jobs: network: [mainnet] include: - network: mainnet - spec: frequency + spec: recurrency build-profile: release - release-file-name-prefix: frequency + release-file-name-prefix: recurrency - os: ubuntu-22.04 arch: amd64 runs-on: ${{matrix.os}} @@ -440,7 +440,7 @@ jobs: - name: Set Env Vars run: | echo "BIN_DIR=target/${{matrix.build-profile}}" >> $GITHUB_ENV - echo "BUILT_BIN_FILENAME=frequency" >> $GITHUB_ENV + echo "BUILT_BIN_FILENAME=recurrency" >> $GITHUB_ENV echo "RELEASE_BIN_FILENAME=${{matrix.release-file-name-prefix}}.${{matrix.arch}}" >> $GITHUB_ENV - name: Check Out Repo uses: actions/checkout@v4 @@ -477,7 +477,7 @@ jobs: # Could not port this job to container because the reference node will be started in a # parallel container to the job polkadot-js-tools container and the latter will not # be able to connect to the former without runner supporting DinD mode first. - # See https://github.com/frequency-chain/frequency/issues/1543 + # See https://github.com/rustadot/recurrency/issues/1543 compare-metadata: needs: build-binaries name: Compare Metadata @@ -485,13 +485,13 @@ jobs: env: NETWORK: mainnet BIN_DIR: target/release - BIN_FILENAME: frequency.amd64 - TEST_BIN_FILENAME: frequency.amd64 + BIN_FILENAME: recurrency.amd64 + TEST_BIN_FILENAME: recurrency.amd64 TEST_DOWNLOAD_DIR: download-test - REF_BIN_FILENAME: frequency-ref.amd64 + REF_BIN_FILENAME: recurrency-ref.amd64 REF_DOWNLOAD_DIR: download-ref OUTPUT_DIR: target/release - FREQUENCY_PROCESS_NAME: frequency + RECURRENCY_PROCESS_NAME: recurrency steps: - name: Set Env Vars run: | @@ -542,7 +542,7 @@ jobs: --name test-node \ ubuntu:22.04 \ /bin/sh -c "chmod +x /app/${{env.TEST_BIN_FILENAME}} && /app/${{env.TEST_BIN_FILENAME}} \ - --chain=frequency-bench \ + --chain=recurrency-bench \ --rpc-external \ --rpc-cors=all \ --rpc-methods=Unsafe \ @@ -561,7 +561,7 @@ jobs: --name ref-node \ ubuntu:22.04 \ /bin/sh -c "chmod +x /app/${{env.REF_BIN_FILENAME}} && /app/${{env.REF_BIN_FILENAME}} \ - --chain=frequency-bench \ + --chain=recurrency-bench \ --rpc-external \ --rpc-cors=all \ --rpc-methods=Unsafe \ @@ -605,7 +605,7 @@ jobs: - name: Stop Local Nodes if: always() run: | - echo "Attempting to kill all frequency processes..." + echo "Attempting to kill all recurrency processes..." docker stop ref-node || true docker stop test-node || true docker network rm net-${{env.RELEASE_BRANCH_NAME}} @@ -634,7 +634,7 @@ jobs: needs: wait-for-all-builds name: Release Built Artifacts runs-on: ubuntu-22.04 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 permissions: contents: write steps: @@ -761,7 +761,7 @@ jobs: body_path: tools/ci/release-notes/release-notes.md tag_name: ${{env.NEW_RELEASE_TAG}} files: | - /tmp/frequency*.* + /tmp/recurrency*.* /tmp/metadata-compare-* - name: Publish Full Release on GitHub if: steps.is-full-release.outputs.is-full-release == 'true' @@ -770,7 +770,7 @@ jobs: body_path: tools/ci/release-notes/release-notes.md tag_name: ${{env.NEW_RELEASE_TAG}} files: | - /tmp/frequency*.* + /tmp/recurrency*.* /tmp/metadata-compare-* - name: Get Latest Commit id: get-latest-commit @@ -795,7 +795,7 @@ jobs: github-token: ${{secrets.GHA_WORKFLOW_TRIGGER}} script: | await github.rest.actions.createWorkflowDispatch({ - owner: 'frequency-chain', + owner: 'rustadot', repo: 'metadata-portal', workflow_id: 'auto-sign.yml', ref: 'main' @@ -812,21 +812,21 @@ jobs: include: - network: testnet build-profile: release - release-file-name-prefix: frequency-testnet + release-file-name-prefix: recurrency-testnet - network: mainnet build-profile: release - release-file-name-prefix: frequency + release-file-name-prefix: recurrency - arch: amd64 docker-platform: linux/amd64 env: - DOCKER_HUB_PROFILE: frequencychain + DOCKER_HUB_PROFILE: recurrencychain IMAGE_NAME: parachain-node runs-on: ubuntu-22.04 steps: - name: Set Env Vars run: | echo "BIN_DIR=target/${{matrix.build-profile}}" >> $GITHUB_ENV - echo "BUILT_BIN_FILENAME=frequency" >> $GITHUB_ENV + echo "BUILT_BIN_FILENAME=recurrency" >> $GITHUB_ENV echo "RELEASE_BIN_FILENAME=${{matrix.release-file-name-prefix}}.${{matrix.arch}}" >> $GITHUB_ENV - name: Check Out Repo uses: actions/checkout@v4 @@ -905,19 +905,19 @@ jobs: - node: collator-node-local network: local build-profile: release - release-file-name-prefix: frequency-local + release-file-name-prefix: recurrency-local - node: standalone-node network: dev build-profile: release - release-file-name-prefix: frequency-dev + release-file-name-prefix: recurrency-dev env: - DOCKER_HUB_PROFILE: frequencychain + DOCKER_HUB_PROFILE: recurrencychain runs-on: ubuntu-22.04 steps: - name: Set Env Vars run: | echo "BIN_DIR=target/${{matrix.build-profile}}" >> $GITHUB_ENV - echo "BUILT_BIN_FILENAME=frequency" >> $GITHUB_ENV + echo "BUILT_BIN_FILENAME=recurrency" >> $GITHUB_ENV echo "RELEASE_BIN_FILENAME=${{matrix.release-file-name-prefix}}.${{matrix.arch}}" >> $GITHUB_ENV - name: Check Out Repo uses: actions/checkout@v4 @@ -985,7 +985,7 @@ jobs: repository: ${{env.DOCKER_HUB_PROFILE}}/${{matrix.node}} readme-filepath: docker/${{matrix.node}}.overview.md - # Published to https://frequency-chain.github.io/frequency/ + # Published to https://rustadot.github.io/recurrency/ release-rust-developer-docs: needs: wait-for-all-builds name: Release Rust Developer Docs diff --git a/.github/workflows/verify-pr-commit.yml b/.github/workflows/verify-pr-commit.yml index d033524..4c4fead 100644 --- a/.github/workflows/verify-pr-commit.yml +++ b/.github/workflows/verify-pr-commit.yml @@ -85,21 +85,21 @@ jobs: include: - network: dev git_branch: ${{github.head_ref}} - spec: frequency-no-relay + spec: recurrency-no-relay branch_alias: pr - network: local git_branch: ${{github.head_ref}} - spec: frequency-local + spec: recurrency-local branch_alias: pr - network: local git_branch: main - spec: frequency-local + spec: recurrency-local branch_alias: main - network: testnet - spec: frequency-testnet + spec: recurrency-testnet branch_alias: pr - network: mainnet - spec: frequency + spec: recurrency branch_alias: pr steps: - run: echo "Just a dummy matrix to satisfy GitHub required checks that were skipped" @@ -114,24 +114,24 @@ jobs: include: - network: dev git_branch: ${{github.head_ref}} - spec: frequency-no-relay + spec: recurrency-no-relay branch_alias: pr - network: local git_branch: ${{github.head_ref}} - spec: frequency-local + spec: recurrency-local branch_alias: pr - network: local git_branch: main - spec: frequency-local + spec: recurrency-local branch_alias: main - network: testnet - spec: frequency-testnet + spec: recurrency-testnet branch_alias: pr - network: mainnet - spec: frequency + spec: recurrency branch_alias: pr runs-on: ubicloud-standard-16 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 env: NETWORK: mainnet steps: @@ -141,7 +141,7 @@ jobs: ref: ${{matrix.git_branch}} - name: Set Env Vars run: | - export BUILT_BIN_FILENAME=frequency; echo "BUILT_BIN_FILENAME=$BUILT_BIN_FILENAME" >> $GITHUB_ENV + export BUILT_BIN_FILENAME=recurrency; echo "BUILT_BIN_FILENAME=$BUILT_BIN_FILENAME" >> $GITHUB_ENV echo "FINAL_BIN_FILENAME=$BUILT_BIN_FILENAME.${{matrix.network}}.${{matrix.spec}}.${{matrix.branch_alias}}" >> $GITHUB_ENV # # XXX Keep this step as it lets us skip full binary builds during development/testing # - name: Cache Binary for Testing @@ -177,7 +177,7 @@ jobs: if: needs.changes.outputs.cargo-lock == 'true' name: Check for Vulnerable Crates runs-on: ubuntu-22.04 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 @@ -194,7 +194,7 @@ jobs: name: Verify Rust Code Format runs-on: ubuntu-22.04 container: - image: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + image: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repository uses: actions/checkout@v4 @@ -216,14 +216,14 @@ jobs: if: needs.changes.outputs.rust == 'true' name: Lint Rust Code runs-on: ubicloud-standard-4 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 - name: Lint run: | SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy \ - --features runtime-benchmarks,frequency-lint-check \ + --features runtime-benchmarks,recurrency-lint-check \ -- \ -D warnings @@ -232,47 +232,47 @@ jobs: if: needs.changes.outputs.rust == 'true' name: Verify Rust Developer Docs runs-on: ubicloud-standard-4 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 - name: Build Docs run: | - RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo doc --no-deps --workspace --features frequency + RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo doc --no-deps --workspace --features recurrency verify-rust-packages-and-deps: needs: changes if: needs.changes.outputs.rust == 'true' name: Verify Rust Packages and Dependencies runs-on: ubicloud-standard-4 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 - name: Check - run: SKIP_WASM_BUILD= cargo check --features runtime-benchmarks,frequency-lint-check + run: SKIP_WASM_BUILD= cargo check --features runtime-benchmarks,recurrency-lint-check run-rust-tests: needs: changes if: needs.changes.outputs.rust == 'true' name: Run Rust Tests runs-on: ubicloud-standard-8 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 - name: Init Git run: | - git config --global --add safe.directory /__w/frequency/frequency + git config --global --add safe.directory /__w/recurrency/recurrency - name: Run Tests - run: cargo test --features runtime-benchmarks,frequency-lint-check --workspace --release + run: cargo test --features runtime-benchmarks,recurrency-lint-check --workspace --release calc-code-coverage: needs: changes if: needs.changes.outputs.rust == 'true' name: Calculate Code Coverage runs-on: ubicloud-standard-8 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 @@ -304,34 +304,34 @@ jobs: fail-fast: true matrix: # Remember, runtimes are separate for each relay chain - # We do not release frequency-*-local runtimes however + # We do not release recurrency-*-local runtimes however # Also should match `verify-build-runtimes-dummy` network: [dev, paseo, mainnet] include: - network: dev chain: dev build-profile: release - package: frequency-runtime - runtime-dir: runtime/frequency - built-wasm-file-name-prefix: frequency_runtime - features: frequency-no-relay - wasm-core-version: frequency-testnet + package: recurrency-runtime + runtime-dir: runtime/recurrency + built-wasm-file-name-prefix: recurrency_runtime + features: recurrency-no-relay + wasm-core-version: recurrency-testnet - network: paseo - chain: frequency-paseo + chain: recurrency-paseo build-profile: release - package: frequency-runtime - runtime-dir: runtime/frequency - built-wasm-file-name-prefix: frequency_runtime - features: frequency-testnet - wasm-core-version: frequency-testnet + package: recurrency-runtime + runtime-dir: runtime/recurrency + built-wasm-file-name-prefix: recurrency_runtime + features: recurrency-testnet + wasm-core-version: recurrency-testnet - network: mainnet - chain: frequency + chain: recurrency build-profile: release - package: frequency-runtime - runtime-dir: runtime/frequency - built-wasm-file-name-prefix: frequency_runtime - features: frequency - wasm-core-version: frequency + package: recurrency-runtime + runtime-dir: runtime/recurrency + built-wasm-file-name-prefix: recurrency_runtime + features: recurrency + wasm-core-version: recurrency runs-on: ubicloud-standard-8 steps: - name: Check Out Repo @@ -392,13 +392,13 @@ jobs: needs: build-binaries name: Verify JS API Augment runs-on: ubuntu-22.04 - container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 + container: ghcr.io/rustadot/recurrency/ci-base-image:1.3.1 steps: - name: Check Out Repo uses: actions/checkout@v4 - name: Set Env Vars run: | - echo "BIN_FILENAME=frequency.local.frequency-local.pr" >> $GITHUB_ENV + echo "BIN_FILENAME=recurrency.local.recurrency-local.pr" >> $GITHUB_ENV - name: Set up NodeJs uses: actions/setup-node@v4 with: @@ -428,7 +428,7 @@ jobs: run: | chmod 755 ${{env.BIN_FILENAME}} - name: Output Metadata - run: ${{env.BIN_DIR}}/${{env.BIN_FILENAME}} export-metadata --chain=frequency-paseo-local --tmp ./js/api-augment/metadata.json + run: ${{env.BIN_DIR}}/${{env.BIN_FILENAME}} export-metadata --chain=recurrency-paseo-local --tmp ./js/api-augment/metadata.json - name: Build run: npm run build working-directory: js/api-augment @@ -445,7 +445,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: artifacts-api-augment-${{github.run_id}} - path: js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz + path: js/api-augment/dist/rustadot-api-augment-0.0.0.tgz if-no-files-found: error verify-node-docker-images: @@ -457,8 +457,8 @@ jobs: uses: actions/checkout@v4 - name: Set Env Vars run: | - echo "BUILT_BIN_FILENAME=frequency.mainnet.frequency.pr" >> $GITHUB_ENV - echo "DOCKER_BIN_FILENAME=frequency" >> $GITHUB_ENV + echo "BUILT_BIN_FILENAME=recurrency.mainnet.recurrency.pr" >> $GITHUB_ENV + echo "DOCKER_BIN_FILENAME=recurrency" >> $GITHUB_ENV - name: Download Binaries id: download-binaries uses: actions/download-artifact@v4 @@ -510,7 +510,7 @@ jobs: uses: actions/checkout@v4 - name: Set Env Vars run: | - echo "TEST_BIN_FILENAME=frequency.mainnet.frequency.pr" >> $GITHUB_ENV + echo "TEST_BIN_FILENAME=recurrency.mainnet.recurrency.pr" >> $GITHUB_ENV - name: Download Binaries id: download-binaries uses: actions/download-artifact@v4 @@ -545,8 +545,8 @@ jobs: fetch-depth: 0 - name: Set Env Vars run: | - echo "TEST_BIN_FILENAME=frequency.local.frequency-local.pr" >> $GITHUB_ENV - echo "REF_BIN_FILENAME=frequency.local.frequency-local.main" >> $GITHUB_ENV + echo "TEST_BIN_FILENAME=recurrency.local.recurrency-local.pr" >> $GITHUB_ENV + echo "REF_BIN_FILENAME=recurrency.local.recurrency-local.main" >> $GITHUB_ENV - name: Download Binaries id: download-binaries uses: actions/download-artifact@v4 @@ -569,9 +569,9 @@ jobs: working-directory: ${{env.BIN_DIR}} run: | set -x - ./$REF_BIN_FILENAME export-metadata --chain=frequency-paseo-local --tmp metadata-ref.json + ./$REF_BIN_FILENAME export-metadata --chain=recurrency-paseo-local --tmp metadata-ref.json metadata_ref=$(cat metadata-ref.json | jq -r .result) - ./$TEST_BIN_FILENAME export-metadata --chain=frequency-paseo-local --tmp metadata.json + ./$TEST_BIN_FILENAME export-metadata --chain=recurrency-paseo-local --tmp metadata.json metadata=$(cat metadata.json | jq -r .result) matches=$([ "$metadata" = "$metadata_ref" ] && echo 'true' || echo 'false') echo "Metadata matches?: $match" @@ -626,8 +626,8 @@ jobs: fetch-depth: 0 - name: Set Env Vars run: | - echo "BIN_FILENAME=frequency.dev.frequency-no-relay.pr" >> $GITHUB_ENV - echo "FREQUENCY_PROCESS_NAME=frequency" >> $GITHUB_ENV + echo "BIN_FILENAME=recurrency.dev.recurrency-no-relay.pr" >> $GITHUB_ENV + echo "RECURRENCY_PROCESS_NAME=recurrency" >> $GITHUB_ENV - name: Download Binaries id: download-binaries uses: actions/download-artifact@v4 @@ -673,7 +673,7 @@ jobs: cache: "npm" cache-dependency-path: e2e/package-lock.json - name: Install Built api-augment - run: npm install ../js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz + run: npm install ../js/api-augment/dist/rustadot-api-augment-0.0.0.tgz working-directory: e2e - name: Install NPM Modules run: npm ci @@ -689,7 +689,7 @@ jobs: run: npm test - name: Stop Local Node if: always() - run: pkill ${{env.FREQUENCY_PROCESS_NAME}} + run: pkill ${{env.RECURRENCY_PROCESS_NAME}} verify-genesis-state: needs: build-binaries @@ -700,8 +700,8 @@ jobs: run: | echo "EXPECTED_GENESIS_STATE_PASEO=0x000000000000000000000000000000000000000000000000000000000000000000805f6ddb6879aa31316a38c149e52ffe4e9f2a193e966ddcf3b6a2cb5846e96903170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400" >> $GITHUB_ENV echo "EXPECTED_GENESIS_STATE_MAINNET=0x000000000000000000000000000000000000000000000000000000000000000000393a2a0f7778716d006206c5a4787cbf2ea3b26a67379b7a38ee54519d7fd4be03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400" >> $GITHUB_ENV - echo "BIN_FILENAME_TESTNET=frequency.testnet.frequency-testnet.pr" >> $GITHUB_ENV - echo "BIN_FILENAME_MAINNET=frequency.mainnet.frequency.pr" >> $GITHUB_ENV + echo "BIN_FILENAME_TESTNET=recurrency.testnet.recurrency-testnet.pr" >> $GITHUB_ENV + echo "BIN_FILENAME_MAINNET=recurrency.mainnet.recurrency.pr" >> $GITHUB_ENV - name: Download Binaries id: download-binaries uses: actions/download-artifact@v4 @@ -719,16 +719,16 @@ jobs: run: | chmod 755 $BIN_FILENAME_TESTNET chmod 755 $BIN_FILENAME_MAINNET - - name: Test Frequency Paseo Genesis State + - name: Test Recurrency Paseo Genesis State working-directory: ${{env.BIN_DIR}} run: | expected_genesis_state=${{env.EXPECTED_GENESIS_STATE_PASEO}} echo "Expected genesis state: $expected_genesis_state" - actual_genesis_state=$(./${{env.BIN_FILENAME_TESTNET}} export-genesis-state --chain=frequency-paseo) + actual_genesis_state=$(./${{env.BIN_FILENAME_TESTNET}} export-genesis-state --chain=recurrency-paseo) echo "Actual genesis state: $actual_genesis_state" [ $actual_genesis_state = $expected_genesis_state ] || \ (echo "ERROR: The actual genesis state does not match the expected" && exit 1) - - name: Test Frequency Mainnet Genesis State + - name: Test Recurrency Mainnet Genesis State working-directory: ${{env.BIN_DIR}} run: | expected_genesis_state=${{env.EXPECTED_GENESIS_STATE_MAINNET}} diff --git a/.gitignore b/.gitignore index 56d876a..f861738 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ res/ scratch/ -frequency.log +recurrency.log scripts/js/onboard/.yarnrc.yml scripts/js/onboard/.yarn/cache diff --git a/.vscode/launch.json b/.vscode/launch.json index 86546c6..b7a65ad 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,10 +12,10 @@ "args": [ "build", "--features", - "frequency-no-relay", + "recurrency-no-relay", ], "filter": { - "name": "frequency", + "name": "recurrency", "kind": "bin" } }, @@ -46,22 +46,22 @@ { "type": "lldb", "request": "attach", - "name": "Attach to Frequency", - "program": "${workspaceFolder}/target/debug/frequency", + "name": "Attach to Recurrency", + "program": "${workspaceFolder}/target/debug/recurrency", }, { "type": "lldb", "request": "launch", - "name": "Debug unit tests in executable 'frequency'", + "name": "Debug unit tests in executable 'recurrency'", "cargo": { "args": [ "test", "--no-run", - "--bin=frequency", - "--package=frequency" + "--bin=recurrency", + "--package=recurrency" ], "filter": { - "name": "frequency", + "name": "recurrency", "kind": "bin" } }, @@ -71,16 +71,16 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in library 'frequency-cli'", + "name": "Debug unit tests in library 'recurrency-cli'", "cargo": { "args": [ "test", "--no-run", "--lib", - "--package=frequency-cli" + "--package=recurrency-cli" ], "filter": { - "name": "frequency-cli", + "name": "recurrency-cli", "kind": "lib" } }, @@ -109,16 +109,16 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in library 'frequency-service'", + "name": "Debug unit tests in library 'recurrency-service'", "cargo": { "args": [ "test", "--no-run", "--lib", - "--package=frequency-service" + "--package=recurrency-service" ], "filter": { - "name": "frequency-service", + "name": "recurrency-service", "kind": "lib" } }, @@ -166,16 +166,16 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in library 'frequency-runtime'", + "name": "Debug unit tests in library 'recurrency-runtime'", "cargo": { "args": [ "test", "--no-run", "--lib", - "--package=frequency-runtime" + "--package=recurrency-runtime" ], "filter": { - "name": "frequency-runtime", + "name": "recurrency-runtime", "kind": "lib" } }, @@ -242,16 +242,16 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in library 'pallet-frequency-tx-payment'", + "name": "Debug unit tests in library 'pallet-recurrency-tx-payment'", "cargo": { "args": [ "test", "--no-run", "--lib", - "--package=pallet-frequency-tx-payment" + "--package=pallet-recurrency-tx-payment" ], "filter": { - "name": "pallet-frequency-tx-payment", + "name": "pallet-recurrency-tx-payment", "kind": "lib" } }, diff --git a/.vscode/settings.json b/.vscode/settings.json index 534c713..6edbde6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,9 +15,9 @@ ], // Set the features to use for cargo commands "rust-analyzer.cargo.features": [ - "frequency-no-relay", + "recurrency-no-relay", "runtime-benchmarks", - "frequency-lint-check" + "recurrency-lint-check" ], "lldb.launch.preRunCommands": [ "script lldb.debugger.HandleCommand('settings set target.source-map /rustc/{} \"{}/lib/rustlib/src/rust\"'.format(os.popen('rustc --version --verbose').read().split('commit-hash: ')[1].split('\\n')[0].strip(), os.popen('rustc --print sysroot').readline().strip()))" diff --git a/Cargo.lock b/Cargo.lock index 65ee3e0..eb25c7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3615,16 +3615,16 @@ dependencies = [ ] [[package]] -name = "frequency" +name = "recurrency" version = "0.0.0" dependencies = [ - "frequency-cli", - "frequency-service", + "recurrency-cli", + "recurrency-service", "substrate-build-script-utils", ] [[package]] -name = "frequency-cli" +name = "recurrency-cli" version = "0.0.0" dependencies = [ "clap", @@ -3642,13 +3642,13 @@ dependencies = [ "frame-metadata-hash-extension", "frame-support", "frame-system", - "frequency-runtime", - "frequency-service", + "recurrency-runtime", + "recurrency-service", "futures", "hex-literal", "log", "pallet-balances", - "pallet-frequency-tx-payment", + "pallet-recurrency-tx-payment", "pallet-handles", "pallet-msa", "pallet-stateful-storage", @@ -3677,7 +3677,7 @@ dependencies = [ ] [[package]] -name = "frequency-runtime" +name = "recurrency-runtime" version = "0.0.0" dependencies = [ "common-primitives", @@ -3706,8 +3706,8 @@ dependencies = [ "pallet-collator-selection", "pallet-collective", "pallet-democracy", - "pallet-frequency-tx-payment", - "pallet-frequency-tx-payment-runtime-api", + "pallet-recurrency-tx-payment", + "pallet-recurrency-tx-payment-runtime-api", "pallet-handles", "pallet-handles-runtime-api", "pallet-messages", @@ -3756,7 +3756,7 @@ dependencies = [ ] [[package]] -name = "frequency-service" +name = "recurrency-service" version = "0.0.0" dependencies = [ "clap", @@ -3780,14 +3780,14 @@ dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "frame-system", - "frequency-runtime", + "recurrency-runtime", "futures", "hex", "hex-literal", "jsonrpsee", "log", - "pallet-frequency-tx-payment-rpc", - "pallet-frequency-tx-payment-runtime-api", + "pallet-recurrency-tx-payment-rpc", + "pallet-recurrency-tx-payment-runtime-api", "pallet-handles-rpc", "pallet-handles-runtime-api", "pallet-messages-rpc", @@ -6986,7 +6986,7 @@ dependencies = [ ] [[package]] -name = "pallet-frequency-tx-payment" +name = "pallet-recurrency-tx-payment" version = "0.0.0" dependencies = [ "common-primitives", @@ -7009,13 +7009,13 @@ dependencies = [ ] [[package]] -name = "pallet-frequency-tx-payment-rpc" +name = "pallet-recurrency-tx-payment-rpc" version = "0.0.0" dependencies = [ "common-helpers", "common-primitives", "jsonrpsee", - "pallet-frequency-tx-payment-runtime-api", + "pallet-recurrency-tx-payment-runtime-api", "parity-scale-codec", "rayon", "sc-client-api", @@ -7030,7 +7030,7 @@ dependencies = [ ] [[package]] -name = "pallet-frequency-tx-payment-runtime-api" +name = "pallet-recurrency-tx-payment-runtime-api" version = "0.0.0" dependencies = [ "common-primitives", diff --git a/HEADER-APACHE2 b/HEADER-APACHE2 index e9763b7..6def412 100644 --- a/HEADER-APACHE2 +++ b/HEADER-APACHE2 @@ -1,6 +1,6 @@ -// This file is part of Frequency. +// This file is part of Recurrency. -// Copyright (C) Frequency Network Foundation. +// Copyright (C) Recurrency Network Foundation. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/LICENSE b/LICENSE index 4181f60..2c02535 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Frequency Network Foundation + Copyright 2024 Recurrency Network Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index 2457d06..2921c72 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ all: build clean: cargo clean -.PHONY: start start-frequency start-frequency-docker start-manual start-interval start-interval-short start-with-offchain start-frequency-with-offchain start-manual-with-offchain start-interval-with-offchain +.PHONY: start start-recurrency start-recurrency-docker start-manual start-interval start-interval-short start-with-offchain start-recurrency-with-offchain start-manual-with-offchain start-interval-with-offchain start: - ./scripts/init.sh start-frequency-instant + ./scripts/init.sh start-recurrency-instant start-paseo-relay: ./scripts/init.sh start-paseo-relay-chain @@ -21,42 +21,42 @@ start-paseo-collator-alice: start-paseo-collator-bob: ./scripts/init.sh start-paseo-collator-bob -start-frequency: - ./scripts/init.sh start-frequency +start-recurrency: + ./scripts/init.sh start-recurrency -start-frequency-docker: - ./scripts/init.sh start-frequency-docker +start-recurrency-docker: + ./scripts/init.sh start-recurrency-docker start-manual: - ./scripts/init.sh start-frequency-manual + ./scripts/init.sh start-recurrency-manual start-interval: - ./scripts/init.sh start-frequency-interval + ./scripts/init.sh start-recurrency-interval start-interval-short: - ./scripts/init.sh start-frequency-interval 0 1 + ./scripts/init.sh start-recurrency-interval 0 1 start-with-offchain: - ./scripts/init.sh start-frequency-instant with-offchain + ./scripts/init.sh start-recurrency-instant with-offchain -start-frequency-with-offchain: - ./scripts/init.sh start-frequency with-offchain +start-recurrency-with-offchain: + ./scripts/init.sh start-recurrency with-offchain start-manual-with-offchain: - ./scripts/init.sh start-frequency-manual with-offchain + ./scripts/init.sh start-recurrency-manual with-offchain start-interval-with-offchain: - ./scripts/init.sh start-frequency-interval with-offchain + ./scripts/init.sh start-recurrency-interval with-offchain -.PHONY: stop stop-relay stop-frequency-docker +.PHONY: stop stop-relay stop-recurrency-docker stop-relay: ./scripts/init.sh stop-relay-chain stop-paseo-relay: ./scripts/init.sh stop-paseo-relay-chain -stop-frequency-docker: - ./scripts/init.sh stop-frequency-docker +stop-recurrency-docker: + ./scripts/init.sh stop-recurrency-docker .PHONY: local-block local-block: @@ -69,15 +69,15 @@ local-block: .PHONY: register register: - ./scripts/init.sh register-frequency-paseo-local + ./scripts/init.sh register-recurrency-paseo-local .PHONY: onboard onboard: - ./scripts/init.sh onboard-frequency-paseo-local + ./scripts/init.sh onboard-recurrency-paseo-local .PHONY: offboard offboard: - ./scripts/init.sh offboard-frequency-paseo-local + ./scripts/init.sh offboard-recurrency-paseo-local .PHONY: specs-testnet-2000 specs-paseo-local specs-testnet-2000: @@ -93,8 +93,8 @@ format: .PHONY: lint lint-audit lint: cargo +nightly-2024-08-01 fmt --check - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --features runtime-benchmarks,frequency-lint-check -- -D warnings - RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo doc --no-deps --features frequency + SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --features runtime-benchmarks,recurrency-lint-check -- -D warnings + RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo doc --no-deps --features recurrency lint-audit: cargo deny check -c deny.toml @@ -107,10 +107,10 @@ ci-local: check lint lint-audit test js e2e-tests .PHONY: upgrade-local upgrade-no-relay upgrade-local: - ./scripts/init.sh upgrade-frequency-paseo-local + ./scripts/init.sh upgrade-recurrency-paseo-local upgrade-no-relay: - ./scripts/init.sh upgrade-frequency-no-relay + ./scripts/init.sh upgrade-recurrency-no-relay # @@ -123,7 +123,7 @@ upgrade-no-relay: BENCH_TARGETS=\ benchmarks-messages \ benchmarks-msa \ -benchmarks-frequency-tx-payment \ +benchmarks-recurrency-tx-payment \ benchmarks-overhead \ benchmarks-schemas \ benchmarks-stateful-storage \ @@ -147,7 +147,7 @@ benchmarks-messages-local \ benchmarks-msa-local \ benchmarks-overhead-local \ benchmarks-schemas-local \ -benchmarks-frequency-tx-payment-local \ +benchmarks-recurrency-tx-payment-local \ benchmarks-stateful-storage-local \ benchmarks-handles-local \ benchmarks-passkey-local \ @@ -203,7 +203,7 @@ benchmarks-capacity: .PHONY: docs docs: - RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --workspace --features frequency + RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --workspace --features recurrency # Cleans unused docker resources and artifacts .PHONY: docs @@ -212,19 +212,19 @@ docker-prune: .PHONY: check check-no-relay check-local check-testnet check-mainnet check: - SKIP_WASM_BUILD= cargo check --features runtime-benchmarks,frequency-lint-check + SKIP_WASM_BUILD= cargo check --features runtime-benchmarks,recurrency-lint-check check-no-relay: - SKIP_WASM_BUILD= cargo check --features frequency-no-relay + SKIP_WASM_BUILD= cargo check --features recurrency-no-relay check-local: - SKIP_WASM_BUILD= cargo check --features frequency-paseo-local + SKIP_WASM_BUILD= cargo check --features recurrency-paseo-local check-testnet: - SKIP_WASM_BUILD= cargo check --features frequency-testnet + SKIP_WASM_BUILD= cargo check --features recurrency-testnet check-mainnet: - SKIP_WASM_BUILD= cargo check --features frequency + SKIP_WASM_BUILD= cargo check --features recurrency .PHONY: js js: @@ -232,32 +232,32 @@ js: .PHONY: build build-benchmarks build-no-relay build-local build-testnet build-mainnet build-testnet-release build-mainnet-release build: - cargo build --features frequency-no-relay + cargo build --features recurrency-no-relay build-benchmarks: - cargo build --release --features runtime-benchmarks,frequency-lint-check --workspace + cargo build --release --features runtime-benchmarks,recurrency-lint-check --workspace build-no-relay: - cargo build --features frequency-no-relay + cargo build --features recurrency-no-relay build-local: - cargo build --features frequency-local + cargo build --features recurrency-local build-testnet: - cargo build --features frequency-testnet + cargo build --features recurrency-testnet build-mainnet: - cargo build --features frequency + cargo build --features recurrency build-testnet-release: - cargo build --locked --features frequency-testnet --release + cargo build --locked --features recurrency-testnet --release build-mainnet-release: - cargo build --locked --features frequency --release + cargo build --locked --features recurrency --release .PHONY: test e2e-tests e2e-tests-serial e2e-tests-only e2e-tests-load e2e-tests-load-only e2e-tests-testnet-paseo e2e-tests-paseo-local test: - cargo test --workspace --features runtime-benchmarks,frequency-lint-check + cargo test --workspace --features runtime-benchmarks,recurrency-lint-check e2e-tests: ./scripts/run_e2e_tests.sh @@ -290,27 +290,27 @@ try-runtime-create-snapshot-paseo-testnet: check-try-runtime-installed # mainnet snapshot takes as many as 24 hours to complete try-runtime-create-snapshot-mainnet: check-try-runtime-installed - try-runtime create-snapshot --uri wss://1.rpc.frequency.xyz:443 mainnet-all-pallets.state + try-runtime create-snapshot --uri wss://1.rpc.recurrency.xyz:443 mainnet-all-pallets.state try-runtime-upgrade-paseo-testnet: check-try-runtime-installed - cargo build --release --features frequency-testnet,try-runtime && \ - try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade live --uri wss://0.rpc.testnet.amplica.io:443 + cargo build --release --features recurrency-testnet,try-runtime && \ + try-runtime --runtime ./target/release/wbuild/recurrency-runtime/recurrency_runtime.wasm on-runtime-upgrade live --uri wss://0.rpc.testnet.amplica.io:443 try-runtime-upgrade-mainnet: check-try-runtime-installed - cargo build --release --features frequency,try-runtime && \ - try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade live --uri wss://1.rpc.frequency.xyz:443 + cargo build --release --features recurrency,try-runtime && \ + try-runtime --runtime ./target/release/wbuild/recurrency-runtime/recurrency_runtime.wasm on-runtime-upgrade live --uri wss://1.rpc.recurrency.xyz:443 try-runtime-use-snapshot-paseo-testnet: check-try-runtime-installed - cargo build --release --features frequency-testnet,try-runtime && \ - try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade snap --path testnet-paseo-all-pallets.state + cargo build --release --features recurrency-testnet,try-runtime && \ + try-runtime --runtime ./target/release/wbuild/recurrency-runtime/recurrency_runtime.wasm on-runtime-upgrade snap --path testnet-paseo-all-pallets.state try-runtime-use-snapshot-mainnet: check-try-runtime-installed - cargo build --release --features frequency,try-runtime && \ - try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade snap --path mainnet-all-pallets.state + cargo build --release --features recurrency,try-runtime && \ + try-runtime --runtime ./target/release/wbuild/recurrency-runtime/recurrency_runtime.wasm on-runtime-upgrade snap --path mainnet-all-pallets.state try-runtime-check-migrations-paseo-testnet: check-try-runtime-installed - cargo build --release --features frequency-testnet,try-runtime -q --locked && \ - try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade --checks="pre-and-post" --disable-spec-version-check --no-weight-warnings live --uri wss://0.rpc.testnet.amplica.io:443 + cargo build --release --features recurrency-testnet,try-runtime -q --locked && \ + try-runtime --runtime ./target/release/wbuild/recurrency-runtime/recurrency_runtime.wasm on-runtime-upgrade --checks="pre-and-post" --disable-spec-version-check --no-weight-warnings live --uri wss://0.rpc.testnet.amplica.io:443 # Pull the Polkadot version from the polkadot-cli package in the Cargo.lock file. # This will break if the lock file format changes POLKADOT_VERSION=$(shell grep -o 'release-polkadot-v[0-9.]*' Cargo.toml | sed 's/release-polkadot-v//' | head -n 1) diff --git a/README.md b/README.md index e3f2e99..ebf6af9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [![Issues][issues-shield]][issues-url] [![Codecov][codecov-shield]][codecov-url] -Frequency is a [Polkadot](https://www.parity.io/technologies/polkadot) parachain for data distribution protocols such as [DSNP](https://www.dsnp.org). +Recurrency is a [Polkadot](https://www.parity.io/technologies/polkadot) parachain for data distribution protocols such as [DSNP](https://www.dsnp.org). # Table of Contents @@ -70,7 +70,7 @@ Non-Collator nodes may have less power, but low memory configurations may lead t 1. Install Rust using the [official instructions](https://www.rust-lang.org/tools/install). 2. Check out this repository 3. `rust-toolchain.toml` specifies the standard toolchain to use. If you have `rustup` installed, it will automatically install the correct toolchain when you run any cargo command. -4. Running `make check` will run cargo checks for all Frequency features. This is the recommended way to check your code before committing. Alternatively, you can run following for specific features: +4. Running `make check` will run cargo checks for all Recurrency features. This is the recommended way to check your code before committing. Alternatively, you can run following for specific features: ```sh make check-no-relay @@ -91,7 +91,7 @@ Non-Collator nodes may have less power, but low memory configurations may lead t make build ``` - Above will build Frequency with all features. Alternatively you may run following command to build with specific features: + Above will build Recurrency with all features. Alternatively you may run following command to build with specific features: ```sh make build-no-relay @@ -106,7 +106,7 @@ At this point you should have `./target/debug` directory generated locally with ### asdf Support -Frequency optionally supports [asdf](https://asdf-vm.com) for managing dependencies of the following tools: +Recurrency optionally supports [asdf](https://asdf-vm.com) for managing dependencies of the following tools: Install the required plugins for [asdf](https://asdf-vm.com): Please note that if you use rustup, asdf may conflict and cause issues. It is recommended to use one or the other, but not both for rust. @@ -141,13 +141,13 @@ sudo apt install --assume-yes clang curl libssl-dev cmake 2. Follow [official instructions to install Rust](https://www.rust-lang.org/tools/install), but select `3. customize the installation`, then reply **n** to `Modify PATH variable? (Y/n)` 3. Follow steps 6-10 at [Substrate: Linux development](https://docs.substrate.io/main-docs/install/linux/) -4. Proceed with checking out and building Frequency as above. +4. Proceed with checking out and building Recurrency as above. # Run There are 2 options to run the chain locally: -_Note, Running Frequency via following options does not require binary to be built or chain specs to be generated separately, and is programmed within the scripts for simplicity._ +_Note, Running Recurrency via following options does not require binary to be built or chain specs to be generated separately, and is programmed within the scripts for simplicity._ 1. Collator Node without a relay chain (in manual/instant/interval sealing mode) 2. Collator Node with a local relay chain @@ -190,17 +190,17 @@ Great for most testing. make start ``` -Also available as a Docker image: [`frequencychain/standalone-node`](https://hub.docker.com/r/frequencychain/standalone-node) +Also available as a Docker image: [`recurrencychain/standalone-node`](https://hub.docker.com/r/recurrencychain/standalone-node) ```sh -docker run --rm -p 9944:9944 frequencychain/standalone-node +docker run --rm -p 9944:9944 recurrencychain/standalone-node ``` To stop running chain hit [Ctrl+C] in terminal where the chain was started. | **Node** | **Ports** | **Explorer URL** | | ----------------------- | :---------------: | ----------------------------------------------------------------------------------------- | -| Frequency Collator Node | ws and rpc:`9944` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | +| Recurrency Collator Node | ws and rpc:`9944` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | ### Interval Sealing @@ -224,7 +224,7 @@ This option runs two collator nodes as local host processes and two relay chain make start-paseo-relay ``` -1. Register a new parachain slot (parachain id) for Frequency. _Note, if parachain was +1. Register a new parachain slot (parachain id) for Recurrency. _Note, if parachain was previously registered on a running relay chain and no new registration is required, then you can skip the above step._ @@ -232,7 +232,7 @@ This option runs two collator nodes as local host processes and two relay chain make register ``` -1. Start Frequency as parachain with a single collator. +1. Start Recurrency as parachain with a single collator. ```sh make start-paseo-collator-alice @@ -241,39 +241,39 @@ This option runs two collator nodes as local host processes and two relay chain make start-paseo-collator-bob ``` -1. Generate genesis/wasm and onboard Frequency to the relay chain. +1. Generate genesis/wasm and onboard Recurrency to the relay chain. ```sh make onboard ``` #### Stop and Clean Environment -1. Off-board Frequency from relay chain: `make offboard` -2. To stop Frequency running in the terminal: `[Ctrl+C] ` +1. Off-board Recurrency from relay chain: `make offboard` +2. To stop Recurrency running in the terminal: `[Ctrl+C] ` 3. Stop the relay chain. `make stop-relay` 4. Run to remove unused volumes. `make docker-prune` 5. Clean up temporary directory to avoid any conflicts with next onboarding: - `rm -fr /tmp/frequency` + `rm -fr /tmp/recurrency` ### All in Docker Container -:exclamation: Currently does not work on M\* series MacOS laptops. See https://github.com/frequency-chain/frequency/issues/779 +:exclamation: Currently does not work on M\* series MacOS laptops. See https://github.com/rustadot/recurrency/issues/779 Start: ```sh -make start-frequency-docker +make start-recurrency-docker ``` Stop: ```sh -make stop-frequency-docker +make stop-recurrency-docker ``` | **Node** | **Ports** | **Explorer URL** | | -------------------- | ------------------------------- | ----------------------------------------------------------------------------------------- | -| Frequency Relay Node | ws and rpc: `9944`, p2p:`30333` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | +| Recurrency Relay Node | ws and rpc: `9944`, p2p:`30333` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | | Alice Relay Node | ws and rpc: `9946`, p2p:`30335` | [127.0.0.1:9946](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9946#/explorer) | | Bob Relay Node | ws and rpc: `9947`, p2p:`30336` | [127.0.0.1:9947](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9947#/explorer) | @@ -283,7 +283,7 @@ make stop-frequency-docker # Run all the tests make test # Activate selected features -cargo test --features frequency +cargo test --features recurrency ``` ### E2E Tests @@ -299,7 +299,7 @@ make benchmarks ## Run with offchain features ```sh -make start-frequency-with-offchain +make start-recurrency-with-offchain ``` # Format, Lint and Audit Source Code @@ -321,9 +321,9 @@ make start-frequency-with-offchain 2. Use [srtool](https://github.com/paritytech/srtool) and [srtool-cli](https://github.com/chevdor/srtool-cli) to verify the runtime: ```sh SRTOOL_TAG="1.77.0" srtool build \ - --build-opts="'--features on-chain-release-build,no-metadata-docs,frequency'" \ + --build-opts="'--features on-chain-release-build,no-metadata-docs,recurrency'" \ --profile=release \ - --package=frequency-runtime \ + --package=recurrency-runtime \ --root ``` @@ -369,18 +369,18 @@ make docker-prune # View all listening ports lsof -i -P | grep -i "listen" -# View ports Frequency node is listening on -lsof -i -P | grep -i "listen" | grep frequency +# View ports Recurrency node is listening on +lsof -i -P | grep -i "listen" | grep recurrency ``` -[issues-shield]: https://img.shields.io/github/issues/frequency-chain/frequency.svg?style=for-the-badge -[issues-url]: https://github.com/frequency-chain/frequency/issues -[codecov-shield]: https://img.shields.io/codecov/c/github/frequency-chain/frequency?style=for-the-badge -[codecov-url]: https://app.codecov.io/gh/frequency-chain/frequency -[release-shield]: https://img.shields.io/github/v/release/frequency-chain/frequency?style=for-the-badge -[release-url]: https://github.com/frequency-chain/frequency/releases -[docker-shield]: https://img.shields.io/docker/v/frequencychain/parachain-node-mainnet/latest?color=1c90ed&label=Docker&style=for-the-badge -[docker-url]: https://hub.docker.com/u/frequencychain +[issues-shield]: https://img.shields.io/github/issues/rustadot/recurrency.svg?style=for-the-badge +[issues-url]: https://github.com/rustadot/recurrency/issues +[codecov-shield]: https://img.shields.io/codecov/c/github/rustadot/recurrency?style=for-the-badge +[codecov-url]: https://app.codecov.io/gh/rustadot/recurrency +[release-shield]: https://img.shields.io/github/v/release/rustadot/recurrency?style=for-the-badge +[release-url]: https://github.com/rustadot/recurrency/releases +[docker-shield]: https://img.shields.io/docker/v/recurrencychain/parachain-node-mainnet/latest?color=1c90ed&label=Docker&style=for-the-badge +[docker-url]: https://hub.docker.com/u/recurrencychain diff --git a/SECURITY.md b/SECURITY.md index 8603b61..c038694 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,9 +9,9 @@ promptly and protect our users. **Please do not report security vulnerabilities through public GitHub issues.** -Instead, please report the vulnerability via [https://github.com/frequency-chain/frequency/security/advisories/new](https://github.com/frequency-chain/frequency/security/advisories/new). +Instead, please report the vulnerability via [https://github.com/rustadot/recurrency/security/advisories/new](https://github.com/rustadot/recurrency/security/advisories/new). -Alternatively, you can send email to [security@frequency.xyz](mailto:security@frequency.xyz). If +Alternatively, you can send email to [security@recurrency.xyz](mailto:security@recurrency.xyz). If possible, encrypt your message with our PGP key; you can download it from [OpenGPG key server](https://keys.openpgp.org/vks/v1/by-fingerprint/0E50AE7CFD8195999CF45370B766E94411B9B734) or copy from below. @@ -30,7 +30,7 @@ understand the nature and scope of the possible issue: - Any other details **Reminder: This process is only for security related vulnerabilities and if this is a generic issue -(no security implications) with Frequency or Polkadot-sdk or any other dependencies please open a +(no security implications) with Recurrency or Polkadot-sdk or any other dependencies please open a regular GitHub issue.** ## Plaintext PGP Key diff --git a/common/helpers/Cargo.toml b/common/helpers/Cargo.toml index 5649c02..08f677e 100644 --- a/common/helpers/Cargo.toml +++ b/common/helpers/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] -description = "A package that defines common helper modules used in Frequency" +authors = ["Recurrency"] +description = "A package that defines common helper modules used in Recurrency" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "common-helpers" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] diff --git a/common/primitives/Cargo.toml b/common/primitives/Cargo.toml index 94b4cde..31a3517 100644 --- a/common/primitives/Cargo.toml +++ b/common/primitives/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "A package that defines common primitives used in runtime and RPCs" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "common-primitives" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] diff --git a/common/primitives/src/lib.rs b/common/primitives/src/lib.rs index e232c2e..9567822 100644 --- a/common/primitives/src/lib.rs +++ b/common/primitives/src/lib.rs @@ -1,4 +1,4 @@ -//! # Frequency Primitives +//! # Recurrency Primitives //! //! Primitives package contains many of the structs and trait implementations //! for Pallets and utilities that need to be shared across packages diff --git a/common/primitives/src/utils.rs b/common/primitives/src/utils.rs index f28d515..e9b0a1a 100644 --- a/common/primitives/src/utils.rs +++ b/common/primitives/src/utils.rs @@ -6,7 +6,7 @@ pub const MAINNET_GENESIS_HASH: &[u8] = &[ 71, 156, 108, 67, 111, 7, 243, 111, 204, 141, 58, 225, ]; -/// Frequency Testnet on Paseo Genesis Hash 0x203c6838fc78ea3660a2f298a58d859519c72a5efdc0f194abd6f0d5ce1838e0 +/// Recurrency Testnet on Paseo Genesis Hash 0x203c6838fc78ea3660a2f298a58d859519c72a5efdc0f194abd6f0d5ce1838e0 pub const TESTNET_ON_PASEO_GENESIS_HASH: &[u8] = &[ 32, 60, 104, 56, 252, 120, 234, 54, 96, 162, 242, 152, 165, 141, 133, 149, 25, 199, 42, 94, 253, 192, 241, 148, 171, 214, 240, 213, 206, 24, 56, 224, @@ -17,17 +17,17 @@ pub const TESTNET_ON_PASEO_GENESIS_HASH: &[u8] = &[ pub enum DetectedChainType { /// An unknown chain, it can be a local or development chain Unknown, - /// Frequency Mainnet - FrequencyMainNet, - /// Frequency Paseo Testnet - FrequencyPaseoTestNet, + /// Recurrency Mainnet + RecurrencyMainNet, + /// Recurrency Paseo Testnet + RecurrencyPaseoTestNet, } /// Finds the chain type by genesis hash pub fn get_chain_type_by_genesis_hash(genesis_hash: &[u8]) -> DetectedChainType { match genesis_hash { - MAINNET_GENESIS_HASH => DetectedChainType::FrequencyMainNet, - TESTNET_ON_PASEO_GENESIS_HASH => DetectedChainType::FrequencyPaseoTestNet, + MAINNET_GENESIS_HASH => DetectedChainType::RecurrencyMainNet, + TESTNET_ON_PASEO_GENESIS_HASH => DetectedChainType::RecurrencyPaseoTestNet, _ => DetectedChainType::Unknown, } } @@ -283,7 +283,7 @@ mod tests { let detected = get_chain_type_by_genesis_hash(&known_genesis); // assert - assert_eq!(detected, DetectedChainType::FrequencyMainNet); + assert_eq!(detected, DetectedChainType::RecurrencyMainNet); } #[test] @@ -296,6 +296,6 @@ mod tests { let detected = get_chain_type_by_genesis_hash(&known_genesis); // assert - assert_eq!(detected, DetectedChainType::FrequencyPaseoTestNet); + assert_eq!(detected, DetectedChainType::RecurrencyPaseoTestNet); } } diff --git a/deny.toml b/deny.toml index 0b66901..1d56c3c 100644 --- a/deny.toml +++ b/deny.toml @@ -48,7 +48,7 @@ all-features = false no-default-features = false # If set, these feature will be enabled when collecting metadata. If `--features` # is specified on the cmd line they will take precedence over this option. -features = ["frequency-lint-check", "std"] +features = ["recurrency-lint-check", "std"] # The output table provides options for how/if diagnostics are outputted [output] @@ -73,7 +73,7 @@ ignore = [ { id = "RUSTSEC-2020-0168", reason = "There is no suitable replacement for mach and the mach2 crate has not been vetted." }, { id = "RUSTSEC-2024-0336", reason = "Only use of rustls@v0.20.9 is in futures-rustls which does not use the effected code" }, { id = "RUSTSEC-2024-0344", reason = "We are only able to remove this once parity updates its dependencies. Older versions of curve25519-dalek should get replaces with >= 4.1.3" }, - { id = "RUSTSEC-2022-0093", reason = "The vulnerable code is not exploitable in Frequency because the signing function is not exposed in a way that allows the use of arbitrary public keys, ensuring protection against the described vulnerability." }, + { id = "RUSTSEC-2022-0093", reason = "The vulnerable code is not exploitable in Recurrency because the signing function is not exposed in a way that allows the use of arbitrary public keys, ensuring protection against the described vulnerability." }, ] # If this is true, then cargo deny will use the git executable to fetch advisory database. # If this is false, then it uses a built-in git library. diff --git a/designdocs/README.md b/designdocs/README.md index c67ed61..38f062a 100644 --- a/designdocs/README.md +++ b/designdocs/README.md @@ -1,31 +1,31 @@ # Design Documents -To create a new design document, Please see the [Design Doc README](https://github.com/frequency-chain/meta/blob/main/DESIGN_DOCS.md) for details on what goes in each section, and use the provided template there. +To create a new design document, Please see the [Design Doc README](https://github.com/rustadot/meta/blob/main/DESIGN_DOCS.md) for details on what goes in each section, and use the provided template there. ## Accepted Design Documents - [Accounts](./accounts.md) - - [PR](https://github.com/frequency-chain/frequency/pull/13) + - [PR](https://github.com/rustadot/recurrency/pull/13) - [On Chain Message Storage](message_storage.md) - - [Merged Pull Request](https://github.com/frequency-chain/frequency/pull/15) + - [Merged Pull Request](https://github.com/rustadot/recurrency/pull/15) - [Delegation](./delegation.md) - - [PR](https://github.com/frequency-chain/frequency/pull/14) + - [PR](https://github.com/rustadot/recurrency/pull/14) - [Message Schema(s)](./schema.md) - - [Merged Pull Request](https://github.com/frequency-chain/frequency/pull/17) + - [Merged Pull Request](https://github.com/rustadot/recurrency/pull/17) - [Provider Permissions and Grants](./provider_permissions.md) - - [Merged Pull Request](https://github.com/frequency-chain/frequency/pull/150) + - [Merged Pull Request](https://github.com/rustadot/recurrency/pull/150) - [Provider Registration](./provider_registration.md) - - [Merged Pull Request](https://github.com/frequency-chain/frequency/pull/208) + - [Merged Pull Request](https://github.com/rustadot/recurrency/pull/208) - [Capacity](./capacity.md) - - [Merged Pull Request](https://github.com/frequency-chain/frequency/pull/426) + - [Merged Pull Request](https://github.com/rustadot/recurrency/pull/426) - [Stateful Storage](./stateful_storage.md) - - [PR](https://github.com/frequency-chain/frequency/pull/900) + - [PR](https://github.com/rustadot/recurrency/pull/900) - [Graph Sdk](./graph_sdk.md) - - [PR](https://github.com/frequency-chain/frequency/pull/1159) + - [PR](https://github.com/rustadot/recurrency/pull/1159) ## Basic Data Model -There are three core data models in Frequency and each corresponds to a pallet. +There are three core data models in Recurrency and each corresponds to a pallet. - [Message Source Account (MSA)](../pallets/msa/) - Represents a pseudonymous identity that can be the source of messages or provide access to the chain to others @@ -39,14 +39,14 @@ There are three core data models in Frequency and each corresponds to a pallet. ![Basic Data Model drawio](../docs/images/BasicDataModel.drawio.png?raw=true) -## Frequency Glossary +## Recurrency Glossary - `AccountId`: A public key that could be a `Token Account` and/or associated with an `MSA` - `Announcer AccountId`: The `AccountId` that signs a capacity transaction and is associated with an MSA from which capacity will be deducted for that capacity transaction. - `Announcer MSA`: The `MSA` associated with the `AccountId` that signs a capacity transaction. - `Delegate` (verb): The action of an `MSA` (the `Delegator`) delegating to a `Provider`. _A verb only. Do not use as a noun!_ - `Delegator`: An `MSA` that has delegated to a `Provider`. -- `MRC`: The old name for Frequency +- `MRC`: The old name for Recurrency - `MSA Id`: The 64 bit unsigned integer associated with an `MSA`. - `MSA`: Message Source Account. A registered identifier with the MSA pallet. `AccountIds` (aka public keys) may only be associated with one `MSA` and that association is immutable. - `Message`: A message that matches a registered `Schema` (on-chain or off-chain). diff --git a/designdocs/accounts.md b/designdocs/accounts.md index b06d6dc..b1c5964 100644 --- a/designdocs/accounts.md +++ b/designdocs/accounts.md @@ -1,8 +1,8 @@ ## Context and Scope -The ability to create an on-chain account without a token to increase user accessibility for Frequency. +The ability to create an on-chain account without a token to increase user accessibility for Recurrency. -In Polkadot an on-chain account is created when an existential deposit is made to an address generated from cryptographic keys. In order to be able to make such deposit a user needs to acquire tokens via an exchange or transfer tokens into an account address. The process of creating an on-chain account can discourage users from using Frequency and by removing this overhead it allows Frequency to extend it services to a wider audience. +In Polkadot an on-chain account is created when an existential deposit is made to an address generated from cryptographic keys. In order to be able to make such deposit a user needs to acquire tokens via an exchange or transfer tokens into an account address. The process of creating an on-chain account can discourage users from using Recurrency and by removing this overhead it allows Recurrency to extend it services to a wider audience. ## Goals @@ -17,7 +17,7 @@ In addition, the message sender must preserve the following characteristics: ## Proposal -I propose a dual account system in Frequency. +I propose a dual account system in Recurrency. These two different types of accounts act as building blocks to facilitate the aforementioned goals. One type of account, [Token] Account, will be responsible for holding a balance, transferring tokens to other accounts, and pay certain transactions [list transactions]. Another account, Message Source Account (MSA), will be used to broadcast messages and delegate to another MSA account. @@ -27,7 +27,7 @@ A token account has the ability to transfer value between accounts. More general Similar to Bitcoin, an account address is derived from cryptographic keys and is created by sending token to a public key. It also carries an existential deposit that keeps an account from being pruned. More on the type of supported keys below. -In Substrate a [Token] Account can be implemented by using the Balances Pallet to create a Frequency Token and storing a [Token] balance in System pallet. +In Substrate a [Token] Account can be implemented by using the Balances Pallet to create a Recurrency Token and storing a [Token] balance in System pallet. ### Message Source Account (MSA) diff --git a/designdocs/batched_messages.md b/designdocs/batched_messages.md index cb8c086..5bc881b 100644 --- a/designdocs/batched_messages.md +++ b/designdocs/batched_messages.md @@ -170,9 +170,9 @@ Please see [Batching Source Dependent Messages With Delegation](https://forums.p the benefits of announcing batch files on chain rather than all types of user-created messages. -One risk is that providers on Frequency could simply register a new schema and +One risk is that providers on Recurrency could simply register a new schema and announce batches "unofficially". We have not decided whether or not to let everyone -with enough token balance register a schema. Other Frequency participants would need to +with enough token balance register a schema. Other Recurrency participants would need to first learn about and evaluate new schemas, then update their software to consume a new message type. @@ -232,4 +232,4 @@ pub struct MessageResponse { - _IPFS_ [InterPlanetary File System](https://docs.ipfs.io/), a decentralized file system for building the next generation of the internet - _CID_ [Content IDentifier](https://github.com/multiformats/cid/), Self-describing content-addressed identifiers for distributed systems -- _MsaId_ [Message Source Account ID](https://github.com/frequency-chain/frequency/blob/main/designdocs/accounts.md) an identifier for a MSA. +- _MsaId_ [Message Source Account ID](https://github.com/rustadot/recurrency/blob/main/designdocs/accounts.md) an identifier for a MSA. diff --git a/designdocs/capacity.md b/designdocs/capacity.md index dfdf639..572d20e 100644 --- a/designdocs/capacity.md +++ b/designdocs/capacity.md @@ -4,7 +4,7 @@ Feeless transactions are essential in reaching mass adoption as it removes the overhead costs of transactions for app developers to acquire a far-reaching user base. -In this document, I will introduce the concept of [Capacity](https://forums.projectliberty.io/t/05-what-is-capacity-frequency-economics-part-1/248), a non-transferable resource that is associated with an MSA account of a [Registered Provider](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_registration.md), and how Capacity can be acquired through staking, refills, and used to perform transactions such as: +In this document, I will introduce the concept of [Capacity](https://forums.projectliberty.io/t/05-what-is-capacity-recurrency-economics-part-1/248), a non-transferable resource that is associated with an MSA account of a [Registered Provider](https://github.com/rustadot/recurrency/blob/main/designdocs/provider_registration.md), and how Capacity can be acquired through staking, refills, and used to perform transactions such as: - Create an MSA. - Add a key to an MSA. @@ -15,7 +15,7 @@ In this document, I will introduce the concept of [Capacity](https://forums.proj ## Proposal -Frequency explains how Capacity can be acquired through staking, refills, and used to perform certain transactions. This approach is addressed in each section below: +Recurrency explains how Capacity can be acquired through staking, refills, and used to perform certain transactions. This approach is addressed in each section below: - [Implementation of acquiring Capacity through staking](#staking) - [Implementation of replenishing Capacity](#replenish) @@ -29,7 +29,7 @@ This section is limited to the interfaces for staking and un-staking tokens. As a Registered Provider, you can receive Capacity by staking your tokens to the network or when others stake their tokens to the network. -When staking tokens to the network, the network generates Capacity based on a Capacity-generating function that considers usage and other criteria. When you stake tokens, you will also provide a target Registered Provider to receive the Capacity generated. In exchange for staking Token to the network, you receive rewards. Rewards are deferred to a supplemental [staking design doc](https://github.com/frequency-chain/frequency/issues/40). You may increase your stake to network many times and target different Service Providers each time you stake. Note every time you stake to network your tokens are locked until you decide to unstake. +When staking tokens to the network, the network generates Capacity based on a Capacity-generating function that considers usage and other criteria. When you stake tokens, you will also provide a target Registered Provider to receive the Capacity generated. In exchange for staking Token to the network, you receive rewards. Rewards are deferred to a supplemental [staking design doc](https://github.com/rustadot/recurrency/issues/40). You may increase your stake to network many times and target different Service Providers each time you stake. Note every time you stake to network your tokens are locked until you decide to unstake. Unstaking tokens allow you to schedule a number of tokens to be unlocked from your balance. There is no limit on the amount that you can schedule to be unlocked (up to the amount staked), but there is a limit on how many scheduled requests you can make. After scheduling tokens to be unlocked using **`unstake`**, you can withdraw those tokens after a thaw period has elapsed by using the **`withdraw_unstaked`** extrinsic. If the call is successful, all thawed tokens become unlocked and increase the ability to make more scheduled requests. @@ -246,7 +246,7 @@ pub enum Error { ```rust pub enum Event { - /// Tokens have been staked to the Frequency network. + /// Tokens have been staked to the Recurrency network. Staked { /// The token account that staked tokens to the network. account: T::AccountId, @@ -264,7 +264,7 @@ pub enum Event { /// the total amount withdrawn, i.e. put back into free balance. amount: BalanceOf, }, - /// A token account has unstaked the Frequency network. + /// A token account has unstaked the Recurrency network. UnStaked { /// The token account that staked tokens to the network. account: T::AccountId, diff --git a/designdocs/delegation.md b/designdocs/delegation.md index 88461ce..85c8689 100644 --- a/designdocs/delegation.md +++ b/designdocs/delegation.md @@ -26,7 +26,7 @@ The primary motivation for delegation is to support End Users of the DSNP platfo Market research makes it clear that End Users are extremely reluctant to pay to use applications, particularly social networks. This means there needs to be some way to onboard End Users and relay their activity through the DSNP platform without charging them. The use of authorized Delegates enables the creation of End User accounts as well as processing and storing user messages and other data for the End Users, paid for by a Provider, who can recoup these costs by other means (outside the scope of this Design Document). -The vast majority of this activity will not reside on chain, however, Frequency needs to be able to coordinate the exchange of data, and to securely allow an End User or any other type of account holder to manage their Delegates. +The vast majority of this activity will not reside on chain, however, Recurrency needs to be able to coordinate the exchange of data, and to securely allow an End User or any other type of account holder to manage their Delegates. The delegation is managed by assigning each account, called a Message Source Account or MSA, an ID number, called an MsaId. ## Goals and Non-Goals @@ -37,7 +37,7 @@ Put another way, delegation must have the following properties: - **Authorizable** - delegations can be authorized with specific permissions by MSAs. - **Verifiable** - there is a way to check that Providers are doing things only when authorized and only what they are authorized to do. - **Transparent** - delegations can be readable by anyone, in order to maximize opportunities to police Provider actions. -- **Changeable** - a Delegator can change Provider permissions to give MSAs control over what tasks are permitted to the Provider. https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_permissions.md +- **Changeable** - a Delegator can change Provider permissions to give MSAs control over what tasks are permitted to the Provider. https://github.com/rustadot/recurrency/blob/main/designdocs/provider_permissions.md - **Revocable** - a Delegator can withdraw permissions completely from the Provider. ### Non-Goals @@ -208,7 +208,7 @@ Directly adding a provider, with or without a provider's permission, is not to b ## Glossary -- **Provider**: An MSA that has been granted specific permissions by its Delegator. A company or individual operating an on-chain Provider MSA in order to post Frequency transactions on behalf of other MSAs. +- **Provider**: An MSA that has been granted specific permissions by its Delegator. A company or individual operating an on-chain Provider MSA in order to post Recurrency transactions on behalf of other MSAs. - **Delegator**: An MSA that has granted specific permissions to a Provider. - **MSA**: Message Source Account. A collection of key pairs which can have a specific token balance. - **Public Key**: A 32-byte (u256) number that is used to refer to an on-chain MSA and verify signatures. It is one of the keys of an MSA key pair diff --git a/designdocs/graph_sdk.md b/designdocs/graph_sdk.md index b6ef0b8..b63075d 100644 --- a/designdocs/graph_sdk.md +++ b/designdocs/graph_sdk.md @@ -3,25 +3,25 @@ ## Context and Scope The proposed design consists of changes that is going to be a separate [repository](https://github.com/LibertyDSNP/graph-sdk) to facilitate -graph related interactions with Frequency chain in test and production environments. +graph related interactions with Recurrency chain in test and production environments. ## Problem Statement -Implementing DSNP protocol on Frequency comes with its own challenges and tradeoffs. One of these -challenges is to decide what is the boundary between DSNP and Frequency and what should be -implemented directly in Frequency. +Implementing DSNP protocol on Recurrency comes with its own challenges and tradeoffs. One of these +challenges is to decide what is the boundary between DSNP and Recurrency and what should be +implemented directly in Recurrency. -To keep Frequency implementation as DSNP agnostic as possible we decided to store social graph -related data as blobs in Frequency and keep the details of how these blobs are created and modified +To keep Recurrency implementation as DSNP agnostic as possible we decided to store social graph +related data as blobs in Recurrency and keep the details of how these blobs are created and modified inside DSNP spec. Graph SDK is an implementation of mentioned DSNP spec for social graph, optimized -for storage and interaction with Frequency. +for storage and interaction with Recurrency. ## Goals - Define operations - Define interface of Graph SDK. - Define the main entities in Graph SDK. - Define the memory model of the graph. -- Define the algorithms to optimize the output regarding Frequency. +- Define the algorithms to optimize the output regarding Recurrency. ## Operations Following is a list of desired operations in this SDK: @@ -29,11 +29,11 @@ Following is a list of desired operations in this SDK: | Name | Description | | ------------- | ------------- | | **Initialise** | Creates in memory graph structure for a desired DSNP user. | -| **Import** | Import the blob(s) and keys from frequency into Graph SDK for desired DSNP user. | +| **Import** | Import the blob(s) and keys from recurrency into Graph SDK for desired DSNP user. | | **Update** | Changes the current in-memory graph structure with incoming updates. | | **Get Graph** | Exposes current state of in-memory graph to the consumer of the SDK. | -| **Has Updates** | Determines if the applied changes created some updates in graph that needs to be persisted on Frequency. | -| **Calculate Updates** | Applies the graph changes and generates optimized blobs to be applied to Frequency | +| **Has Updates** | Determines if the applied changes created some updates in graph that needs to be persisted on Recurrency. | +| **Calculate Updates** | Applies the graph changes and generates optimized blobs to be applied to Recurrency | #### Import actions Steps necessary to import a social graph blob: @@ -155,12 +155,12 @@ pub struct Rotation { ![Entities](https://user-images.githubusercontent.com/9152501/222261121-185d4d9d-1ecb-4ffa-8fe0-8612e58d7b27.png) -* **Tracker**: This is used only to allow generating optimized pages for Frequency. +* **Tracker**: This is used only to allow generating optimized pages for Recurrency. ## Memory model and usage It is recommended to batch the graph changes for DSNP users as much as possible and initialize the library with all the keys and page blobs related to desired users. Apply all changes to in-memory -graph and calculate and apply all page updates to Frequency chain. +graph and calculate and apply all page updates to Recurrency chain. To ensure local graph state is in sync with the chain graph state, it is recommended to only initialize and use the library in case there are any changes to the graph, instead of having a @@ -170,7 +170,7 @@ state being stale. ## Algorithms We would like to minimize the number of transactions and related data which needs to be submitted to -Frequency. +Recurrency. An example of such an algorithm would be as follows 1. apply all removes before adds to determine all pages that are required to be changed diff --git a/designdocs/message_storage.md b/designdocs/message_storage.md index 1fb1dbb..e8dc4ab 100644 --- a/designdocs/message_storage.md +++ b/designdocs/message_storage.md @@ -5,7 +5,7 @@ The proposed feature consists of changes that is going to be one (or more) palle Substrate based blockchain, and it will be used in all environments including production. ## Problem Statement -One of the core features of **Frequency** is to facilitate passing messages between different +One of the core features of **Recurrency** is to facilitate passing messages between different participants. To implement this core feature, backed with guarantees provided by Blockchain technology (in our case **Substrate**) we are looking for architectures and data structures that will allow us to store these messages on chain. @@ -63,7 +63,7 @@ Following is a list of considerations for choosing a serialization format. 2. **Efficient storage** - On chain data storage is a limited resource, and we need to minimize stored data 3. **Supported on popular Languages** - - To facilitate third-party integrations with **Frequency** the serialization format should be + - To facilitate third-party integrations with **Recurrency** the serialization format should be widely supported in popular programming languages. #### Candidates @@ -117,7 +117,7 @@ from `StartingBlockNumber` until is reaches one of values from `EndBlockNumber` #### Mitigations 1. To be able to achieve high throughput we need to carefully calculate `pre-defined maximum number` -of messages per block. This number should be sufficiently big enough to satisfy **Frequency** +of messages per block. This number should be sufficiently big enough to satisfy **Recurrency** requirements without allowing any denial of service attacks. 2. One way to improve read throughput for sequential data is to index the block numbers that have any messages, to eliminate unnecessary DB reads. We can use a BitArray per SchemaId storing diff --git a/designdocs/passkey_p256.md b/designdocs/passkey_p256.md index 6fb4a26..3490a6c 100644 --- a/designdocs/passkey_p256.md +++ b/designdocs/passkey_p256.md @@ -45,11 +45,11 @@ ## 1. Introduction -This document outlines the design considerations and specifications for integrating P256 Passkey support for performing transactions on the Frequency chain. Passkey support aims to provide a novel non-custodial solution for managing user accounts and signing transactions on-chain. +This document outlines the design considerations and specifications for integrating P256 Passkey support for performing transactions on the Recurrency chain. Passkey support aims to provide a novel non-custodial solution for managing user accounts and signing transactions on-chain. ## 2. Benefits -- **Non-Custodial Account Management**: Passkey support enables users to interact with the Frequency chain without actual seed access. This reduces the risk of seed exposure and enhances security. +- **Non-Custodial Account Management**: Passkey support enables users to interact with the Recurrency chain without actual seed access. This reduces the risk of seed exposure and enhances security. - **Functionality**: Passkey support provides a better user experience by enabling users to sign transactions without seed access. The proliferation of Passkey-enabled services can lead to a seamless user experience. @@ -62,7 +62,7 @@ This document outlines the design considerations and specifications for integrat ### Accounts - **Passkey Account**: The user account associated with the Passkey. -- **Frequency Account**: The account used for on-chain transactions and interactions. This account is derived from a seed phrase generated by the Web Wallet. +- **Recurrency Account**: The account used for on-chain transactions and interactions. This account is derived from a seed phrase generated by the Web Wallet. - **Web Wallet**: The platform facilitating the management and interaction with user accounts. ### Keys @@ -93,7 +93,7 @@ This document outlines the design considerations and specifications for integrat - Passkey Signature of Account Public Key (`passkey_sig_account_pk`) - Passkey signature of transaction (`passkey_sig_tx`) -- Frequency Account key signature of Passkey Public Key (`account_sig_passkey_pk`) +- Recurrency Account key signature of Passkey Public Key (`account_sig_passkey_pk`) - Generated Account Public Key (`account_pk`) - `credentialPublicKey`: Passkey Public Key (`passkey_pk`) - `UserName`: User's website-specific username (email, etc...) @@ -107,14 +107,14 @@ This document outlines the design considerations and specifications for integrat ### Users Device - Keypair for Passkey -- Keypair seed backup for Frequency Account +- Keypair seed backup for Recurrency Account - All data included in the [Web Wallet backend](#web-wallet-backend) section ## 5. Specification ### Terms -These are the following technical terms and specifications for the implementation of Passkey support on Frequency chain. +These are the following technical terms and specifications for the implementation of Passkey support on Recurrency chain. - `account_keypair` : A cryptographic key pair generated from a seed phrase - `account_pk` : Account Public Key @@ -246,7 +246,7 @@ Browser/Client receives the following data from the backend: call: tx, }; - let passkeyCall = api.registry.createType('PalletFrequencyTxPaymentPasskeyCall', passkeyCallData); + let passkeyCall = api.registry.createType('PalletRecurrencyTxPaymentPasskeyCall', passkeyCallData); ``` 2. **Passkey Signing**: @@ -283,7 +283,7 @@ Browser/Client receives the following data from the backend: passkeyCall, }; - const passkey_payload = api.createType('PalletFrequencyTxPaymentPasskeyPayload', payload); + const passkey_payload = api.createType('PalletRecurrencyTxPaymentPasskeyPayload', payload); // Submit the transaction to the chain without signature const tx = api.tx.{frequecyPassKeyProxy}.submitPasskeyTx(passkey_payload); @@ -314,7 +314,7 @@ Browser/Client receives the following data from the backend: for registration is generated account Public Key (`account_pk`) - Passkey Login response should get verified which checks the random challenge - Passkey Transaction response should get verified which checks transaction related challenge. -- Any provided Frequency account signature should get verified. +- Any provided Recurrency account signature should get verified. #### On-chain @@ -331,7 +331,7 @@ a wrapper around the Original C implementation and unfortunately it doesn't look #### Extrinsic verification -Currently, the Frequency chain primarily makes use of _SignedExtrinsic_. Every signed extrinsic is validated by a list of SignedExtensions which each verify a different aspect of that extrinsic. The list of signed extensions includes: +Currently, the Recurrency chain primarily makes use of _SignedExtrinsic_. Every signed extrinsic is validated by a list of SignedExtensions which each verify a different aspect of that extrinsic. The list of signed extensions includes: - **CheckNonce**: Checks the the nonce inside the payload to avoid replay attacks. - **ChargeFrqTransactionPayment**: Checks that the transaction fee can be applied to the owner account inside @@ -539,7 +539,7 @@ should be a different and random value coming from server instead of the Public ### Separate Pallet -_Question_: Should we implement this feature in a separate pallet or just use already existing `frequency-tx-payment` +_Question_: Should we implement this feature in a separate pallet or just use already existing `recurrency-tx-payment` pallet? One argument against having it in a separate pallet is since there is no extra data required to be diff --git a/designdocs/provider_boosting_economic_model.md b/designdocs/provider_boosting_economic_model.md index 85c4b62..0aec2f5 100644 --- a/designdocs/provider_boosting_economic_model.md +++ b/designdocs/provider_boosting_economic_model.md @@ -10,26 +10,26 @@ This document outlines the economic model to be used for: ## Context and Scope: -The Frequency Transaction Payment system uses Capacity to pay for a limited number of specific transactions on chain. Accounts that wish to pay for transactions with Capacity must: +The Recurrency Transaction Payment system uses Capacity to pay for a limited number of specific transactions on chain. Accounts that wish to pay for transactions with Capacity must: -1. Have an [MSA](https://github.com/frequency-chain/frequency/blob/main/designdocs/accounts.md) -2. Be a [Provider](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_registration.md) (see also [Provider Permissions and Grants](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_permissions.md)) -3. Lock up a minimum amount of FRQCY token to receive [Capacity](https://github.com/frequency-chain/frequency/blob/main/designdocs/capacity.md). +1. Have an [MSA](https://github.com/rustadot/recurrency/blob/main/designdocs/accounts.md) +2. Be a [Provider](https://github.com/rustadot/recurrency/blob/main/designdocs/provider_registration.md) (see also [Provider Permissions and Grants](https://github.com/rustadot/recurrency/blob/main/designdocs/provider_permissions.md)) +3. Lock up a minimum amount of FRQCY token to receive [Capacity](https://github.com/rustadot/recurrency/blob/main/designdocs/capacity.md). There is also a business case for allowing any token holder to lock up its tokens in exchange for a reward - while also targeting a Provider to receive some Capacity. ## Problem Statement: A system consisting only of providers and coinless users who delegate to providers will tend toward centralization. -To build a self-sustaining Frequency network where control is decentralized, a variety of economic solutions are needed. One of these is the ability to lock up FRQCY token in return for something; this creates an incentive for participation and involvement with the Frequency chain fundamentals and governance. +To build a self-sustaining Recurrency network where control is decentralized, a variety of economic solutions are needed. One of these is the ability to lock up FRQCY token in return for something; this creates an incentive for participation and involvement with the Recurrency chain fundamentals and governance. -How is that so? Capacity is how Frequency intends Providers to pay for the vast majority of their on-chain messages. In the proposed system, Providers receive Capacity when users lock up some FRQCY. These Providers would then lose Capacity if those users unlock. If a Provider's Capacity from Provider Boosting is significant, this gives Provider Boosters some power over their targeted Providers. If a Provider is utilizing all or nearly all their Capacity almost every Epoch -- which they should do if trying to be economical -- then even a small percentage of lost Capacity will literally cost them to replace it. This gives those end-users relying upon - and Boosting - their Providers the ability to exercise direct market power they did not previously have. +How is that so? Capacity is how Recurrency intends Providers to pay for the vast majority of their on-chain messages. In the proposed system, Providers receive Capacity when users lock up some FRQCY. These Providers would then lose Capacity if those users unlock. If a Provider's Capacity from Provider Boosting is significant, this gives Provider Boosters some power over their targeted Providers. If a Provider is utilizing all or nearly all their Capacity almost every Epoch -- which they should do if trying to be economical -- then even a small percentage of lost Capacity will literally cost them to replace it. This gives those end-users relying upon - and Boosting - their Providers the ability to exercise direct market power they did not previously have. -Account holders on Frequency may receive FRQCY from different sources. Providers may offer airdrops in return for such bringing in new users or sharing links on other platforms, then encourage their users to participate in Provider Boosting. Rewards could potentially be exchanged for non-transferable, in-app-only benefits such as premium features, special emoji, avatar customization, and the like, similarly to platforms such as [Steam](https://store.steampowered.com). +Account holders on Recurrency may receive FRQCY from different sources. Providers may offer airdrops in return for such bringing in new users or sharing links on other platforms, then encourage their users to participate in Provider Boosting. Rewards could potentially be exchanged for non-transferable, in-app-only benefits such as premium features, special emoji, avatar customization, and the like, similarly to platforms such as [Steam](https://store.steampowered.com). ### Provider Boost Accounts are not required to have MSA -Any Frequency account with an existential balance + the minimum staking amount in FRQCY may participate in in the Provider Boost program. An MSA is optional. +Any Recurrency account with an existential balance + the minimum staking amount in FRQCY may participate in in the Provider Boost program. An MSA is optional. ## Assumptions @@ -53,7 +53,7 @@ To specify the following: This document does not: - specify implementation details or naming in code. -- specify reward amounts for all time; values and methods used for calculating rewards should be expected to change to meet economic goals of the Frequency Blockchain and any legal requirements. +- specify reward amounts for all time; values and methods used for calculating rewards should be expected to change to meet economic goals of the Recurrency Blockchain and any legal requirements. ## Proposal: diff --git a/designdocs/provider_boosting_implementation.md b/designdocs/provider_boosting_implementation.md index c078c59..56987c8 100644 --- a/designdocs/provider_boosting_implementation.md +++ b/designdocs/provider_boosting_implementation.md @@ -25,21 +25,21 @@ This process will be described in more detail in the Economic Model Design Docum ### NOTE: Actual reward amounts are TBD; amounts are for illustration purposes only -![Provider boosted staking](https://github.com/frequency-chain/frequency/assets/502640/ffb632f2-79c2-4a09-a906-e4de02e4f348) +![Provider boosted staking](https://github.com/rustadot/recurrency/assets/502640/ffb632f2-79c2-4a09-a906-e4de02e4f348) The proposed feature is a design for staking FRQCY token in exchange for Capacity and/or FRQCY. -It is specific to the Frequency Substrate parachain. +It is specific to the Recurrency Substrate parachain. It consists of enhancements to the capacity pallet, needed traits and their implementations, and needed runtime configuration. This does _not_ outline the economic model for Staking Rewards (also known as "Provider Boosting"); it describes the economic model as a black box, i.e. an interface. ## Context and Scope: -The Frequency Transaction Payment system allows certain transactions on chain to be paid for with Capacity. Accounts that wish to pay with Capacity must: +The Recurrency Transaction Payment system allows certain transactions on chain to be paid for with Capacity. Accounts that wish to pay with Capacity must: -1. Have an [MSA](https://github.com/frequency-chain/frequency/blob/main/designdocs/accounts.md) -2. Be a [Provider](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_registration.md) (see also [Provider Permissions and Grants](https://github.com/frequency-chain/frequency/blob/main/designdocs/provider_permissions.md)) -3. Stake a minimum amount of FRQCY (on mainnet, XRQCY on testnet) token to receive [Capacity](https://github.com/frequency-chain/frequency/blob/main/designdocs/capacity.md). +1. Have an [MSA](https://github.com/rustadot/recurrency/blob/main/designdocs/accounts.md) +2. Be a [Provider](https://github.com/rustadot/recurrency/blob/main/designdocs/provider_registration.md) (see also [Provider Permissions and Grants](https://github.com/rustadot/recurrency/blob/main/designdocs/provider_permissions.md)) +3. Stake a minimum amount of FRQCY (on mainnet, XRQCY on testnet) token to receive [Capacity](https://github.com/rustadot/recurrency/blob/main/designdocs/capacity.md). # Problem Statement @@ -48,9 +48,9 @@ It does not give regard to what the economic model actually is, since that is ye ## Glossary -1. **FRQCY**: the native token of Frequency, a Substrate parachain in the Polkdaot blockhain ecosystem. -1. **Capacity**: the non-transferrable utility token which can be used only to pay for certain Frequency transactions. -1. **Account**: a Frequency System Account controlled by a private key and addressed by a public key, having at least a minimum balance (currently 0.01 FRQCY). +1. **FRQCY**: the native token of Recurrency, a Substrate parachain in the Polkdaot blockhain ecosystem. +1. **Capacity**: the non-transferrable utility token which can be used only to pay for certain Recurrency transactions. +1. **Account**: a Recurrency System Account controlled by a private key and addressed by a public key, having at least a minimum balance (currently 0.01 FRQCY). 1. **Stake** (verb): to lock some amount of a token against transfer for a period of time in exchange for some reward. 1. **RewardEra**: the time period (TBD in blocks) that Staking Rewards are based upon. `RewardEra` is to distinguish it easily from Substrate's staking pallet Era, or the index of said time period. 1. **Staking Reward**: a per-RewardEra share of a staking reward pool of FRQCY tokens for a given staking account. diff --git a/designdocs/provider_permissions.md b/designdocs/provider_permissions.md index b31fd95..78c756f 100644 --- a/designdocs/provider_permissions.md +++ b/designdocs/provider_permissions.md @@ -2,11 +2,11 @@ ## Context and Scope -Frequency enables users(read delegators) to have control over their own data. While providers can send and receive messages on behalf of users, there is need for separation of control via **delegator->provider**, **provider<->delegator** relationships in form of Permissions and Grants respectively. This document describes the design of the two types of relationships and recommendation on how to implement them. +Recurrency enables users(read delegators) to have control over their own data. While providers can send and receive messages on behalf of users, there is need for separation of control via **delegator->provider**, **provider<->delegator** relationships in form of Permissions and Grants respectively. This document describes the design of the two types of relationships and recommendation on how to implement them. ## Problem Statement -Data Access Pattern on Frequency, at-minimum, should provide ***RESTRICTED*** ```permissions``` at **delegator->provider**, as well as ***PUBLISH*** and, ***Block***, ```grants``` for specific ```schema_id``` at **provider<->delegator**.This entails users can enable specific permissions for provider to write data on their behalf, while also restricting grants to providers at schema level, rendering providers as restricted. Providers should also be able to opt into publish, on behalf of, users, or block from publication, on behalf of, at schema level. Primarily, the use case can be summarized in following way: +Data Access Pattern on Recurrency, at-minimum, should provide ***RESTRICTED*** ```permissions``` at **delegator->provider**, as well as ***PUBLISH*** and, ***Block***, ```grants``` for specific ```schema_id``` at **provider<->delegator**.This entails users can enable specific permissions for provider to write data on their behalf, while also restricting grants to providers at schema level, rendering providers as restricted. Providers should also be able to opt into publish, on behalf of, users, or block from publication, on behalf of, at schema level. Primarily, the use case can be summarized in following way: - **As a provider**, I would want to publish data for specific ```schema_id``` on-behalf of a delegator. Defaults to ```publish``` permissions on all schemas registered by provider on behalf of delegator. - **As a delegator**, I would like to restrict a provider, by allowing a provider to only publish data for specific ```schema_ids``` on-behalf of me. @@ -15,20 +15,20 @@ Note: A publish state would mean that a provider is able to publish data on beha ## Goals and Non-Goals -Frequency is a default read only for items stored on and off chain, requiring an explicit process to control writing or publishing of messages via some permissions and grants. Some of the major goals surrounding provider permissions and grants are: +Recurrency is a default read only for items stored on and off chain, requiring an explicit process to control writing or publishing of messages via some permissions and grants. Some of the major goals surrounding provider permissions and grants are: ### Goals -**Opt In and Duality**: Providers should register users with Frequency and delegate on behalf of them, while also specifically allowing a collection of schema(s) for which delegator provide them full publication rights. This ensures default state of providers is ***Restrict***. Delegators can also choose to restrict providers on per-schema basis by blocking them from publishing data on their behalf. This ensures default state of delegators is ***Block*** for all non provider preferred ```schema_ids```. Duality should be implemented at schema level grants. +**Opt In and Duality**: Providers should register users with Recurrency and delegate on behalf of them, while also specifically allowing a collection of schema(s) for which delegator provide them full publication rights. This ensures default state of providers is ***Restrict***. Delegators can also choose to restrict providers on per-schema basis by blocking them from publishing data on their behalf. This ensures default state of delegators is ***Block*** for all non provider preferred ```schema_ids```. Duality should be implemented at schema level grants. -**ToS Baked In**: As a part of this design doc, it is recommended to discuss about baking in ***ToS*** for providers and delegators as a part of permission grants by including a hash of ToS unless there is a re-delegation. Such that Frequency can also act as proof of specific agreement established between a provider and a delegator. +**ToS Baked In**: As a part of this design doc, it is recommended to discuss about baking in ***ToS*** for providers and delegators as a part of permission grants by including a hash of ToS unless there is a re-delegation. Such that Recurrency can also act as proof of specific agreement established between a provider and a delegator. -**Time Bound Grants**: Any grants given or revoked by a delegator (allowing provider to publish or block them for certain duration) or any grants are modified by a provider or delegator are valid for the duration of ***ToS***. This can be a control mechanism in Frequency which can be a fixed number for version 1 of this implementation and be extensible via a governance mechanism. This also brings the question about, if not time bounded, does permissions and grants are set till they are explicitly revoked. While un-delegation, definitely is an option for user to remove a provider completely from ever publishing on their behalf. +**Time Bound Grants**: Any grants given or revoked by a delegator (allowing provider to publish or block them for certain duration) or any grants are modified by a provider or delegator are valid for the duration of ***ToS***. This can be a control mechanism in Recurrency which can be a fixed number for version 1 of this implementation and be extensible via a governance mechanism. This also brings the question about, if not time bounded, does permissions and grants are set till they are explicitly revoked. While un-delegation, definitely is an option for user to remove a provider completely from ever publishing on their behalf. ### Non-Goals - Does not cover the case where a delegator or provider can restrict reading of data on their behalf. -- Frequency enables a valid provider or delegator to be able to read as a default. +- Recurrency enables a valid provider or delegator to be able to read as a default. - Only covers basic version 1 of permission and grant implementation details. - Does not cover details of economics, governance mechanism. - Does not cover details on dynamic expiry time for permissions/grants. @@ -43,7 +43,7 @@ Note: The terminology and implementation are subject to change at issue resoluti Permission is a generic option for any user. For version 1 of this implementation, the following options are available: -- ***RESTRICTED***: Where a user grants a provider to publish data on their behalf for specific schema(s) only. This is the default state of a provider on Frequency, where a provider has to explicitly provide a list of schema(s) for which they are allowed to publish data on behalf of the user. +- ***RESTRICTED***: Where a user grants a provider to publish data on their behalf for specific schema(s) only. This is the default state of a provider on Recurrency, where a provider has to explicitly provide a list of schema(s) for which they are allowed to publish data on behalf of the user. An example of permission data structure is as follows: @@ -65,7 +65,7 @@ pub struct Permission { Grants enable delegators as well as providers to restrict one another from publishing data on specific schema(s). For version 1 of this implementation, the following options are available: -- ***PUBLISH***: Where a delegator grants a provider to publish data on their behalf for specific schema(s) only. This is the default state of a provider on Frequency, where a provider has to explicitly provide a list of schema(s) for which they are allowed to publish data on behalf of the delegator. This also enables a delegator to opt in to publish their data. +- ***PUBLISH***: Where a delegator grants a provider to publish data on their behalf for specific schema(s) only. This is the default state of a provider on Recurrency, where a provider has to explicitly provide a list of schema(s) for which they are allowed to publish data on behalf of the delegator. This also enables a delegator to opt in to publish their data. An example of grant data structure is as follows: @@ -89,7 +89,7 @@ pub struct Grant { - ***Grant***: The user level action/result. "A user grants a permission to a provider". - ***ToS***: The hash of terms of service between a delegator and provider. - ***expiry***: The expiry time of a permission/grant. -- ***schema_id***: The unique identifier of a registered schema on Frequency. +- ***schema_id***: The unique identifier of a registered schema on Recurrency. ### add_schema_grants() @@ -109,9 +109,9 @@ An extrinsic to allow a provider to request publish write to list of schemas. Re - Notes: The weights of this extrinsic should account for required weights when revoking grants at schema level via provider/delegator. -### add_frequency_publisher() : Not in the scope for version 1 of this implementation +### add_recurrency_publisher() : Not in the scope for version 1 of this implementation -An extrinsic to allow (via governance) to set a provider as Frequency publisher. This in turn will give all publish rights on all schemas for any delegator delegating to this provider. Rending them **Publisher** status. +An extrinsic to allow (via governance) to set a provider as Recurrency publisher. This in turn will give all publish rights on all schemas for any delegator delegating to this provider. Rending them **Publisher** status. - Parameters: 1. **provider_msa**: The MSA of the provider/app. @@ -148,8 +148,8 @@ An extrinsic (or rpc if revoking is paid off while adding) to allow a provider o ## Time bounded permissions -- Expiry time on permissions for version 1 can be a fixed number of blocks set in Frequency. -- This expiry time can be updated via governance or runtime upgrades. Since this is not important for the scope of the design doc, implementation details can define, how Frequency is handling expiry time in first version. +- Expiry time on permissions for version 1 can be a fixed number of blocks set in Recurrency. +- This expiry time can be updated via governance or runtime upgrades. Since this is not important for the scope of the design doc, implementation details can define, how Recurrency is handling expiry time in first version. - However, expiry time can be baked in the above extrinsic call and can be set as a parameter. ## Validation @@ -172,7 +172,7 @@ Some risks are primarily at implementation level, such a storage pattern of such - Key management for reading private data - Delegation for reading vs writing - Do we need to have a way for the user to express how their data is used on "3rd party" sites (aka sites you don't have an explicit delegation with) - - Maybe not Frequency, but perhaps at the DSNP layer? + - Maybe not Recurrency, but perhaps at the DSNP layer? - DSNP data use policy for each announcement (We already assume friends/followers can see it even on 3rd party sites) - Do we need extendable/modular permissions or "roles"? - Grouping Schemas together somehow? @@ -185,7 +185,7 @@ Some risks are primarily at implementation level, such a storage pattern of such - Sub-permissions CRUD? We really only have Create as a permission - Could service permissions be set at the provider MSA level and the delegation only have exclusions? - This is more auto-optin which I think is bad. -- Public "Read" permission (DSNP or Frequency?) +- Public "Read" permission (DSNP or Recurrency?) - Robots.txt - Could this be on a per service basis? - aka I grant the public ability to "read" schema 7 from service A but not schema 7 from service B diff --git a/designdocs/provider_registration.md b/designdocs/provider_registration.md index fd8b91d..e423f17 100644 --- a/designdocs/provider_registration.md +++ b/designdocs/provider_registration.md @@ -10,11 +10,11 @@ * [Glossary](#glossary) ## Context and Scope -In order to properly implement Frequency, we need to describe how service providers +In order to properly implement Recurrency, we need to describe how service providers will participate on the network. ## Problem Statement -Service providers are an integral part of how Frequency functions. However, there are +Service providers are an integral part of how Recurrency functions. However, there are some open questions about how they operate, questions that this document hopes to provide clarity on. @@ -29,7 +29,7 @@ Among those questions are: ## Goals and Non-Goals This document will discuss the ways in which service providers can register with -and participate in the Frequency network. +and participate in the Recurrency network. This document will not discuss the specifics of how providers will process service requests from users on the network. This document will also not discuss diff --git a/designdocs/schema.md b/designdocs/schema.md index f622b50..4255e5a 100644 --- a/designdocs/schema.md +++ b/designdocs/schema.md @@ -1,25 +1,25 @@ -# Frequency Message Schemas +# Recurrency Message Schemas ## Context and Scope -Messages on Frequency are validated and stored against pre-defined schema(s). In order to support a variety of message types, it is imperative to define an on-chain semantics, pallet(s) for example, to handle dynamic registration, validation, storage and retention schemes for schemas. +Messages on Recurrency are validated and stored against pre-defined schema(s). In order to support a variety of message types, it is imperative to define an on-chain semantics, pallet(s) for example, to handle dynamic registration, validation, storage and retention schemes for schemas. This document describes how schemas are handled on chain in the following sections. ## Problem Statement -Message passing is a core functionality to networking protocols. The way to enforce a communication protocol between participants of network via services is done by messaging schema. Analogous to interfaces, schemas provide a strongly typed description for messages ensuring their correctness, validity, extensibility and interoperability between services interacting with Frequency. +Message passing is a core functionality to networking protocols. The way to enforce a communication protocol between participants of network via services is done by messaging schema. Analogous to interfaces, schemas provide a strongly typed description for messages ensuring their correctness, validity, extensibility and interoperability between services interacting with Recurrency. ## Goals -At a minimum, Frequency should implement procedures to register, validate, store and access variety of messaging schemas dynamically. Schemas on chain must have the following salient features: +At a minimum, Recurrency should implement procedures to register, validate, store and access variety of messaging schemas dynamically. Schemas on chain must have the following salient features: - **Registry**: Implement a schema registry, enabling participants to register and store validated schemas on chain. -- **Validation**: Schema validation enables message consumers and producers to entrust Frequency with correctness of schema prior to storage and a valid ```schema_id``` is produced. Schema validation can be done on chain with following basic steps: +- **Validation**: Schema validation enables message consumers and producers to entrust Recurrency with correctness of schema prior to storage and a valid ```schema_id``` is produced. Schema validation can be done on chain with following basic steps: - Some sort of duplication checks to be put in place ensuring uniqueness of schemas. - Total count of schemas does not exceed a pre-defined maximum count that can be stored on chain. - - Schema being registered should have a minimum size as defined by Frequency and should not exceed a pre-defined maximum size. + - Schema being registered should have a minimum size as defined by Recurrency and should not exceed a pre-defined maximum size. - Schema should not be malformed. Note: due to the [serialization concerns](./OnChainMessageStorage.md#serialization-concerns) pertaining to processing restrictions on chain as well as lack of better serialization rust libraries, schema integrity may be required to be validated off chain. @@ -34,11 +34,11 @@ Note: due to the [serialization concerns](./OnChainMessageStorage.md#serializati - Schema itself has bug which was overlooked during registration. - Cost of garbage collecting data would eventually be a factor. -- **Evolution**: An important aspect of message passing is schema evolution. After initial schema is defined, network participants may need to evolve it over time depending on their respective use cases, it is critical to messaging system to handle data encoded with both old and new schema seamlessly. Schema evolution on Frequency can be achieved simply via various approaches, preferably some sort of retirement mechanism discussed in this proposal. See [additional notes](#additional-notes) for more details. +- **Evolution**: An important aspect of message passing is schema evolution. After initial schema is defined, network participants may need to evolve it over time depending on their respective use cases, it is critical to messaging system to handle data encoded with both old and new schema seamlessly. Schema evolution on Recurrency can be achieved simply via various approaches, preferably some sort of retirement mechanism discussed in this proposal. See [additional notes](#additional-notes) for more details. ## Proposal -This document outlines various components of Frequency schemas, including, but not limited to, ability of network participants to register, validate and access message schemas dynamically via on chain semantics. +This document outlines various components of Recurrency schemas, including, but not limited to, ability of network participants to register, validate and access message schemas dynamically via on chain semantics. ## Schema Registry @@ -93,14 +93,14 @@ Using schema registry, message producers no longer need to include full schema w - **Type definition**: ```StorageMap<_, Twox64Concat, SchemaId, BoundedVec>``` - **Description**: Schemas are stored as key-value pair of SchemaId vs Serialized schema payload allowed to a maximum size. -- **Implementation**: Frequency will expose a substrate extrinsic ``` create_schema ``` to allow participants store a schema on chain. On successful registration raise ```SchemaCreated``` event with ```schema_id``` and schema payload. Schema registration should also initialize default ```SchemaPolicy``` upon successful schema registration. +- **Implementation**: Recurrency will expose a substrate extrinsic ``` create_schema ``` to allow participants store a schema on chain. On successful registration raise ```SchemaCreated``` event with ```schema_id``` and schema payload. Schema registration should also initialize default ```SchemaPolicy``` upon successful schema registration. ### Schema Validation -Schema registry, at least, performs following checks before onboarding a schema on Frequency: +Schema registry, at least, performs following checks before onboarding a schema on Recurrency: - Payload is signed by an authorizing AccountId. -- Frequency did not exceed maximum count of schemas that can be hosted on chain. +- Recurrency did not exceed maximum count of schemas that can be hosted on chain. - A given schema adheres to minimum and maximum size limits allowed per schema. - Schema itself is not broken or malformed. - No duplicate schema(s) ever get registered. @@ -119,7 +119,7 @@ Retention periods on a schema is designed for message(s) store to retain message - **Type Definition**: ```StorageMap```. - **Description**: Retention period are stored as a map of ```SchemaId``` and ```SchemaPolicy```. By default schemas have no retention policy and by default ```retention``` and ```starting_block``` is set to 1 signaling message store to retain messages on chain database indefinitely. -- **Implementation**: Frequency will expose a substrate sudo call ```update_schema_retention``` to update ```retention``` period for a given ```schema_id```. On successful execution, retention block count will be updated. +- **Implementation**: Recurrency will expose a substrate sudo call ```update_schema_retention``` to update ```retention``` period for a given ```schema_id```. On successful execution, retention block count will be updated. - **Read**: Schema registry should expose ```get_retention_period``` procedural call to return current state of retention period for a given ```schema_id```. Note: ```starting_block``` should only be modifiable via internal calls, for example, via message store and should not be exposed to consumers. Check out the following section for more details. @@ -127,12 +127,12 @@ Note: ```starting_block``` should only be modifiable via internal calls, for exa ### Starting Blocks Storage and Access - **Description**: On chain storage of starting block number for each schema. Required by message store. Defaults to block number 1. -- **Implementation**: Schema registry should provide some sort of procedural call (internal to Frequency) to read (```get_schema_starting_block```) and write (```set_schema_starting_block```) starting block number for a given ```schema_id```. This will be utilized by message store for further processing. +- **Implementation**: Schema registry should provide some sort of procedural call (internal to Recurrency) to read (```get_schema_starting_block```) and write (```set_schema_starting_block```) starting block number for a given ```schema_id```. This will be utilized by message store for further processing. - **Rationale**: Message store periodically garbage collect messages per schema based on their retention period for on chain storage, upon successful garbage collection message store will update starting block to last block where messages were removed from on chain storage to chain database and new set of message will be store till ```starting_block + block_count-1```. ### Schema Retirement/Deprecation -Schema(s) being immutable on Frequency, would generally follow a cycle of deprecation/retirement for various reasons, such as, but not limited to, schema being wrong from consumer perspective , such as missing key fields that author intend to have and author would want to retire or deprecate a schema, even from chain perspective, the cost of garbage collection, processing feed or storage fees over time would require Frequency to regularly garbage collect stable/expired/deprecated schemas. In general, following salient features have been proposed to address schema retirement/deprecation: +Schema(s) being immutable on Recurrency, would generally follow a cycle of deprecation/retirement for various reasons, such as, but not limited to, schema being wrong from consumer perspective , such as missing key fields that author intend to have and author would want to retire or deprecate a schema, even from chain perspective, the cost of garbage collection, processing feed or storage fees over time would require Recurrency to regularly garbage collect stable/expired/deprecated schemas. In general, following salient features have been proposed to address schema retirement/deprecation: 1. Schema(s) are immutable. 2. Schema(s) that are intended to be retired based on their usage or vulnerabilities can be proposed to be deprecated in bulk via some sort of off chain governance. @@ -148,7 +148,7 @@ Note: Given the nature of dependency on governance we might want these extrinsic ### Schema Evolution -With Schema Registry, different consumers of Frequency can evolve a given schema at different rates, changing the shape of data and entrusting schema registry to handle translations from one schema to another. Currently schema evolution is not directly supported on chain and can be achieved by different consumers via unique [schema retirement procedure](#schema-retirementdeprecation) for evolved schemas. This is work in progress and various suggestions for future reference and development are listed in [additional notes](#additional-notes), preferably [suggestion 4](#suggestion-4). +With Schema Registry, different consumers of Recurrency can evolve a given schema at different rates, changing the shape of data and entrusting schema registry to handle translations from one schema to another. Currently schema evolution is not directly supported on chain and can be achieved by different consumers via unique [schema retirement procedure](#schema-retirementdeprecation) for evolved schemas. This is work in progress and various suggestions for future reference and development are listed in [additional notes](#additional-notes), preferably [suggestion 4](#suggestion-4). ## Benefits and Risks @@ -164,9 +164,9 @@ With Schema Registry, different consumers of Frequency can evolve a given schema ### Risks -- Schema registration on Frequency should prevent DoS attempts given schema registration will be open to anyone with enough balance to pay for the same. Should schema registration be costly, or restricting it specific accounts would be worth considering. +- Schema registration on Recurrency should prevent DoS attempts given schema registration will be open to anyone with enough balance to pay for the same. Should schema registration be costly, or restricting it specific accounts would be worth considering. -- Schema evolution is critical to any message passing system, how does Frequency intend to handle it or is it required , is still a question that needs to be ironed out. +- Schema evolution is critical to any message passing system, how does Recurrency intend to handle it or is it required , is still a question that needs to be ironed out. - Another factor to consider is who is permissioned to modify retention periods per schema, who will pay for such an update and what are the defaults, if any. diff --git a/designdocs/stateful_storage.md b/designdocs/stateful_storage.md index f992e03..d8919d9 100644 --- a/designdocs/stateful_storage.md +++ b/designdocs/stateful_storage.md @@ -14,7 +14,7 @@ communicating parties and for some others it might be directly dependent on the particular party. ### DSNP Usecase -**Frequency** is the first implementation of [DSNP](https://dsnp.org) and most of the state +**Recurrency** is the first implementation of [DSNP](https://dsnp.org) and most of the state transitions in **DSNP** can be modeled via `Announcements`. For some of these state transitions we only care about the latest state, and currently the only way to achieve this via announcements is to have some kind of third party indexer to track the latest state for these types. diff --git a/designdocs/user-handles.md b/designdocs/user-handles.md index 4d25484..21a69ef 100644 --- a/designdocs/user-handles.md +++ b/designdocs/user-handles.md @@ -1,12 +1,12 @@ -# Frequency Handles +# Recurrency Handles ## Context and Scope -The Frequency blockchain aims to provide a mechanism to register and retrieve user handles on chain to make it easier to use MSA Ids. -To achieve this, we propose the creation of a user handle ```registry``` system on Frequency chain, coupled with ```MessageSourceAccount```, that allows users to choose a handle for their MSA Ids. The Handle system would then append an available numeric suffix to the chosen user handle, separated by a delimiter[.], to make it unique and store the mapping of the handle to the MSA Id in the registry. +The Recurrency blockchain aims to provide a mechanism to register and retrieve user handles on chain to make it easier to use MSA Ids. +To achieve this, we propose the creation of a user handle ```registry``` system on Recurrency chain, coupled with ```MessageSourceAccount```, that allows users to choose a handle for their MSA Ids. The Handle system would then append an available numeric suffix to the chosen user handle, separated by a delimiter[.], to make it unique and store the mapping of the handle to the MSA Id in the registry. The user handle system will also enforce guidelines to ensure that handles are user-friendly and easy to remember, as well as prevent misuse and abuse. -The goal of this proposal is to enable users to create unique handles on the Frequency blockchain using a registry, making it more accessible for users to engage with the network. +The goal of this proposal is to enable users to create unique handles on the Recurrency blockchain using a registry, making it more accessible for users to engage with the network. ## Assumptions @@ -31,8 +31,8 @@ The high level requirements for user handles are: ### Handles Terminology -* **Base Handle**: A base handle is a string of characters chosen by the user of Frequency. The base handle is the part of the handle that is not suffixed. -* **Canonical Base**: A canonical base is a reduced/translated version of a base handle that is used to identify a user on the Frequency blockchain. +* **Base Handle**: A base handle is a string of characters chosen by the user of Recurrency. The base handle is the part of the handle that is not suffixed. +* **Canonical Base**: A canonical base is a reduced/translated version of a base handle that is used to identify a user on the Recurrency blockchain. * **Suffix**: A suffix is a numeric value that is appended to a base handle to make it unique. The suffix is randomly constrained and selected within a range configured on chain. * **Delimiter**: A delimiter is a character that is used to separate the base handle and suffix. The delimiter is a period (.) by default. * **Display Handle**: A display handle is formed by concatenating the base handle and suffix with the delimiter. The display handle is the handle that is displayed to the user. @@ -51,7 +51,7 @@ The high level requirements for user handles are: ## Proposal -Handles```registry``` on Frequency chain. +Handles```registry``` on Recurrency chain. ### General Steps @@ -80,14 +80,14 @@ sequenceDiagram actor User participant App participant RPC - participant Frequency + participant Recurrency User->>App: enter desired handle loop until msa_id and handle successfully claimed alt Optionally retrive n number of presumtive suffix App->>RPC: get_next_suffixes(handle, n) - RPC->>Frequency: query state for current index for a base handle - Frequency-->>RPC: return current index - Frequency->>RPC: compute suffix options + RPC->>Recurrency: query state for current index for a base handle + Recurrency-->>RPC: return current index + Recurrency->>RPC: compute suffix options RPC-->>App: return `n` presumptive suffixes App->>User: submit base handle chosen by user User->>App: confirm and submit @@ -95,21 +95,21 @@ sequenceDiagram App->>Wallet: send signup data with base handle and expiration Wallet->>Wallet: perform 2FA if first attempt Wallet-->>App: return signed payload - App->>Frequency: claim_handle(.., signed_payload) - Frequency-->>Frequency: compute suffix options - Frequency-->>Frequency: check_handle_availability(...handle, suffix) - Frequency-->>Frequency: fail if available suffix does not match signed_payload suffix - Frequency-->>Frequency: submit transaction - Frequency-->>App: HandleClaimed event with (msa_id, handle+suffix) + App->>Recurrency: claim_handle(.., signed_payload) + Recurrency-->>Recurrency: compute suffix options + Recurrency-->>Recurrency: check_handle_availability(...handle, suffix) + Recurrency-->>Recurrency: fail if available suffix does not match signed_payload suffix + Recurrency-->>Recurrency: submit transaction + Recurrency-->>App: HandleClaimed event with (msa_id, handle+suffix) end App->>User: proceed with setup User->>App: request to get msa_id - App->>Frequency: query state for msa_id (handle<->msa_id) - Frequency-->>App: return msa_id (State Query handle<->msa_id) + App->>Recurrency: query state for msa_id (handle<->msa_id) + Recurrency-->>App: return msa_id (State Query handle<->msa_id) User->>App: request to get handle for msa_id App->>RPC: get_handle_for_msa_id(msa_id) - RPC->>Frequency: query for handle given msa_id (index handle<->msa_id) - Frequency-->>RPC: return handle for msa_id + RPC->>Recurrency: query for handle given msa_id (index handle<->msa_id) + Recurrency-->>RPC: return handle for msa_id RPC-->>App: return handle for msa_id ``` @@ -135,7 +135,7 @@ ClaimHandlePayload { ### Claim handle - As a network, Frequency should allow users to choose their own handle, while the chain will generate a random numeric suffix within the range of suffixes allowed. The display handle will be the base handle with the suffix. + As a network, Recurrency should allow users to choose their own handle, while the chain will generate a random numeric suffix within the range of suffixes allowed. The display handle will be the base handle with the suffix. Input @@ -173,7 +173,7 @@ The extrinsic must be signed by the MSA owner's private key. The signature must ### Retire handle -As a network, Frequency should allow users to retire their handles. This extrinsic will allow users to retire their handles. +As a network, Recurrency should allow users to retire their handles. This extrinsic will allow users to retire their handles. Note: As of this implementation @@ -208,11 +208,11 @@ Output * **Risk**: The handle feature may not be used by users. * **Mitigation**: The handle feature is not a core feature of the protocol. It is an optional feature that users can choose to use or not. If the feature is not used by users, it will not affect the protocol. * **Risk**: Homoglpyhs. - * **Mitigation**: Frequency handles will use a PRNG to generate suffixes. This will prevent homoglyph attacks. However, a utility to check for homoglyphs will be provided to help users avoid homoglyphs. + * **Mitigation**: Recurrency handles will use a PRNG to generate suffixes. This will prevent homoglyph attacks. However, a utility to check for homoglyphs will be provided to help users avoid homoglyphs. * **Risk**: Unavailability of desired suffixes. * **Mitigation**: The handle feature will provide a utility to check for available suffixes. This will allow users to check for available suffixes before attempting to create a new MSA. * **Risk**: Claims on retired handles. - * **Mitigation**: Frequency would use a retirement period to prevent claims on retired handles. The retirement period would be set to some block number in future. This would allow users to claim their handles after the retirement period has ended. + * **Mitigation**: Recurrency would use a retirement period to prevent claims on retired handles. The retirement period would be set to some block number in future. This would allow users to claim their handles after the retirement period has ended. * **Risk**: Handle merging. * **Mitigation**: To be determined. This will be decided based on implementation requirements. diff --git a/docker/collator-node-local.dockerfile b/docker/collator-node-local.dockerfile index 7cfaa89..1224446 100644 --- a/docker/collator-node-local.dockerfile +++ b/docker/collator-node-local.dockerfile @@ -1,10 +1,10 @@ # Docker image for running collator node node locally against the local relay chain. # Requires to run from repository root and to copy the binary in the build folder. FROM --platform=linux/amd64 ubuntu:22.04 -LABEL maintainer="Frequency" -LABEL description="Frequency collator node for local relay chain" +LABEL maintainer="Recurrency" +LABEL description="Recurrency collator node for local relay chain" -WORKDIR /frequency +WORKDIR /recurrency RUN apt-get update && \ apt-get install -y jq apt-utils apt-transport-https \ @@ -13,16 +13,16 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # For local testing only -# COPY target/release/frequency.amd64 ./target/release/frequency -COPY target/release/frequency ./target/release/ -RUN chmod +x target/release/frequency +# COPY target/release/recurrency.amd64 ./target/release/recurrency +COPY target/release/recurrency ./target/release/ +RUN chmod +x target/release/recurrency RUN ls ./target/release # Checks RUN ls -lah / -RUN file ./target/release/frequency && \ - ./target/release/frequency --version +RUN file ./target/release/recurrency && \ + ./target/release/recurrency --version # Add chain resources to image COPY resources ./resources/ @@ -32,7 +32,7 @@ RUN chmod +x ./scripts/run_collator.sh RUN chmod +x ./scripts/init.sh RUN chmod +x ./scripts/healthcheck.sh -ENV Frequency_BINARY_PATH=./target/release/frequency +ENV Recurrency_BINARY_PATH=./target/release/recurrency HEALTHCHECK --interval=300s --timeout=75s --start-period=30s --retries=3 \ CMD ["./scripts/healthcheck.sh"] @@ -45,6 +45,6 @@ VOLUME ["/data"] EXPOSE 9944 30333 9615 ENTRYPOINT ["/usr/bin/tini", "--"] -CMD ["/bin/bash", "./scripts/init.sh", "start-frequency-container"] +CMD ["/bin/bash", "./scripts/init.sh", "start-recurrency-container"] diff --git a/docker/collator-node-local.overview.md b/docker/collator-node-local.overview.md index 2fd86e3..da54fdc 100644 --- a/docker/collator-node-local.overview.md +++ b/docker/collator-node-local.overview.md @@ -1,33 +1,33 @@ -# Frequency Collator Node for Local Relay Chain +# Recurrency Collator Node for Local Relay Chain Runs one collator node that connects to the local relay chain consisting of two validator nodes. -![](https://github.com/frequency-chain/frequency/blob/main/docs/images/local-dev-env-option-2.jpg?raw=true) +![](https://github.com/rustadot/recurrency/blob/main/docs/images/local-dev-env-option-2.jpg?raw=true) ## Run 1. Checkout project and generate local spec ``` - git clone git@github.com:frequency-chain/frequency.git + git clone git@github.com:rustadot/recurrency.git ``` 1. Start relay chain and collator node ```sh - make start-frequency-docker + make start-recurrency-docker ``` 1. Stop all nodes ```sh - make stop-frequency-docker + make stop-recurrency-docker ``` | **Node** | **Ports** | **Explorer URL** | | -------------------- | ------------------------------- | ----------------------------------------------------------------------------------------- | -| Frequency Relay Node | ws and rpc: `9944`, p2p:`30333` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | +| Recurrency Relay Node | ws and rpc: `9944`, p2p:`30333` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | | Alice Relay Node | ws and rpc: `9946`, p2p:`30335` | [127.0.0.1:9946](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9946#/explorer) | | Bob Relay Node | ws and rpc: `9947`, p2p:`30336` | [127.0.0.1:9947](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9947#/explorer) | diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 35cffef..8ff4933 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -56,9 +56,9 @@ services: --log="main,info" restart: unless-stopped - collator_frequency: - container_name: frequency - image: frequencychain/collator-node-local:latest + collator_recurrency: + container_name: recurrency + image: recurrencychain/collator-node-local:latest # Replace image with build if you want to build locally instead of pulling # build: # context: .. diff --git a/docker/frequency-start.sh b/docker/frequency-start.sh index 80a4d41..b2790a4 100755 --- a/docker/frequency-start.sh +++ b/docker/frequency-start.sh @@ -15,7 +15,7 @@ then CREATE_EMPTY_BLOCKS="--sealing-create-empty-blocks" fi -exec /frequency/frequency \ +exec /recurrency/recurrency \ --dev \ -lruntime=debug \ --no-telemetry \ diff --git a/docker/parachain-node-mainnet.overview.md b/docker/parachain-node-mainnet.overview.md index 5d692a7..9c37f06 100644 --- a/docker/parachain-node-mainnet.overview.md +++ b/docker/parachain-node-mainnet.overview.md @@ -1,13 +1,13 @@ -# Frequency Parachain Node for Mainnet +# Recurrency Parachain Node for Mainnet -Frequency parachain node which connects to the Mainnet network. +Recurrency parachain node which connects to the Mainnet network. ## Run Full Node Start full chain node that connects to Mainnet network: ```sh -docker run -p 9944:9944 -p 30333:30333 frequencychain/parachain-node-mainnet: \ +docker run -p 9944:9944 -p 30333:30333 recurrencychain/parachain-node-mainnet: \ --base-path=/chain-data \ --rpc-external \ --rpc-cors=all \ @@ -21,5 +21,5 @@ Using [Volumes](https://docs.docker.com/storage/volumes/) or [Bind Mounts](https To view all available options and arguments: ```sh -docker run --rm frequencychain/parachain-node-mainnet: --help +docker run --rm recurrencychain/parachain-node-mainnet: --help ``` diff --git a/docker/parachain-node-testnet.overview.md b/docker/parachain-node-testnet.overview.md index 6b3b58b..6ec94c2 100644 --- a/docker/parachain-node-testnet.overview.md +++ b/docker/parachain-node-testnet.overview.md @@ -1,24 +1,24 @@ -# Frequency Parachain Node for Testnets +# Recurrency Parachain Node for Testnets -Frequency parachain node which connects to Frequency testnets: +Recurrency parachain node which connects to Recurrency testnets: -- Frequency Paseo Testnet `--chain=frequency-paseo` (Default) +- Recurrency Paseo Testnet `--chain=recurrency-paseo` (Default) To view all available options and arguments: ```sh -docker run --rm frequencychain/parachain-node-testnet: --help +docker run --rm recurrencychain/parachain-node-testnet: --help ``` ## Run Full Node -### Frequency Paseo Testnet +### Recurrency Paseo Testnet Start full chain node that connects to Paseo Testnet network and syncs with warp: ```sh -docker run -p 9944:9944 -p 30333:30333 frequencychain/parachain-node-testnet: \ - --chain=frequency-paseo \ +docker run -p 9944:9944 -p 30333:30333 recurrencychain/parachain-node-testnet: \ + --chain=recurrency-paseo \ --base-path=/chain-data \ --rpc-external \ --rpc-cors=all \ diff --git a/docker/parachain-node.dockerfile b/docker/parachain-node.dockerfile index f5496a1..404abab 100644 --- a/docker/parachain-node.dockerfile +++ b/docker/parachain-node.dockerfile @@ -1,13 +1,13 @@ -# Docker image for running Frequency parachain node container (without collating). +# Docker image for running Recurrency parachain node container (without collating). # Requires to run from repository root and to copy the binary in the build folder. # This is the build stage for Polkadot. Here we create the binary in a temporary image. FROM --platform=linux/amd64 ubuntu:22.04 AS base -LABEL maintainer="Frequency" -LABEL description="Frequency Parachain Node" +LABEL maintainer="Recurrency" +LABEL description="Recurrency Parachain Node" RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates -# This is the 2nd stage: a very small image where we copy the Frequency binary +# This is the 2nd stage: a very small image where we copy the Recurrency binary FROM --platform=linux/amd64 ubuntu:22.04 # We want jq and curl in the final image, but we don't need the support files @@ -16,17 +16,17 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /usr/share/doc /usr/share/man /usr/share/zsh -RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \ - mkdir -p /chain-data /frequency/.local/share && \ - chown -R frequency:frequency /chain-data && \ - ln -s /chain-data /frequency/.local/share/frequency +RUN useradd -m -u 1000 -U -s /bin/sh -d /recurrency recurrency && \ + mkdir -p /chain-data /recurrency/.local/share && \ + chown -R recurrency:recurrency /chain-data && \ + ln -s /chain-data /recurrency/.local/share/recurrency -USER frequency +USER recurrency COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt # For local testing only -# COPY --chown=frequency target/release/frequency.amd64 ./frequency/frequency -COPY --chown=frequency target/release/frequency ./frequency/ +# COPY --chown=recurrency target/release/recurrency.amd64 ./recurrency/recurrency +COPY --chown=recurrency target/release/recurrency ./recurrency/ # 9944 for Websocket and Rpc # 30333 for P2P @@ -35,7 +35,7 @@ EXPOSE 9944 30333 9615 VOLUME ["/chain-data"] -ENTRYPOINT ["/frequency/frequency"] +ENTRYPOINT ["/recurrency/recurrency"] # Params which can be overriden from CLI # CMD ["", "", ...] diff --git a/docker/standalone-node.dockerfile b/docker/standalone-node.dockerfile index d962ac6..08ebb86 100644 --- a/docker/standalone-node.dockerfile +++ b/docker/standalone-node.dockerfile @@ -1,15 +1,15 @@ -# Docker image for running Frequency parachain node container (with collating) +# Docker image for running Recurrency parachain node container (with collating) # locally as a standalone node. Requires to run from repository root and to copy # the binary in the build folder. # This is the build stage for Polkadot. Here we create the binary in a temporary image. FROM --platform=linux/amd64 ubuntu:22.04 AS base -LABEL maintainer="Frequency" -LABEL description="Frequency standalone node" +LABEL maintainer="Recurrency" +LABEL description="Recurrency standalone node" RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates -# This is the 2nd stage: a very small image where we copy the Frequency binary +# This is the 2nd stage: a very small image where we copy the Recurrency binary FROM --platform=linux/amd64 ubuntu:22.04 # We want jq and curl in the final image, but we don't need the support files @@ -18,23 +18,23 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /usr/share/doc /usr/share/man /usr/share/zsh -RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \ - mkdir -p /data /frequency/.local/share && \ - chown -R frequency:frequency /data && \ - ln -s /data /frequency/.local/share/frequency +RUN useradd -m -u 1000 -U -s /bin/sh -d /recurrency recurrency && \ + mkdir -p /data /recurrency/.local/share && \ + chown -R recurrency:recurrency /data && \ + ln -s /data /recurrency/.local/share/recurrency -USER frequency +USER recurrency COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt # For local testing only -# COPY --chown=frequency target/x86_64-unknown-linux-gnu/debug/frequency ./frequency/frequency -COPY --chown=frequency target/release/frequency ./frequency/ -COPY --chown=frequency docker/frequency-start.sh ./frequency/ -RUN chmod +x ./frequency/frequency ./frequency/frequency-start.sh +# COPY --chown=recurrency target/x86_64-unknown-linux-gnu/debug/recurrency ./recurrency/recurrency +COPY --chown=recurrency target/release/recurrency ./recurrency/ +COPY --chown=recurrency docker/recurrency-start.sh ./recurrency/ +RUN chmod +x ./recurrency/recurrency ./recurrency/recurrency-start.sh # 9944 for RPC call EXPOSE 9944 VOLUME ["/data"] -ENTRYPOINT [ "/frequency/frequency-start.sh" ] +ENTRYPOINT [ "/recurrency/recurrency-start.sh" ] diff --git a/docker/standalone-node.overview.md b/docker/standalone-node.overview.md index 41a2156..0bdcbfd 100644 --- a/docker/standalone-node.overview.md +++ b/docker/standalone-node.overview.md @@ -1,13 +1,13 @@ -# Frequency Collator Node in Local Only Sealing Mode +# Recurrency Collator Node in Local Only Sealing Mode Runs just one collator node that will not connect to any other nodes. Defaults to running in instant sealing mode where a block will be triggered when a transaction enters the validated transaction pool. -A "collator node" is a Frequency parachain node that is actively collating (aka forming blocks to submit to the relay chain, although in this case without a relay chain). +A "collator node" is a Recurrency parachain node that is actively collating (aka forming blocks to submit to the relay chain, although in this case without a relay chain). ### Quick Run ```sh -docker run --rm -p 9944:9944 frequencychain/standalone-node: +docker run --rm -p 9944:9944 recurrencychain/standalone-node: ``` @@ -45,7 +45,7 @@ curl http://localhost:9944 -H "Content-Type:application/json;charset=utf-8" -d Note: Docker `--rm` removes the volume when stopped. ```sh -docker run --rm -p 9944:9944 frequencychain/standalone-node: +docker run --rm -p 9944:9944 recurrencychain/standalone-node: ``` ## Environment Variables @@ -69,9 +69,9 @@ The following environment variables are supported by this image. The same behavi ### Run ```sh -docker run --rm -p 9944:9944 frequencychain/standalone-node: -- --manual-seal +docker run --rm -p 9944:9944 recurrencychain/standalone-node: -- --manual-seal ``` | **Node** | **Ports** | **Explorer URL** | | ----------------------- | :-------------------------------: | ----------------------------------------------------------------------------------------- | -| Frequency Local-Only Node | ws and rpc :`9944` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | +| Recurrency Local-Only Node | ws and rpc :`9944` | [127.0.0.1:9944](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer) | diff --git a/e2e/README.md b/e2e/README.md index 75e8de8..6bdb776 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -1,15 +1,15 @@ Running E2E Tests ========================= -To run all tests (and automatically start up a Frequency node): +To run all tests (and automatically start up a Recurrency node): `make e2e-tests` -To run all tests (after starting up a Frequency node): +To run all tests (after starting up a Recurrency node): `npm run test` -To run an individual test (after starting up a Frequency node): +To run an individual test (after starting up a Recurrency node): Note: this is for the "createMsa" tests @@ -23,7 +23,7 @@ Notes on E2E Testing 1. Avoid using anonymous arrow functions for test blocks (`describe`, `it`, `before`, etc). Though technically legal, it's discouraged in Mocha. See [here](https://mochajs.org/#arrow-functions) for details. 2. Avoid using the standard Substrate dev accounts ('//Alice', '//Bob', etc) for running tests. It causes interference -when multiple test suites are running in parallel, or against the same Frequency chain. Instead, create a new account & MSA +when multiple test suites are running in parallel, or against the same Recurrency chain. Instead, create a new account & MSA for each test and fund it from one of the well-known dev accounts. There are helper functions to assist in this, like so: ``` /* In suite initialization */ @@ -38,7 +38,7 @@ it is not necessary to look for the `ExtrinsicFailed` event, but simply to expec or not. 4. There are 2 environment variables that can be set: `VERBOSE_TESTS`: 'true' or '1' enables verbose logging in tests using the `log()` function - `WS_PROVIDER_URL`: allows override of the default Frequency URL (localhost) + `WS_PROVIDER_URL`: allows override of the default Recurrency URL (localhost) 5. ExtrinsicHelpers: this is a static class that is initialized by the root hooks. Each helper method returns an Extrinsic object with the following methods: - getEstimatedTxFee(): Get payment info for the extrinsic call represented by the current object diff --git a/e2e/capacity/capacity_rpc.test.ts b/e2e/capacity/capacity_rpc.test.ts index baa3429..5bf7e1a 100644 --- a/e2e/capacity/capacity_rpc.test.ts +++ b/e2e/capacity/capacity_rpc.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { u64, u16 } from '@polkadot/types'; import assert from 'assert'; @@ -62,7 +62,7 @@ describe('Capacity RPC', function () { proofSize, }); - const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.frequencyTxPayment.computeCapacityFeeDetails( + const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.recurrencyTxPayment.computeCapacityFeeDetails( call.toHex(), null ); @@ -92,8 +92,8 @@ describe('Capacity RPC', function () { signPayloadSr25519(delegatorKeys, addProviderData), addProviderPayload ); - const tx = ExtrinsicHelper.api.tx.frequencyTxPayment.payWithCapacity(insideTx); - const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.frequencyTxPayment.computeCapacityFeeDetails( + const tx = ExtrinsicHelper.api.tx.recurrencyTxPayment.payWithCapacity(insideTx); + const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.recurrencyTxPayment.computeCapacityFeeDetails( tx.toHex(), null ); @@ -110,7 +110,7 @@ describe('Capacity RPC', function () { it('Returns nothing when requesting capacity cost of a non-capacity transaction', async function () { const tx = ExtrinsicHelper.api.tx.msa.retireMsa(); - const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.frequencyTxPayment.computeCapacityFeeDetails( + const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.recurrencyTxPayment.computeCapacityFeeDetails( tx.toHex(), null ); @@ -120,8 +120,8 @@ describe('Capacity RPC', function () { it('Returns nothing when requesting pay with capacity call with a non-capacity transaction', async function () { const insideTx = ExtrinsicHelper.api.tx.msa.retireMsa(); - const tx = ExtrinsicHelper.api.tx.frequencyTxPayment.payWithCapacity(insideTx); - const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.frequencyTxPayment.computeCapacityFeeDetails( + const tx = ExtrinsicHelper.api.tx.recurrencyTxPayment.payWithCapacity(insideTx); + const feeDetails: FeeDetails = await ExtrinsicHelper.apiPromise.rpc.recurrencyTxPayment.computeCapacityFeeDetails( tx.toHex(), null ); diff --git a/e2e/capacity/replenishment.test.ts b/e2e/capacity/replenishment.test.ts index 18704a5..1f50482 100644 --- a/e2e/capacity/replenishment.test.ts +++ b/e2e/capacity/replenishment.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { u16, u64 } from '@polkadot/types'; import assert from 'assert'; diff --git a/e2e/capacity/staking.test.ts b/e2e/capacity/staking.test.ts index 7c10299..bdfbcce 100644 --- a/e2e/capacity/staking.test.ts +++ b/e2e/capacity/staking.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { u64 } from '@polkadot/types'; import assert from 'assert'; @@ -90,7 +90,7 @@ describe('Capacity Staking Tests', function () { }); it('successfully withdraws the unstaked amount', async function () { - // Withdrawing unstaked token will only be executed against a Frequency + // Withdrawing unstaked token will only be executed against a Recurrency // node built for development due to the long length of time it would // take to wait for an epoch period to roll over. if (!isDev()) this.skip(); diff --git a/e2e/capacity/transactions.test.ts b/e2e/capacity/transactions.test.ts index 29c5466..c3c1f07 100644 --- a/e2e/capacity/transactions.test.ts +++ b/e2e/capacity/transactions.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { Bytes, u64, u16 } from '@polkadot/types'; import { u8aToHex } from '@polkadot/util/u8a/toHex'; @@ -6,7 +6,7 @@ import { u8aWrapBytes } from '@polkadot/util'; import assert from 'assert'; import { AddKeyData, AddProviderPayload, EventMap, ExtrinsicHelper } from '../scaffolding/extrinsicHelpers'; import { base64 } from 'multiformats/bases/base64'; -import { SchemaId } from '@frequency-chain/api-augment/interfaces'; +import { SchemaId } from '@rustadot/api-augment/interfaces'; import { createKeys, createAndFundKeypair, @@ -209,7 +209,7 @@ describe('Capacity Transactions', function () { it('successfully pays with Capacity for eligible transaction - addIPFSMessage', async function () { const schemaId = await getOrCreateParquetBroadcastSchema(fundingSource); - const ipfs_payload_data = 'This is a test of Frequency.'; + const ipfs_payload_data = 'This is a test of Recurrency.'; const ipfs_payload_len = ipfs_payload_data.length + 1; const ipfs_cid_64 = (await ipfsCid(ipfs_payload_data, './e2e_test.txt')).toString(base64); const call = ExtrinsicHelper.addIPFSMessage(capacityKeys, schemaId, ipfs_cid_64, ipfs_payload_len); @@ -261,12 +261,12 @@ describe('Capacity Transactions', function () { const schemaId_deletable: SchemaId = await getOrCreateAvroChatMessageItemizedSchema(fundingSource); // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; - const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Frequency'); + const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Recurrency'); const update_action = { Add: payload_2, }; @@ -294,7 +294,7 @@ describe('Capacity Transactions', function () { let target_hash = await getCurrentPaginatedHash(capacityProvider, schemaId, page_id); // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const call = ExtrinsicHelper.upsertPage( capacityKeys, schemaId, @@ -322,12 +322,12 @@ describe('Capacity Transactions', function () { const itemizedSchemaId: SchemaId = await getOrCreateAvroChatMessageItemizedSchema(fundingSource); // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; - const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Frequency'); + const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Recurrency'); const update_action = { Add: payload_2, }; @@ -366,12 +366,12 @@ describe('Capacity Transactions', function () { const itemizedSchemaId: SchemaId = await getOrCreateAvroChatMessageItemizedSchema(fundingSource); // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; - const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Frequency'); + const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Recurrency'); const update_action = { Add: payload_2, }; @@ -416,7 +416,7 @@ describe('Capacity Transactions', function () { targetHash: target_hash, schemaId: paginatedSchemaId, pageId: page_id, - payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), }); const upsertPayloadData = ExtrinsicHelper.api.registry.createType( 'PalletStatefulStoragePaginatedUpsertSignaturePayload', @@ -477,7 +477,7 @@ describe('Capacity Transactions', function () { targetHash: target_hash, schemaId: paginatedSchemaId, pageId: page_id, - payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), }); const upsertPayloadData = ExtrinsicHelper.api.registry.createType( 'PalletStatefulStoragePaginatedUpsertSignaturePayloadV2', diff --git a/e2e/capacity/unstaking.test.ts b/e2e/capacity/unstaking.test.ts index d401976..9c42940 100644 --- a/e2e/capacity/unstaking.test.ts +++ b/e2e/capacity/unstaking.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { u64 } from '@polkadot/types'; import assert from 'assert'; diff --git a/e2e/handles/handles.test.ts b/e2e/handles/handles.test.ts index 249b234..aa9a098 100644 --- a/e2e/handles/handles.test.ts +++ b/e2e/handles/handles.test.ts @@ -1,9 +1,9 @@ // Handles test suite -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createDelegator, getTestHandle } from '../scaffolding/helpers'; import { KeyringPair } from '@polkadot/keyring/types'; -import { MessageSourceId } from '@frequency-chain/api-augment/interfaces'; +import { MessageSourceId } from '@rustadot/api-augment/interfaces'; import { ExtrinsicHelper } from '../scaffolding/extrinsicHelpers'; import { Bytes } from '@polkadot/types'; import { getBlockNumber } from '../scaffolding/helpers'; diff --git a/e2e/load-tests/signatureRegistry.test.ts b/e2e/load-tests/signatureRegistry.test.ts index 41cdbac..fc22873 100644 --- a/e2e/load-tests/signatureRegistry.test.ts +++ b/e2e/load-tests/signatureRegistry.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createKeys, diff --git a/e2e/messages/addIPFSMessage.test.ts b/e2e/messages/addIPFSMessage.test.ts index 02de0d7..53739cc 100644 --- a/e2e/messages/addIPFSMessage.test.ts +++ b/e2e/messages/addIPFSMessage.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { base64 } from 'multiformats/bases/base64'; import { base32 } from 'multiformats/bases/base32'; @@ -12,7 +12,7 @@ import { ipfsCid } from './ipfs'; import { getFundingSource } from '../scaffolding/funding'; const fundingSource = getFundingSource('messages-add-ipfs'); -const ipfs_payload_data = 'This is a test of Frequency.'; +const ipfs_payload_data = 'This is a test of Recurrency.'; const ipfs_payload_len = ipfs_payload_data.length + 1; describe('Add Offchain Message', function () { @@ -76,7 +76,7 @@ describe('Add Offchain Message', function () { it('should fail if schema does not exist (InvalidSchemaId)', async function () { // Pick an arbitrarily high schemaId, such that it won't exist on the test chain. - // If we ever create more than 999 schemas in a test suite/single Frequency instance, this test will fail. + // If we ever create more than 999 schemas in a test suite/single Recurrency instance, this test will fail. const f = ExtrinsicHelper.addIPFSMessage(keys, 999, ipfs_cid_64, ipfs_payload_len); await assert.rejects(f.fundAndSend(fundingSource), { name: 'InvalidSchemaId', diff --git a/e2e/miscellaneous/frequency.test.ts b/e2e/miscellaneous/frequency.test.ts index bf89a16..767f44a 100644 --- a/e2e/miscellaneous/frequency.test.ts +++ b/e2e/miscellaneous/frequency.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { DOLLARS, createAndFundKeypair, getBlockNumber, getNonce } from '../scaffolding/helpers'; import { KeyringPair } from '@polkadot/keyring/types'; @@ -7,9 +7,9 @@ import { getFundingSource } from '../scaffolding/funding'; import { u8, Option } from '@polkadot/types'; import { u8aToHex } from '@polkadot/util/u8a/toHex'; -const fundingSource: KeyringPair = getFundingSource('frequency-misc'); +const fundingSource: KeyringPair = getFundingSource('recurrency-misc'); -describe('Frequency', function () { +describe('Recurrency', function () { describe('setup', function () { let keypairA: KeyringPair; let keypairB: KeyringPair; @@ -38,7 +38,7 @@ describe('Frequency', function () { for (let i = beforeBlockNumber + 1; i <= afterBlockNumber; i++) { const block = await ExtrinsicHelper.apiPromise.rpc.chain.getBlockHash(i); - const events = await ExtrinsicHelper.getFrequencyEvents(block); + const events = await ExtrinsicHelper.getRecurrencyEvents(block); if ( events.find( (e) => e.pallet.eq(balance_pallet) && e.event.eq(transfer_event) && e.data.toHex().includes(dest_account) diff --git a/e2e/miscellaneous/utilityBatch.test.ts b/e2e/miscellaneous/utilityBatch.test.ts index b4f06e8..e28ec9c 100644 --- a/e2e/miscellaneous/utilityBatch.test.ts +++ b/e2e/miscellaneous/utilityBatch.test.ts @@ -85,7 +85,7 @@ describe('Utility Batch Filtering', function () { }); it('should fail to execute ❌ batch with `Pays::No` calls', async function () { - // bad batch: with frequency related Pays::No call + // bad batch: with recurrency related Pays::No call const badBatch: SubmittableExtrinsic[] = []; badBatch.push(ExtrinsicHelper.api.tx.msa.retireMsa()); const batch = ExtrinsicHelper.executeUtilityBatchAll(sender, badBatch); @@ -97,8 +97,8 @@ describe('Utility Batch Filtering', function () { } }); - it('should fail to execute ❌ batch with `Pays::Yes` `create_provider`call blocked by Frequency', async function () { - // bad batch: with frequency related Pays::Yes call + it('should fail to execute ❌ batch with `Pays::Yes` `create_provider`call blocked by Recurrency', async function () { + // bad batch: with recurrency related Pays::Yes call const badBatch: SubmittableExtrinsic[] = []; badBatch.push(ExtrinsicHelper.api.tx.msa.createProvider('I am a ba(tch)d provider')); const batch = ExtrinsicHelper.executeUtilityBatchAll(sender, badBatch); @@ -110,8 +110,8 @@ describe('Utility Batch Filtering', function () { } }); - it('should fail to execute ❌ batch with `Pays::Yes` `create_schema` call blocked by Frequency', async function () { - // bad batch: with frequency related Pays::Yes call + it('should fail to execute ❌ batch with `Pays::Yes` `create_schema` call blocked by Recurrency', async function () { + // bad batch: with recurrency related Pays::Yes call const badBatch: SubmittableExtrinsic[] = []; badBatch.push(ExtrinsicHelper.api.tx.msa.createProvider('I am a ba(tch)d provider')); const batch = ExtrinsicHelper.executeUtilityBatchAll(sender, badBatch); diff --git a/e2e/msa/createMsa.test.ts b/e2e/msa/createMsa.test.ts index fbf8cc6..6364cb7 100644 --- a/e2e/msa/createMsa.test.ts +++ b/e2e/msa/createMsa.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createAndFundKeypair } from '../scaffolding/helpers'; import { KeyringPair } from '@polkadot/keyring/types'; diff --git a/e2e/msa/msaKeyManagement.test.ts b/e2e/msa/msaKeyManagement.test.ts index 5bbab5d..45fe4ae 100644 --- a/e2e/msa/msaKeyManagement.test.ts +++ b/e2e/msa/msaKeyManagement.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createKeys, diff --git a/e2e/package-lock.json b/e2e/package-lock.json index c138c0f..3502b7a 100644 --- a/e2e/package-lock.json +++ b/e2e/package-lock.json @@ -1,16 +1,16 @@ { - "name": "frequency-e2e-tests", + "name": "recurrency-e2e-tests", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "frequency-e2e-tests", + "name": "recurrency-e2e-tests", "version": "1.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@frequency-chain/api-augment": "file:../js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz", + "@rustadot/api-augment": "file:../js/api-augment/dist/rustadot-api-augment-0.0.0.tgz", "@helia/unixfs": "^3.0.7", "@noble/curves": "^1.5.0", "@polkadot/api": "12.3.1", @@ -2836,9 +2836,9 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@frequency-chain/api-augment": { + "node_modules/@rustadot/api-augment": { "version": "0.0.0", - "resolved": "file:../js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz", + "resolved": "file:../js/api-augment/dist/rustadot-api-augment-0.0.0.tgz", "integrity": "sha512-E39EoMsjnD17kIyA7U/ib24vxvyQmeWGNaKyWblacWyENcUhUGMFtPlIFK2xgyIPXvSsDDwLwYuue35/pX23Hg==", "license": "Apache-2.0", "dependencies": { diff --git a/e2e/package.json b/e2e/package.json index 9013173..f972be5 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -1,7 +1,7 @@ { - "name": "frequency-e2e-tests", + "name": "recurrency-e2e-tests", "version": "1.0.0", - "description": "End to end tests for the Frequency project", + "description": "End to end tests for the Recurrency project", "type": "module", "scripts": { "clean": "rm -Rf dist", @@ -18,7 +18,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@frequency-chain/api-augment": "file:../js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz", + "@rustadot/api-augment": "file:../js/api-augment/dist/rustadot-api-augment-0.0.0.tgz", "@helia/unixfs": "^3.0.7", "@noble/curves": "^1.5.0", "@polkadot/api": "12.3.1", diff --git a/e2e/passkey/passkeyProxy.test.ts b/e2e/passkey/passkeyProxy.test.ts index ce4e374..69392b4 100644 --- a/e2e/passkey/passkeyProxy.test.ts +++ b/e2e/passkey/passkeyProxy.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createAndFundKeypair, getNextEpochBlock, getNonce } from '../scaffolding/helpers'; import { KeyringPair } from '@polkadot/keyring/types'; diff --git a/e2e/proxy-pallet/proxy.test.ts b/e2e/proxy-pallet/proxy.test.ts index c052f7d..2ffe374 100644 --- a/e2e/proxy-pallet/proxy.test.ts +++ b/e2e/proxy-pallet/proxy.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createAndFundKeypair } from '../scaffolding/helpers'; import { KeyringPair } from '@polkadot/keyring/types'; diff --git a/e2e/scaffolding/apiConnection.ts b/e2e/scaffolding/apiConnection.ts index b5ff9e2..1693034 100644 --- a/e2e/scaffolding/apiConnection.ts +++ b/e2e/scaffolding/apiConnection.ts @@ -1,4 +1,4 @@ -import { options } from '@frequency-chain/api-augment'; +import { options } from '@rustadot/api-augment'; import { ApiRx, WsProvider, ApiPromise } from '@polkadot/api'; import { firstValueFrom } from 'rxjs'; import * as env from './env'; diff --git a/e2e/scaffolding/extrinsicHelpers.ts b/e2e/scaffolding/extrinsicHelpers.ts index db343ef..60f1528 100644 --- a/e2e/scaffolding/extrinsicHelpers.ts +++ b/e2e/scaffolding/extrinsicHelpers.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { ApiPromise, ApiRx } from '@polkadot/api'; import { ApiTypes, AugmentedEvent, SubmittableExtrinsic } from '@polkadot/api/types'; import { KeyringPair } from '@polkadot/keyring/types'; @@ -19,7 +19,7 @@ import { PresumptiveSuffixesResponse, RpcEvent, SchemaResponse, -} from '@frequency-chain/api-augment/interfaces'; +} from '@rustadot/api-augment/interfaces'; import { u8aToHex } from '@polkadot/util/u8a/toHex'; import { u8aWrapBytes } from '@polkadot/util'; import type { AccountId32, Call, H256 } from '@polkadot/types/interfaces/runtime'; @@ -220,7 +220,7 @@ export class Extrinsic> { - return ExtrinsicHelper.apiPromise.rpc.frequency.getEvents(at); + public static getRecurrencyEvents(at: H256 | string): Promise> { + return ExtrinsicHelper.apiPromise.rpc.recurrency.getEvents(at); } public static getMissingNonceValues(accountId: AccountId32 | string | Uint8Array): Promise> { - return ExtrinsicHelper.apiPromise.rpc.frequency.getMissingNonceValues(accountId); + return ExtrinsicHelper.apiPromise.rpc.recurrency.getMissingNonceValues(accountId); } public static addOnChainMessage(keys: KeyringPair, schemaId: any, payload: string) { @@ -821,7 +821,7 @@ export class ExtrinsicHelper { public static payWithCapacityBatchAll(keys: KeyringPair, calls: any) { return new Extrinsic( - () => ExtrinsicHelper.api.tx.frequencyTxPayment.payWithCapacityBatchAll(calls), + () => ExtrinsicHelper.api.tx.recurrencyTxPayment.payWithCapacityBatchAll(calls), keys, ExtrinsicHelper.api.events.utility.BatchCompleted ); diff --git a/e2e/scaffolding/funding.ts b/e2e/scaffolding/funding.ts index b97056e..163b6eb 100644 --- a/e2e/scaffolding/funding.ts +++ b/e2e/scaffolding/funding.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { Keyring } from '@polkadot/api'; import { isTestnet } from './env'; @@ -14,7 +14,7 @@ export const fundingSources = [ 'capacity-staking', 'capacity-transactions', 'capacity-unstaking', - 'frequency-misc', + 'recurrency-misc', 'handles', 'load-signature-registry', 'messages-add-ipfs', diff --git a/e2e/scaffolding/helpers.ts b/e2e/scaffolding/helpers.ts index 49bcc47..92c0c34 100644 --- a/e2e/scaffolding/helpers.ts +++ b/e2e/scaffolding/helpers.ts @@ -32,7 +32,7 @@ import { MessageSourceId, PageHash, SchemaId, -} from '@frequency-chain/api-augment/interfaces'; +} from '@rustadot/api-augment/interfaces'; import assert from 'assert'; import { AVRO_GRAPH_CHANGE } from '../schemas/fixtures/avroGraphChangeSchemaType'; import { PARQUET_BROADCAST } from '../schemas/fixtures/parquetBroadcastSchemaType'; diff --git a/e2e/scenarios/grantDelegation.test.ts b/e2e/scenarios/grantDelegation.test.ts index 98741c1..33189ca 100644 --- a/e2e/scenarios/grantDelegation.test.ts +++ b/e2e/scenarios/grantDelegation.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import { KeyringPair } from '@polkadot/keyring/types'; import { u16, u64 } from '@polkadot/types'; import assert from 'assert'; @@ -13,7 +13,7 @@ import { getOrCreateDummySchema, signPayloadSr25519, } from '../scaffolding/helpers'; -import { SchemaGrantResponse, SchemaId } from '@frequency-chain/api-augment/interfaces'; +import { SchemaGrantResponse, SchemaId } from '@rustadot/api-augment/interfaces'; import { getFundingSource } from '../scaffolding/funding'; const fundingSource = getFundingSource('scenarios-grant-delegation'); diff --git a/e2e/schemas/createSchema.test.ts b/e2e/schemas/createSchema.test.ts index 2a47475..6db9554 100644 --- a/e2e/schemas/createSchema.test.ts +++ b/e2e/schemas/createSchema.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; diff --git a/e2e/schemas/fixtures/avroGraphChangeSchemaType.ts b/e2e/schemas/fixtures/avroGraphChangeSchemaType.ts index 52154a7..b932fe3 100644 --- a/e2e/schemas/fixtures/avroGraphChangeSchemaType.ts +++ b/e2e/schemas/fixtures/avroGraphChangeSchemaType.ts @@ -2,7 +2,7 @@ export const AVRO_GRAPH_CHANGE = { type: 'record', name: 'GraphChange', fields: [ - // When converting from Frequency Schema Message to DSNP Announcement, assume announcementType=1 + // When converting from Recurrency Schema Message to DSNP Announcement, assume announcementType=1 { name: 'changeType', type: { diff --git a/e2e/stateful-pallet-storage/handleItemized.test.ts b/e2e/stateful-pallet-storage/handleItemized.test.ts index e5a1669..e0941c1 100644 --- a/e2e/stateful-pallet-storage/handleItemized.test.ts +++ b/e2e/stateful-pallet-storage/handleItemized.test.ts @@ -1,5 +1,5 @@ // E2E tests for pallets/stateful-pallet-storage/handleItemized.ts -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { DOLLARS, @@ -12,7 +12,7 @@ import { import { KeyringPair } from '@polkadot/keyring/types'; import { ExtrinsicHelper } from '../scaffolding/extrinsicHelpers'; import { AVRO_CHAT_MESSAGE } from '../stateful-pallet-storage/fixtures/itemizedSchemaType'; -import { MessageSourceId, SchemaId } from '@frequency-chain/api-augment/interfaces'; +import { MessageSourceId, SchemaId } from '@rustadot/api-augment/interfaces'; import { Bytes, u16, u64 } from '@polkadot/types'; import { getFundingSource } from '../scaffolding/funding'; @@ -58,13 +58,13 @@ describe('📗 Stateful Pallet Storage', function () { describe('Itemized Storage Tests 😊/😥', function () { it('✅ should be able to call applyItemizedAction and apply actions', async function () { // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; - const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Frequency'); + const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Recurrency'); const update_action = { Add: payload_2, @@ -100,7 +100,7 @@ describe('📗 Stateful Pallet Storage', function () { }); it('🛑 should fail call to applyItemizedAction with invalid schemaId', async function () { - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; @@ -120,7 +120,7 @@ describe('📗 Stateful Pallet Storage', function () { }); it('🛑 should fail call to applyItemizedAction with invalid schema location', async function () { - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; @@ -139,7 +139,7 @@ describe('📗 Stateful Pallet Storage', function () { }); it('🛑 should fail call to applyItemizedAction with for un-delegated attempts', async function () { - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; @@ -160,13 +160,13 @@ describe('📗 Stateful Pallet Storage', function () { it('🛑 should fail call to applyItemizedAction for target hash mismatch', async function () { // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; - const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Frequency'); + const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Recurrency'); const update_action = { Add: payload_2, diff --git a/e2e/stateful-pallet-storage/handlePaginated.test.ts b/e2e/stateful-pallet-storage/handlePaginated.test.ts index 25584d8..3ed5cf0 100644 --- a/e2e/stateful-pallet-storage/handlePaginated.test.ts +++ b/e2e/stateful-pallet-storage/handlePaginated.test.ts @@ -1,5 +1,5 @@ // E2E tests for pallets/stateful-pallet-storage/handlePaginated.ts -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createProviderKeysAndId, @@ -12,7 +12,7 @@ import { import { KeyringPair } from '@polkadot/keyring/types'; import { ExtrinsicHelper } from '../scaffolding/extrinsicHelpers'; import { AVRO_CHAT_MESSAGE } from './fixtures/itemizedSchemaType'; -import { MessageSourceId, SchemaId } from '@frequency-chain/api-augment/interfaces'; +import { MessageSourceId, SchemaId } from '@rustadot/api-augment/interfaces'; import { Bytes, u16, u64 } from '@polkadot/types'; import { getFundingSource } from '../scaffolding/funding'; @@ -61,7 +61,7 @@ describe('📗 Stateful Pallet Storage', function () { let target_hash = await getCurrentPaginatedHash(msa_id, schemaId, page_id); // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const paginated_add_result_1 = ExtrinsicHelper.upsertPage( providerKeys, schemaId, @@ -143,7 +143,7 @@ describe('📗 Stateful Pallet Storage', function () { it('🛑 should fail call to upsert page with invalid schemaId', async function () { const page_id = 0; const target_hash = await getCurrentPaginatedHash(msa_id, schemaId, page_id); - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const fake_schema_id = new u16(ExtrinsicHelper.api.registry, badSchemaId); const paginated_add_result_1 = ExtrinsicHelper.upsertPage( delegatorKeys, @@ -162,7 +162,7 @@ describe('📗 Stateful Pallet Storage', function () { it('🛑 should fail call to upsert page with invalid schema location', async function () { const page_id = 0; const target_hash = await getCurrentPaginatedHash(msa_id, schemaId, page_id); - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const paginated_add_result_1 = ExtrinsicHelper.upsertPage( delegatorKeys, schemaId_unsupported, @@ -179,7 +179,7 @@ describe('📗 Stateful Pallet Storage', function () { it('🛑 should fail call to upsert page with for un-delegated attempts', async function () { const page_id = 0; - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const target_hash = await getCurrentPaginatedHash(msa_id, schemaId, page_id); const paginated_add_result_1 = ExtrinsicHelper.upsertPage( @@ -198,7 +198,7 @@ describe('📗 Stateful Pallet Storage', function () { it('🛑 should fail call to upsert page with stale target hash', async function () { const page_id = 0; - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const paginated_add_result_1 = ExtrinsicHelper.upsertPage(providerKeys, schemaId, msa_id, page_id, payload_1, 0); await assert.rejects(paginated_add_result_1.signAndSend('current'), { diff --git a/e2e/stateful-pallet-storage/handleSignatureRequired.test.ts b/e2e/stateful-pallet-storage/handleSignatureRequired.test.ts index 8eeb1fb..e444d6e 100644 --- a/e2e/stateful-pallet-storage/handleSignatureRequired.test.ts +++ b/e2e/stateful-pallet-storage/handleSignatureRequired.test.ts @@ -1,5 +1,5 @@ // E2E tests for pallets/stateful-pallet-storage/handleItemizedWithSignature.ts -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { DOLLARS, @@ -19,7 +19,7 @@ import { import { KeyringPair } from '@polkadot/keyring/types'; import { ExtrinsicHelper } from '../scaffolding/extrinsicHelpers'; import { AVRO_CHAT_MESSAGE } from '../stateful-pallet-storage/fixtures/itemizedSchemaType'; -import { MessageSourceId, SchemaId } from '@frequency-chain/api-augment/interfaces'; +import { MessageSourceId, SchemaId } from '@rustadot/api-augment/interfaces'; import { Bytes, u16 } from '@polkadot/types'; import { getFundingSource } from '../scaffolding/funding'; @@ -82,8 +82,8 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { it('provider should be able to call applyItemizedActionWithSignature and apply actions', async function () { const { payload, signature } = await generateItemizedActionsSignedPayload( generateItemizedActions([ - { action: 'Add', value: 'Hello, world from Frequency' }, - { action: 'Add', value: 'Hello, world again from Frequency' }, + { action: 'Add', value: 'Hello, world from Recurrency' }, + { action: 'Add', value: 'Hello, world again from Recurrency' }, ]), itemizedSchemaId, delegatorKeys, @@ -118,8 +118,8 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { it('delegator (owner) should be able to call applyItemizedActionWithSignature and apply actions', async function () { const { payload, signature } = await generateItemizedActionsSignedPayload( generateItemizedActions([ - { action: 'Add', value: 'Hello, world from Frequency' }, - { action: 'Add', value: 'Hello, world again from Frequency' }, + { action: 'Add', value: 'Hello, world from Recurrency' }, + { action: 'Add', value: 'Hello, world again from Recurrency' }, ]), itemizedSchemaId, delegatorKeys, @@ -154,8 +154,8 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { it('provider should be able to call applyItemizedActionWithSignatureV2 and apply actions', async function () { const { payload, signature } = await generateItemizedActionsSignedPayloadV2( generateItemizedActions([ - { action: 'Add', value: 'Hello, world from Frequency' }, - { action: 'Add', value: 'Hello, world again from Frequency' }, + { action: 'Add', value: 'Hello, world from Recurrency' }, + { action: 'Add', value: 'Hello, world again from Recurrency' }, ]), itemizedSchemaId, delegatorKeys, @@ -190,8 +190,8 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { it('delegator (owner) should be able to call applyItemizedActionWithSignatureV2 and apply actions', async function () { const { payload, signature } = await generateItemizedActionsSignedPayloadV2( generateItemizedActions([ - { action: 'Add', value: 'Hello, world from Frequency' }, - { action: 'Add', value: 'Hello, world again from Frequency' }, + { action: 'Add', value: 'Hello, world from Recurrency' }, + { action: 'Add', value: 'Hello, world again from Recurrency' }, ]), itemizedSchemaId, delegatorKeys, @@ -225,8 +225,8 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { it('provider should not be able to call applyItemizedAction', async function () { const add_actions = generateItemizedActions([ - { action: 'Add', value: 'Hello, world from Frequency' }, - { action: 'Add', value: 'Hello, world again from Frequency' }, + { action: 'Add', value: 'Hello, world from Recurrency' }, + { action: 'Add', value: 'Hello, world again from Recurrency' }, ]); const target_hash = await getCurrentItemizedHash(msa_id, itemizedSchemaId); @@ -252,8 +252,8 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { it('owner should be able to call applyItemizedAction', async function () { const add_actions = generateItemizedActions([ - { action: 'Add', value: 'Hello, world from Frequency' }, - { action: 'Add', value: 'Hello, world again from Frequency' }, + { action: 'Add', value: 'Hello, world from Recurrency' }, + { action: 'Add', value: 'Hello, world again from Recurrency' }, ]); const target_hash = await getCurrentItemizedHash(msa_id, itemizedSchemaId); @@ -296,7 +296,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { targetHash: target_hash, schemaId: paginatedSchemaId, pageId: page_id, - payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), }); const upsertPayloadData = ExtrinsicHelper.api.registry.createType( 'PalletStatefulStoragePaginatedUpsertSignaturePayload', @@ -373,7 +373,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { targetHash: target_hash, schemaId: paginatedSchemaId, pageId: page_id, - payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), }); const upsertPayloadData = ExtrinsicHelper.api.registry.createType( 'PalletStatefulStoragePaginatedUpsertSignaturePayload', @@ -449,7 +449,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { targetHash: target_hash, schemaId: paginatedSchemaId, pageId: page_id, - payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), }); const upsertPayloadData = ExtrinsicHelper.api.registry.createType( 'PalletStatefulStoragePaginatedUpsertSignaturePayloadV2', @@ -524,7 +524,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { targetHash: target_hash, schemaId: paginatedSchemaId, pageId: page_id, - payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + payload: new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), }); const upsertPayloadData = ExtrinsicHelper.api.registry.createType( 'PalletStatefulStoragePaginatedUpsertSignaturePayloadV2', @@ -600,7 +600,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { paginatedSchemaId, msa_id, page_id, - new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), target_hash ); await assert.rejects(upsert.fundAndSend(fundingSource), { name: 'UnauthorizedDelegate' }); @@ -610,7 +610,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { paginatedSchemaId, msa_id, page_id, - new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), target_hash ); await assert.rejects(upsert_2.fundAndSend(fundingSource), { name: 'UnsupportedOperationForSchema' }); @@ -626,7 +626,7 @@ describe('📗 Stateful Pallet Storage Signature Required', function () { paginatedSchemaId, msa_id, page_id, - new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'), + new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'), target_hash ); const { target: pageUpdateEvent, eventMap: chainEvents1 } = await upsert_result.fundAndSend(fundingSource); diff --git a/e2e/sudo/sudo.test.ts b/e2e/sudo/sudo.test.ts index 689907e..dcda717 100644 --- a/e2e/sudo/sudo.test.ts +++ b/e2e/sudo/sudo.test.ts @@ -1,7 +1,7 @@ // All the sudo required tests must be in one test for parallelization needs -import '@frequency-chain/api-augment'; -import { MessageSourceId, SchemaId } from '@frequency-chain/api-augment/interfaces'; +import '@rustadot/api-augment'; +import { MessageSourceId, SchemaId } from '@rustadot/api-augment/interfaces'; import { KeyringPair } from '@polkadot/keyring/types'; import assert from 'assert'; import { Extrinsic, ExtrinsicHelper } from '../scaffolding/extrinsicHelpers'; @@ -148,13 +148,13 @@ describe('Sudo required', function () { describe('Itemized With AppendOnly Storage Tests', function () { it('should not be able to call delete action', async function () { // Add and update actions - const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Frequency'); + const payload_1 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World From Recurrency'); const add_action = { Add: payload_1, }; - const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Frequency'); + const payload_2 = new Bytes(ExtrinsicHelper.api.registry, 'Hello World Again From Recurrency'); const update_action = { Add: payload_2, diff --git a/e2e/time-release/timeRelease.test.ts b/e2e/time-release/timeRelease.test.ts index c310a3f..161b410 100644 --- a/e2e/time-release/timeRelease.test.ts +++ b/e2e/time-release/timeRelease.test.ts @@ -1,4 +1,4 @@ -import '@frequency-chain/api-augment'; +import '@rustadot/api-augment'; import assert from 'assert'; import { createAndFundKeypair } from '../scaffolding/helpers'; import { KeyringPair } from '@polkadot/keyring/types'; diff --git a/js/api-augment/CHANGELOG.md b/js/api-augment/CHANGELOG.md index 3fed1fa..965032a 100644 --- a/js/api-augment/CHANGELOG.md +++ b/js/api-augment/CHANGELOG.md @@ -1 +1 @@ -Changelog is maintained in the [releases for Frequency](https://github.com/frequency-chain/frequency/releases). +Changelog is maintained in the [releases for Recurrency](https://github.com/rustadot/recurrency/releases). diff --git a/js/api-augment/CONTRIBUTING.md b/js/api-augment/CONTRIBUTING.md index f048c78..b5c3f40 100644 --- a/js/api-augment/CONTRIBUTING.md +++ b/js/api-augment/CONTRIBUTING.md @@ -21,5 +21,5 @@ Tests require getting the metadata and building first. - `npm run build` ### From CLI -- Frequency Project Root +- Recurrency Project Root - `make js` \ No newline at end of file diff --git a/js/api-augment/README.md b/js/api-augment/README.md index d7132ed..637fef7 100644 --- a/js/api-augment/README.md +++ b/js/api-augment/README.md @@ -17,30 +17,30 @@ [![NPM @latest][npm-shield]][npm-url] [![NPM @next][npm-next-shield]][npm-next-url] -# Frequency Custom RPC and Types for Polkadot JS API +# Recurrency Custom RPC and Types for Polkadot JS API -An easy way to get all the custom rpc and types config to be able to easily use [Frequency](https://github.com/frequency-chain/frequency/) with the [Polkadot JS API library](https://www.npmjs.com/package/@polkadot/api) with TypeScript. +An easy way to get all the custom rpc and types config to be able to easily use [Recurrency](https://github.com/rustadot/recurrency/) with the [Polkadot JS API library](https://www.npmjs.com/package/@polkadot/api) with TypeScript. ## Getting Started -- `npm install @frequency-chain/api-augment` (API Augmentation Library) +- `npm install @rustadot/api-augment` (API Augmentation Library) - `npm install @polkadot/api` (Polkadot API Library) ## Upgrades and Matching Versions -Assuming you are using no deprecated methods, any release version should work against a release version of `@frequency-chain/api-augment`. +Assuming you are using no deprecated methods, any release version should work against a release version of `@rustadot/api-augment`. If you are working against a development version it is suggested that you match against the commit hash using `v0.0.0-[First 6 of the commit hash]`. -Changelog is maintained in the [releases for Frequency](https://github.com/frequency-chain/frequency/releases). +Changelog is maintained in the [releases for Recurrency](https://github.com/rustadot/recurrency/releases). ### Usage For details on use, see the [Polkadot API library documentation](https://polkadot.js.org/docs/api). ```typescript -import { options } from "@frequency-chain/api-augment"; +import { options } from "@rustadot/api-augment"; import { ApiPromise } from "@polkadot/api"; // ... @@ -66,19 +66,19 @@ To generate the JS api definitions, run make js ``` -This command will start a Frequency node in the background and fetch API definitions from it. To stop the Frequency process, use the PID output by the command. +This command will start a Recurrency node in the background and fetch API definitions from it. To stop the Recurrency process, use the PID output by the command. ## Helpful Notes ### Fails to Resolve Custom RPCs The api augmentation declares the modules used by `@polkadot/api`. -Thus the import for `@frequency-chain/api-augment` must come before any `@polkadot/api` so that the Frequency declarations resolve first. +Thus the import for `@rustadot/api-augment` must come before any `@polkadot/api` so that the Recurrency declarations resolve first. ```typescript -import { options } from "@frequency-chain/api-augment"; +import { options } from "@rustadot/api-augment"; // Or -import "@frequency-chain/api-augment"; +import "@rustadot/api-augment"; // Must come BEFORE any imports from @polkadot/api import { ApiPromise } from "@polkadot/api"; ``` @@ -118,17 +118,17 @@ Distributed under the Apache 2.0 License. See `LICENSE` for more information. -[contributors-shield]: https://img.shields.io/github/contributors/frequency-chain/frequency.svg?style=for-the-badge -[contributors-url]: https://github.com/frequency-chain/frequency/graphs/contributors -[forks-shield]: https://img.shields.io/github/forks/frequency-chain/frequency.svg?style=for-the-badge -[forks-url]: https://github.com/frequency-chain/frequency/network/members -[stars-shield]: https://img.shields.io/github/stars/frequency-chain/frequency.svg?style=for-the-badge -[stars-url]: https://github.com/frequency-chain/frequency/stargazers -[issues-shield]: https://img.shields.io/github/issues/frequency-chain/frequency.svg?style=for-the-badge -[issues-url]: https://github.com/frequency-chain/frequency/issues -[license-shield]: https://img.shields.io/github/license/frequency-chain/frequency.svg?style=for-the-badge -[license-url]: https://github.com/frequency-chain/frequency/blob/master/LICENSE -[npm-shield]: https://img.shields.io/npm/v/@frequency-chain/api-augment?label=npm%20%40latest&style=for-the-badge -[npm-url]: https://www.npmjs.com/package/@frequency-chain/api-augment -[npm-next-shield]: https://img.shields.io/npm/v/@frequency-chain/api-augment/next?label=npm%20%40next&style=for-the-badge -[npm-next-url]: https://www.npmjs.com/package/@frequency-chain/api-augment +[contributors-shield]: https://img.shields.io/github/contributors/rustadot/recurrency.svg?style=for-the-badge +[contributors-url]: https://github.com/rustadot/recurrency/graphs/contributors +[forks-shield]: https://img.shields.io/github/forks/rustadot/recurrency.svg?style=for-the-badge +[forks-url]: https://github.com/rustadot/recurrency/network/members +[stars-shield]: https://img.shields.io/github/stars/rustadot/recurrency.svg?style=for-the-badge +[stars-url]: https://github.com/rustadot/recurrency/stargazers +[issues-shield]: https://img.shields.io/github/issues/rustadot/recurrency.svg?style=for-the-badge +[issues-url]: https://github.com/rustadot/recurrency/issues +[license-shield]: https://img.shields.io/github/license/rustadot/recurrency.svg?style=for-the-badge +[license-url]: https://github.com/rustadot/recurrency/blob/master/LICENSE +[npm-shield]: https://img.shields.io/npm/v/@rustadot/api-augment?label=npm%20%40latest&style=for-the-badge +[npm-url]: https://www.npmjs.com/package/@rustadot/api-augment +[npm-next-shield]: https://img.shields.io/npm/v/@rustadot/api-augment/next?label=npm%20%40next&style=for-the-badge +[npm-next-url]: https://www.npmjs.com/package/@rustadot/api-augment diff --git a/js/api-augment/definitions/index.ts b/js/api-augment/definitions/index.ts index 53969a3..6326b26 100644 --- a/js/api-augment/definitions/index.ts +++ b/js/api-augment/definitions/index.ts @@ -6,5 +6,5 @@ export { default as messages } from './messages.js'; export { default as schemas } from './schemas.js'; export { default as statefulStorage } from './statefulStorage.js'; export { default as handles } from './handles.js'; -export { default as frequency } from './frequency.js'; -export { default as frequencyTxPayment } from './frequencyTxPayment.js'; +export { default as recurrency } from './recurrency.js'; +export { default as recurrencyTxPayment } from './recurrencyTxPayment.js'; diff --git a/js/api-augment/index.ts b/js/api-augment/index.ts index 5bb7565..7f1dd01 100644 --- a/js/api-augment/index.ts +++ b/js/api-augment/index.ts @@ -26,7 +26,7 @@ export const rpc = Object.entries(definitions).reduce((acc, [key, value]) => { }, {}); /** - * Frequency Specific Signed Extensions + * Recurrency Specific Signed Extensions */ export const signedExtensions: ExtDef = { // `CheckFreeExtrinsicUse` has no payload or extrinsic requirements diff --git a/js/api-augment/package-lock.json b/js/api-augment/package-lock.json index 029b71e..5799845 100644 --- a/js/api-augment/package-lock.json +++ b/js/api-augment/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@frequency-chain/api-augment", + "name": "@rustadot/api-augment", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@frequency-chain/api-augment", + "name": "@rustadot/api-augment", "version": "0.0.0", "license": "Apache-2.0", "dependencies": { diff --git a/js/api-augment/package.json b/js/api-augment/package.json index 7c77ef6..a0284f3 100644 --- a/js/api-augment/package.json +++ b/js/api-augment/package.json @@ -1,15 +1,15 @@ { - "name": "@frequency-chain/api-augment", + "name": "@rustadot/api-augment", "version": "0.0.0", "bugs": { - "url": "https://github.com/frequency-chain/frequency/issues" + "url": "https://github.com/rustadot/recurrency/issues" }, - "description": "RPC configuration for Frequency for use with Polkadotjs API", + "description": "RPC configuration for Recurrency for use with Polkadotjs API", "main": "index.js", "type": "module", "repository": { "type": "git", - "url": "https://github.com/frequency-chain/frequency.git", + "url": "https://github.com/rustadot/recurrency.git", "directory": "js/api-augment" }, "scripts": { @@ -23,14 +23,14 @@ "build": "tsc -p ./tsconfig.types.json && tsc -p ./tsconfig.cjs.json && tsc -p ./tsconfig.esm.json", "postbuild": "npm run package", "fetch:local": "curl -H \"Content-Type: application/json\" -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9944 -o ./metadata.json", - "generate:defs": "node --import=tsx/esm node_modules/.bin/polkadot-types-from-defs --package @frequency-chain/api-augment --input ./interfaces --endpoint ./metadata.json", - "generate:meta": "node --import=tsx/esm node_modules/.bin/polkadot-types-from-chain --package @frequency-chain/api-augment --endpoint ./metadata.json --output ./interfaces", + "generate:defs": "node --import=tsx/esm node_modules/.bin/polkadot-types-from-defs --package @rustadot/api-augment --input ./interfaces --endpoint ./metadata.json", + "generate:meta": "node --import=tsx/esm node_modules/.bin/polkadot-types-from-chain --package @rustadot/api-augment --endpoint ./metadata.json --output ./interfaces", "test": "mocha --import=tsx ./test/**/*.test.ts", "test:only": "mocha --import=tsx", "format": "tsc --noEmit --pretty && prettier --write . && eslint --fix", "lint": "tsc --noEmit --pretty && prettier --check . && eslint" }, - "author": "frequency-chain", + "author": "rustadot", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^12.3.1", diff --git a/js/api-augment/test/index.test.ts b/js/api-augment/test/index.test.ts index 4da561b..14f9736 100644 --- a/js/api-augment/test/index.test.ts +++ b/js/api-augment/test/index.test.ts @@ -41,6 +41,6 @@ describe('index', function () { assert.notEqual(api.rpc.messages, undefined); assert.notEqual(api.rpc.msa, undefined); assert.notEqual(api.rpc.schemas, undefined); - assert.notEqual(api.rpc.frequency, undefined); + assert.notEqual(api.rpc.recurrency, undefined); }); }); diff --git a/js/api-augment/tsconfig.json b/js/api-augment/tsconfig.json index 62ebe2f..e5529e7 100644 --- a/js/api-augment/tsconfig.json +++ b/js/api-augment/tsconfig.json @@ -15,7 +15,7 @@ "target": "es2022", "typeRoots": ["node_modules/@types"], "paths": { - "@frequency-chain/api-augment/*": ["./interfaces/*"], + "@rustadot/api-augment/*": ["./interfaces/*"], "@polkadot/api/augment": ["./interfaces/augment-api.ts"], "@polkadot/types/augment": ["./interfaces/augment-types.ts"], "@polkadot/types/lookup": ["./interfaces/types-lookup.ts"] diff --git a/node/Cargo.toml b/node/Cargo.toml index 7983fd5..38a35b4 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,44 +1,44 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] build = "build.rs" -description = "Substrate node for Frequency" +description = "Substrate node for Recurrency" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" -name = "frequency" -repository = "https://github.com/frequency-chain/frequency/" +name = "recurrency" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [[bin]] -name = "frequency" +name = "recurrency" path = "src/main.rs" [build-dependencies] substrate-build-script-utils = { workspace = true } [dependencies] -# Frequency Runtime -frequency-cli = { path = "cli" } -frequency-service = { path = "service" } +# Recurrency Runtime +recurrency-cli = { path = "cli" } +recurrency-service = { path = "service" } [features] std = [] default = [] -runtime-benchmarks = ["frequency-cli/runtime-benchmarks"] -frequency = ["frequency-service/frequency", "frequency-cli/frequency"] -frequency-no-relay = [ - "frequency-service/frequency-no-relay", - "frequency-cli/frequency-no-relay", +runtime-benchmarks = ["recurrency-cli/runtime-benchmarks"] +recurrency = ["recurrency-service/recurrency", "recurrency-cli/recurrency"] +recurrency-no-relay = [ + "recurrency-service/recurrency-no-relay", + "recurrency-cli/recurrency-no-relay", ] -frequency-local = [ - "frequency-service/frequency-local", - "frequency-cli/frequency-local", +recurrency-local = [ + "recurrency-service/recurrency-local", + "recurrency-cli/recurrency-local", ] -frequency-testnet = [ - "frequency-service/frequency-testnet", - "frequency-cli/frequency-testnet", +recurrency-testnet = [ + "recurrency-service/recurrency-testnet", + "recurrency-cli/recurrency-testnet", ] -frequency-lint-check = [ - "frequency-service/frequency-lint-check", - "frequency-cli/frequency-lint-check", +recurrency-lint-check = [ + "recurrency-service/recurrency-lint-check", + "recurrency-cli/recurrency-lint-check", ] diff --git a/node/cli-opt/Cargo.toml b/node/cli-opt/Cargo.toml index 4cc9932..1c295fe 100644 --- a/node/cli-opt/Cargo.toml +++ b/node/cli-opt/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Frequency"] -description = "Substrate CLI options for Frequency node" +authors = ["Recurrency"] +description = "Substrate CLI options for Recurrency node" edition = "2021" -homepage = "https://frequency.xyz/" +homepage = "https://recurrency.xyz/" license = "Apache-2.0" name = "cli-opt" -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [dependencies] diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 56a81da..d9c3643 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Frequency"] -description = "Substrate cli for frequency node" +authors = ["Recurrency"] +description = "Substrate cli for recurrency node" edition = "2021" -homepage = "https://frequency.xyz/" +homepage = "https://recurrency.xyz/" license = "Apache-2.0" -name = "frequency-cli" -repository = "https://github.com/frequency-chain/frequency/" +name = "recurrency-cli" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [dependencies] @@ -16,13 +16,13 @@ hex-literal = { workspace = true } log = { workspace = true } serde_json = { workspace = true } serde = { workspace = true, features = ["derive"] } -# Frequency Runtime +# Recurrency Runtime common-primitives = { default-features = false, path = "../../common/primitives" } common-runtime = { package = "common-runtime", path = "../../runtime/common", default-features = false } -frequency-runtime = { package = "frequency-runtime", path = "../../runtime/frequency", default-features = false } -frequency-service = { package = "frequency-service", path = "../service", default-features = false, optional = true } +recurrency-runtime = { package = "recurrency-runtime", path = "../../runtime/recurrency", default-features = false } +recurrency-service = { package = "recurrency-service", path = "../service", default-features = false, optional = true } pallet-msa = { package = "pallet-msa", path = "../../pallets/msa", default-features = false } -pallet-frequency-tx-payment = { package = "pallet-frequency-tx-payment", path = "../../pallets/frequency-tx-payment", default-features = false } +pallet-recurrency-tx-payment = { package = "pallet-recurrency-tx-payment", path = "../../pallets/recurrency-tx-payment", default-features = false } pallet-handles = { package = "pallet-handles", path = "../../pallets/handles", default-features = false } pallet-stateful-storage = { package = "pallet-stateful-storage", path = "../../pallets/stateful-storage", default-features = false } cli-opt = { default-features = false, path = "../cli-opt" } @@ -68,7 +68,7 @@ substrate-build-script-utils = { workspace = true } [features] std = ["sp-io/std", "sp-api/std", "frame-support/std", "sp-runtime/std", "sp-core/std"] cli = [ - "frequency-service", + "recurrency-service", "sp-core", "sc-cli", "sc-service", @@ -78,24 +78,24 @@ cli = [ default = ["std", "cli"] runtime-benchmarks = [ "polkadot-cli/runtime-benchmarks", - "frequency-runtime/runtime-benchmarks", + "recurrency-runtime/runtime-benchmarks", "sc-service?/runtime-benchmarks", "frame-benchmarking-cli/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] try-runtime = [ - "frequency-service/try-runtime", + "recurrency-service/try-runtime", "sp-runtime/try-runtime" ] on-chain-release-build = ["sp-api/disable-logging"] -frequency = ["frequency-service/frequency"] -frequency-no-relay = ["frequency-service/frequency-no-relay"] -frequency-local = ["frequency-service/frequency-local"] -frequency-testnet = ["frequency-service/frequency-testnet"] -frequency-lint-check = [ - "frequency", - "frequency-no-relay", - "frequency-local", - "frequency-testnet", - "frequency-service/frequency-lint-check", +recurrency = ["recurrency-service/recurrency"] +recurrency-no-relay = ["recurrency-service/recurrency-no-relay"] +recurrency-local = ["recurrency-service/recurrency-local"] +recurrency-testnet = ["recurrency-service/recurrency-testnet"] +recurrency-lint-check = [ + "recurrency", + "recurrency-no-relay", + "recurrency-local", + "recurrency-testnet", + "recurrency-service/recurrency-lint-check", ] diff --git a/node/cli/build.rs b/node/cli/build.rs index a4489fb..bacf2f3 100644 --- a/node/cli/build.rs +++ b/node/cli/build.rs @@ -1,52 +1,52 @@ use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed}; #[cfg(not(any( - feature = "frequency", - feature = "frequency-local", - feature = "frequency-no-relay", - feature = "frequency-testnet" + feature = "recurrency", + feature = "recurrency-local", + feature = "recurrency-no-relay", + feature = "recurrency-testnet" )))] compile_error!( r#"You must enable one of these features: -- Mainnet: "frequency" -- Frequency Paseo: "frequency-testnet" -- Local: "frequency-local" -- No Relay: "frequency-no-relay", -- All: "frequency-lint-check"# +- Mainnet: "recurrency" +- Recurrency Paseo: "recurrency-testnet" +- Local: "recurrency-local" +- No Relay: "recurrency-no-relay", +- All: "recurrency-lint-check"# ); // Don't allow more than one main feature (except for benchmark/lint/check) so that we always have a good mainnet runtime #[cfg(all( - not(feature = "frequency-lint-check"), - feature = "frequency", + not(feature = "recurrency-lint-check"), + feature = "recurrency", any( - feature = "frequency-no-relay", - feature = "frequency-local", - feature = "frequency-testnet" + feature = "recurrency-no-relay", + feature = "recurrency-local", + feature = "recurrency-testnet" ) ))] -compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"frequency-lint-check\""); +compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"recurrency-lint-check\""); #[cfg(all( - not(feature = "frequency-lint-check"), - feature = "frequency-no-relay", - any(feature = "frequency", feature = "frequency-local", feature = "frequency-testnet") + not(feature = "recurrency-lint-check"), + feature = "recurrency-no-relay", + any(feature = "recurrency", feature = "recurrency-local", feature = "recurrency-testnet") ))] -compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"frequency-lint-check\""); +compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"recurrency-lint-check\""); #[cfg(all( - not(feature = "frequency-lint-check"), - feature = "frequency-local", - any(feature = "frequency", feature = "frequency-no-relay", feature = "frequency-testnet") + not(feature = "recurrency-lint-check"), + feature = "recurrency-local", + any(feature = "recurrency", feature = "recurrency-no-relay", feature = "recurrency-testnet") ))] -compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"frequency-lint-check\""); +compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"recurrency-lint-check\""); #[cfg(all( - not(feature = "frequency-lint-check"), - feature = "frequency-testnet", - any(feature = "frequency", feature = "frequency-no-relay", feature = "frequency-local",) + not(feature = "recurrency-lint-check"), + feature = "recurrency-testnet", + any(feature = "recurrency", feature = "recurrency-no-relay", feature = "recurrency-local",) ))] -compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"frequency-lint-check\""); +compile_error!("\"Only one main feature can be enabled except for benchmark/lint/check with \"recurrency-lint-check\""); fn main() { generate_cargo_keys(); diff --git a/node/cli/src/benchmarking.rs b/node/cli/src/benchmarking.rs index 466674e..1173326 100644 --- a/node/cli/src/benchmarking.rs +++ b/node/cli/src/benchmarking.rs @@ -6,14 +6,14 @@ use common_primitives::node::{AccountId, Balance, Signature}; use frame_support::pallet_prelude::InherentData; use frame_system::{Call as SystemCall, Config}; -use frequency_service::service::{frequency_runtime as runtime, ParachainClient as FullClient}; +use recurrency_service::service::{recurrency_runtime as runtime, ParachainClient as FullClient}; use sc_cli::Result; use sc_client_api::BlockBackend; use sp_core::{Encode, Pair}; use sp_keyring::Sr25519Keyring; use sp_runtime::{OpaqueExtrinsic, SaturatedConversion}; -use frequency_runtime::StaleHashCheckExtension; +use recurrency_runtime::StaleHashCheckExtension; use pallet_balances::Call as BalancesCall; use pallet_msa; use sp_inherents::InherentDataProvider; @@ -130,7 +130,7 @@ pub fn create_benchmark_extrinsic( )), common_runtime::extensions::check_nonce::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), - pallet_frequency_tx_payment::ChargeFrqTransactionPayment::::from(0), + pallet_recurrency_tx_payment::ChargeFrqTransactionPayment::::from(0), pallet_msa::CheckFreeExtrinsicUse::::new(), pallet_handles::handles_signed_extension::HandlesSignedExtension::::new(), StaleHashCheckExtension, diff --git a/node/cli/src/cli.rs b/node/cli/src/cli.rs index 9133005..aed90a6 100644 --- a/node/cli/src/cli.rs +++ b/node/cli/src/cli.rs @@ -1,14 +1,14 @@ -//! Frequency CLI library. +//! Recurrency CLI library. // File originally from https://github.com/paritytech/cumulus/blob/master/parachain-template/node/src/cli.rs use crate::{ExportMetadataCmd, ExportRuntimeVersionCmd}; use std::path::PathBuf; -#[cfg(feature = "frequency-no-relay")] +#[cfg(feature = "recurrency-no-relay")] use std::num::NonZeroU16; -#[cfg(feature = "frequency-no-relay")] +#[cfg(feature = "recurrency-no-relay")] use cli_opt::SealingMode; /// Sub-commands supported by the collator. @@ -87,17 +87,17 @@ pub struct Cli { /// Instant block sealing /// Blocks are triggered to be formed each time a transaction hits the validated transaction pool /// Empty blocks can also be formed using the `engine_createBlock` RPC - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] #[clap(long, value_enum, help = "The sealing mode", default_value_t=SealingMode::Instant)] pub sealing: SealingMode, /// Interval in seconds for interval sealing. - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] #[clap(long, help = "The interval in seconds", default_value = "12", value_name = "SECONDS")] pub sealing_interval: NonZeroU16, /// Whether to create empty blocks in manual and interval sealing modes. - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] #[clap(long, help = "Create empty blocks in interval sealing modes", default_value = "false")] pub sealing_create_empty_blocks: bool, } @@ -121,7 +121,7 @@ impl RelayChainCli { relay_chain_args: impl Iterator, ) -> Self { let extension = - frequency_service::chain_spec::Extensions::try_get(&*para_config.chain_spec); + recurrency_service::chain_spec::Extensions::try_get(&*para_config.chain_spec); let chain_id = extension.map(|e| e.relay_chain.clone()); let base_path = para_config.base_path.path().join("polkadot"); Self { diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index fc6bd66..b1c30de 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -7,9 +7,9 @@ use crate::{ use common_primitives::node::Block; use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions; use frame_benchmarking_cli::BenchmarkCmd; -use frequency_service::{ +use recurrency_service::{ chain_spec, - service::{frequency_runtime::VERSION, new_partial}, + service::{recurrency_runtime::VERSION, new_partial}, }; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, @@ -19,10 +19,10 @@ use sc_service::config::{BasePath, PrometheusConfig}; use sp_runtime::traits::HashingFor; enum ChainIdentity { - Frequency, - FrequencyPaseo, - FrequencyLocal, - FrequencyDev, + Recurrency, + RecurrencyPaseo, + RecurrencyLocal, + RecurrencyDev, } trait IdentifyChain { @@ -31,14 +31,14 @@ trait IdentifyChain { impl IdentifyChain for dyn sc_service::ChainSpec { fn identify(&self) -> ChainIdentity { - if self.id() == "frequency" { - ChainIdentity::Frequency - } else if self.id() == "frequency-paseo" { - ChainIdentity::FrequencyPaseo - } else if self.id() == "frequency-local" { - ChainIdentity::FrequencyLocal + if self.id() == "recurrency" { + ChainIdentity::Recurrency + } else if self.id() == "recurrency-paseo" { + ChainIdentity::RecurrencyPaseo + } else if self.id() == "recurrency-local" { + ChainIdentity::RecurrencyLocal } else if self.id() == "dev" { - ChainIdentity::FrequencyDev + ChainIdentity::RecurrencyDev } else { panic!("Unknown chain identity") } @@ -48,10 +48,10 @@ impl IdentifyChain for dyn sc_service::ChainSpec { impl PartialEq for ChainIdentity { fn eq(&self, other: &Self) -> bool { match (self, other) { - (ChainIdentity::Frequency, ChainIdentity::Frequency) => true, - (ChainIdentity::FrequencyPaseo, ChainIdentity::FrequencyPaseo) => true, - (ChainIdentity::FrequencyLocal, ChainIdentity::FrequencyLocal) => true, - (ChainIdentity::FrequencyDev, ChainIdentity::FrequencyDev) => true, + (ChainIdentity::Recurrency, ChainIdentity::Recurrency) => true, + (ChainIdentity::RecurrencyPaseo, ChainIdentity::RecurrencyPaseo) => true, + (ChainIdentity::RecurrencyLocal, ChainIdentity::RecurrencyLocal) => true, + (ChainIdentity::RecurrencyDev, ChainIdentity::RecurrencyDev) => true, _ => false, } } @@ -65,53 +65,53 @@ impl IdentifyChain for T { fn load_spec(id: &str) -> std::result::Result, String> { match id { - #[cfg(feature = "frequency")] - "frequency-bench" => return Ok(Box::new(chain_spec::frequency::benchmark_mainnet_config())), - #[cfg(feature = "frequency")] - "frequency" => return Ok(Box::new(chain_spec::frequency::load_frequency_spec())), - #[cfg(feature = "frequency-no-relay")] - "dev" | "frequency-no-relay" => - return Ok(Box::new(chain_spec::frequency_dev::development_config())), - #[cfg(feature = "frequency-local")] - "frequency-paseo-local" => - return Ok(Box::new(chain_spec::frequency_paseo::local_paseo_testnet_config())), - #[cfg(feature = "frequency-testnet")] - "frequency-testnet" | "frequency-paseo" | "paseo" | "testnet" => - return Ok(Box::new(chain_spec::frequency_paseo::load_frequency_paseo_spec())), + #[cfg(feature = "recurrency")] + "recurrency-bench" => return Ok(Box::new(chain_spec::recurrency::benchmark_mainnet_config())), + #[cfg(feature = "recurrency")] + "recurrency" => return Ok(Box::new(chain_spec::recurrency::load_recurrency_spec())), + #[cfg(feature = "recurrency-no-relay")] + "dev" | "recurrency-no-relay" => + return Ok(Box::new(chain_spec::recurrency_dev::development_config())), + #[cfg(feature = "recurrency-local")] + "recurrency-paseo-local" => + return Ok(Box::new(chain_spec::recurrency_paseo::local_paseo_testnet_config())), + #[cfg(feature = "recurrency-testnet")] + "recurrency-testnet" | "recurrency-paseo" | "paseo" | "testnet" => + return Ok(Box::new(chain_spec::recurrency_paseo::load_recurrency_paseo_spec())), path => { if path.is_empty() { - if cfg!(feature = "frequency") { - #[cfg(feature = "frequency")] + if cfg!(feature = "recurrency") { + #[cfg(feature = "recurrency")] { - return Ok(Box::new(chain_spec::frequency::load_frequency_spec())); + return Ok(Box::new(chain_spec::recurrency::load_recurrency_spec())); } - #[cfg(not(feature = "frequency"))] - return Err("Frequency runtime is not available.".into()); - } else if cfg!(feature = "frequency-no-relay") { - #[cfg(feature = "frequency-no-relay")] + #[cfg(not(feature = "recurrency"))] + return Err("Recurrency runtime is not available.".into()); + } else if cfg!(feature = "recurrency-no-relay") { + #[cfg(feature = "recurrency-no-relay")] { - return Ok(Box::new(chain_spec::frequency_dev::development_config())); + return Ok(Box::new(chain_spec::recurrency_dev::development_config())); } - #[cfg(not(feature = "frequency-no-relay"))] - return Err("Frequency Development (no relay) runtime is not available.".into()); - } else if cfg!(feature = "frequency-local") { - #[cfg(feature = "frequency-local")] + #[cfg(not(feature = "recurrency-no-relay"))] + return Err("Recurrency Development (no relay) runtime is not available.".into()); + } else if cfg!(feature = "recurrency-local") { + #[cfg(feature = "recurrency-local")] { return Ok(Box::new( - chain_spec::frequency_paseo::local_paseo_testnet_config(), + chain_spec::recurrency_paseo::local_paseo_testnet_config(), )); } - #[cfg(not(feature = "frequency-local"))] - return Err("Frequency Local runtime is not available.".into()); - } else if cfg!(feature = "frequency-testnet") { - #[cfg(feature = "frequency-testnet")] + #[cfg(not(feature = "recurrency-local"))] + return Err("Recurrency Local runtime is not available.".into()); + } else if cfg!(feature = "recurrency-testnet") { + #[cfg(feature = "recurrency-testnet")] { return Ok(Box::new( - chain_spec::frequency_paseo::load_frequency_paseo_spec(), + chain_spec::recurrency_paseo::load_recurrency_paseo_spec(), )); } - #[cfg(not(feature = "frequency-testnet"))] - return Err("Frequency Paseo runtime is not available.".into()); + #[cfg(not(feature = "recurrency-testnet"))] + return Err("Recurrency Paseo runtime is not available.".into()); } else { return Err("No chain spec is available.".into()); } @@ -119,42 +119,42 @@ fn load_spec(id: &str) -> std::result::Result, String> { let path_buf = std::path::PathBuf::from(path); let spec = Box::new(chain_spec::DummyChainSpec::from_json_file(path_buf.clone())?) as Box; - if ChainIdentity::Frequency == spec.identify() { - #[cfg(feature = "frequency")] + if ChainIdentity::Recurrency == spec.identify() { + #[cfg(feature = "recurrency")] { - return Ok(Box::new(chain_spec::frequency::ChainSpec::from_json_file( + return Ok(Box::new(chain_spec::recurrency::ChainSpec::from_json_file( path_buf, )?)); } - #[cfg(not(feature = "frequency"))] - return Err("Frequency runtime is not available.".into()); - } else if ChainIdentity::FrequencyPaseo == spec.identify() { - #[cfg(feature = "frequency-testnet")] + #[cfg(not(feature = "recurrency"))] + return Err("Recurrency runtime is not available.".into()); + } else if ChainIdentity::RecurrencyPaseo == spec.identify() { + #[cfg(feature = "recurrency-testnet")] { - return Ok(Box::new(chain_spec::frequency_paseo::ChainSpec::from_json_file( + return Ok(Box::new(chain_spec::recurrency_paseo::ChainSpec::from_json_file( path_buf, )?)); } - #[cfg(not(feature = "frequency-testnet"))] - return Err("Frequency Paseo runtime is not available.".into()); - } else if ChainIdentity::FrequencyLocal == spec.identify() { - #[cfg(feature = "frequency-local")] + #[cfg(not(feature = "recurrency-testnet"))] + return Err("Recurrency Paseo runtime is not available.".into()); + } else if ChainIdentity::RecurrencyLocal == spec.identify() { + #[cfg(feature = "recurrency-local")] { - return Ok(Box::new(chain_spec::frequency_paseo::ChainSpec::from_json_file( + return Ok(Box::new(chain_spec::recurrency_paseo::ChainSpec::from_json_file( path_buf, )?)); } - #[cfg(not(feature = "frequency-local"))] - return Err("Frequency Local runtime is not available.".into()); - } else if ChainIdentity::FrequencyDev == spec.identify() { - #[cfg(feature = "frequency-no-relay")] + #[cfg(not(feature = "recurrency-local"))] + return Err("Recurrency Local runtime is not available.".into()); + } else if ChainIdentity::RecurrencyDev == spec.identify() { + #[cfg(feature = "recurrency-no-relay")] { - return Ok(Box::new(chain_spec::frequency_paseo::ChainSpec::from_json_file( + return Ok(Box::new(chain_spec::recurrency_paseo::ChainSpec::from_json_file( path_buf, )?)); } - #[cfg(not(feature = "frequency-no-relay"))] - return Err("Frequency Dev (no relay) runtime is not available.".into()); + #[cfg(not(feature = "recurrency-no-relay"))] + return Err("Recurrency Dev (no relay) runtime is not available.".into()); } else { return Err("Unknown chain spec.".into()); } @@ -163,7 +163,7 @@ fn load_spec(id: &str) -> std::result::Result, String> { } fn chain_name() -> String { - "Frequency".into() + "Recurrency".into() } impl SubstrateCli for Cli { @@ -176,10 +176,10 @@ impl SubstrateCli for Cli { } fn description() -> String { - "Frequency\n\nThe command-line arguments provided first will be \ + "Recurrency\n\nThe command-line arguments provided first will be \ passed to the parachain node, while the arguments provided after -- will be passed \ to the relay chain node.\n\n\ - frequency -- " + recurrency -- " .into() } @@ -188,7 +188,7 @@ impl SubstrateCli for Cli { } fn support_url() -> String { - "https://github.com/frequency-chain/frequency/issues/new".into() + "https://github.com/rustadot/recurrency/issues/new".into() } fn copyright_start_year() -> i32 { @@ -209,7 +209,7 @@ impl Cli { impl SubstrateCli for RelayChainCli { fn impl_name() -> String { - "Frequency".into() + "Recurrency".into() } fn impl_version() -> String { @@ -217,10 +217,10 @@ impl SubstrateCli for RelayChainCli { } fn description() -> String { - "Frequency\n\nThe command-line arguments provided first will be \ + "Recurrency\n\nThe command-line arguments provided first will be \ passed to the parachain node, while the arguments provided after -- will be passed \ to the relay chain node.\n\n\ - frequency -- " + recurrency -- " .into() } @@ -239,11 +239,11 @@ impl SubstrateCli for RelayChainCli { fn load_spec(&self, id: &str) -> std::result::Result, String> { match id { // TODO: Remove once on a Polkadot-SDK with Paseo-Local - #[cfg(feature = "frequency-local")] - "paseo-local" => return Ok(Box::new(chain_spec::frequency_paseo::load_paseo_local_spec())), + #[cfg(feature = "recurrency-local")] + "paseo-local" => return Ok(Box::new(chain_spec::recurrency_paseo::load_paseo_local_spec())), // TODO: Remove once on a Polkadot-SDK with Paseo - #[cfg(feature = "frequency-testnet")] - "paseo" => return Ok(Box::new(chain_spec::frequency_paseo::load_paseo_spec())), + #[cfg(feature = "recurrency-testnet")] + "paseo" => return Ok(Box::new(chain_spec::recurrency_paseo::load_paseo_spec())), _ => return polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()) .load_spec(id), @@ -411,11 +411,11 @@ pub fn run() -> Result<()> { pub fn run_chain(cli: Cli) -> sc_service::Result<(), sc_cli::Error> { #[allow(unused)] let mut result: sc_service::Result<(), polkadot_cli::Error> = Ok(()); - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] { result = crate::run_as_localchain::run_as_localchain(cli); } - #[cfg(not(feature = "frequency-no-relay"))] + #[cfg(not(feature = "recurrency-no-relay"))] { result = crate::run_as_parachain::run_as_parachain(cli); } diff --git a/node/cli/src/lib.rs b/node/cli/src/lib.rs index 1abf194..de81a1a 100644 --- a/node/cli/src/lib.rs +++ b/node/cli/src/lib.rs @@ -1,4 +1,4 @@ -//! Frequency CLI library. +//! Recurrency CLI library. #![allow(missing_docs)] #[cfg(feature = "cli")] @@ -33,7 +33,7 @@ pub use runtime_version_cmd::*; #[cfg(feature = "cli")] pub use sc_cli::{Error, Result}; -#[cfg(feature = "frequency-no-relay")] +#[cfg(feature = "recurrency-no-relay")] pub mod run_as_localchain; -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] pub mod run_as_parachain; diff --git a/node/cli/src/run_as_localchain.rs b/node/cli/src/run_as_localchain.rs index 3119b16..2e0bd1a 100644 --- a/node/cli/src/run_as_localchain.rs +++ b/node/cli/src/run_as_localchain.rs @@ -1,12 +1,12 @@ use crate::cli::Cli; -use frequency_service::block_sealing::start_frequency_dev_sealing_node; +use recurrency_service::block_sealing::start_recurrency_dev_sealing_node; use sc_cli::SubstrateCli; pub fn run_as_localchain(cli: Cli) -> sc_service::Result<(), sc_cli::Error> { let runner = cli.create_runner(&cli.run.normalize())?; runner.run_node_until_exit(|config| async move { - start_frequency_dev_sealing_node( + start_recurrency_dev_sealing_node( config, cli.sealing, u16::from(cli.sealing_interval), diff --git a/node/cli/src/run_as_parachain.rs b/node/cli/src/run_as_parachain.rs index 60d0e42..82061f2 100644 --- a/node/cli/src/run_as_parachain.rs +++ b/node/cli/src/run_as_parachain.rs @@ -1,6 +1,6 @@ use crate::cli::{Cli, RelayChainCli}; use cumulus_primitives_core::ParaId; -use frequency_service::chain_spec; +use recurrency_service::chain_spec; use log::info; use sc_cli::SubstrateCli; @@ -36,7 +36,7 @@ pub fn run_as_parachain(cli: Cli) -> sc_service::Result<(), sc_cli::Error> { info!("Parachain id: {:?}", id); info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" }); - return frequency_service::service::start_parachain_node( + return recurrency_service::service::start_parachain_node( config, polkadot_config, collator_options, diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 147098c..cd49fa7 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Frequency"] -description = "Substrate node for frequency" +authors = ["Recurrency"] +description = "Substrate node for recurrency" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" -name = "frequency-service" -repository = "https://github.com/frequency-chain/frequency/" +name = "recurrency-service" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [dependencies] @@ -23,8 +23,8 @@ serde = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["macros", "time", "parking_lot"] } serde_json = { workspace = true } -# Frequency Runtime -frequency-runtime = { path = "../../runtime/frequency", optional = true } +# Recurrency Runtime +recurrency-runtime = { path = "../../runtime/recurrency", optional = true } common-runtime = { path = "../../runtime/common" } cli-opt = { default-features = false, path = "../cli-opt" } # Substrate @@ -91,7 +91,7 @@ cumulus-relay-chain-inprocess-interface = { workspace = true } cumulus-relay-chain-interface = { workspace = true } cumulus-relay-chain-minimal-node = { workspace = true } cumulus-relay-chain-rpc-interface = { workspace = true } -# Frequency +# Recurrency common-helpers = { default-features = false, path = "../../common/helpers" } common-primitives = { default-features = false, path = "../../common/primitives" } pallet-messages-rpc = { path = "../../pallets/messages/src/rpc" } @@ -104,8 +104,8 @@ pallet-stateful-storage-rpc = { path = "../../pallets/stateful-storage/src/rpc" pallet-stateful-storage-runtime-api = { path = "../../pallets/stateful-storage/src/runtime-api" } pallet-handles-rpc = { path = "../../pallets/handles/src/rpc" } pallet-handles-runtime-api = { path = "../../pallets/handles/src/runtime-api" } -pallet-frequency-tx-payment-rpc = { path = "../../pallets/frequency-tx-payment/src/rpc" } -pallet-frequency-tx-payment-runtime-api = { path = "../../pallets/frequency-tx-payment/src/runtime-api" } +pallet-recurrency-tx-payment-rpc = { path = "../../pallets/recurrency-tx-payment/src/rpc" } +pallet-recurrency-tx-payment-runtime-api = { path = "../../pallets/recurrency-tx-payment/src/runtime-api" } system-runtime-api = { path = "../../runtime/system-runtime-api" } [build-dependencies] @@ -119,17 +119,17 @@ scale-info = { workspace = true, features = ["derive"] } default = ["std"] std = ["sp-api/std", "sp-core/std"] runtime-benchmarks = [ - "frequency-runtime/runtime-benchmarks", + "recurrency-runtime/runtime-benchmarks", "polkadot-service/runtime-benchmarks", ] -frequency = ["frequency-runtime"] -frequency-no-relay = ["frequency-runtime"] -frequency-local = ["frequency-runtime"] -frequency-testnet = ["frequency-runtime"] -frequency-lint-check = [ - "frequency", - "frequency-no-relay", - "frequency-local", - "frequency-testnet", +recurrency = ["recurrency-runtime"] +recurrency-no-relay = ["recurrency-runtime"] +recurrency-local = ["recurrency-runtime"] +recurrency-testnet = ["recurrency-runtime"] +recurrency-lint-check = [ + "recurrency", + "recurrency-no-relay", + "recurrency-local", + "recurrency-testnet", ] -try-runtime = ["frequency-runtime/try-runtime", "polkadot-service/try-runtime"] +try-runtime = ["recurrency-runtime/try-runtime", "polkadot-service/try-runtime"] diff --git a/node/service/src/block_sealing.rs b/node/service/src/block_sealing.rs index 610b578..8e6f53c 100644 --- a/node/service/src/block_sealing.rs +++ b/node/service/src/block_sealing.rs @@ -25,10 +25,10 @@ use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::Block as BlockT; use std::{sync::Arc, task::Poll}; -/// Function to start Frequency in dev mode without a relay chain +/// Function to start Recurrency in dev mode without a relay chain /// This function is called when --chain dev --sealing= is passed. #[allow(clippy::expect_used)] -pub fn start_frequency_dev_sealing_node( +pub fn start_recurrency_dev_sealing_node( config: Configuration, sealing_mode: SealingMode, sealing_interval: u16, @@ -111,7 +111,7 @@ pub fn start_frequency_dev_sealing_node( let role = config.role.clone(); let select_chain = maybe_select_chain - .expect("In frequency dev mode, `new_partial` will return some `select_chain`; qed"); + .expect("In recurrency dev mode, `new_partial` will return some `select_chain`; qed"); // Only block authoring nodes create, seal and finalize blocks let command_sink = if role.is_authority() { diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index def4e58..d9c7012 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -10,18 +10,18 @@ use sp_runtime::traits::{IdentifyAccount, Verify}; /// Dummy chain spec for building and checking pub type DummyChainSpec = sc_service::GenericChainSpec; -#[cfg(feature = "frequency")] -pub mod frequency; +#[cfg(feature = "recurrency")] +pub mod recurrency; #[cfg(any( - feature = "frequency-testnet", - feature = "frequency-local", - feature = "frequency-no-relay" + feature = "recurrency-testnet", + feature = "recurrency-local", + feature = "recurrency-no-relay" ))] -pub mod frequency_paseo; +pub mod recurrency_paseo; -#[cfg(any(feature = "frequency-no-relay"))] -pub mod frequency_dev; +#[cfg(any(feature = "recurrency-no-relay"))] +pub mod recurrency_dev; #[allow(clippy::expect_used)] /// Helper function to generate a crypto pair from seed diff --git a/node/service/src/chain_spec/frequency.rs b/node/service/src/chain_spec/frequency.rs index edc9701..4fac94a 100644 --- a/node/service/src/chain_spec/frequency.rs +++ b/node/service/src/chain_spec/frequency.rs @@ -2,10 +2,10 @@ use common_primitives::node::{AccountId, Balance}; use common_runtime::constants::{ currency::{DOLLARS, UNITS}, - FREQUENCY_TOKEN, TOKEN_DECIMALS, + RECURRENCY_TOKEN, TOKEN_DECIMALS, }; use cumulus_primitives_core::ParaId; -use frequency_runtime::{AuraId, CouncilConfig, Ss58Prefix, TechnicalCommitteeConfig}; +use recurrency_runtime::{AuraId, CouncilConfig, Ss58Prefix, TechnicalCommitteeConfig}; use hex::FromHex; use sc_service::ChainType; @@ -18,7 +18,7 @@ pub type ChainSpec = sc_service::GenericChainSpec; use super::{get_properties, Extensions}; -pub mod frequency_mainnet_keys { +pub mod recurrency_mainnet_keys { // Unfinished Collator 1 public key (sr25519) and session key pub const UNFINISHED_COLLATOR_1_SR25519: &str = @@ -64,15 +64,15 @@ pub mod frequency_mainnet_keys { pub const TECHNICAL_COUNCIL_3: &str = "0xcee0137a698a9a616193c80550185ea91387f16208544a8b47d477703b055b4b"; - pub const FREQUENCY_COUNCIL_1: &str = + pub const RECURRENCY_COUNCIL_1: &str = "0x9286ca034a2523b7a53c30e433bc148aa43a4eccbceffe2569df30c915bf666f"; - pub const FREQUENCY_COUNCIL_2: &str = + pub const RECURRENCY_COUNCIL_2: &str = "0x3692687b80fcc7293aeae47847e234d9744a81963881d262d044d0dc7080f059"; - pub const FREQUENCY_COUNCIL_3: &str = + pub const RECURRENCY_COUNCIL_3: &str = "0x96a666eb5d96e39f555094e37f32885f6c8fad30e17bee5fddb138843285c237"; - pub const FREQUENCY_COUNCIL_4: &str = + pub const RECURRENCY_COUNCIL_4: &str = "0xaab55f57a977dfed1fc64e88c242c9a6c7f02abe2b581fc58f2bbfc0bdaad224"; - pub const FREQUENCY_COUNCIL_5: &str = + pub const RECURRENCY_COUNCIL_5: &str = "0xfcac9ce9c9807732f092a84efde7cfbf77b4c3abedffadfb12cc63c6f6836605"; } @@ -110,43 +110,43 @@ pub mod foundation_keys { } #[allow(clippy::unwrap_used)] -pub fn load_frequency_spec() -> ChainSpec { - ChainSpec::from_json_bytes(&include_bytes!("../../../../resources/frequency.raw.json")[..]) +pub fn load_recurrency_spec() -> ChainSpec { + ChainSpec::from_json_bytes(&include_bytes!("../../../../resources/recurrency.raw.json")[..]) .unwrap() } #[allow(clippy::unwrap_used)] pub fn benchmark_mainnet_config() -> ChainSpec { let properties = - get_properties(FREQUENCY_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into()); + get_properties(RECURRENCY_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into()); let para_id: ParaId = 2091.into(); ChainSpec::builder( - frequency_runtime::wasm_binary_unwrap(), + recurrency_runtime::wasm_binary_unwrap(), Extensions { relay_chain: "polkadot".into(), para_id: para_id.into() }, ).with_name( - "Frequency", + "Recurrency", ).with_protocol_id( - "frequency", + "recurrency", ).with_properties( properties, ).with_chain_type( ChainType::Live ).with_telemetry_endpoints( - TelemetryEndpoints::new(vec![("wss://telemetry.polkadot.io/submit/".into(), 0), ("wss://telemetry.frequency.xyz/submit/".into(), 0)]).unwrap() + TelemetryEndpoints::new(vec![("wss://telemetry.polkadot.io/submit/".into(), 0), ("wss://telemetry.recurrency.xyz/submit/".into(), 0)]).unwrap() ).with_boot_nodes(vec![ - "/dns4/0.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP".parse().unwrap(), - "/dns4/1.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw".parse().unwrap(), + "/dns4/0.boot.recurrency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP".parse().unwrap(), + "/dns4/1.boot.recurrency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw".parse().unwrap(), ]).with_genesis_config( - frequency_genesis( + recurrency_genesis( vec![ ( - frequency_mainnet_keys::UNFINISHED_COLLATOR_1_SR25519 + recurrency_mainnet_keys::UNFINISHED_COLLATOR_1_SR25519 .parse::() .unwrap() .into(), AuraId::from_slice( &<[u8; 32]>::from_hex( - frequency_mainnet_keys::UNFINISHED_COLLATOR_1_SESSION_KEY + recurrency_mainnet_keys::UNFINISHED_COLLATOR_1_SESSION_KEY .strip_prefix("0x") .unwrap(), ) @@ -155,13 +155,13 @@ pub fn benchmark_mainnet_config() -> ChainSpec { .unwrap(), ), ( - frequency_mainnet_keys::UNFINISHED_COLLATOR_2_SR25519 + recurrency_mainnet_keys::UNFINISHED_COLLATOR_2_SR25519 .parse::() .unwrap() .into(), AuraId::from_slice( &<[u8; 32]>::from_hex( - frequency_mainnet_keys::UNFINISHED_COLLATOR_2_SESSION_KEY + recurrency_mainnet_keys::UNFINISHED_COLLATOR_2_SESSION_KEY .strip_prefix("0x") .unwrap(), ) @@ -170,13 +170,13 @@ pub fn benchmark_mainnet_config() -> ChainSpec { .unwrap(), ), ( - frequency_mainnet_keys::UNFINISHED_COLLATOR_3_SR25519 + recurrency_mainnet_keys::UNFINISHED_COLLATOR_3_SR25519 .parse::() .unwrap() .into(), AuraId::from_slice( &<[u8; 32]>::from_hex( - frequency_mainnet_keys::UNFINISHED_COLLATOR_3_SESSION_KEY + recurrency_mainnet_keys::UNFINISHED_COLLATOR_3_SESSION_KEY .strip_prefix("0x") .unwrap(), ) @@ -185,13 +185,13 @@ pub fn benchmark_mainnet_config() -> ChainSpec { .unwrap(), ), ( - frequency_mainnet_keys::ON_FINALITY_COLLATOR_1_SR25519 + recurrency_mainnet_keys::ON_FINALITY_COLLATOR_1_SR25519 .parse::() .unwrap() .into(), AuraId::from_slice( &<[u8; 32]>::from_hex( - frequency_mainnet_keys::ON_FINALITY_COLLATOR_1_SESSION_KEY + recurrency_mainnet_keys::ON_FINALITY_COLLATOR_1_SESSION_KEY .strip_prefix("0x") .unwrap(), ) @@ -200,13 +200,13 @@ pub fn benchmark_mainnet_config() -> ChainSpec { .unwrap(), ), ( - frequency_mainnet_keys::EXTERNAL_COLLATOR_1_SR25519 + recurrency_mainnet_keys::EXTERNAL_COLLATOR_1_SR25519 .parse::() .unwrap() .into(), AuraId::from_slice( &<[u8; 32]>::from_hex( - frequency_mainnet_keys::EXTERNAL_COLLATOR_1_SESSION_KEY + recurrency_mainnet_keys::EXTERNAL_COLLATOR_1_SESSION_KEY .strip_prefix("0x") .unwrap(), ) @@ -215,13 +215,13 @@ pub fn benchmark_mainnet_config() -> ChainSpec { .unwrap(), ), ( - frequency_mainnet_keys::EXTERNAL_COLLATOR_2_SR25519 + recurrency_mainnet_keys::EXTERNAL_COLLATOR_2_SR25519 .parse::() .unwrap() .into(), AuraId::from_slice( &<[u8; 32]>::from_hex( - frequency_mainnet_keys::EXTERNAL_COLLATOR_2_SESSION_KEY + recurrency_mainnet_keys::EXTERNAL_COLLATOR_2_SESSION_KEY .strip_prefix("0x") .unwrap(), ) @@ -319,7 +319,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { .into(), 100 * DOLLARS, ), - // Frequency (53% Total) + // Recurrency (53% Total) ( // Treasury Pallet common_runtime::constants::TREASURY_PALLET_ID.into_account_truncating(), @@ -327,7 +327,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member - frequency_mainnet_keys::FREQUENCY_COUNCIL_1 + recurrency_mainnet_keys::RECURRENCY_COUNCIL_1 .parse::() .unwrap() .into(), @@ -335,7 +335,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member - frequency_mainnet_keys::FREQUENCY_COUNCIL_2 + recurrency_mainnet_keys::RECURRENCY_COUNCIL_2 .parse::() .unwrap() .into(), @@ -343,7 +343,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member - frequency_mainnet_keys::FREQUENCY_COUNCIL_3 + recurrency_mainnet_keys::RECURRENCY_COUNCIL_3 .parse::() .unwrap() .into(), @@ -351,7 +351,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member - frequency_mainnet_keys::FREQUENCY_COUNCIL_4 + recurrency_mainnet_keys::RECURRENCY_COUNCIL_4 .parse::() .unwrap() .into(), @@ -359,7 +359,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member and TECHNICAL_COUNCIL_2 - frequency_mainnet_keys::FREQUENCY_COUNCIL_5 + recurrency_mainnet_keys::RECURRENCY_COUNCIL_5 .parse::() .unwrap() .into(), @@ -367,7 +367,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member - frequency_mainnet_keys::TECHNICAL_COUNCIL_1 + recurrency_mainnet_keys::TECHNICAL_COUNCIL_1 .parse::() .unwrap() .into(), @@ -375,7 +375,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ( // Council Member - frequency_mainnet_keys::TECHNICAL_COUNCIL_3 + recurrency_mainnet_keys::TECHNICAL_COUNCIL_3 .parse::() .unwrap() .into(), @@ -383,16 +383,16 @@ pub fn benchmark_mainnet_config() -> ChainSpec { ), ], vec!( - frequency_mainnet_keys::FREQUENCY_COUNCIL_1.parse::().unwrap().into(), - frequency_mainnet_keys::FREQUENCY_COUNCIL_2.parse::().unwrap().into(), - frequency_mainnet_keys::FREQUENCY_COUNCIL_3.parse::().unwrap().into(), - frequency_mainnet_keys::FREQUENCY_COUNCIL_4.parse::().unwrap().into(), - frequency_mainnet_keys::FREQUENCY_COUNCIL_5.parse::().unwrap().into(), + recurrency_mainnet_keys::RECURRENCY_COUNCIL_1.parse::().unwrap().into(), + recurrency_mainnet_keys::RECURRENCY_COUNCIL_2.parse::().unwrap().into(), + recurrency_mainnet_keys::RECURRENCY_COUNCIL_3.parse::().unwrap().into(), + recurrency_mainnet_keys::RECURRENCY_COUNCIL_4.parse::().unwrap().into(), + recurrency_mainnet_keys::RECURRENCY_COUNCIL_5.parse::().unwrap().into(), ), vec!( - frequency_mainnet_keys::TECHNICAL_COUNCIL_1.parse::().unwrap().into(), - frequency_mainnet_keys::TECHNICAL_COUNCIL_2.parse::().unwrap().into(), - frequency_mainnet_keys::TECHNICAL_COUNCIL_3.parse::().unwrap().into(), + recurrency_mainnet_keys::TECHNICAL_COUNCIL_1.parse::().unwrap().into(), + recurrency_mainnet_keys::TECHNICAL_COUNCIL_2.parse::().unwrap().into(), + recurrency_mainnet_keys::TECHNICAL_COUNCIL_3.parse::().unwrap().into(), ), //candidacy bond 100_000 * UNITS, @@ -403,7 +403,7 @@ pub fn benchmark_mainnet_config() -> ChainSpec { } #[allow(clippy::unwrap_used)] -fn frequency_genesis( +fn recurrency_genesis( initial_authorities: Vec<(AccountId, AuraId)>, endowed_accounts: Vec<(AccountId, Balance)>, council_members: Vec, @@ -411,26 +411,26 @@ fn frequency_genesis( candidacy_bond: Balance, id: ParaId, ) -> serde_json::Value { - let genesis = frequency_runtime::RuntimeGenesisConfig { - system: frequency_runtime::SystemConfig { ..Default::default() }, - balances: frequency_runtime::BalancesConfig { balances: endowed_accounts }, - parachain_info: frequency_runtime::ParachainInfoConfig { + let genesis = recurrency_runtime::RuntimeGenesisConfig { + system: recurrency_runtime::SystemConfig { ..Default::default() }, + balances: recurrency_runtime::BalancesConfig { balances: endowed_accounts }, + parachain_info: recurrency_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: frequency_runtime::CollatorSelectionConfig { + collator_selection: recurrency_runtime::CollatorSelectionConfig { invulnerables: initial_authorities.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond, desired_candidates: 0, }, - session: frequency_runtime::SessionConfig { + session: recurrency_runtime::SessionConfig { keys: initial_authorities .into_iter() .map(|(acc, aura)| { ( acc.clone(), // account id acc, // validator id - frequency_runtime::SessionKeys { aura }, // session keys + recurrency_runtime::SessionKeys { aura }, // session keys ) }) .collect(), @@ -438,8 +438,8 @@ fn frequency_genesis( aura: Default::default(), aura_ext: Default::default(), parachain_system: Default::default(), - // SUDO removed Jan 2023, but needed when testing and checking with frequency-lint-check - #[cfg(any(not(feature = "frequency"), feature = "frequency-lint-check"))] + // SUDO removed Jan 2023, but needed when testing and checking with recurrency-lint-check + #[cfg(any(not(feature = "recurrency"), feature = "recurrency-lint-check"))] sudo: Default::default(), schemas: Default::default(), time_release: Default::default(), diff --git a/node/service/src/chain_spec/frequency_dev.rs b/node/service/src/chain_spec/frequency_dev.rs index c860380..84b120e 100644 --- a/node/service/src/chain_spec/frequency_dev.rs +++ b/node/service/src/chain_spec/frequency_dev.rs @@ -1,10 +1,10 @@ #![allow(missing_docs)] use common_primitives::node::AccountId; use common_runtime::constants::{ - currency::EXISTENTIAL_DEPOSIT, FREQUENCY_LOCAL_TOKEN, TOKEN_DECIMALS, + currency::EXISTENTIAL_DEPOSIT, RECURRENCY_LOCAL_TOKEN, TOKEN_DECIMALS, }; use cumulus_primitives_core::ParaId; -use frequency_runtime::{AuraId, CouncilConfig, Ss58Prefix, SudoConfig, TechnicalCommitteeConfig}; +use recurrency_runtime::{AuraId, CouncilConfig, Ss58Prefix, SudoConfig, TechnicalCommitteeConfig}; use sc_service::ChainType; use sp_core::sr25519; use sp_runtime::traits::AccountIdConversion; @@ -17,16 +17,16 @@ use super::{get_account_id_from_seed, get_collator_keys_from_seed, get_propertie pub fn development_config() -> ChainSpec { // Give your base currency a unit name and decimal places let properties = - get_properties(FREQUENCY_LOCAL_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into()); + get_properties(RECURRENCY_LOCAL_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into()); ChainSpec::builder( - frequency_runtime::wasm_binary_unwrap(), + recurrency_runtime::wasm_binary_unwrap(), Extensions { relay_chain: "dev".into(), // You MUST set this to the correct network! para_id: 1000, }, ) - .with_name("Frequency Development (No Relay)") + .with_name("Recurrency Development (No Relay)") .with_id("dev") .with_properties(properties) .with_chain_type(ChainType::Development) @@ -46,12 +46,12 @@ pub fn development_config() -> ChainSpec { /// Generate the session keys from individual elements. /// /// The input must be a tuple of individual keys (a single arg for now since we have just one key). -fn template_session_keys(keys: AuraId) -> frequency_runtime::SessionKeys { - frequency_runtime::SessionKeys { aura: keys } +fn template_session_keys(keys: AuraId) -> recurrency_runtime::SessionKeys { + recurrency_runtime::SessionKeys { aura: keys } } #[allow(clippy::unwrap_used)] -fn load_genesis_schemas() -> Vec { +fn load_genesis_schemas() -> Vec { serde_json::from_slice(include_bytes!("../../../../resources/genesis-schemas.json")).unwrap() } @@ -64,21 +64,21 @@ fn development_genesis( technical_committee_members: Vec, id: ParaId, ) -> serde_json::Value { - let genesis = frequency_runtime::RuntimeGenesisConfig { + let genesis = recurrency_runtime::RuntimeGenesisConfig { system: Default::default(), - balances: frequency_runtime::BalancesConfig { + balances: recurrency_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, - parachain_info: frequency_runtime::ParachainInfoConfig { + parachain_info: recurrency_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: frequency_runtime::CollatorSelectionConfig { + collator_selection: recurrency_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: EXISTENTIAL_DEPOSIT * 16, ..Default::default() }, - session: frequency_runtime::SessionConfig { + session: recurrency_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -94,13 +94,13 @@ fn development_genesis( // of this. aura: Default::default(), aura_ext: Default::default(), - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] parachain_system: Default::default(), sudo: SudoConfig { // Assign network admin rights. key: Some(root_key), }, - schemas: frequency_runtime::pallet_schemas::GenesisConfig { + schemas: recurrency_runtime::pallet_schemas::GenesisConfig { initial_schemas: load_genesis_schemas(), ..Default::default() }, diff --git a/node/service/src/chain_spec/frequency_paseo.rs b/node/service/src/chain_spec/frequency_paseo.rs index cfd9fef..24dc64f 100644 --- a/node/service/src/chain_spec/frequency_paseo.rs +++ b/node/service/src/chain_spec/frequency_paseo.rs @@ -1,10 +1,10 @@ #![allow(missing_docs)] use common_primitives::node::AccountId; use common_runtime::constants::{ - currency::EXISTENTIAL_DEPOSIT, FREQUENCY_LOCAL_TOKEN, TOKEN_DECIMALS, + currency::EXISTENTIAL_DEPOSIT, RECURRENCY_LOCAL_TOKEN, TOKEN_DECIMALS, }; use cumulus_primitives_core::ParaId; -use frequency_runtime::{AuraId, CouncilConfig, Ss58Prefix, SudoConfig, TechnicalCommitteeConfig}; +use recurrency_runtime::{AuraId, CouncilConfig, Ss58Prefix, SudoConfig, TechnicalCommitteeConfig}; use polkadot_service::chain_spec::Extensions as RelayChainExtensions; use sc_service::ChainType; use sp_runtime::traits::AccountIdConversion; @@ -19,10 +19,10 @@ use sp_core::sr25519; pub type RelayChainSpec = sc_service::GenericChainSpec; #[allow(clippy::unwrap_used)] -/// Generates the Frequency Paseo chain spec from the raw json -pub fn load_frequency_paseo_spec() -> ChainSpec { +/// Generates the Recurrency Paseo chain spec from the raw json +pub fn load_recurrency_paseo_spec() -> ChainSpec { ChainSpec::from_json_bytes( - &include_bytes!("../../../../resources/frequency-paseo.raw.json")[..], + &include_bytes!("../../../../resources/recurrency-paseo.raw.json")[..], ) .unwrap() } @@ -46,25 +46,25 @@ pub fn load_paseo_local_spec() -> RelayChainSpec { /// Generate the session keys from individual elements. /// /// The input must be a tuple of individual keys (a single arg for now since we have just one key). -fn template_session_keys(keys: AuraId) -> frequency_runtime::SessionKeys { - frequency_runtime::SessionKeys { aura: keys } +fn template_session_keys(keys: AuraId) -> recurrency_runtime::SessionKeys { + recurrency_runtime::SessionKeys { aura: keys } } /// Generates the chain spec for a local testnet pub fn local_paseo_testnet_config() -> ChainSpec { // Give your base currency a unit name and decimal places let properties = - get_properties(FREQUENCY_LOCAL_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into()); + get_properties(RECURRENCY_LOCAL_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into()); ChainSpec::builder( - frequency_runtime::wasm_binary_unwrap(), + recurrency_runtime::wasm_binary_unwrap(), Extensions { relay_chain: "paseo-local".into(), // You MUST set this to the correct network! para_id: 2000, }, ) - .with_name("Frequency Local Testnet") - .with_protocol_id("frequency-paseo-local") + .with_name("Recurrency Local Testnet") + .with_protocol_id("recurrency-paseo-local") .with_properties(properties) .with_chain_type(ChainType::Local) .with_genesis_config(testnet_genesis( @@ -123,21 +123,21 @@ fn testnet_genesis( technical_committee_members: Vec, id: ParaId, ) -> serde_json::Value { - let genesis = frequency_runtime::RuntimeGenesisConfig { - system: frequency_runtime::SystemConfig { ..Default::default() }, - balances: frequency_runtime::BalancesConfig { + let genesis = recurrency_runtime::RuntimeGenesisConfig { + system: recurrency_runtime::SystemConfig { ..Default::default() }, + balances: recurrency_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, - parachain_info: frequency_runtime::ParachainInfoConfig { + parachain_info: recurrency_runtime::ParachainInfoConfig { parachain_id: id, ..Default::default() }, - collator_selection: frequency_runtime::CollatorSelectionConfig { + collator_selection: recurrency_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: EXISTENTIAL_DEPOSIT * 16, ..Default::default() }, - session: frequency_runtime::SessionConfig { + session: recurrency_runtime::SessionConfig { keys: invulnerables .into_iter() .map(|(acc, aura)| { @@ -153,7 +153,7 @@ fn testnet_genesis( // of this. aura: Default::default(), aura_ext: Default::default(), - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] parachain_system: Default::default(), sudo: SudoConfig { // Assign network admin rights. diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index d67b9e9..c739b00 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -1,10 +1,10 @@ -//! Frequency Client library. +//! Recurrency Client library. #![warn(missing_docs)] #![warn(unused_extern_crates)] /// Block sealing -#[cfg(feature = "frequency-no-relay")] +#[cfg(feature = "recurrency-no-relay")] pub mod block_sealing; pub mod chain_spec; pub mod common; diff --git a/node/service/src/rpc/frequency_rpc.rs b/node/service/src/rpc/frequency_rpc.rs index 42fc247..3607fe7 100644 --- a/node/service/src/rpc/frequency_rpc.rs +++ b/node/service/src/rpc/frequency_rpc.rs @@ -25,25 +25,25 @@ use system_runtime_api::AdditionalRuntimeApi; /// This is an upper limit to restrict the number of returned nonce holes to eliminate a potential /// attack vector const MAX_RETURNED_MISSING_NONCE_SIZE: usize = 1000; -/// Frequency MSA Custom RPC API +/// Recurrency MSA Custom RPC API #[rpc(client, server)] -pub trait FrequencyRpcApi { +pub trait RecurrencyRpcApi { /// gets the events for a block hash - #[method(name = "frequency_getEvents")] + #[method(name = "recurrency_getEvents")] fn get_events(&self, at: B::Hash) -> RpcResult>; /// returns a list of missing nonce values from Future transaction pool. - #[method(name = "frequency_getMissingNonceValues")] + #[method(name = "recurrency_getMissingNonceValues")] fn get_missing_nonce_values(&self, account: AccountId) -> RpcResult>; } -/// The client handler for the API used by Frequency Service RPC with `jsonrpsee` -pub struct FrequencyRpcHandler { +/// The client handler for the API used by Recurrency Service RPC with `jsonrpsee` +pub struct RecurrencyRpcHandler { client: Arc, pool: Arc

, _marker: std::marker::PhantomData, } -impl FrequencyRpcHandler { +impl RecurrencyRpcHandler { /// Create new instance with the given reference to the client. pub fn new(client: Arc, pool: Arc

) -> Self { Self { client, pool, _marker: Default::default() } @@ -51,8 +51,8 @@ impl FrequencyRpcHandler { } #[async_trait] -impl FrequencyRpcApiServer - for FrequencyRpcHandler +impl RecurrencyRpcApiServer + for RecurrencyRpcHandler where Block: BlockT, C: HeaderBackend, diff --git a/node/service/src/rpc/mod.rs b/node/service/src/rpc/mod.rs index cc5a641..3a902f2 100644 --- a/node/service/src/rpc/mod.rs +++ b/node/service/src/rpc/mod.rs @@ -18,7 +18,7 @@ use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; -mod frequency_rpc; +mod recurrency_rpc; /// A type representing all RPC extensions. pub type RpcExtension = jsonrpsee::RpcModule<()>; @@ -50,7 +50,7 @@ where + Sync + 'static, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - C::Api: pallet_frequency_tx_payment_rpc::CapacityTransactionPaymentRuntimeApi, + C::Api: pallet_recurrency_tx_payment_rpc::CapacityTransactionPaymentRuntimeApi, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: BlockBuilder, C::Api: pallet_messages_runtime_api::MessagesRuntimeApi, @@ -65,9 +65,9 @@ where use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; - // Frequency RPCs - use frequency_rpc::{FrequencyRpcApiServer, FrequencyRpcHandler}; - use pallet_frequency_tx_payment_rpc::{CapacityPaymentApiServer, CapacityPaymentHandler}; + // Recurrency RPCs + use recurrency_rpc::{RecurrencyRpcApiServer, RecurrencyRpcHandler}; + use pallet_recurrency_tx_payment_rpc::{CapacityPaymentApiServer, CapacityPaymentHandler}; use pallet_handles_rpc::{HandlesApiServer, HandlesHandler}; use pallet_messages_rpc::{MessagesApiServer, MessagesHandler}; use pallet_msa_rpc::{MsaApiServer, MsaHandler}; @@ -85,7 +85,7 @@ where module.merge(StatefulStorageHandler::new(client.clone()).into_rpc())?; module.merge(HandlesHandler::new(client.clone()).into_rpc())?; module.merge(CapacityPaymentHandler::new(client.clone()).into_rpc())?; - module.merge(FrequencyRpcHandler::new(client, pool).into_rpc())?; + module.merge(RecurrencyRpcHandler::new(client, pool).into_rpc())?; if let Some(command_sink) = command_sink { module.merge( // We provide the rpc handler with the sending end of the channel to allow the rpc diff --git a/node/service/src/service.rs b/node/service/src/service.rs index af8830c..0cd52a7 100644 --- a/node/service/src/service.rs +++ b/node/service/src/service.rs @@ -8,7 +8,7 @@ use sc_client_api::Backend; use std::{sync::Arc, time::Duration}; use cumulus_client_cli::CollatorOptions; -use frequency_runtime::apis::RuntimeApi; +use recurrency_runtime::apis::RuntimeApi; // RPC use common_primitives::node::{AccountId, Balance, Block, Hash, Index as Nonce}; @@ -67,11 +67,11 @@ type HostFunctions = ( common_primitives::offchain::custom::HostFunctions, ); -pub use frequency_runtime; +pub use recurrency_runtime; type ParachainExecutor = WasmExecutor; -/// Frequency parachain +/// Recurrency parachain pub type ParachainClient = TFullClient; type ParachainBackend = TFullBackend; @@ -146,14 +146,14 @@ pub fn new_partial( let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] let import_queue = sc_consensus_manual_seal::import_queue( Box::new(client.clone()), &task_manager.spawn_essential_handle(), config.prometheus_registry(), ); - #[cfg(not(feature = "frequency-no-relay"))] + #[cfg(not(feature = "recurrency-no-relay"))] let import_queue = build_import_queue( client.clone(), block_import.clone(), @@ -184,7 +184,7 @@ pub fn new_partial( /// This is the actual implementation that is abstract over the executor and the runtime api. #[allow(clippy::expect_used)] #[sc_tracing::logging::prefix_logs_with("Parachain")] -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] pub async fn start_parachain_node( parachain_config: Configuration, polkadot_config: Configuration, @@ -386,7 +386,7 @@ pub async fn start_parachain_node( } /// Build the import queue for the parachain runtime. -#[cfg(not(feature = "frequency-no-relay"))] +#[cfg(not(feature = "recurrency-no-relay"))] /// Build the import queue for the parachain runtime. fn build_import_queue( client: Arc, @@ -414,7 +414,7 @@ fn build_import_queue( ) } -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] fn start_consensus( client: Arc, backend: Arc, diff --git a/node/src/main.rs b/node/src/main.rs index 4d7c796..0e93d7b 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -2,6 +2,6 @@ #![warn(missing_docs)] -fn main() -> frequency_cli::Result<()> { - frequency_cli::run() +fn main() -> recurrency_cli::Result<()> { + recurrency_cli::run() } diff --git a/pallets/README.md b/pallets/README.md index 80759e3..b61f37e 100644 --- a/pallets/README.md +++ b/pallets/README.md @@ -5,7 +5,7 @@ - The pallet should have a `README.md` file in the root. See `README.template.md` for a template. - The Readme file should strictly follow the standard as the contents may be used elsewhere. - The Readme file _must only_ use full links so the links work where ever the content is used. -- Any additional technical notes for Frequency developers may be placed in the docs after the Readme is included. +- Any additional technical notes for Recurrency developers may be placed in the docs after the Readme is included. The standard documentation header for `lib.rs`: diff --git a/pallets/README.template.md b/pallets/README.template.md index 9fa6e0e..db0d0da 100644 --- a/pallets/README.template.md +++ b/pallets/README.template.md @@ -24,9 +24,9 @@ The {Name} pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | -------------------------------- | ------------- | ------- | ------------------------------------------------------------------------------------------------------------- | ------------- | -| `{extrinsic}`
{Description} | Token Account | Tokens | [`{Event}`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.{Event}) | 1 | +| `{extrinsic}`
{Description} | Token Account | Tokens | [`{Event}`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.{Event}) | 1 | -See [Rust Docs](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/{pallet_name}/pallet/struct.Pallet.html) for more details. ### State Queries @@ -34,7 +34,7 @@ See [Rust Docs](https://frequency-chain.github.io/frequency/{pallet_name}/pallet | --------- | ------------------- | ------------------------ | ------------- | | {Query 1} | {Query Description} | `{queryCallInCamelCase}` | 1 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/{pallet_name}/pallet/storage_types/index.html) for additional state queries and details. ### RPCs @@ -42,8 +42,8 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | ------- | ----------------- | ---------------------------------------------------------------------------------------------------- | ------------ | -| {RPC 1} | {RPC Description} | [`checkDelegations`]({link to the ApiServer method on https://frequency-chain.github.io/frequency/}) | v1.0.0+ | +| {RPC 1} | {RPC Description} | [`checkDelegations`]({link to the ApiServer method on https://rustadot.github.io/recurrency/}) | v1.0.0+ | \* Must be enabled with off-chain indexing -See [Rust Docs]({link to the ApiServer on https://frequency-chain.github.io/frequency/}) for more details. +See [Rust Docs]({link to the ApiServer on https://rustadot.github.io/recurrency/}) for more details. diff --git a/pallets/capacity/Cargo.toml b/pallets/capacity/Cargo.toml index 5a1f49a..fe3e029 100644 --- a/pallets/capacity/Cargo.toml +++ b/pallets/capacity/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Pallet for Capacity" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "pallet-capacity" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" diff --git a/pallets/capacity/README.md b/pallets/capacity/README.md index 83fb976..111559d 100644 --- a/pallets/capacity/README.md +++ b/pallets/capacity/README.md @@ -1,6 +1,6 @@ # Capacity Pallet -The Capacity Pallet manages the staking and balances for Capacity, an alternative payment system on Frequency. +The Capacity Pallet manages the staking and balances for Capacity, an alternative payment system on Recurrency. ## Summary @@ -8,7 +8,7 @@ Capacity is an alternative to paying with tokens for a limited set of calls. These Capacity eligible extrinsics are noted in each pallet's documentation with "Capacity" in the Payment column of the extrinsics section. Tokens can be staked to generate Capacity for a targeted Provider. The generated Capacity renews each [Epoch](#capacity-epoch). -[Learn more about Capacity](https://docs.frequency.xyz/Tokenomics/ProviderIncentives.html#capacity-model). +[Learn more about Capacity](https://docs.recurrency.xyz/Tokenomics/ProviderIncentives.html#capacity-model). ### Staking & Unstaking Currently, the token to Capacity ratio is 50:1. @@ -42,11 +42,11 @@ The Capacity Pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | -------------------------------- | ------------- | ------- | ------------------------------------------------------------------------------------------------------------- | ------------- | -| `stake`
Lock tokens to grant Capacity to a Provider | Token Account | Tokens | [`Staked`](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/enum.Event.html#variant.Staked) | 1 | -| `unstake`
Begin the process of unlocking tokens by unstaking currently staked tokens | Token Account | Tokens | [`UnStaked`](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/enum.Event.html#variant.UnStaked) | 1 | -| `withdraw_unstaked`
Complete the process of unlocking tokens staked by releasing locks on expired unlock chunks | Token Account | Tokens | [`StakeWithdrawn`](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/enum.Event.html#variant.StakeWithdrawn) | 1 | +| `stake`
Lock tokens to grant Capacity to a Provider | Token Account | Tokens | [`Staked`](https://rustadot.github.io/recurrency/pallet_capacity/pallet/enum.Event.html#variant.Staked) | 1 | +| `unstake`
Begin the process of unlocking tokens by unstaking currently staked tokens | Token Account | Tokens | [`UnStaked`](https://rustadot.github.io/recurrency/pallet_capacity/pallet/enum.Event.html#variant.UnStaked) | 1 | +| `withdraw_unstaked`
Complete the process of unlocking tokens staked by releasing locks on expired unlock chunks | Token Account | Tokens | [`StakeWithdrawn`](https://rustadot.github.io/recurrency/pallet_capacity/pallet/enum.Event.html#variant.StakeWithdrawn) | 1 | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_capacity/pallet/struct.Pallet.html) for more details. ### State Queries @@ -60,4 +60,4 @@ See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_capacity/pall | Get Unstake Information | Returns the information about an account's current unstaking details and the unlocking chunks | `unstakeUnlocks` | 1 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/pallet_capacity/pallet/storage_types/index.html) for additional state queries and details. diff --git a/pallets/capacity/src/lib.rs b/pallets/capacity/src/lib.rs index 72defb7..a8dcc1c 100644 --- a/pallets/capacity/src/lib.rs +++ b/pallets/capacity/src/lib.rs @@ -83,7 +83,7 @@ pub mod pallet { /// Creates a freeze reason for this pallet that is aggregated by `construct_runtime`. #[pallet::composite_enum] pub enum FreezeReason { - /// The account has staked tokens to the Frequency network. + /// The account has staked tokens to the Recurrency network. CapacityStaking, } @@ -214,7 +214,7 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub (super) fn deposit_event)] pub enum Event { - /// Tokens have been staked to the Frequency network. + /// Tokens have been staked to the Recurrency network. Staked { /// The token account that staked tokens to the network. account: T::AccountId, @@ -232,7 +232,7 @@ pub mod pallet { /// the total amount withdrawn, i.e. put back into free balance. amount: BalanceOf, }, - /// A token account has unstaked the Frequency network. + /// A token account has unstaked the Recurrency network. UnStaked { /// The token account that unstaked tokens from the network. account: T::AccountId, diff --git a/pallets/capacity/src/weights.rs b/pallets/capacity/src/weights.rs index 6ec00ed..54490a5 100644 --- a/pallets/capacity/src/weights.rs +++ b/pallets/capacity/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_capacity // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/pallets/frequency-tx-payment/Cargo.toml b/pallets/frequency-tx-payment/Cargo.toml index bdff0cd..c83b673 100644 --- a/pallets/frequency-tx-payment/Cargo.toml +++ b/pallets/frequency-tx-payment/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Pallet for paying fees" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" -name = "pallet-frequency-tx-payment" +name = "pallet-recurrency-tx-payment" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] @@ -27,7 +27,7 @@ sp-runtime = { workspace = true } sp-std = { workspace = true } log = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } [dev-dependencies] @@ -35,7 +35,7 @@ common-runtime = { path = "../../runtime/common", default-features = false } pallet-balances = { workspace = true } pallet-utility = { workspace = true } -# Frequency related dev dependencies +# Recurrency related dev dependencies pallet-msa = { path = '../msa' } diff --git a/pallets/frequency-tx-payment/README.md b/pallets/frequency-tx-payment/README.md index e1ef84d..4bd7c23 100644 --- a/pallets/frequency-tx-payment/README.md +++ b/pallets/frequency-tx-payment/README.md @@ -1,14 +1,14 @@ -# Frequency Transaction Pallet +# Recurrency Transaction Pallet Allows users to perform transactions using Capacity. ## Summary -Frequency supports the following alternative payments: +Recurrency supports the following alternative payments: - Capacity: A refillable resource limited to a subset of transactions. -The Frequency Transaction Pallet proxies or nests one or more calls inside of the root call to enable them to be paid using an alternative method. +The Recurrency Transaction Pallet proxies or nests one or more calls inside of the root call to enable them to be paid using an alternative method. For example, to call something like `add_ipfs_message(params)` with Capacity, one would call `pay_with_capacity(add_ipfs_message(params))`. The `pay_with_capacity` will verify that the inner call is allowed with Capacity. @@ -27,7 +27,7 @@ While periodic updates do occur, the costs typically stay the same or may even d ### Actions -The Frequency Transaction pallet provides for: +The Recurrency Transaction pallet provides for: - Transacting using only Capacity @@ -37,12 +37,12 @@ The Frequency Transaction pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | -------------------------------- | ------------- | ------- | ------------------------------------------------------------------------------------------------------------- | ------------- | -| `pay_with_capacity`
Proxies a single Capacity allowed call | Provider | Capacity | [`CapacityWithdrawn`](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/enum.Event.html#variant.CapacityWithdrawn)* | 1 | -| `pay_with_capacity_batch_all`
Proxies a batch (limit 10) of Capacity allowed calls | Provider | Capacity | [`CapacityWithdrawn`](https://frequency-chain.github.io/frequency/pallet_capacity/pallet/enum.Event.html#variant.CapacityWithdrawn)* | 1 | +| `pay_with_capacity`
Proxies a single Capacity allowed call | Provider | Capacity | [`CapacityWithdrawn`](https://rustadot.github.io/recurrency/pallet_capacity/pallet/enum.Event.html#variant.CapacityWithdrawn)* | 1 | +| `pay_with_capacity_batch_all`
Proxies a batch (limit 10) of Capacity allowed calls | Provider | Capacity | [`CapacityWithdrawn`](https://rustadot.github.io/recurrency/pallet_capacity/pallet/enum.Event.html#variant.CapacityWithdrawn)* | 1 | \* Note: This is just the event noting the use of Capacity. Additional events for the call being proxied will still occur. -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_frequency_tx_payment/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_recurrency_tx_payment/pallet/struct.Pallet.html) for more details. ### RPCs @@ -50,6 +50,6 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | ------- | ----------------- | ---------------------------------------------------------------------------------------------------- | ------------ | -| Compute Capacity Fee | Calculates the expected Capacity cost of the supplied transaction | [`computeCapacityFeeDetails`](https://frequency-chain.github.io/frequency/pallet_frequency_tx_payment_rpc/trait.CapacityPaymentApiServer.html#tymethod.compute_capacity_fee_details) | v1.8.0+ | +| Compute Capacity Fee | Calculates the expected Capacity cost of the supplied transaction | [`computeCapacityFeeDetails`](https://rustadot.github.io/recurrency/pallet_recurrency_tx_payment_rpc/trait.CapacityPaymentApiServer.html#tymethod.compute_capacity_fee_details) | v1.8.0+ | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_frequency_tx_payment_rpc/trait.CapacityPaymentApiServer.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_recurrency_tx_payment_rpc/trait.CapacityPaymentApiServer.html) for more details. diff --git a/pallets/frequency-tx-payment/src/lib.rs b/pallets/frequency-tx-payment/src/lib.rs index 0f80227..4448dd8 100644 --- a/pallets/frequency-tx-payment/src/lib.rs +++ b/pallets/frequency-tx-payment/src/lib.rs @@ -3,8 +3,8 @@ //! ## Quick Links //! - [Configuration: `Config`](Config) //! - [Extrinsics: `Call`](Call) -//! - [Runtime API: `CapacityTransactionPaymentRuntimeApi`](../pallet_frequency_tx_payment_runtime_api/trait.CapacityTransactionPaymentRuntimeApi.html) -//! - [Custom RPC API: `CapacityPaymentApiServer`](../pallet_frequency_tx_payment_rpc/trait.CapacityPaymentApiServer.html) +//! - [Runtime API: `CapacityTransactionPaymentRuntimeApi`](../pallet_recurrency_tx_payment_runtime_api/trait.CapacityTransactionPaymentRuntimeApi.html) +//! - [Custom RPC API: `CapacityPaymentApiServer`](../pallet_recurrency_tx_payment_rpc/trait.CapacityPaymentApiServer.html) //! - [Event Enum: `Event`](Event) //! - [Error Enum: `Error`](Error) #![doc = include_str!("../README.md")] diff --git a/pallets/frequency-tx-payment/src/rpc/Cargo.toml b/pallets/frequency-tx-payment/src/rpc/Cargo.toml index 8081b78..4a84cd4 100644 --- a/pallets/frequency-tx-payment/src/rpc/Cargo.toml +++ b/pallets/frequency-tx-payment/src/rpc/Cargo.toml @@ -1,20 +1,20 @@ [package] -name = "pallet-frequency-tx-payment-rpc" +name = "pallet-recurrency-tx-payment-rpc" version = "0.0.0" description = "A package that adds RPC to payment pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] parity-scale-codec = { workspace = true } jsonrpsee = { workspace = true, features = ["client-core", "server", "macros"] } rayon = { workspace = true } -# Frequency crates -pallet-frequency-tx-payment-runtime-api = { default-features = false, path = "../runtime-api" } +# Recurrency crates +pallet-recurrency-tx-payment-runtime-api = { default-features = false, path = "../runtime-api" } common-primitives = { default-features = false, path = "../../../../common/primitives" } common-helpers = { default-features = false, path = "../../../../common/helpers" } # Substrate crates @@ -37,7 +37,7 @@ std = [ "parity-scale-codec/std", "sp-api/std", "sp-runtime/std", - "pallet-frequency-tx-payment-runtime-api/std", + "pallet-recurrency-tx-payment-runtime-api/std", "common-primitives/std", "common-helpers/std", ] diff --git a/pallets/frequency-tx-payment/src/rpc/src/lib.rs b/pallets/frequency-tx-payment/src/rpc/src/lib.rs index f6d1ead..9d23be4 100644 --- a/pallets/frequency-tx-payment/src/rpc/src/lib.rs +++ b/pallets/frequency-tx-payment/src/rpc/src/lib.rs @@ -24,7 +24,7 @@ use jsonrpsee::{ proc_macros::rpc, types::{error::ErrorCode, ErrorObject}, }; -use pallet_frequency_tx_payment_runtime_api::{FeeDetails, InclusionFee}; +use pallet_recurrency_tx_payment_runtime_api::{FeeDetails, InclusionFee}; use parity_scale_codec::{Codec, Decode}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; @@ -32,7 +32,7 @@ use sp_core::Bytes; use sp_rpc::number::NumberOrHex; use sp_runtime::traits::{Block as BlockT, MaybeDisplay}; -pub use pallet_frequency_tx_payment_runtime_api::CapacityTransactionPaymentRuntimeApi; +pub use pallet_recurrency_tx_payment_runtime_api::CapacityTransactionPaymentRuntimeApi; #[cfg(test)] mod tests; @@ -41,7 +41,7 @@ mod tests; #[rpc(client, server)] pub trait CapacityPaymentApi { /// Query the capcity fee details for a given extrinsic. - #[method(name = "frequencyTxPayment_computeCapacityFeeDetails")] + #[method(name = "recurrencyTxPayment_computeCapacityFeeDetails")] fn compute_capacity_fee_details( &self, encoded_xt: Bytes, diff --git a/pallets/frequency-tx-payment/src/rpc/src/tests/mod.rs b/pallets/frequency-tx-payment/src/rpc/src/tests/mod.rs index 16eac50..56533b8 100644 --- a/pallets/frequency-tx-payment/src/rpc/src/tests/mod.rs +++ b/pallets/frequency-tx-payment/src/rpc/src/tests/mod.rs @@ -2,7 +2,7 @@ mod rpc_mock; use super::*; use common_primitives::node::{Balance, Block}; -use pallet_frequency_tx_payment_runtime_api::CapacityTransactionPaymentRuntimeApi; +use pallet_recurrency_tx_payment_runtime_api::CapacityTransactionPaymentRuntimeApi; use rpc_mock::*; use sp_runtime::{traits::Zero, OpaqueExtrinsic}; use std::sync::Arc; diff --git a/pallets/frequency-tx-payment/src/runtime-api/Cargo.toml b/pallets/frequency-tx-payment/src/runtime-api/Cargo.toml index 37cbd14..df592cb 100644 --- a/pallets/frequency-tx-payment/src/runtime-api/Cargo.toml +++ b/pallets/frequency-tx-payment/src/runtime-api/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "pallet-frequency-tx-payment-runtime-api" +name = "pallet-recurrency-tx-payment-runtime-api" version = "0.0.0" description = "A package that adds Runtime Api for payment pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] @@ -15,7 +15,7 @@ parity-scale-codec = { workspace = true, features = ["derive"] } sp-api = { workspace = true } sp-std = { workspace = true } frame-support = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../../../common/primitives" } pallet-transaction-payment = { workspace = true } diff --git a/pallets/frequency-tx-payment/src/runtime-api/src/lib.rs b/pallets/frequency-tx-payment/src/runtime-api/src/lib.rs index c287e10..5340dd7 100644 --- a/pallets/frequency-tx-payment/src/runtime-api/src/lib.rs +++ b/pallets/frequency-tx-payment/src/runtime-api/src/lib.rs @@ -25,7 +25,7 @@ pub use pallet_transaction_payment::{FeeDetails, InclusionFee}; // Here we declare the runtime API. It is implemented in the `impl` block in // runtime files (the `runtime` folder) sp_api::decl_runtime_apis! { - /// Runtime Version for Frequency Payment + /// Runtime Version for Recurrency Payment #[api_version(1)] pub trait CapacityTransactionPaymentRuntimeApi where Balance: Codec + MaybeDisplay, diff --git a/pallets/frequency-tx-payment/src/tests/mock.rs b/pallets/frequency-tx-payment/src/tests/mock.rs index 3e2bcab..261db0f 100644 --- a/pallets/frequency-tx-payment/src/tests/mock.rs +++ b/pallets/frequency-tx-payment/src/tests/mock.rs @@ -1,4 +1,4 @@ -use crate as pallet_frequency_tx_payment; +use crate as pallet_recurrency_tx_payment; use crate::*; use common_primitives::{ @@ -40,7 +40,7 @@ frame_support::construct_runtime!( Msa: pallet_msa::{Pallet, Call, Storage, Event}, Capacity: pallet_capacity::{Pallet, Call, Storage, Event, FreezeReason}, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, - FrequencyTxPayment: pallet_frequency_tx_payment::{Pallet, Call, Event}, + RecurrencyTxPayment: pallet_recurrency_tx_payment::{Pallet, Call, Event}, Utility: pallet_utility::{Pallet, Call, Storage, Event}, } ); diff --git a/pallets/frequency-tx-payment/src/tests/pallet_tests.rs b/pallets/frequency-tx-payment/src/tests/pallet_tests.rs index cc57509..a440539 100644 --- a/pallets/frequency-tx-payment/src/tests/pallet_tests.rs +++ b/pallets/frequency-tx-payment/src/tests/pallet_tests.rs @@ -1,5 +1,5 @@ use crate::{ - self as pallet_frequency_tx_payment, tests::mock::*, ChargeFrqTransactionPayment, DispatchInfo, + self as pallet_recurrency_tx_payment, tests::mock::*, ChargeFrqTransactionPayment, DispatchInfo, *, }; use frame_support::{assert_noop, assert_ok, dispatch::DispatchErrorWithPostInfo, weights::Weight}; @@ -10,7 +10,7 @@ use sp_runtime::{testing::TestXt, transaction_validity::TransactionValidityError use pallet_balances::Call as BalancesCall; use pallet_capacity::CapacityLedger; -use pallet_frequency_tx_payment::Call as FrequencyTxPaymentCall; +use pallet_recurrency_tx_payment::Call as RecurrencyTxPaymentCall; use pallet_msa::Call as MsaCall; #[test] @@ -168,7 +168,7 @@ fn transaction_payment_with_capacity_and_no_overcharge_post_dispatch_refund_is_s .execute_with(|| { let account_id = 1u64; let balances_call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity { + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity { call: Box::new(RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100, @@ -221,7 +221,7 @@ fn pay_with_capacity_happy_path() { let key_without_msa = 20u64; let create_msa_call = Box::new(RuntimeCall::Msa(MsaCall::::create {})); - assert_ok!(FrequencyTxPayment::pay_with_capacity( + assert_ok!(RecurrencyTxPayment::pay_with_capacity( RuntimeOrigin::signed(key_without_msa), create_msa_call )); @@ -241,7 +241,7 @@ fn pay_with_capacity_errors_with_call_error() { let create_msa_call = Box::new(RuntimeCall::Msa(MsaCall::::create {})); assert_noop!( - FrequencyTxPayment::pay_with_capacity( + RecurrencyTxPayment::pay_with_capacity( RuntimeOrigin::signed(existing_key_with_msa), create_msa_call ), @@ -255,8 +255,8 @@ fn pay_with_capacity_returns_weight_of_child_call() { let create_msa_call = Box::new(RuntimeCall::Msa(MsaCall::::create {})); let create_msa_dispatch_info = create_msa_call.get_dispatch_info(); - let pay_with_capacity_call = Box::new(RuntimeCall::FrequencyTxPayment( - FrequencyTxPaymentCall::::pay_with_capacity { call: create_msa_call }, + let pay_with_capacity_call = Box::new(RuntimeCall::RecurrencyTxPayment( + RecurrencyTxPaymentCall::::pay_with_capacity { call: create_msa_call }, )); let pay_with_capacity_dispatch_info = pay_with_capacity_call.get_dispatch_info(); @@ -279,7 +279,7 @@ fn charge_frq_transaction_payment_withdraw_fee_for_capacity_batch_tx_returns_tup let charge_tx_payment = ChargeFrqTransactionPayment::::from(0u64); let who = 1u64; let call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity_batch_all { + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity_batch_all { calls: vec![RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100, @@ -314,7 +314,7 @@ fn charge_frq_transaction_payment_withdraw_fee_for_capacity_tx_returns_tupple_wi let charge_tx_payment = ChargeFrqTransactionPayment::::from(0u64); let who = 1u64; let call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity { + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity { call: Box::new(RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100, @@ -351,7 +351,7 @@ fn charge_frq_transaction_payment_withdraw_fee_errors_for_capacity_tx_when_user_ let charge_tx_payment = ChargeFrqTransactionPayment::::from(0u64); let who = 1u64; let call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity { + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity { call: Box::new(RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100, @@ -463,7 +463,7 @@ fn charge_frq_transaction_payment_tip_is_zero_for_capacity_calls() { let fake_tip = 100; let charge_tx_payment = ChargeFrqTransactionPayment::::from(fake_tip); let call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity { + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity { call: Box::new(RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100, @@ -497,7 +497,7 @@ pub fn assert_withdraw_fee_result( let dispatch_info = DispatchInfo { weight: Weight::from_parts(5, 0), ..Default::default() }; let call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity { call: Box::new(call.clone()) }); + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity { call: Box::new(call.clone()) }); let withdraw_fee = ChargeFrqTransactionPayment::::from(0u64).withdraw_fee( &account_id, @@ -698,7 +698,7 @@ fn compute_capacity_fee_successful() { &RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100 }); // fee = base_weight + extrinsic weight + len = CAPACITY_EXTRINSIC_BASE_WEIGHT + 11 + 10 = CAPACITY_EXTRINSIC_BASE_WEIGHT + 21 - let fee = FrequencyTxPayment::compute_capacity_fee( + let fee = RecurrencyTxPayment::compute_capacity_fee( 10u32, ::CapacityCalls::get_stable_weight(call).unwrap(), ); @@ -725,7 +725,7 @@ fn pay_with_capacity_batch_all_happy_path() { let token_balance_before_call = Balances::free_balance(origin); - assert_ok!(FrequencyTxPayment::pay_with_capacity_batch_all( + assert_ok!(RecurrencyTxPayment::pay_with_capacity_batch_all( RuntimeOrigin::signed(origin), calls )); @@ -762,7 +762,7 @@ fn pay_with_capacity_batch_all_errors_when_transaction_amount_exceeds_maximum() RuntimeCall::Balances(BalancesCall::transfer_allow_death { dest: 2, value: 100 }), ]; assert_noop!( - FrequencyTxPayment::pay_with_capacity_batch_all( + RecurrencyTxPayment::pay_with_capacity_batch_all( RuntimeOrigin::signed(origin), too_many_calls ), @@ -799,7 +799,7 @@ fn pay_with_capacity_batch_all_transactions_will_all_fail_if_one_fails() { let calls_to_batch = vec![successful_balance_transfer_call, balance_transfer_call_insufficient_funds]; - let result = FrequencyTxPayment::pay_with_capacity_batch_all( + let result = RecurrencyTxPayment::pay_with_capacity_batch_all( RuntimeOrigin::signed(origin), calls_to_batch, ); @@ -837,7 +837,7 @@ fn compute_capacity_fee_returns_zero_when_call_is_not_capacity_eligible() { .build() .execute_with(|| { let fee = - FrequencyTxPayment::compute_capacity_fee_details(call, &dispatch_info.weight, len); + RecurrencyTxPayment::compute_capacity_fee_details(call, &dispatch_info.weight, len); assert!(fee.inclusion_fee.is_some()); assert!(fee.tip == 0); }); @@ -847,7 +847,7 @@ fn compute_capacity_fee_returns_zero_when_call_is_not_capacity_eligible() { fn compute_capacity_fee_returns_fee_when_call_is_capacity_eligible() { let balance_factor = 10; let call: &::RuntimeCall = - &RuntimeCall::FrequencyTxPayment(Call::pay_with_capacity { + &RuntimeCall::RecurrencyTxPayment(Call::pay_with_capacity { call: Box::new(RuntimeCall::Msa(MsaCall::::create {})), }); let origin = 111111; @@ -864,7 +864,7 @@ fn compute_capacity_fee_returns_fee_when_call_is_capacity_eligible() { .build() .execute_with(|| { let fee_res = - FrequencyTxPayment::compute_capacity_fee_details(call, &dispatch_info.weight, len); + RecurrencyTxPayment::compute_capacity_fee_details(call, &dispatch_info.weight, len); assert!(fee_res.inclusion_fee.is_some()); }); } diff --git a/pallets/frequency-tx-payment/src/weights.rs b/pallets/frequency-tx-payment/src/weights.rs index c444f37..ea38ff5 100644 --- a/pallets/frequency-tx-payment/src/weights.rs +++ b/pallets/frequency-tx-payment/src/weights.rs @@ -1,25 +1,25 @@ -//! Autogenerated weights for `pallet_frequency_tx_payment` +//! Autogenerated weights for `pallet_recurrency_tx_payment` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet -// --pallet=pallet_frequency-tx-payment +// --pallet=pallet_recurrency-tx-payment // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 // --repeat=10 -// --output=./scripts/../pallets/frequency-tx-payment/src/weights.rs +// --output=./scripts/../pallets/recurrency-tx-payment/src/weights.rs // --template=./scripts/../.maintain/frame-weight-template.hbs // --additional-trie-layers=3 @@ -31,13 +31,13 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; -/// Weight functions needed for `pallet_frequency_tx_payment`. +/// Weight functions needed for `pallet_recurrency_tx_payment`. pub trait WeightInfo { fn pay_with_capacity() -> Weight; fn pay_with_capacity_batch_all(n: u32, ) -> Weight; } -/// Weights for `pallet_frequency_tx_payment` using the Substrate node and recommended hardware. +/// Weights for `pallet_recurrency_tx_payment` using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn pay_with_capacity() -> Weight { diff --git a/pallets/handles/Cargo.toml b/pallets/handles/Cargo.toml index dbc72a4..83bf8ec 100644 --- a/pallets/handles/Cargo.toml +++ b/pallets/handles/Cargo.toml @@ -1,13 +1,13 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Handles Pallet" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "pallet-handles" version = "0.0.0" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -25,7 +25,7 @@ sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } handles-utils = { default-features = false, path = "src/handles-utils" } [dev-dependencies] diff --git a/pallets/handles/README.md b/pallets/handles/README.md index 5ac387e..ae6622a 100644 --- a/pallets/handles/README.md +++ b/pallets/handles/README.md @@ -43,11 +43,11 @@ The Handles pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | -------------------------------- | ------------- | ------- | ------------------------------------------------------------------------------------------------------------- | ------------- | -| `claim_handle`
Claim a handle with the given | Provider or MSA Owner | Capacity or Tokens | [`HandleClaimed`](https://frequency-chain.github.io/frequency/pallet_handles/pallet/enum.Event.html#variant.HandleClaimed) | 27 | -| `retire_handle`
Retire a handle. Retired handles + suffix are never reused. | MSA Owner | Free | [`HandleRetired`](https://frequency-chain.github.io/frequency/pallet_handles/pallet/enum.Event.html#variant.HandleRetired) | 27 | -| `change_handle`
Convenience method to retire and then claim a new handle | Provider or MSA Owner | Capacity or Tokens | [`HandleRetired`](https://frequency-chain.github.io/frequency/pallet_handles/pallet/enum.Event.html#variant.HandleRetired), [`HandleClaimed`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.HandleClaimed) | 47 | +| `claim_handle`
Claim a handle with the given | Provider or MSA Owner | Capacity or Tokens | [`HandleClaimed`](https://rustadot.github.io/recurrency/pallet_handles/pallet/enum.Event.html#variant.HandleClaimed) | 27 | +| `retire_handle`
Retire a handle. Retired handles + suffix are never reused. | MSA Owner | Free | [`HandleRetired`](https://rustadot.github.io/recurrency/pallet_handles/pallet/enum.Event.html#variant.HandleRetired) | 27 | +| `change_handle`
Convenience method to retire and then claim a new handle | Provider or MSA Owner | Capacity or Tokens | [`HandleRetired`](https://rustadot.github.io/recurrency/pallet_handles/pallet/enum.Event.html#variant.HandleRetired), [`HandleClaimed`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.HandleClaimed) | 47 | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_handles/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_handles/pallet/struct.Pallet.html) for more details. ### State Queries @@ -58,7 +58,7 @@ Note: RPC use is suggested over the direct state queries for handles. | Get Handle by MSA Id | Returns the Display Handle and the block number in which it was claimed | `msaIdToDisplayName` | 29 | | Get MSA Id by Canonical Base and Suffix | Uses the stored canonical lookup string NOT the display handle with the suffix to retrieve the MSA Id | `canonicalBaseHandleAndSuffixToMSAId` | 29 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_handles/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/pallet_handles/pallet/storage_types/index.html) for additional state queries and details. ### RPCs @@ -66,9 +66,9 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | ------- | ----------------- | ---------------------------------------------------------------------------------------------------- | ------------ | -| Get Handle by MSA Id | Returns the base handle and suffix as well as the canonical version of the handle | [`getHandleforMSA`](https://frequency-chain.github.io/frequency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.get_handle_for_msa) | v1.6.0+ | -| Get MSA Id by Display Handle | Returns the MSA Id for a given Display Handle | [`getMsaForHandle`](https://frequency-chain.github.io/frequency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.get_handle_for_msa) | v1.6.0+ | -| Validate Handle String | Checks to see if the handle string validates | [`validateHandle`](https://frequency-chain.github.io/frequency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.validate_handle) | v1.8.0+ | -| Get Next Suffixes | Given a Base Handle and count, returns the next suffixes that will be used for claimed handles | [`getNextSuffixes`](https://frequency-chain.github.io/frequency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.get_next_suffixes) | v1.8.0+ | +| Get Handle by MSA Id | Returns the base handle and suffix as well as the canonical version of the handle | [`getHandleforMSA`](https://rustadot.github.io/recurrency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.get_handle_for_msa) | v1.6.0+ | +| Get MSA Id by Display Handle | Returns the MSA Id for a given Display Handle | [`getMsaForHandle`](https://rustadot.github.io/recurrency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.get_handle_for_msa) | v1.6.0+ | +| Validate Handle String | Checks to see if the handle string validates | [`validateHandle`](https://rustadot.github.io/recurrency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.validate_handle) | v1.8.0+ | +| Get Next Suffixes | Given a Base Handle and count, returns the next suffixes that will be used for claimed handles | [`getNextSuffixes`](https://rustadot.github.io/recurrency/pallet_handles_rpc/trait.HandlesApiServer.html#tymethod.get_next_suffixes) | v1.8.0+ | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_handles_rpc/trait.HandlesApiServer.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_handles_rpc/trait.HandlesApiServer.html) for more details. diff --git a/pallets/handles/src/handles-utils/Cargo.toml b/pallets/handles/src/handles-utils/Cargo.toml index 434779d..beddfd0 100644 --- a/pallets/handles/src/handles-utils/Cargo.toml +++ b/pallets/handles/src/handles-utils/Cargo.toml @@ -1,14 +1,14 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Handles Utilities" edition = "2021" build = "build.rs" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "handles-utils" version = "0.0.0" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" [dependencies] phf = { workspace = true, features = ["macros"] } diff --git a/pallets/handles/src/rpc/Cargo.toml b/pallets/handles/src/rpc/Cargo.toml index 998cca4..ff487dd 100644 --- a/pallets/handles/src/rpc/Cargo.toml +++ b/pallets/handles/src/rpc/Cargo.toml @@ -2,17 +2,17 @@ name = "pallet-handles-rpc" version = "0.0.0" description = "A package that adds RPC to Handles pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] jsonrpsee = { workspace = true, features = ["client-core", "server", "macros"] } rayon = { workspace = true } -# Frequency crates +# Recurrency crates pallet-handles-runtime-api = { default-features = false, path = "../runtime-api" } common-primitives = { default-features = false, path = "../../../../common/primitives" } common-helpers = { default-features = false, path = "../../../../common/helpers" } diff --git a/pallets/handles/src/rpc/src/lib.rs b/pallets/handles/src/rpc/src/lib.rs index 8bc7087..430b89b 100644 --- a/pallets/handles/src/rpc/src/lib.rs +++ b/pallets/handles/src/rpc/src/lib.rs @@ -30,7 +30,7 @@ use std::sync::Arc; #[cfg(test)] mod tests; -/// Frequency Handles Custom RPC API +/// Recurrency Handles Custom RPC API #[rpc(client, server)] pub trait HandlesApi { /// retrieve `HandleResponse` for a given `MessageSourceId` @@ -54,7 +54,7 @@ pub trait HandlesApi { fn validate_handle(&self, base_handle: String) -> RpcResult; } -/// The client handler for the API used by Frequency Service RPC with `jsonrpsee` +/// The client handler for the API used by Recurrency Service RPC with `jsonrpsee` pub struct HandlesHandler { client: Arc, _marker: std::marker::PhantomData, diff --git a/pallets/handles/src/runtime-api/Cargo.toml b/pallets/handles/src/runtime-api/Cargo.toml index a305938..69cf1a7 100644 --- a/pallets/handles/src/runtime-api/Cargo.toml +++ b/pallets/handles/src/runtime-api/Cargo.toml @@ -2,18 +2,18 @@ name = "pallet-handles-runtime-api" version = "0.0.0" description = "A package that adds Runtime Api for the Handles pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] # Substrate sp-std = { workspace = true } sp-api = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../../../common/primitives" } [features] diff --git a/pallets/handles/src/weights.rs b/pallets/handles/src/weights.rs index 43f5c4a..0be3ef9 100644 --- a/pallets/handles/src/weights.rs +++ b/pallets/handles/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_handles // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/pallets/messages/Cargo.toml b/pallets/messages/Cargo.toml index 8897225..ee36a22 100644 --- a/pallets/messages/Cargo.toml +++ b/pallets/messages/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Message Storage Pallet" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "pallet-messages" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] @@ -24,7 +24,7 @@ sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } cid = { version = "0.11", default-features = false } multibase = { version = "0.9", default-features = false } diff --git a/pallets/messages/README.md b/pallets/messages/README.md index 46c490b..0e89b3d 100644 --- a/pallets/messages/README.md +++ b/pallets/messages/README.md @@ -38,12 +38,12 @@ The Messages pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | ---------------------------------------------------------------------------------------- | -------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| `add_ipfs_message`
Add a message to a Schema with an `IPFS` payload location | Provider | Capacity or Tokens | [`MessagesInBlock`](https://frequency-chain.github.io/frequency/pallet_messages/pallet/enum.Event.html#variant.MessagesInBlock)\* | 1 | -| `add_onchain_message`
Add a message to a Schema with an `ON_CHAIN` payload location | Provider | Capacity or Tokens | [`MessagesInBlock`](https://frequency-chain.github.io/frequency/pallet_messages/pallet/enum.Event.html#variant.MessagesInBlock)\* | 1 | +| `add_ipfs_message`
Add a message to a Schema with an `IPFS` payload location | Provider | Capacity or Tokens | [`MessagesInBlock`](https://rustadot.github.io/recurrency/pallet_messages/pallet/enum.Event.html#variant.MessagesInBlock)\* | 1 | +| `add_onchain_message`
Add a message to a Schema with an `ON_CHAIN` payload location | Provider | Capacity or Tokens | [`MessagesInBlock`](https://rustadot.github.io/recurrency/pallet_messages/pallet/enum.Event.html#variant.MessagesInBlock)\* | 1 | \* The `MessagesInBlock` may not occur more than once per block and does _not_ indicate which schema received messages. -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_messages/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_messages/pallet/struct.Pallet.html) for more details. ### State Queries @@ -52,7 +52,7 @@ See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_messages/pall | Get Messages v2 | _Suggested_: Use RPC instead of this storage directly. Storage for the messages by Block number, Schema Id, and Message Index | `messagesV2` | 61 | | Get Messages v1 | Removed in Runtime 60 | `messages` | 1-60 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_messages/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/pallet_messages/pallet/storage_types/index.html) for additional state queries and details. ### RPCs @@ -60,6 +60,6 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | ------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| Get Messages by Schema Id | Fetch paginated messages for a specific Schema Id in the given block range for a given Schema Id | [`getBySchemaId`](https://frequency-chain.github.io/frequency/pallet_messages_rpc/trait.MessagesApiServer.html#tymethod.get_messages_by_schema_id) | v1.0.0+ | +| Get Messages by Schema Id | Fetch paginated messages for a specific Schema Id in the given block range for a given Schema Id | [`getBySchemaId`](https://rustadot.github.io/recurrency/pallet_messages_rpc/trait.MessagesApiServer.html#tymethod.get_messages_by_schema_id) | v1.0.0+ | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_messages_rpc/trait.MessagesApiServer.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_messages_rpc/trait.MessagesApiServer.html) for more details. diff --git a/pallets/messages/src/rpc/Cargo.toml b/pallets/messages/src/rpc/Cargo.toml index ba774c6..3fb84fa 100644 --- a/pallets/messages/src/rpc/Cargo.toml +++ b/pallets/messages/src/rpc/Cargo.toml @@ -2,16 +2,16 @@ name = "pallet-messages-rpc" version = "0.0.0" description = "A package that adds RPC to Messages pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] jsonrpsee = { workspace = true, features = ["client-core", "server", "macros"] } -# Frequency crates +# Recurrency crates pallet-messages-runtime-api = { default-features = false, path = "../runtime-api" } common-primitives = { default-features = false, path = "../../../../common/primitives" } common-helpers = { default-features = false, path = "../../../../common/helpers" } diff --git a/pallets/messages/src/rpc/src/lib.rs b/pallets/messages/src/rpc/src/lib.rs index fac23c9..eb19776 100644 --- a/pallets/messages/src/rpc/src/lib.rs +++ b/pallets/messages/src/rpc/src/lib.rs @@ -26,7 +26,7 @@ use std::sync::Arc; #[cfg(test)] mod tests; -/// Frequency Messages Custom RPC API +/// Recurrency Messages Custom RPC API #[rpc(client, server)] pub trait MessagesApi { /// Retrieve paginated messages by schema id @@ -38,7 +38,7 @@ pub trait MessagesApi { ) -> RpcResult>; } -/// The client handler for the API used by Frequency Service RPC with `jsonrpsee` +/// The client handler for the API used by Recurrency Service RPC with `jsonrpsee` pub struct MessagesHandler { client: Arc, _marker: std::marker::PhantomData, diff --git a/pallets/messages/src/runtime-api/Cargo.toml b/pallets/messages/src/runtime-api/Cargo.toml index fdcd4aa..5278f05 100644 --- a/pallets/messages/src/runtime-api/Cargo.toml +++ b/pallets/messages/src/runtime-api/Cargo.toml @@ -2,11 +2,11 @@ name = "pallet-messages-runtime-api" version = "0.0.0" description = "A package that adds Runtime Api for Messages pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] @@ -14,7 +14,7 @@ edition = "2021" sp-api= { workspace = true } sp-std= { workspace = true } frame-support = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../../../common/primitives" } [features] diff --git a/pallets/messages/src/weights.rs b/pallets/messages/src/weights.rs index 3a6e29a..6d6bc32 100644 --- a/pallets/messages/src/weights.rs +++ b/pallets/messages/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_messages // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/pallets/msa/Cargo.toml b/pallets/msa/Cargo.toml index d4c69c7..45227d5 100644 --- a/pallets/msa/Cargo.toml +++ b/pallets/msa/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Pallet for creating MSA" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "pallet-msa" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] @@ -25,7 +25,7 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } sp-weights = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["alloc"] } diff --git a/pallets/msa/README.md b/pallets/msa/README.md index ca78f55..8b2ed34 100644 --- a/pallets/msa/README.md +++ b/pallets/msa/README.md @@ -4,8 +4,8 @@ The MSA Pallet provides functionality for handling Message Source Accounts. ## Summary -The Message Source Account (MSA) is the primary user account system on Frequency for Messages and Stateful Storage. -All users on Frequency must have an MSA in order to: +The Message Source Account (MSA) is the primary user account system on Recurrency for Messages and Stateful Storage. +All users on Recurrency must have an MSA in order to: 1. Acquire a User Handle 2. Delegate tasks to Providers (defining specific tasks for specific providers) @@ -31,19 +31,19 @@ The MSA pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | --------------------------------------------------------------------------------------------- | ------------------------------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | -| `add_public_key_to_msa`
Add MSA control key | MSA Control Key or Provider with Signature | Capacity or Tokens | [`PublicKeyAdded`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.PublicKeyAdded) | 1 | -| `create`
Create new MSA | Token Account | Tokens | [`MsaCreated`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.MsaCreated) | 1 | -| `create_provider`
Convert an MSA into a Provider | Testnet: Provider or Mainnet: Governance | Tokens | [`ProviderCreated`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.ProviderCreated) | 1 | -| `create_provider_via_governance`
Convert an MSA into a Provider | Frequency Council | Tokens | [`ProviderCreated`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.ProviderCreated) | 12 | -| `create_sponsored_account_with_delegation`
Create new MSA via Provider with a Delegation | Provider | Capacity or Tokens | [`MsaCreated`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.MsaCreated), [`DelegationGranted`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.DelegationGranted) | 1 | -| `delete_msa_public_key`
Remove MSA control key | Delegator | Free | [`PublicKeyDeleted`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.PublicKeyDeleted) | 1 | -| `grant_delegation`
Create or alter a delegation | Provider with Signature | Capacity | [`DelegationGranted`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.DelegationGranted) | 1 | +| `add_public_key_to_msa`
Add MSA control key | MSA Control Key or Provider with Signature | Capacity or Tokens | [`PublicKeyAdded`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.PublicKeyAdded) | 1 | +| `create`
Create new MSA | Token Account | Tokens | [`MsaCreated`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.MsaCreated) | 1 | +| `create_provider`
Convert an MSA into a Provider | Testnet: Provider or Mainnet: Governance | Tokens | [`ProviderCreated`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.ProviderCreated) | 1 | +| `create_provider_via_governance`
Convert an MSA into a Provider | Recurrency Council | Tokens | [`ProviderCreated`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.ProviderCreated) | 12 | +| `create_sponsored_account_with_delegation`
Create new MSA via Provider with a Delegation | Provider | Capacity or Tokens | [`MsaCreated`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.MsaCreated), [`DelegationGranted`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.DelegationGranted) | 1 | +| `delete_msa_public_key`
Remove MSA control key | Delegator | Free | [`PublicKeyDeleted`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.PublicKeyDeleted) | 1 | +| `grant_delegation`
Create or alter a delegation | Provider with Signature | Capacity | [`DelegationGranted`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.DelegationGranted) | 1 | | `propose_to_be_provider`
Request the council to convert an MSA to a Provider | Token Account | Tokens | [`Proposed`](https://paritytech.github.io/polkadot-sdk/master/pallet_collective/pallet/enum.Event.html#variant.Proposed) | 12 | -| `retire_msa`
Remove all keys and mark the MSA as retired | Delegator | Free | [`PublicKeyDeleted`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.PublicKeyDeleted), [`MsaRetired`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.MsaRetired) | 18 | -| `revoke_delegation_by_delegator`
Remove delegation | Delegator | Free | [`DelegationRevoked`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.DelegationRevoked) | 1 | -| `revoke_delegation_by_provider`
Remove delegation | Provider | Free | [`DelegationRevoked`](https://frequency-chain.github.io/frequency/pallet_msa/pallet/enum.Event.html#variant.DelegationRevoked) | 1 | +| `retire_msa`
Remove all keys and mark the MSA as retired | Delegator | Free | [`PublicKeyDeleted`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.PublicKeyDeleted), [`MsaRetired`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.MsaRetired) | 18 | +| `revoke_delegation_by_delegator`
Remove delegation | Delegator | Free | [`DelegationRevoked`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.DelegationRevoked) | 1 | +| `revoke_delegation_by_provider`
Remove delegation | Provider | Free | [`DelegationRevoked`](https://rustadot.github.io/recurrency/pallet_msa/pallet/enum.Event.html#variant.DelegationRevoked) | 1 | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_msa/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_msa/pallet/struct.Pallet.html) for more details. ### State Queries @@ -54,7 +54,7 @@ See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_msa/pallet/st | Get Current Delegator to Provider | Returns the current relationship between the specified Delegator and specified Provider at the given block number | `delegatorAndProviderToDelegation` | 1 | | Get Public Key Count for MSA Id | Returns the number of public keys for the given MSA Id | `publicKeyCountforMsaId` | 1 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_msa/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/pallet_msa/pallet/storage_types/index.html) for additional state queries and details. ### RPCs @@ -62,11 +62,11 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | ----------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| Check Delegations | Test a list of MSAs to see if they have delegated to the provider MSA | [`checkDelegations`](https://frequency-chain.github.io/frequency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.check_delegations ) | v1.0.0+ | -| Delegation Schema Grants | Fetch the list of Schema Ids that a delegator has granted to a provider | [`grantedSchemaIdsByMsaId`](https://frequency-chain.github.io/frequency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.get_granted_schemas_by_msa_id) | v1.0.0+ | -| Get Control Keys by MSA Id\* | Fetch the list of current control keys for an MSA from the off-chain index | [`getKeysByMsaId`](https://frequency-chain.github.io/frequency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.get_keys_by_msa_id) | v1.10.0+ | -| Get All Delegations by MSA Id | Retreives all delegations and schemas, active and inactive, for an MSA ID | ['getAllGrantedDelegationsByMsaId'](https://frequency-chain.github.io/frequency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.get_all_granted_delegations_by_msa_id) | v1.13.0+ | +| Check Delegations | Test a list of MSAs to see if they have delegated to the provider MSA | [`checkDelegations`](https://rustadot.github.io/recurrency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.check_delegations ) | v1.0.0+ | +| Delegation Schema Grants | Fetch the list of Schema Ids that a delegator has granted to a provider | [`grantedSchemaIdsByMsaId`](https://rustadot.github.io/recurrency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.get_granted_schemas_by_msa_id) | v1.0.0+ | +| Get Control Keys by MSA Id\* | Fetch the list of current control keys for an MSA from the off-chain index | [`getKeysByMsaId`](https://rustadot.github.io/recurrency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.get_keys_by_msa_id) | v1.10.0+ | +| Get All Delegations by MSA Id | Retreives all delegations and schemas, active and inactive, for an MSA ID | ['getAllGrantedDelegationsByMsaId'](https://rustadot.github.io/recurrency/pallet_msa_rpc/trait.MsaApiServer.html#tymethod.get_all_granted_delegations_by_msa_id) | v1.13.0+ | \* Must be enabled with off-chain indexing -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_msa_rpc/trait.MsaApiServer.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_msa_rpc/trait.MsaApiServer.html) for more details. diff --git a/pallets/msa/src/lib.rs b/pallets/msa/src/lib.rs index a339075..2a65046 100644 --- a/pallets/msa/src/lib.rs +++ b/pallets/msa/src/lib.rs @@ -803,7 +803,7 @@ pub mod pallet { /// Retires a MSA /// - /// When a user wants to disassociate themselves from Frequency, they can retire their MSA for free provided that: + /// When a user wants to disassociate themselves from Recurrency, they can retire their MSA for free provided that: /// (1) They own the MSA /// (2) The MSA is not a registered provider. /// (3) They retire their user handle (if they have one) diff --git a/pallets/msa/src/offchain_storage.rs b/pallets/msa/src/offchain_storage.rs index b6bd886..fa6e565 100644 --- a/pallets/msa/src/offchain_storage.rs +++ b/pallets/msa/src/offchain_storage.rs @@ -24,10 +24,10 @@ use sp_runtime::{ use sp_std::{collections::btree_map::BTreeMap, fmt::Debug, vec, vec::Vec}; /// Block event storage prefix -const BLOCK_EVENT_KEY: &[u8] = b"frequency::block_event::msa::"; +const BLOCK_EVENT_KEY: &[u8] = b"recurrency::block_event::msa::"; /// Offchain index for MSA events count -const BLOCK_EVENT_COUNT_KEY: &[u8] = b"frequency::block_event::msa::count::"; +const BLOCK_EVENT_COUNT_KEY: &[u8] = b"recurrency::block_event::msa::count::"; /// Lock expiration timeout in in milli-seconds for initial data import msa pallet const MSA_INITIAL_LOCK_TIMEOUT_EXPIRATION_MS: u64 = 3000; diff --git a/pallets/msa/src/rpc/Cargo.toml b/pallets/msa/src/rpc/Cargo.toml index b712292..ba1648c 100644 --- a/pallets/msa/src/rpc/Cargo.toml +++ b/pallets/msa/src/rpc/Cargo.toml @@ -2,18 +2,18 @@ name = "pallet-msa-rpc" version = "0.0.0" description = "A package that adds RPC to Msa pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] parity-scale-codec = { workspace = true } jsonrpsee = { workspace = true, features = ["client-core", "server", "macros"] } rayon = { workspace = true } -# Frequency crates +# Recurrency crates pallet-msa-runtime-api = { default-features = false, path = "../runtime-api" } common-primitives = { default-features = false, path = "../../../../common/primitives" } common-helpers = { default-features = false, path = "../../../../common/helpers" } diff --git a/pallets/msa/src/rpc/src/lib.rs b/pallets/msa/src/rpc/src/lib.rs index 8b8305a..5656fba 100644 --- a/pallets/msa/src/rpc/src/lib.rs +++ b/pallets/msa/src/rpc/src/lib.rs @@ -36,7 +36,7 @@ use std::sync::Arc; #[cfg(test)] mod tests; -/// Frequency MSA Custom RPC API +/// Recurrency MSA Custom RPC API #[rpc(client, server)] pub trait MsaApi { /// Check for a list of delegations @@ -74,7 +74,7 @@ pub trait MsaApi { ) -> RpcResult>>; } -/// The client handler for the API used by Frequency Service RPC with `jsonrpsee` +/// The client handler for the API used by Recurrency Service RPC with `jsonrpsee` pub struct MsaHandler { client: Arc, offchain: Arc>>, diff --git a/pallets/msa/src/runtime-api/Cargo.toml b/pallets/msa/src/runtime-api/Cargo.toml index 6f1349d..69e0d1d 100644 --- a/pallets/msa/src/runtime-api/Cargo.toml +++ b/pallets/msa/src/runtime-api/Cargo.toml @@ -2,11 +2,11 @@ name = "pallet-msa-runtime-api" version = "0.0.0" description = "A package that adds Runtime Api for Msa pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] @@ -15,7 +15,7 @@ parity-scale-codec = { workspace = true, features = ["derive"] } sp-api = { workspace = true } sp-std = { workspace = true } frame-support = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../../../common/primitives" } [features] diff --git a/pallets/msa/src/tests/other_tests.rs b/pallets/msa/src/tests/other_tests.rs index e24c8a4..4f0772c 100644 --- a/pallets/msa/src/tests/other_tests.rs +++ b/pallets/msa/src/tests/other_tests.rs @@ -627,7 +627,7 @@ pub fn ensure_all_schema_ids_are_valid_success() { pub fn is_registered_provider_is_true() { new_test_ext().execute_with(|| { let provider = ProviderId(1); - let provider_name = Vec::from("frequency".as_bytes()).try_into().unwrap(); + let provider_name = Vec::from("recurrency".as_bytes()).try_into().unwrap(); let provider_meta = ProviderRegistryEntry { provider_name }; ProviderToRegistryEntry::::insert(provider, provider_meta); diff --git a/pallets/msa/src/weights.rs b/pallets/msa/src/weights.rs index b6b2b2a..5475b2a 100644 --- a/pallets/msa/src/weights.rs +++ b/pallets/msa/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_msa // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/pallets/passkey/Cargo.toml b/pallets/passkey/Cargo.toml index 0f74a98..d995490 100644 --- a/pallets/passkey/Cargo.toml +++ b/pallets/passkey/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "pallet-passkey" description = "Provides a way to execute transactions using passkey signatures." -authors = ["Frequency"] +authors = ["Recurrency"] edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" publish = false version = "0.0.0" @@ -26,7 +26,7 @@ base64-url = { workspace = true } serde_json = { workspace = true, features = ["alloc"] } pallet-transaction-payment = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } common-runtime = { path = "../../runtime/common", default-features = false } diff --git a/pallets/passkey/README.md b/pallets/passkey/README.md index f3a9307..84897ee 100644 --- a/pallets/passkey/README.md +++ b/pallets/passkey/README.md @@ -5,7 +5,7 @@ Provides a way to execute transactions using passkey signatures. ## Summary Passkeys are a secure alternative to passwords for authentication. Due to its ease of use for the -users and having a well established support in different platforms, Frequency chain supports passkey +users and having a well established support in different platforms, Recurrency chain supports passkey p256 signatures for select transactions. With this feature users would be able to execute a transactions by authenticating themselves with a Passkey P256 signature. @@ -29,8 +29,8 @@ checks within the ValidateUnsigned trait implementation to mitigate potential vu | Name/Description | Caller | Payment | Key Events | Runtime Added | |----------------------------------------|--------| ------------------ |-------------------------------------------------------------------------------------------------------------------------------------------|---------------| -| `proxy`
Proxies an extrinsic call | Anyone | Tokens | [`TransactionExecutionSuccess`](https://frequency-chain.github.io/frequency/pallet_passkey/module/enum.Event.html#variant.TransactionExecutionSuccess) | 92 | +| `proxy`
Proxies an extrinsic call | Anyone | Tokens | [`TransactionExecutionSuccess`](https://rustadot.github.io/recurrency/pallet_passkey/module/enum.Event.html#variant.TransactionExecutionSuccess) | 92 | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_passkey/module/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_passkey/module/struct.Pallet.html) for more details. diff --git a/pallets/passkey/src/weights.rs b/pallets/passkey/src/weights.rs index 0bd9b50..e4e3ad1 100644 --- a/pallets/passkey/src/weights.rs +++ b/pallets/passkey/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-07-15, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-4-155`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_passkey // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --additional-trie-layers=5 diff --git a/pallets/schemas/Cargo.toml b/pallets/schemas/Cargo.toml index 5276563..81d61fc 100644 --- a/pallets/schemas/Cargo.toml +++ b/pallets/schemas/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Schema operations" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "pallet-schemas" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] @@ -29,7 +29,7 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } sp-weights = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } [dev-dependencies] diff --git a/pallets/schemas/README.md b/pallets/schemas/README.md index a09b71b..86e8e4b 100644 --- a/pallets/schemas/README.md +++ b/pallets/schemas/README.md @@ -1,6 +1,6 @@ # Schemas Pallet -The Schemas Pallet provides universal schema registration for data flowing through Frequency. +The Schemas Pallet provides universal schema registration for data flowing through Recurrency. ## Summary @@ -22,28 +22,28 @@ For example, two schemas might both only have a hash for contents, but one is a #### Model Types -- [`Parquet`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.ModelType.html#variant.Parquet): Designed for lists and when a Provider is collecting items from many different MSAs and publishing them together. -- [`AvroBinary`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.ModelType.html#variant.AvroBinary): Useful for most generic data structures. +- [`Parquet`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.ModelType.html#variant.Parquet): Designed for lists and when a Provider is collecting items from many different MSAs and publishing them together. +- [`AvroBinary`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.ModelType.html#variant.AvroBinary): Useful for most generic data structures. #### Settings -- [`AppendOnly`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.SchemaSetting.html#variant.AppendOnly) +- [`AppendOnly`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.SchemaSetting.html#variant.AppendOnly) - Prior data is immutable and all new data is appended to existing data. - For Payload Locations: `Itemized` -- [`SignatureRequired`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.SchemaSetting.html#variant.SignatureRequired) +- [`SignatureRequired`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.SchemaSetting.html#variant.SignatureRequired) - An MSA control key signature is required instead of a delegation. - For Payload Locations: `Itemized` or `Paginated` #### Payload Locations -- [`OnChain`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.PayloadLocation.html#variant.OnChain): Data is stored directly in the Messages pallet data storage, usually as `AvroBinary`. -- [`IPFS`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.PayloadLocation.html#variant.IPFS): Data is stored in IPFS and Messages pallet stores the CID. -- [`Itemized`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.PayloadLocation.html#variant.Itemized): Data is stored in the Stateful Storage pallet as an array of individual items. -- [`Paginated`](https://frequency-chain.github.io/frequency/common_primitives/schema/enum.PayloadLocation.html#variant.Paginated): Data is stored in the Stateful Storage pallet as a list of paged blobs. +- [`OnChain`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.PayloadLocation.html#variant.OnChain): Data is stored directly in the Messages pallet data storage, usually as `AvroBinary`. +- [`IPFS`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.PayloadLocation.html#variant.IPFS): Data is stored in IPFS and Messages pallet stores the CID. +- [`Itemized`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.PayloadLocation.html#variant.Itemized): Data is stored in the Stateful Storage pallet as an array of individual items. +- [`Paginated`](https://rustadot.github.io/recurrency/common_primitives/schema/enum.PayloadLocation.html#variant.Paginated): Data is stored in the Stateful Storage pallet as a list of paged blobs. ### Mainnet vs Testnet Schema Creation -Mainnet schemas must be approved by the Frequency Council. +Mainnet schemas must be approved by the Recurrency Council. This is to prevent malicious schemas and increase the documentation around the schemas available. On Testnets, schemas can be created by anyone, so there are _no_ guarantees around schema correctness or quality. @@ -64,14 +64,14 @@ The Schemas pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| `set_max_schema_model_bytes`
Governance action to alter the maximum byte length of Schema models | Governance | Tokens | [`SchemaMaxSizeChanged`](https://frequency-chain.github.io/frequency/pallet_schemas/pallet/enum.Event.html#variant.SchemaMaxSizeChanged) | 1 | -| `propose_to_create_schema_v2`
Creates a proposal to the Frequency Council for a new schema | Token Account | Tokens | [`Proposed`](https://paritytech.github.io/polkadot-sdk/master/pallet_collective/pallet/enum.Event.html#variant.Proposed) | 66 | -| `create_schema_via_governance_v2`
Governance action version of `create_schema_v3` | Frequency Council | Tokens | [`SchemaCreated`](https://frequency-chain.github.io/frequency/pallet_schemas/pallet/enum.Event.html#variant.SchemaCreated) | 66 | -| `create_schema_v3`
Creates a new Schema. | Mainnet: Governance
Testnet: Token Account | Tokens | [`SchemaCreated`](https://frequency-chain.github.io/frequency/pallet_schemas/pallet/enum.Event.html#variant.SchemaCreated) | 1 | +| `set_max_schema_model_bytes`
Governance action to alter the maximum byte length of Schema models | Governance | Tokens | [`SchemaMaxSizeChanged`](https://rustadot.github.io/recurrency/pallet_schemas/pallet/enum.Event.html#variant.SchemaMaxSizeChanged) | 1 | +| `propose_to_create_schema_v2`
Creates a proposal to the Recurrency Council for a new schema | Token Account | Tokens | [`Proposed`](https://paritytech.github.io/polkadot-sdk/master/pallet_collective/pallet/enum.Event.html#variant.Proposed) | 66 | +| `create_schema_via_governance_v2`
Governance action version of `create_schema_v3` | Recurrency Council | Tokens | [`SchemaCreated`](https://rustadot.github.io/recurrency/pallet_schemas/pallet/enum.Event.html#variant.SchemaCreated) | 66 | +| `create_schema_v3`
Creates a new Schema. | Mainnet: Governance
Testnet: Token Account | Tokens | [`SchemaCreated`](https://rustadot.github.io/recurrency/pallet_schemas/pallet/enum.Event.html#variant.SchemaCreated) | 1 | | `propose_to_create_schema_name`
Creates a Council proposal to set the name of a Schema | Token Account | Tokens | [`Proposed`](https://paritytech.github.io/polkadot-sdk/master/pallet_collective/pallet/enum.Event.html#variant.Proposed) | 1 | -| `create_schema_name_via_governance`
Governance action to set the name of a Schema | Frequency Council | Tokens | [`SchemaNameCreated`](https://frequency-chain.github.io/frequency/pallet_schemas/pallet/enum.Event.html#variant.SchemaNameCreated) | 66 | +| `create_schema_name_via_governance`
Governance action to set the name of a Schema | Recurrency Council | Tokens | [`SchemaNameCreated`](https://rustadot.github.io/recurrency/pallet_schemas/pallet/enum.Event.html#variant.SchemaNameCreated) | 66 | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_schemas/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_schemas/pallet/struct.Pallet.html) for more details. ### State Queries @@ -83,7 +83,7 @@ See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_schemas/palle | Get Schema Ids by Name | Fetch matching Schemas Ids by namespace and name | `schemaNameToIds` | 62 | | Get Schema Payload/Model | Fetch the payload/model JSON for the specified Schema | `schemaPayloads` | 62 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_schemas/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/pallet_schemas/pallet/storage_types/index.html) for additional state queries and details. ### RPCs @@ -91,10 +91,10 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | --------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| Get Schema by Id | Retrieves the schema for the given Schema Id | [`getBySchemaId`](https://frequency-chain.github.io/frequency/pallet_schemas_rpc/trait.SchemasApiServer.html#tymethod.get_by_schema_id) | v1.0.0+ | -| Check Schema Validity | Validates a schema model and returns “true” if the model is correct | [`checkSchemaValidity`](https://frequency-chain.github.io/frequency/pallet_schemas_rpc/trait.SchemasApiServer.html#tymethod.check_schema_validity) | v1.0.0+ | -| Get Schema Versions | Returns an array of schema versions | [`getVersions`](https://frequency-chain.github.io/frequency/pallet_schemas_rpc/trait.SchemasApiServer.html#tymethod.get_versions) | v1.10.0+ | +| Get Schema by Id | Retrieves the schema for the given Schema Id | [`getBySchemaId`](https://rustadot.github.io/recurrency/pallet_schemas_rpc/trait.SchemasApiServer.html#tymethod.get_by_schema_id) | v1.0.0+ | +| Check Schema Validity | Validates a schema model and returns “true” if the model is correct | [`checkSchemaValidity`](https://rustadot.github.io/recurrency/pallet_schemas_rpc/trait.SchemasApiServer.html#tymethod.check_schema_validity) | v1.0.0+ | +| Get Schema Versions | Returns an array of schema versions | [`getVersions`](https://rustadot.github.io/recurrency/pallet_schemas_rpc/trait.SchemasApiServer.html#tymethod.get_versions) | v1.10.0+ | \* Must be enabled with off-chain indexing -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_schemas_rpc/trait.SchemasApiServer.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_schemas_rpc/trait.SchemasApiServer.html) for more details. diff --git a/pallets/schemas/src/migration/v4.rs b/pallets/schemas/src/migration/v4.rs index 75a15db..f300c1e 100644 --- a/pallets/schemas/src/migration/v4.rs +++ b/pallets/schemas/src/migration/v4.rs @@ -18,7 +18,7 @@ pub fn get_known_schemas() -> BTreeMap> { let genesis_block: BlockNumberFor = 0u32.into(); let genesis = >::block_hash(genesis_block); - if let DetectedChainType::FrequencyMainNet = + if let DetectedChainType::RecurrencyMainNet = get_chain_type_by_genesis_hash(&genesis.encode()[..]) { // only return what needs to change which for this case is only on mainnet diff --git a/pallets/schemas/src/rpc/Cargo.toml b/pallets/schemas/src/rpc/Cargo.toml index daba796..b4978f1 100644 --- a/pallets/schemas/src/rpc/Cargo.toml +++ b/pallets/schemas/src/rpc/Cargo.toml @@ -2,16 +2,16 @@ name = "pallet-schemas-rpc" version = "0.0.0" description = "RPC package for schemas" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] jsonrpsee = { workspace = true, features = ["client-core", "server", "macros"] } -# Frequency crates +# Recurrency crates pallet-schemas-runtime-api = { path = "../runtime-api", default-features = false } common-primitives = { path = '../../../../common/primitives', default-features = false } common-helpers = { path = '../../../../common/helpers', default-features = false } diff --git a/pallets/schemas/src/rpc/src/lib.rs b/pallets/schemas/src/rpc/src/lib.rs index 39bd413..8efd362 100644 --- a/pallets/schemas/src/rpc/src/lib.rs +++ b/pallets/schemas/src/rpc/src/lib.rs @@ -45,7 +45,7 @@ impl From for i32 { } } -/// Frequency Schema Custom RPC API +/// Recurrency Schema Custom RPC API #[rpc(client, server)] pub trait SchemasApi { /// retrieving schema by schema id @@ -61,7 +61,7 @@ pub trait SchemasApi { fn get_versions(&self, schema_name: String) -> RpcResult>>; } -/// The client handler for the API used by Frequency Service RPC with `jsonrpsee` +/// The client handler for the API used by Recurrency Service RPC with `jsonrpsee` pub struct SchemasHandler { client: Arc, _marker: std::marker::PhantomData, diff --git a/pallets/schemas/src/runtime-api/Cargo.toml b/pallets/schemas/src/runtime-api/Cargo.toml index e6e83bc..16a874d 100644 --- a/pallets/schemas/src/runtime-api/Cargo.toml +++ b/pallets/schemas/src/runtime-api/Cargo.toml @@ -2,11 +2,11 @@ name = "pallet-schemas-runtime-api" version = "0.0.0" description = "RPC runtime package for schemas" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] @@ -15,7 +15,7 @@ sp-runtime = { workspace = true } sp-api = { workspace = true } sp-std = { workspace = true } frame-support = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../../../common/primitives" } [features] diff --git a/pallets/schemas/src/weights.rs b/pallets/schemas/src/weights.rs index 2191fbc..dafcfd3 100644 --- a/pallets/schemas/src/weights.rs +++ b/pallets/schemas/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_schemas // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/pallets/stateful-storage/Cargo.toml b/pallets/stateful-storage/Cargo.toml index d67bead..786ea29 100644 --- a/pallets/stateful-storage/Cargo.toml +++ b/pallets/stateful-storage/Cargo.toml @@ -1,12 +1,12 @@ [package] -authors = ["Frequency"] +authors = ["Recurrency"] description = "Stateful Storage Pallet" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "pallet-stateful-storage" publish = false -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] @@ -25,7 +25,7 @@ sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } [dev-dependencies] diff --git a/pallets/stateful-storage/README.md b/pallets/stateful-storage/README.md index 30528d5..85d6bae 100644 --- a/pallets/stateful-storage/README.md +++ b/pallets/stateful-storage/README.md @@ -43,14 +43,14 @@ The Stateful Storage pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | -------------------------------- | ------------- | ------- | ------------------------------------------------------------------------------------------------------------- | ------------- | -| `apply_item_actions`
Applies a set of actions to an itemized storage array | Provider or MSA Owner | Capacity or Tokens | [`ItemizedPageUpdated`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageUpdated)
[`ItemizedPageDeleted`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageDeleted) | 22 | -| `apply_item_actions_with_signature_v2`
Applies a set of actions to an itemized storage array with a signature authorization | Provider or MSA Owner | Capacity or Tokens | [`ItemizedPageUpdated`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageUpdated)
[`ItemizedPageDeleted`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageDeleted) | 45 | -| `upsert_page`
Sets the data for a specific page index | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageUpdated`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageUpdated) | 22 | -| `delete_page`
Deletes a specific page index | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageDeleted`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageDeleted)| 22 | -| `upsert_page_with_signature_v2`
Sets the data for a specific page index with a signature authorization | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageUpdated`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageUpdated) | 46 | -| `delete_page_with_signature_v2`
Deletes a specific page index with a signature authorization | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageDeleted`](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageDeleted)| 46 | +| `apply_item_actions`
Applies a set of actions to an itemized storage array | Provider or MSA Owner | Capacity or Tokens | [`ItemizedPageUpdated`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageUpdated)
[`ItemizedPageDeleted`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageDeleted) | 22 | +| `apply_item_actions_with_signature_v2`
Applies a set of actions to an itemized storage array with a signature authorization | Provider or MSA Owner | Capacity or Tokens | [`ItemizedPageUpdated`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageUpdated)
[`ItemizedPageDeleted`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.ItemizedPageDeleted) | 45 | +| `upsert_page`
Sets the data for a specific page index | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageUpdated`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageUpdated) | 22 | +| `delete_page`
Deletes a specific page index | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageDeleted`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageDeleted)| 22 | +| `upsert_page_with_signature_v2`
Sets the data for a specific page index with a signature authorization | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageUpdated`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageUpdated) | 46 | +| `delete_page_with_signature_v2`
Deletes a specific page index with a signature authorization | Provider or MSA Owner | Capacity or Tokens | [`PaginatedPageDeleted`](https://rustadot.github.io/recurrency/{pallet_name}/pallet/enum.Event.html#variant.PaginatedPageDeleted)| 46 | -See [Rust Docs](https://frequency-chain.github.io/frequency/{pallet_name}/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/{pallet_name}/pallet/struct.Pallet.html) for more details. ### RPCs @@ -58,7 +58,7 @@ Note: May be restricted based on node settings and configuration. | Name | Description | Call | Node Version | | ------- | ----------------- | ---------------------------------------------------------------------------------------------------- | ------------ | -| Get Paginated Storage | Retrieves the paginated storage for the given MSA Id and Schema Id | [`getPaginatedStorage`](https://frequency-chain.github.io/frequency/pallet_stateful_storage_rpc/trait.StatefulStorageApiServer.html#tymethod.get_paginated_storage) | v1.4.0+ | -| Get Itemized Storage | Retrieves the itemized storage for the given MSA Id and Schema Id | [`getItemizedStorage`](https://frequency-chain.github.io/frequency/pallet_stateful_storage_rpc/trait.StatefulStorageApiServer.html#tymethod.get_itemized_storage) | v1.4.0+ | +| Get Paginated Storage | Retrieves the paginated storage for the given MSA Id and Schema Id | [`getPaginatedStorage`](https://rustadot.github.io/recurrency/pallet_stateful_storage_rpc/trait.StatefulStorageApiServer.html#tymethod.get_paginated_storage) | v1.4.0+ | +| Get Itemized Storage | Retrieves the itemized storage for the given MSA Id and Schema Id | [`getItemizedStorage`](https://rustadot.github.io/recurrency/pallet_stateful_storage_rpc/trait.StatefulStorageApiServer.html#tymethod.get_itemized_storage) | v1.4.0+ | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_stateful_storage_rpc/trait.StatefulStorageApiServer.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_stateful_storage_rpc/trait.StatefulStorageApiServer.html) for more details. diff --git a/pallets/stateful-storage/src/rpc/Cargo.toml b/pallets/stateful-storage/src/rpc/Cargo.toml index b1d89bb..c428ee2 100644 --- a/pallets/stateful-storage/src/rpc/Cargo.toml +++ b/pallets/stateful-storage/src/rpc/Cargo.toml @@ -2,16 +2,16 @@ name = "pallet-stateful-storage-rpc" version = "0.0.0" description = "RPC package for stateful storage" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] jsonrpsee = { workspace = true, features = ["client-core", "server", "macros"] } -# Frequency crates +# Recurrency crates pallet-stateful-storage-runtime-api = { path = "../runtime-api", default-features = false } common-primitives = { path = '../../../../common/primitives', default-features = false } common-helpers = { path = '../../../../common/helpers', default-features = false } diff --git a/pallets/stateful-storage/src/rpc/src/lib.rs b/pallets/stateful-storage/src/rpc/src/lib.rs index 139cfab..d9c4498 100644 --- a/pallets/stateful-storage/src/rpc/src/lib.rs +++ b/pallets/stateful-storage/src/rpc/src/lib.rs @@ -28,7 +28,7 @@ use std::sync::Arc; #[cfg(test)] mod tests; -/// Frequency Stateful Storage Custom RPC API +/// Recurrency Stateful Storage Custom RPC API #[rpc(client, server)] pub trait StatefulStorageApi { /// retrieving pages of stateful storage @@ -48,7 +48,7 @@ pub trait StatefulStorageApi { ) -> RpcResult; } -/// The client handler for the API used by Frequency Service RPC with `jsonrpsee` +/// The client handler for the API used by Recurrency Service RPC with `jsonrpsee` pub struct StatefulStorageHandler { client: Arc, _marker: std::marker::PhantomData, diff --git a/pallets/stateful-storage/src/runtime-api/Cargo.toml b/pallets/stateful-storage/src/runtime-api/Cargo.toml index e1464d3..78d6740 100644 --- a/pallets/stateful-storage/src/runtime-api/Cargo.toml +++ b/pallets/stateful-storage/src/runtime-api/Cargo.toml @@ -2,11 +2,11 @@ name = "pallet-stateful-storage-runtime-api" version = "0.0.0" description = "A package that adds Runtime Api for the Stateful Storage pallet" -authors = ["Frequency"] +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] @@ -15,7 +15,7 @@ sp-std = { workspace = true } sp-api = { workspace = true } frame-support = { workspace = true } sp-runtime = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../../../common/primitives" } [features] diff --git a/pallets/stateful-storage/src/weights.rs b/pallets/stateful-storage/src/weights.rs index 5edd166..6479607 100644 --- a/pallets/stateful-storage/src/weights.rs +++ b/pallets/stateful-storage/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_stateful-storage // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/pallets/time-release/Cargo.toml b/pallets/time-release/Cargo.toml index 78619a4..fa48de5 100644 --- a/pallets/time-release/Cargo.toml +++ b/pallets/time-release/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "pallet-time-release" description = "Provides scheduled balance freezing mechanism, in a *graded release* way." -authors = ["Frequency"] +authors = ["Recurrency"] edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" publish = false version = "0.0.0" diff --git a/pallets/time-release/README.md b/pallets/time-release/README.md index 74d7cd8..9cec7c7 100644 --- a/pallets/time-release/README.md +++ b/pallets/time-release/README.md @@ -26,12 +26,12 @@ The Time-Release pallet provides for: | Name/Description | Caller | Payment | Key Events | Runtime Added | | ------------------------------------------------------------------------------------------- | ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| `transfer`
Transfer tokens to another account with an unlock schedule | Token Account | Tokens | [`ReleaseScheduleAdded`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.ReleaseScheduleAdded) | 24 | -| `claim`
Remove the lock on tokens for the calling account when the schedule allows | Account with Lock | Tokens | [`Claimed`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.Claimed) | 24 | -| `claim_for`
Remove the lock on tokens for a different account when the schedule allows | Any Token Account | Tokens | [`Claimed`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.Claimed) | 24 | -| `update_release_schedules`
Governance action to update existing schedules | Governance | Tokens | [`ReleaseSchedulesUpdated`](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/enum.Event.html#variant.ReleaseSchedulesUpdated) | 24 | +| `transfer`
Transfer tokens to another account with an unlock schedule | Token Account | Tokens | [`ReleaseScheduleAdded`](https://rustadot.github.io/recurrency/pallet_time_release/pallet/enum.Event.html#variant.ReleaseScheduleAdded) | 24 | +| `claim`
Remove the lock on tokens for the calling account when the schedule allows | Account with Lock | Tokens | [`Claimed`](https://rustadot.github.io/recurrency/pallet_time_release/pallet/enum.Event.html#variant.Claimed) | 24 | +| `claim_for`
Remove the lock on tokens for a different account when the schedule allows | Any Token Account | Tokens | [`Claimed`](https://rustadot.github.io/recurrency/pallet_time_release/pallet/enum.Event.html#variant.Claimed) | 24 | +| `update_release_schedules`
Governance action to update existing schedules | Governance | Tokens | [`ReleaseSchedulesUpdated`](https://rustadot.github.io/recurrency/pallet_time_release/pallet/enum.Event.html#variant.ReleaseSchedulesUpdated) | 24 | -See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/struct.Pallet.html) for more details. +See [Rust Docs](https://rustadot.github.io/recurrency/pallet_time_release/pallet/struct.Pallet.html) for more details. ### State Queries @@ -39,4 +39,4 @@ See [Rust Docs](https://frequency-chain.github.io/frequency/pallet_time_release/ | ---------------- | --------------------------------------------- | ------------------ | ------------- | | Release Schedule | Retrieves the release schedule for an account | `releaseSchedules` | 24 | -See the [Rust Docs](https://frequency-chain.github.io/frequency/pallet_time_release/pallet/storage_types/index.html) for additional state queries and details. +See the [Rust Docs](https://rustadot.github.io/recurrency/pallet_time_release/pallet/storage_types/index.html) for additional state queries and details. diff --git a/pallets/time-release/src/weights.rs b/pallets/time-release/src/weights.rs index 27acc7a..eb8e4d2 100644 --- a/pallets/time-release/src/weights.rs +++ b/pallets/time-release/src/weights.rs @@ -5,16 +5,16 @@ //! DATE: 2024-09-04, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("frequency-bench")`, DB CACHE: `1024` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("recurrency-bench")`, DB CACHE: `1024` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_time-release // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=20 diff --git a/resources/frequency-paseo.json b/resources/frequency-paseo.json index d037f75..543c610 100644 --- a/resources/frequency-paseo.json +++ b/resources/frequency-paseo.json @@ -1,17 +1,17 @@ { - "name": "Frequency Paseo", - "id": "frequency-paseo", + "name": "Recurrency Paseo", + "id": "recurrency-paseo", "chainType": "Live", "bootNodes": [ "/dns4/0.boot.testnet.amplica.io/tcp/30333/ws/p2p/12D3KooWArmKDbY8Y6XXHGodosWAjRWWxSw5YxWEjSZTBNjJXVSC" ], "telemetryEndpoints": [ [ - "/dns/telemetry.frequency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", + "/dns/telemetry.recurrency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", 0 ] ], - "protocolId": "frequency-paseo", + "protocolId": "recurrency-paseo", "properties": { "ss58Format": 42, "tokenDecimals": 8, diff --git a/resources/frequency-paseo.raw.json b/resources/frequency-paseo.raw.json index 5a8d184..5751da5 100644 --- a/resources/frequency-paseo.raw.json +++ b/resources/frequency-paseo.raw.json @@ -1,17 +1,17 @@ { - "name": "Frequency Paseo", - "id": "frequency-paseo", + "name": "Recurrency Paseo", + "id": "recurrency-paseo", "chainType": "Live", "bootNodes": [ "/dns4/0.boot.testnet.amplica.io/tcp/30333/ws/p2p/12D3KooWArmKDbY8Y6XXHGodosWAjRWWxSw5YxWEjSZTBNjJXVSC" ], "telemetryEndpoints": [ [ - "/dns/telemetry.frequency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", + "/dns/telemetry.recurrency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", 0 ] ], - "protocolId": "frequency-paseo", + "protocolId": "recurrency-paseo", "properties": { "ss58Format": 42, "tokenDecimals": 8, diff --git a/resources/frequency.json b/resources/frequency.json index 4b71ecd..7495448 100644 --- a/resources/frequency.json +++ b/resources/frequency.json @@ -1,10 +1,10 @@ { - "name": "Frequency", - "id": "frequency", + "name": "Recurrency", + "id": "recurrency", "chainType": "Live", "bootNodes": [ - "/dns4/0.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP", - "/dns4/1.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw" + "/dns4/0.boot.recurrency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP", + "/dns4/1.boot.recurrency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw" ], "telemetryEndpoints": [ [ @@ -12,11 +12,11 @@ 0 ], [ - "/dns/telemetry.frequency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", + "/dns/telemetry.recurrency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", 0 ] ], - "protocolId": "frequency", + "protocolId": "recurrency", "properties": { "ss58Format": 90, "tokenDecimals": 8, diff --git a/resources/frequency.raw.json b/resources/frequency.raw.json index 9a248aa..3188b25 100644 --- a/resources/frequency.raw.json +++ b/resources/frequency.raw.json @@ -1,10 +1,10 @@ { - "name": "Frequency", - "id": "frequency", + "name": "Recurrency", + "id": "recurrency", "chainType": "Live", "bootNodes": [ - "/dns4/0.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP", - "/dns4/1.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw" + "/dns4/0.boot.recurrency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP", + "/dns4/1.boot.recurrency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw" ], "telemetryEndpoints": [ [ @@ -12,11 +12,11 @@ 0 ], [ - "/dns/telemetry.frequency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", + "/dns/telemetry.recurrency.xyz/tcp/443/x-parity-wss/%2Fsubmit%2F", 0 ] ], - "protocolId": "frequency", + "protocolId": "recurrency", "properties": { "ss58Format": 90, "tokenDecimals": 8, diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index aa75843..62ae506 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,18 +1,18 @@ [package] -authors = ["Frequency"] -description = "Common Runtime for Frequency parachain" +authors = ["Recurrency"] +description = "Common Runtime for Recurrency parachain" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" name = "common-runtime" -repository = "https://github.com/frequency-chain/frequency/" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# Frequency +# Recurrency parity-scale-codec = { workspace = true, features = ["derive"] } common-primitives = { default-features = false, path = "../../common/primitives" } scale-info = { workspace = true, features = ["derive"] } @@ -44,10 +44,10 @@ pallet-time-release = { path = "../../pallets/time-release", default-features = [features] default = ["std"] -frequency = [] -frequency-testnet = [] -frequency-local = [] -frequency-no-relay = [] +recurrency = [] +recurrency-testnet = [] +recurrency-local = [] +recurrency-no-relay = [] runtime-benchmarks = ["pallet-collective/runtime-benchmarks"] std = [ "frame-support/std", diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index 89a8f2e..42c68d6 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -10,9 +10,9 @@ use frame_support::{ PalletId, }; -pub const FREQUENCY_TESTNET_TOKEN: &str = "XRQCY"; -pub const FREQUENCY_LOCAL_TOKEN: &str = "UNIT"; -pub const FREQUENCY_TOKEN: &str = "FRQCY"; +pub const RECURRENCY_TESTNET_TOKEN: &str = "XRQCY"; +pub const RECURRENCY_LOCAL_TOKEN: &str = "UNIT"; +pub const RECURRENCY_TOKEN: &str = "FRQCY"; pub const TOKEN_DECIMALS: u8 = 8; /// The maximum number of schema grants allowed per delegation @@ -63,13 +63,13 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); /// `Operational` extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); -#[cfg(not(any(feature = "frequency-testnet", feature = "frequency-local")))] +#[cfg(not(any(feature = "recurrency-testnet", feature = "recurrency-local")))] /// We allow for 0.5 of a second of compute with a 12 second average block time. pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, 0) .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64); -#[cfg(any(feature = "frequency-testnet", feature = "frequency-local"))] +#[cfg(any(feature = "recurrency-testnet", feature = "recurrency-local"))] /// We allow for 2 seconds of compute with a 6 second average block time. pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), @@ -134,11 +134,11 @@ pub type MinReleaseTransfer = ConstU128<0>; pub const MAX_RELEASE_SCHEDULES: u32 = 50; // -end- TimeRelease Pallet --- -#[cfg(any(feature = "frequency-testnet", feature = "frequency-local"))] +#[cfg(any(feature = "recurrency-testnet", feature = "recurrency-local"))] // --- Timestamp Pallet --- pub type MinimumPeriod = ConstU64<0>; -#[cfg(not(any(feature = "frequency-testnet", feature = "frequency-local")))] +#[cfg(not(any(feature = "recurrency-testnet", feature = "recurrency-local")))] // --- Timestamp Pallet --- pub type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; // -end- Timestamp Pallet --- @@ -251,9 +251,9 @@ pub type TransactionPaymentOperationalFeeMultiplier = ConstU8<5>; pub type TransactionByteFee = ConstU128<{ 10 * currency::MILLICENTS }>; // -end- Transaction Payment Pallet --- -// --- Frequency Transaction Payment Pallet --- +// --- Recurrency Transaction Payment Pallet --- pub type MaximumCapacityBatchLength = ConstU8<10>; -// -end- Frequency Transaction Payment Pallet --- +// -end- Recurrency Transaction Payment Pallet --- // --- Session Pallet --- pub type SessionPeriod = ConstU32<{ 6 * HOURS }>; @@ -327,8 +327,8 @@ impl MaxEncodedLen for MessagesMaxPayloadSizeBytes { // Needs parameter_types! to reduce pallet dependencies parameter_types! { - /// SS58 Prefix for the for Frequency Network - /// 90 is the prefix for the Frequency Network on Polkadot + /// SS58 Prefix for the for Recurrency Network + /// 90 is the prefix for the Recurrency Network on Polkadot /// 42 is the default prefix elsewhere pub const Ss58Prefix: u16 = prod_or_testnet_or_local!(90, 42, 42); } @@ -398,10 +398,10 @@ pub type CapacityMinimumTokenBalance = ConstU128<{ currency::DOLLARS }>; pub type CapacityMaxUnlockingChunks = ConstU32<4>; pub type CapacityMaxEpochLength = ConstU32<7_200>; // one day, assuming 12 second blocks. -#[cfg(not(any(feature = "frequency-local", feature = "frequency-no-relay")))] +#[cfg(not(any(feature = "recurrency-local", feature = "recurrency-no-relay")))] pub type CapacityUnstakingThawPeriod = ConstU16<30>; // 30 Epochs, or 30 days given the above -#[cfg(any(feature = "frequency-local", feature = "frequency-no-relay"))] +#[cfg(any(feature = "recurrency-local", feature = "recurrency-no-relay"))] pub type CapacityUnstakingThawPeriod = ConstU16<2>; // 2 Epochs // Needs parameter_types! for the Perbil diff --git a/runtime/common/src/extensions/check_nonce.rs b/runtime/common/src/extensions/check_nonce.rs index 9dcede2..7a787c0 100644 --- a/runtime/common/src/extensions/check_nonce.rs +++ b/runtime/common/src/extensions/check_nonce.rs @@ -1,4 +1,4 @@ -// This file overrides the default Substrate CheckNonce for Frequency. +// This file overrides the default Substrate CheckNonce for Recurrency. // It only creates the token account for paid extrinsics. // Copyright (C) 2017-2022 Parity Technologies (UK) Ltd. diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 796063a..6b56d34 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -7,7 +7,7 @@ pub mod proxy; pub mod weights; /// Macro to set a value (e.g. when using the `parameter_types` macro) to either a production value -/// or to an environment variable or testing value (in case the `frequency-local` feature is selected or in instant sealing mode). +/// or to an environment variable or testing value (in case the `recurrency-local` feature is selected or in instant sealing mode). /// Note that the environment variable is evaluated _at compile time_. /// /// Usage: @@ -21,9 +21,9 @@ pub mod weights; #[macro_export] macro_rules! prod_or_testnet_or_local { ($prod:expr, $test:expr, $local:expr) => { - if cfg!(any(feature = "frequency-local", feature = "frequency-no-relay")) { + if cfg!(any(feature = "recurrency-local", feature = "recurrency-no-relay")) { $local - } else if cfg!(feature = "frequency-testnet") { + } else if cfg!(feature = "recurrency-testnet") { $test } else { $prod diff --git a/runtime/common/src/weights/block_weights.rs b/runtime/common/src/weights/block_weights.rs index e2b1251..9656866 100644 --- a/runtime/common/src/weights/block_weights.rs +++ b/runtime/common/src/weights/block_weights.rs @@ -1,6 +1,6 @@ -// This file is part of Frequency. +// This file is part of Recurrency. -// Copyright (C) Frequency Network Foundation. +// Copyright (C) Recurrency Network Foundation. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,13 +19,13 @@ //! DATE: 2024-09-04 (Y/M/D) //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` //! -//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Frequency Development (No Relay)` +//! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Recurrency Development (No Relay)` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/common/src/weights` //! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // overhead // --wasm-execution=compiled diff --git a/runtime/common/src/weights/extrinsic_weights.rs b/runtime/common/src/weights/extrinsic_weights.rs index 7ed5a6c..d8625f0 100644 --- a/runtime/common/src/weights/extrinsic_weights.rs +++ b/runtime/common/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ -// This file is part of Frequency. +// This file is part of Recurrency. -// Copyright (C) Frequency Network Foundation. +// Copyright (C) Recurrency Network Foundation. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,13 +19,13 @@ //! DATE: 2024-09-04 (Y/M/D) //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` //! -//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Frequency Development (No Relay)` +//! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Recurrency Development (No Relay)` //! WARMUPS: `10`, REPEAT: `100` //! WEIGHT-PATH: `runtime/common/src/weights` //! WEIGHT-METRIC: `Average`, WEIGHT-MUL: `1.0`, WEIGHT-ADD: `0` // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // overhead // --wasm-execution=compiled diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index b23d07a..28e9927 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_balances // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_collator_selection.rs b/runtime/common/src/weights/pallet_collator_selection.rs index 255a428..78fafa7 100644 --- a/runtime/common/src/weights/pallet_collator_selection.rs +++ b/runtime/common/src/weights/pallet_collator_selection.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_collator_selection // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_collective_council.rs b/runtime/common/src/weights/pallet_collective_council.rs index d71271c..ac4b147 100644 --- a/runtime/common/src/weights/pallet_collective_council.rs +++ b/runtime/common/src/weights/pallet_collective_council.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_collective // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_collective_technical_committee.rs b/runtime/common/src/weights/pallet_collective_technical_committee.rs index c7ad7e4..ad351c8 100644 --- a/runtime/common/src/weights/pallet_collective_technical_committee.rs +++ b/runtime/common/src/weights/pallet_collective_technical_committee.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_collective // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_democracy.rs b/runtime/common/src/weights/pallet_democracy.rs index 031419e..1d6672f 100644 --- a/runtime/common/src/weights/pallet_democracy.rs +++ b/runtime/common/src/weights/pallet_democracy.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_democracy // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_multisig.rs b/runtime/common/src/weights/pallet_multisig.rs index 375fc37..9c14e62 100644 --- a/runtime/common/src/weights/pallet_multisig.rs +++ b/runtime/common/src/weights/pallet_multisig.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_multisig // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_preimage.rs b/runtime/common/src/weights/pallet_preimage.rs index 8b4977a..015fa89 100644 --- a/runtime/common/src/weights/pallet_preimage.rs +++ b/runtime/common/src/weights/pallet_preimage.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_preimage // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_proxy.rs b/runtime/common/src/weights/pallet_proxy.rs index 2c770d2..c752f8f 100644 --- a/runtime/common/src/weights/pallet_proxy.rs +++ b/runtime/common/src/weights/pallet_proxy.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_proxy // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_scheduler.rs b/runtime/common/src/weights/pallet_scheduler.rs index 1bb2599..b4dbb54 100644 --- a/runtime/common/src/weights/pallet_scheduler.rs +++ b/runtime/common/src/weights/pallet_scheduler.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_scheduler // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_session.rs b/runtime/common/src/weights/pallet_session.rs index dbc205e..01bbb19 100644 --- a/runtime/common/src/weights/pallet_session.rs +++ b/runtime/common/src/weights/pallet_session.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_session // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index 16e2e2c..1cd1383 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_timestamp // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/pallet_treasury.rs b/runtime/common/src/weights/pallet_treasury.rs index 0fc3711..858526b 100644 --- a/runtime/common/src/weights/pallet_treasury.rs +++ b/runtime/common/src/weights/pallet_treasury.rs @@ -4,16 +4,16 @@ //! DATE: 2024-05-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-4-53`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_treasury // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --additional-trie-layers=5 diff --git a/runtime/common/src/weights/pallet_utility.rs b/runtime/common/src/weights/pallet_utility.rs index f72c4b7..836e814 100644 --- a/runtime/common/src/weights/pallet_utility.rs +++ b/runtime/common/src/weights/pallet_utility.rs @@ -4,16 +4,16 @@ //! DATE: 2024-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ip-10-173-10-33`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("frequency-bench"), DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("recurrency-bench"), DB CACHE: 1024 // Executed Command: -// ./scripts/../target/release/frequency +// ./scripts/../target/release/recurrency // benchmark // pallet // --pallet=pallet_utility // --extrinsic // * -// --chain=frequency-bench +// --chain=recurrency-bench // --heap-pages=4096 // --wasm-execution=compiled // --steps=50 diff --git a/runtime/common/src/weights/rocksdb_weights.rs b/runtime/common/src/weights/rocksdb_weights.rs index ad2ed5e..2239161 100644 --- a/runtime/common/src/weights/rocksdb_weights.rs +++ b/runtime/common/src/weights/rocksdb_weights.rs @@ -2,7 +2,7 @@ //! DATE: 2024-08-22 (Y/M/D) //! HOSTNAME: `ip-10-173-4-131`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` //! -//! DATABASE: `RocksDb`, RUNTIME: `Frequency` +//! DATABASE: `RocksDb`, RUNTIME: `Recurrency` //! BLOCK-NUM: `BlockId::Number(4413540)` //! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `2` //! STATE-VERSION: `V1`, STATE-CACHE-SIZE: `` @@ -10,17 +10,17 @@ //! METRIC: `Average`, WEIGHT-MUL: `1.3`, WEIGHT-ADD: `0` // Executed Command: -// ./target/release/frequency +// ./target/release/recurrency // benchmark // storage // --state-version=1 -// --chain=frequency +// --chain=recurrency // --base-path=/data // --include-child-trees // --warmups=2 // --mul=1.3 -/// Storage DB weights for the `Frequency` runtime and `RocksDb`. +/// Storage DB weights for the `Recurrency` runtime and `RocksDb`. pub mod constants { use frame_support::weights::constants; use sp_core::parameter_types; diff --git a/runtime/frequency/Cargo.toml b/runtime/frequency/Cargo.toml index 2bc4e1e..4bcf57e 100644 --- a/runtime/frequency/Cargo.toml +++ b/runtime/frequency/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["Frequency"] -description = "Runtime for Frequency mainnet" +authors = ["Recurrency"] +description = "Runtime for Recurrency mainnet" edition = "2021" -homepage = "https://frequency.xyz" +homepage = "https://recurrency.xyz" license = "Apache-2.0" -name = "frequency-runtime" -repository = "https://github.com/frequency-chain/frequency/" +name = "recurrency-runtime" +repository = "https://github.com/rustadot/recurrency/" version = "0.0.0" [package.metadata.docs.rs] @@ -65,12 +65,12 @@ sp-transaction-pool = { workspace = true } sp-version = { workspace = true } # Ported Pallet from ORML pallet-time-release = { path = "../../pallets/time-release", default-features = false } -# Frequency +# Recurrency common-primitives = { default-features = false, path = "../../common/primitives" } common-runtime = { path = "../common", default-features = false } pallet-capacity = { path = "../../pallets/capacity", default-features = false } -pallet-frequency-tx-payment = { path = "../../pallets/frequency-tx-payment", default-features = false } -pallet-frequency-tx-payment-runtime-api = { path = "../../pallets/frequency-tx-payment/src/runtime-api", default-features = false } +pallet-recurrency-tx-payment = { path = "../../pallets/recurrency-tx-payment", default-features = false } +pallet-recurrency-tx-payment-runtime-api = { path = "../../pallets/recurrency-tx-payment/src/runtime-api", default-features = false } pallet-messages = { path = "../../pallets/messages", default-features = false } pallet-messages-runtime-api = { path = "../../pallets/messages/src/runtime-api", default-features = false } pallet-msa = { path = "../../pallets/msa", default-features = false } @@ -119,8 +119,8 @@ std = [ "pallet-collator-selection/std", "pallet-collective/std", "pallet-democracy/std", - "pallet-frequency-tx-payment-runtime-api/std", - "pallet-frequency-tx-payment/std", + "pallet-recurrency-tx-payment-runtime-api/std", + "pallet-recurrency-tx-payment/std", "pallet-handles-runtime-api/std", "pallet-handles/std", "pallet-passkey/std", @@ -183,7 +183,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-collective/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", - "pallet-frequency-tx-payment/runtime-benchmarks", + "pallet-recurrency-tx-payment/runtime-benchmarks", "pallet-handles/runtime-benchmarks", "pallet-passkey/runtime-benchmarks", "pallet-messages/runtime-benchmarks", @@ -216,7 +216,7 @@ try-runtime = [ "pallet-collator-selection/try-runtime", "pallet-collective/try-runtime", "pallet-democracy/try-runtime", - "pallet-frequency-tx-payment/try-runtime", + "pallet-recurrency-tx-payment/try-runtime", "pallet-handles/try-runtime", "pallet-passkey/try-runtime", "pallet-messages/try-runtime", @@ -238,10 +238,10 @@ try-runtime = [ "common-runtime/try-runtime", "sp-runtime/try-runtime", ] -frequency = ["common-runtime/frequency"] -frequency-testnet = ["common-runtime/frequency-testnet"] -frequency-local = ["common-runtime/frequency-local"] -frequency-no-relay = ["common-runtime/frequency-no-relay"] +recurrency = ["common-runtime/recurrency"] +recurrency-testnet = ["common-runtime/recurrency-testnet"] +recurrency-local = ["common-runtime/recurrency-local"] +recurrency-no-relay = ["common-runtime/recurrency-no-relay"] # Following features are used in generating lean wasms no-metadata-docs = ["frame-support/no-metadata-docs"] on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"] @@ -254,6 +254,6 @@ on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"] # `RUNTIME_METADATA_HASH` environment variable set for the `CheckMetadataHash` # extension. metadata-hash = ["substrate-wasm-builder/metadata-hash"] -frequency-lint-check = [] +recurrency-lint-check = [] test = [] parameterized-consensus-hook = [] diff --git a/runtime/frequency/src/apis.rs b/runtime/frequency/src/apis.rs index 4f8fe39..6aeaea9 100644 --- a/runtime/frequency/src/apis.rs +++ b/runtime/frequency/src/apis.rs @@ -19,7 +19,7 @@ use super::{ AccountId, Balance, Block, Executive, InherentDataExt, Runtime, RuntimeCall, RuntimeGenesisConfig, SessionKeys, System, TransactionPayment, VERSION, }; -use crate::{FrequencyTxPayment, Handles, Messages, Msa, Schemas, StatefulStorage}; +use crate::{RecurrencyTxPayment, Handles, Messages, Msa, Schemas, StatefulStorage}; use common_primitives::{ handles::{BaseHandle, DisplayHandle, HandleResponse, PresumptiveSuffixesResponse}, @@ -34,7 +34,7 @@ use common_primitives::{ stateful_storage::{ItemizedStoragePageResponse, PaginatedStorageResponse}, }; -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] use super::{ConsensusHook, ParachainSystem}; #[cfg(feature = "try-runtime")] @@ -56,7 +56,7 @@ impl_runtime_apis! { } } - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] impl cumulus_primitives_aura::AuraUnincludedSegmentApi for Runtime { fn can_build_upon( included_hash: ::Hash, @@ -184,7 +184,7 @@ impl_runtime_apis! { } } - impl pallet_frequency_tx_payment_runtime_api::CapacityTransactionPaymentRuntimeApi for Runtime { + impl pallet_recurrency_tx_payment_runtime_api::CapacityTransactionPaymentRuntimeApi for Runtime { fn compute_capacity_fee( uxt: ::Extrinsic, len: u32, @@ -193,26 +193,26 @@ impl_runtime_apis! { // if the call is wrapped in a batch, we need to get the weight of the outer call // and use that to compute the fee with the inner call's stable weight(s) let dispatch_weight = match &uxt.function { - RuntimeCall::FrequencyTxPayment(pallet_frequency_tx_payment::Call::pay_with_capacity { .. }) | - RuntimeCall::FrequencyTxPayment(pallet_frequency_tx_payment::Call::pay_with_capacity_batch_all { .. }) => { + RuntimeCall::RecurrencyTxPayment(pallet_recurrency_tx_payment::Call::pay_with_capacity { .. }) | + RuntimeCall::RecurrencyTxPayment(pallet_recurrency_tx_payment::Call::pay_with_capacity_batch_all { .. }) => { <::Extrinsic as GetDispatchInfo>::get_dispatch_info(&uxt).weight }, _ => { Weight::zero() } }; - FrequencyTxPayment::compute_capacity_fee_details(&uxt.function, &dispatch_weight, len) + RecurrencyTxPayment::compute_capacity_fee_details(&uxt.function, &dispatch_weight, len) } } - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) } } - // Frequency runtime APIs + // Recurrency runtime APIs impl pallet_messages_runtime_api::MessagesRuntimeApi for Runtime { fn get_messages_by_schema_and_block(schema_id: SchemaId, schema_payload_location: PayloadLocation, block_number: BlockNumber,) -> Vec { @@ -296,7 +296,7 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade(checks: UpgradeCheckSelect) -> (Weight, Weight) { - log::info!("try-runtime::on_runtime_upgrade frequency."); + log::info!("try-runtime::on_runtime_upgrade recurrency."); let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, RuntimeBlockWeights::get().max_block) } @@ -307,7 +307,7 @@ impl_runtime_apis! { try_state: TryStateSelect, ) -> Weight { log::info!( - target: "runtime::frequency", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + target: "runtime::recurrency", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", block.header.number, block.header.hash(), state_root_check, diff --git a/runtime/frequency/src/lib.rs b/runtime/frequency/src/lib.rs index 346456f..300e305 100644 --- a/runtime/frequency/src/lib.rs +++ b/runtime/frequency/src/lib.rs @@ -17,7 +17,7 @@ pub fn wasm_binary_unwrap() -> &'static [u8] { ) } -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] use cumulus_pallet_parachain_system::{RelayNumberMonotonicallyIncreases, RelaychainDataProvider}; use sp_runtime::{ @@ -80,7 +80,7 @@ pub use sp_runtime::{MultiAddress, Perbill, Permill}; pub use sp_runtime::BuildStorage; pub use pallet_capacity; -pub use pallet_frequency_tx_payment::{capacity_stable_weights, types::GetStableWeight}; +pub use pallet_recurrency_tx_payment::{capacity_stable_weights, types::GetStableWeight}; pub use pallet_msa; pub use pallet_passkey; pub use pallet_schemas; @@ -153,7 +153,7 @@ pub struct BaseCallFilter; impl Contains for BaseCallFilter { fn contains(call: &RuntimeCall) -> bool { - #[cfg(not(feature = "frequency"))] + #[cfg(not(feature = "recurrency"))] { match call { RuntimeCall::Utility(pallet_utility_call) => @@ -161,7 +161,7 @@ impl Contains for BaseCallFilter { _ => true, } } - #[cfg(feature = "frequency")] + #[cfg(feature = "recurrency")] { match call { RuntimeCall::Utility(pallet_utility_call) => @@ -195,8 +195,8 @@ impl BaseCallFilter { RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | RuntimeCall::Utility(pallet_utility::Call::force_batch { .. }) => false, - // Block all `FrequencyTxPayment` calls from utility batch - RuntimeCall::FrequencyTxPayment(..) => false, + // Block all `RecurrencyTxPayment` calls from utility batch + RuntimeCall::RecurrencyTxPayment(..) => false, // Block `create_provider` and `create_schema` calls from utility batch RuntimeCall::Msa(pallet_msa::Call::create_provider { .. }) | @@ -230,7 +230,7 @@ impl InstanceFilter for ProxyType { | RuntimeCall::CollatorSelection(..) | RuntimeCall::Council(..) | RuntimeCall::Democracy(..) - | RuntimeCall::FrequencyTxPayment(..) // Capacity Tx never transfer + | RuntimeCall::RecurrencyTxPayment(..) // Capacity Tx never transfer | RuntimeCall::Handles(..) | RuntimeCall::Messages(..) | RuntimeCall::Msa(..) @@ -308,7 +308,7 @@ pub type SignedExtra = ( frame_system::CheckEra, common_runtime::extensions::check_nonce::CheckNonce, frame_system::CheckWeight, - pallet_frequency_tx_payment::ChargeFrqTransactionPayment, + pallet_recurrency_tx_payment::ChargeFrqTransactionPayment, pallet_msa::CheckFreeExtrinsicUse, pallet_handles::handles_signed_extension::HandlesSignedExtension, StaleHashCheckExtension, @@ -369,11 +369,11 @@ impl_opaque_keys! { } // IMPORTANT: Remember to update spec_version in BOTH structs below -#[cfg(feature = "frequency")] +#[cfg(feature = "recurrency")] #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("frequency"), - impl_name: create_runtime_str!("frequency"), + spec_name: create_runtime_str!("recurrency"), + impl_name: create_runtime_str!("recurrency"), authoring_version: 1, spec_version: 110, impl_version: 0, @@ -383,11 +383,11 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { }; // IMPORTANT: Remember to update spec_version in above struct too -#[cfg(not(feature = "frequency"))] +#[cfg(not(feature = "recurrency"))] #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("frequency-testnet"), - impl_name: create_runtime_str!("frequency"), + spec_name: create_runtime_str!("recurrency-testnet"), + impl_name: create_runtime_str!("recurrency"), authoring_version: 1, spec_version: 110, impl_version: 0, @@ -440,7 +440,7 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// Base call filter to use in dispatchable. - // enable for cfg feature "frequency" only + // enable for cfg feature "recurrency" only type BaseCallFilter = BaseCallFilter; /// The aggregated dispatch type that is available for extrinsics. type RuntimeCall = RuntimeCall; @@ -481,9 +481,9 @@ impl frame_system::Config for Runtime { /// This is used as an identifier of the chain. 42 is the generic substrate prefix. type SS58Prefix = Ss58Prefix; /// The action to take on a Runtime Upgrade - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] type OnSetCode = (); type MaxConsumers = FrameSystemMaxConsumers; /// A new way of configuring migrations that run in a single block. @@ -598,9 +598,9 @@ impl pallet_time_release::Config for Runtime { type TransferOrigin = EnsureSigned; type WeightInfo = pallet_time_release::weights::SubstrateWeight; type MaxReleaseSchedules = MaxReleaseSchedules; - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] type BlockNumberProvider = RelaychainDataProvider; - #[cfg(feature = "frequency-no-relay")] + #[cfg(feature = "recurrency-no-relay")] type BlockNumberProvider = System; type RuntimeFreezeReason = RuntimeFreezeReason; } @@ -654,7 +654,7 @@ impl pallet_scheduler::Config for Runtime { type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; /// Origin to schedule or cancel calls - /// Set to Root or a simple majority of the Frequency Council + /// Set to Root or a simple majority of the Recurrency Council type ScheduleOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, @@ -820,7 +820,7 @@ impl pallet_treasury::Config for Runtime { /// Who approves treasury proposals? /// - Root (sudo or governance) - /// - 3/5ths of the Frequency Council + /// - 3/5ths of the Recurrency Council type ApproveOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, @@ -828,7 +828,7 @@ impl pallet_treasury::Config for Runtime { /// Who rejects treasury proposals? /// - Root (sudo or governance) - /// - Simple majority of the Frequency Council + /// - Simple majority of the Recurrency Council type RejectOrigin = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, @@ -891,7 +891,7 @@ impl pallet_transaction_payment::Config for Runtime { type OperationalFeeMultiplier = TransactionPaymentOperationalFeeMultiplier; } -use pallet_frequency_tx_payment::Call as FrequencyPaymentCall; +use pallet_recurrency_tx_payment::Call as RecurrencyPaymentCall; use pallet_handles::Call as HandlesCall; use pallet_messages::Call as MessagesCall; use pallet_msa::Call as MsaCall; @@ -901,7 +901,7 @@ use pallet_utility::Call as UtilityCall; pub struct CapacityEligibleCalls; impl GetStableWeight for CapacityEligibleCalls { fn get_stable_weight(call: &RuntimeCall) -> Option { - use pallet_frequency_tx_payment::capacity_stable_weights::WeightInfo; + use pallet_recurrency_tx_payment::capacity_stable_weights::WeightInfo; match call { RuntimeCall::Msa(MsaCall::add_public_key_to_msa { .. }) => Some( capacity_stable_weights::SubstrateWeight::::add_public_key_to_msa() @@ -927,31 +927,31 @@ impl GetStableWeight for CapacityEligibleCalls { fn get_inner_calls(outer_call: &RuntimeCall) -> Option> { match outer_call { - RuntimeCall::FrequencyTxPayment(FrequencyPaymentCall::pay_with_capacity { + RuntimeCall::RecurrencyTxPayment(RecurrencyPaymentCall::pay_with_capacity { call, .. }) => return Some(vec![call]), - RuntimeCall::FrequencyTxPayment( - FrequencyPaymentCall::pay_with_capacity_batch_all { calls, .. }, + RuntimeCall::RecurrencyTxPayment( + RecurrencyPaymentCall::pay_with_capacity_batch_all { calls, .. }, ) => return Some(calls.iter().collect()), _ => Some(vec![outer_call]), } } } -impl pallet_frequency_tx_payment::Config for Runtime { +impl pallet_recurrency_tx_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; type Capacity = Capacity; - type WeightInfo = pallet_frequency_tx_payment::weights::SubstrateWeight; + type WeightInfo = pallet_recurrency_tx_payment::weights::SubstrateWeight; type CapacityCalls = CapacityEligibleCalls; - type OnChargeCapacityTransaction = pallet_frequency_tx_payment::CapacityAdapter; + type OnChargeCapacityTransaction = pallet_recurrency_tx_payment::CapacityAdapter; type BatchProvider = CapacityBatchProvider; type MaximumCapacityBatchLength = MaximumCapacityBatchLength; } /// Configurations for passkey pallet -#[cfg(any(not(feature = "frequency"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency"), feature = "recurrency-lint-check"))] impl pallet_passkey::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -963,28 +963,28 @@ impl pallet_passkey::Config for Runtime { } #[cfg(any( - feature = "frequency", + feature = "recurrency", feature = "runtime-benchmarks", - feature = "frequency-lint-check", + feature = "recurrency-lint-check", ))] /// Maximum number of blocks simultaneously accepted by the Runtime, not yet included /// into the relay chain. const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1; -#[cfg(any(feature = "frequency-testnet", feature = "frequency-local"))] +#[cfg(any(feature = "recurrency-testnet", feature = "recurrency-local"))] const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3; -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] /// How many parachain blocks are processed by the relay chain per parent. Limits the /// number of blocks authored per slot. const BLOCK_PROCESSING_VELOCITY: u32 = 1; -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] /// Relay chain slot duration, in milliseconds. const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6_000; // See https://paritytech.github.io/substrate/master/pallet_parachain_system/index.html for // the descriptions of these configs. -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] impl cumulus_pallet_parachain_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); @@ -999,7 +999,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; } -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] pub type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< Runtime, RELAY_CHAIN_SLOT_DURATION_MILLIS, @@ -1177,7 +1177,7 @@ impl pallet_handles::Config for Runtime { // See https://paritytech.github.io/substrate/master/pallet_sudo/index.html for // the descriptions of these configs. -#[cfg(any(not(feature = "frequency"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency"), feature = "recurrency-lint-check"))] impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -1199,7 +1199,7 @@ construct_runtime!( pub enum Runtime { // System support stuff. System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - #[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] ParachainSystem: cumulus_pallet_parachain_system::{ Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, } = 1, @@ -1207,7 +1207,7 @@ construct_runtime!( ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, // Sudo removed from mainnet Jan 2023 - #[cfg(any(not(feature = "frequency"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency"), feature = "recurrency-lint-check"))] Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event }= 4, Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 5, @@ -1242,16 +1242,16 @@ construct_runtime!( // Allowing accounts to give permission to other accounts to dispatch types of calls from their signed origin Proxy: pallet_proxy = 43, - // Frequency related pallets + // Recurrency related pallets Msa: pallet_msa::{Pallet, Call, Storage, Event} = 60, Messages: pallet_messages::{Pallet, Call, Storage, Event} = 61, Schemas: pallet_schemas::{Pallet, Call, Storage, Event, Config} = 62, StatefulStorage: pallet_stateful_storage::{Pallet, Call, Storage, Event} = 63, Capacity: pallet_capacity::{Pallet, Call, Storage, Event, FreezeReason} = 64, - FrequencyTxPayment: pallet_frequency_tx_payment::{Pallet, Call, Event} = 65, + RecurrencyTxPayment: pallet_recurrency_tx_payment::{Pallet, Call, Event} = 65, Handles: pallet_handles::{Pallet, Call, Storage, Event} = 66, // Currently enabled only under feature flag - #[cfg(any(not(feature = "frequency"), feature = "frequency-lint-check"))] + #[cfg(any(not(feature = "recurrency"), feature = "recurrency-lint-check"))] Passkey: pallet_passkey::{Pallet, Call, Storage, Event, ValidateUnsigned} = 67, } ); @@ -1450,12 +1450,12 @@ impl StaleHashCheckExtension { )], _ => vec![], }, - RuntimeCall::FrequencyTxPayment(FrequencyPaymentCall::pay_with_capacity { + RuntimeCall::RecurrencyTxPayment(RecurrencyPaymentCall::pay_with_capacity { call, .. }) => Self::extract_hash_data(call), - RuntimeCall::FrequencyTxPayment( - FrequencyPaymentCall::pay_with_capacity_batch_all { calls, .. }, + RuntimeCall::RecurrencyTxPayment( + RecurrencyPaymentCall::pay_with_capacity_batch_all { calls, .. }, ) => calls.iter().flat_map(|c| Self::extract_hash_data(c)).collect(), RuntimeCall::Utility(UtilityCall::batch { calls, .. }) | RuntimeCall::Utility(UtilityCall::batch_all { calls, .. }) => @@ -1552,7 +1552,7 @@ mod benches { [pallet_utility, Utility] [pallet_proxy, Proxy] - // Frequency + // Recurrency [pallet_msa, Msa] [pallet_schemas, Schemas] [pallet_messages, Messages] @@ -1560,13 +1560,13 @@ mod benches { [pallet_handles, Handles] [pallet_time_release, TimeRelease] [pallet_capacity, Capacity] - [pallet_frequency_tx_payment, FrequencyTxPayment] + [pallet_recurrency_tx_payment, RecurrencyTxPayment] // Todo: uncomment after removing the feature flag // [pallet_passkey, Passkey] ); } -#[cfg(any(not(feature = "frequency-no-relay"), feature = "frequency-lint-check"))] +#[cfg(any(not(feature = "recurrency-no-relay"), feature = "recurrency-lint-check"))] cumulus_pallet_parachain_system::register_validate_block! { Runtime = Runtime, BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::, diff --git a/runtime/system-runtime-api/Cargo.toml b/runtime/system-runtime-api/Cargo.toml index 95e1237..86a4946 100644 --- a/runtime/system-runtime-api/Cargo.toml +++ b/runtime/system-runtime-api/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "system-runtime-api" version = "0.0.0" -description = "Additional RPC package for Frequency" -authors = ["Frequency"] +description = "Additional RPC package for Recurrency" +authors = ["Recurrency"] license = "Apache-2.0" publish = false -homepage = "https://frequency.xyz" -repository = "https://github.com/frequency-chain/frequency/" +homepage = "https://recurrency.xyz" +repository = "https://github.com/rustadot/recurrency/" edition = "2021" [dependencies] @@ -17,7 +17,7 @@ sp-api = { workspace = true } sp-std = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } -# Frequency related dependencies +# Recurrency related dependencies common-primitives = { default-features = false, path = "../../common/primitives" } [features] diff --git a/runtime/system-runtime-api/src/lib.rs b/runtime/system-runtime-api/src/lib.rs index 2c4e856..ce0fcf3 100644 --- a/runtime/system-runtime-api/src/lib.rs +++ b/runtime/system-runtime-api/src/lib.rs @@ -10,7 +10,7 @@ missing_docs )] -//! Runtime API definition for additional Frequency RPCs +//! Runtime API definition for additional Recurrency RPCs //! This api must be implemented by the n//!ode runtime. //! Runtime APIs Provide: //! - An interface between the runtime and Custom RPCs. @@ -23,13 +23,13 @@ use sp_std::prelude::*; // runtime files (the `runtime` folder) sp_api::decl_runtime_apis! { - /// Runtime Version for Additional Frequency Runtime Apis + /// Runtime Version for Additional Recurrency Runtime Apis /// - MUST be incremented if anything changes /// - Also update in js/api-augment /// - See: https://paritytech.github.io/polkadot/doc/polkadot_primitives/runtime_api/index.html #[api_version(1)] - /// Runtime API definition for Frequency + /// Runtime API definition for Recurrency pub trait AdditionalRuntimeApi { /// Fetch the events of a block /// An easy to work with structure with minimal SCALE needs diff --git a/scripts/generate_js_definitions.sh b/scripts/generate_js_definitions.sh index fb71b99..76555b1 100755 --- a/scripts/generate_js_definitions.sh +++ b/scripts/generate_js_definitions.sh @@ -8,11 +8,11 @@ BOLD_MESSAGE='\033[1;33m' # Bold Yellow SUCCESS='\033[0;92m' # Green NC='\033[0m' # No Color -echo -e "${STEP_COLOR}Checking to see if Frequency is running...${NC}" +echo -e "${STEP_COLOR}Checking to see if Recurrency is running...${NC}" echo "" -echo -e "${MESSAGE}Is Frequency running?${NC}" +echo -e "${MESSAGE}Is Recurrency running?${NC}" -PID=$(lsof -i tcp:9944 | grep frequency | grep -v grep | xargs | awk '{print $2}') +PID=$(lsof -i tcp:9944 | grep recurrency | grep -v grep | xargs | awk '{print $2}') if [ -z "$PID" ] then @@ -21,7 +21,7 @@ then echo -e "${NC}" echo -e "${STEP_COLOR}Generating using CLI...${NC}" rm -f ./js/api-augment/metadata.json - cargo run --features frequency-local -- export-metadata --tmp --chain=frequency-paseo-local ./js/api-augment/metadata.json + cargo run --features recurrency-local -- export-metadata --tmp --chain=recurrency-paseo-local ./js/api-augment/metadata.json # cd into js dir cd "js/api-augment" npm install # in case things have changed @@ -31,7 +31,7 @@ else echo "Yes. ( You better go catch it ;-) )" echo "" echo "---------------------------------------------" - echo "Use this PID to kill the Frequency process:" + echo "Use this PID to kill the Recurrency process:" echo -e "${BOLD_MESSAGE}PID: ${PID}${SUCCESS}" echo "---------------------------------------------" echo -e "${NC}" diff --git a/scripts/generate_specs.sh b/scripts/generate_specs.sh index 1ae093c..dc6729d 100755 --- a/scripts/generate_specs.sh +++ b/scripts/generate_specs.sh @@ -10,7 +10,7 @@ if [[ $parachain_id == "" ]]; then exit 1 fi -BUILT_TARGET=./target/$profile/frequency +BUILT_TARGET=./target/$profile/recurrency if [ ! -x "$BUILT_TARGET" ]; then echo "FATAL: $BUILT_TARGET does not exist, or not executable, rebuild binary to continue" exit 1 @@ -18,16 +18,16 @@ fi case $build_step in paseo-2000) mkdir -p ./res/genesis/local - echo "Building Spec for frequency testnet paseo localnet paraid=2000" - $PWD/target/$profile/frequency build-spec --disable-default-bootnode --chain=frequency-paseo-local > ./res/genesis/local/frequency-spec-paseo.json - sed -i.bu "s/\"parachainId\": 2000/\"parachainId\": $parachain_id/g" ./res/genesis/local/frequency-spec-paseo.json - sed -i.bu "s/\"para_id\": 2000/\"para_id\": $parachain_id/g" ./res/genesis/local/frequency-spec-paseo.json - $PWD/target/$profile/frequency build-spec --raw --disable-default-bootnode --chain ./res/genesis/local/frequency-spec-paseo.json > ./res/genesis/local/paseo-local-frequency-2000-raw.json - rm ./res/genesis/local/frequency-spec-paseo.json.bu + echo "Building Spec for recurrency testnet paseo localnet paraid=2000" + $PWD/target/$profile/recurrency build-spec --disable-default-bootnode --chain=recurrency-paseo-local > ./res/genesis/local/recurrency-spec-paseo.json + sed -i.bu "s/\"parachainId\": 2000/\"parachainId\": $parachain_id/g" ./res/genesis/local/recurrency-spec-paseo.json + sed -i.bu "s/\"para_id\": 2000/\"para_id\": $parachain_id/g" ./res/genesis/local/recurrency-spec-paseo.json + $PWD/target/$profile/recurrency build-spec --raw --disable-default-bootnode --chain ./res/genesis/local/recurrency-spec-paseo.json > ./res/genesis/local/paseo-local-recurrency-2000-raw.json + rm ./res/genesis/local/recurrency-spec-paseo.json.bu - echo "Exporting state and wasm for frequency testnet paseo localnet paraid=2000" - $PWD/target/$profile/frequency export-genesis-state --chain ./res/genesis/local/paseo-local-frequency-2000-raw.json > ./res/genesis/local/frequency-paseo-genesis-state - $PWD/target/$profile/frequency export-genesis-wasm --chain ./res/genesis/local/paseo-local-frequency-2000-raw.json > ./res/genesis/local/frequency-paseo-genesis-wasm + echo "Exporting state and wasm for recurrency testnet paseo localnet paraid=2000" + $PWD/target/$profile/recurrency export-genesis-state --chain ./res/genesis/local/paseo-local-recurrency-2000-raw.json > ./res/genesis/local/recurrency-paseo-genesis-state + $PWD/target/$profile/recurrency export-genesis-wasm --chain ./res/genesis/local/paseo-local-recurrency-2000-raw.json > ./res/genesis/local/recurrency-paseo-genesis-wasm ;; *) echo "Unknown build step: $build_step" diff --git a/scripts/healthcheck.sh b/scripts/healthcheck.sh index 3ad1e43..68239cb 100755 --- a/scripts/healthcheck.sh +++ b/scripts/healthcheck.sh @@ -2,10 +2,10 @@ set -e -frequency_rpc_port="${Frequency_RPC_PORT:-11936}" +recurrency_rpc_port="${Recurrency_RPC_PORT:-11936}" node="127.0.0.1" -port="$frequency_rpc_port" +port="$recurrency_rpc_port" curl -sS \ -H 'Content-Type: application/json' \ --data '{"id":1,"jsonrpc":"2.0","method":"system_health"}' \ diff --git a/scripts/init.sh b/scripts/init.sh index 36dd723..3811452 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -3,16 +3,16 @@ set -e cmd=$1 -chain_spec="${RAW_PARACHAIN_CHAIN_SPEC:-./res/genesis/local/paseo-local-frequency-2000-raw.json}" +chain_spec="${RAW_PARACHAIN_CHAIN_SPEC:-./res/genesis/local/paseo-local-recurrency-2000-raw.json}" # The runtime we want to use parachain="${PARA_CHAIN_CONFIG:-paseo-2000}" # The parachain Id we want to use para_id="${PARA_ID:-2000}" # The tmp base directory -base_dir=/tmp/frequency +base_dir=/tmp/recurrency # Option to use the Docker image to export state & wasm docker_onboard="${DOCKER_ONBOARD:-false}" -frequency_docker_image_tag="${PARA_DOCKER_IMAGE_TAG:-frequency-latest}" +recurrency_docker_image_tag="${PARA_DOCKER_IMAGE_TAG:-recurrency-latest}" chain="${RELAY_CHAIN_SPEC:-./resources/paseo-local.json}" # offchain options offchain_params="--offchain-worker=never" @@ -36,21 +36,21 @@ stop-paseo-relay-chain) docker-compose down ;; -start-frequency-docker) - echo "Starting frequency container with Alice..." +start-recurrency-docker) + echo "Starting recurrency container with Alice..." cd docker - docker-compose up --build collator_frequency + docker-compose up --build collator_recurrency ;; -stop-frequency-docker) - echo "Stopping frequency container with Alice..." +stop-recurrency-docker) + echo "Stopping recurrency container with Alice..." cd docker docker-compose down ;; start-paseo-collator-alice) - printf "\nBuilding frequency with runtime '$parachain' and id '$para_id'...\n" - cargo build --release --features frequency-local + printf "\nBuilding recurrency with runtime '$parachain' and id '$para_id'...\n" + cargo build --release --features recurrency-local parachain_dir_alice=$base_dir/parachain/alice/${para_id} mkdir -p $parachain_dir_alice; @@ -60,10 +60,10 @@ start-paseo-collator-alice) rm -rf $parachain_dir_alice fi - "${Frequency_BINARY_PATH:-./target/release/frequency}" key generate-node-key --base-path=$parachain_dir_alice/data + "${Recurrency_BINARY_PATH:-./target/release/recurrency}" key generate-node-key --base-path=$parachain_dir_alice/data ./scripts/run_collator.sh \ - --chain="frequency-paseo-local" --alice \ + --chain="recurrency-paseo-local" --alice \ --base-path=$parachain_dir_alice/data \ --wasm-execution=compiled \ --force-authoring \ @@ -77,8 +77,8 @@ start-paseo-collator-alice) ;; start-paseo-collator-bob) - printf "\nBuilding frequency with runtime '$parachain' and id '$para_id'...\n" - cargo build --release --features frequency-local + printf "\nBuilding recurrency with runtime '$parachain' and id '$para_id'...\n" + cargo build --release --features recurrency-local parachain_dir_bob=$base_dir/parachain/bob/${para_id} mkdir -p $parachain_dir_bob; @@ -88,10 +88,10 @@ start-paseo-collator-bob) rm -rf $parachain_dir_bob fi - "${Frequency_BINARY_PATH:-./target/release/frequency}" key generate-node-key --base-path=$parachain_dir_bob/data + "${Recurrency_BINARY_PATH:-./target/release/recurrency}" key generate-node-key --base-path=$parachain_dir_bob/data ./scripts/run_collator.sh \ - --chain="frequency-paseo-local" --bob \ + --chain="recurrency-paseo-local" --bob \ --base-path=$parachain_dir_bob/data \ --wasm-execution=compiled \ --force-authoring \ @@ -104,9 +104,9 @@ start-paseo-collator-bob) $offchain_params \ ;; -start-frequency-instant) - printf "\nBuilding Frequency without relay. Running with instant sealing ...\n" - cargo build --features frequency-no-relay +start-recurrency-instant) + printf "\nBuilding Recurrency without relay. Running with instant sealing ...\n" + cargo build --features recurrency-no-relay parachain_dir=$base_dir/parachain/${para_id} mkdir -p $parachain_dir; @@ -116,7 +116,7 @@ start-frequency-instant) rm -rf $parachain_dir fi - ./target/debug/frequency \ + ./target/debug/recurrency \ --dev \ --state-pruning archive \ -lbasic-authorship=debug \ @@ -135,11 +135,11 @@ start-frequency-instant) --tmp ;; -start-frequency-interval) +start-recurrency-interval) defaultInterval=12 interval=${3-$defaultInterval} - printf "\nBuilding Frequency without relay. Running with interval sealing with interval of $interval seconds...\n" - cargo build --features frequency-no-relay + printf "\nBuilding Recurrency without relay. Running with interval sealing with interval of $interval seconds...\n" + cargo build --features recurrency-no-relay parachain_dir=$base_dir/parachain/${para_id} mkdir -p $parachain_dir; @@ -149,7 +149,7 @@ start-frequency-interval) rm -rf $parachain_dir fi - ./target/debug/frequency \ + ./target/debug/recurrency \ --dev \ --state-pruning archive \ -lbasic-authorship=debug \ @@ -169,9 +169,9 @@ start-frequency-interval) --tmp ;; -start-frequency-manual) - printf "\nBuilding frequency without relay. Running with manual sealing ...\n" - cargo build --features frequency-no-relay +start-recurrency-manual) + printf "\nBuilding recurrency without relay. Running with manual sealing ...\n" + cargo build --features recurrency-no-relay parachain_dir=$base_dir/parachain/${para_id} mkdir -p $parachain_dir; @@ -182,11 +182,11 @@ start-frequency-manual) fi echo "---------------------------------------" - echo "Running Frequency in manual seal mode." + echo "Running Recurrency in manual seal mode." echo "Run 'make local-block' to seal a block." echo "---------------------------------------" - ./target/debug/frequency \ + ./target/debug/recurrency \ --dev \ -lruntime=debug \ --sealing=manual \ @@ -202,22 +202,22 @@ start-frequency-manual) --tmp ;; -start-frequency-container) +start-recurrency-container) parachain_dir=$base_dir/parachain/${para_id} mkdir -p $parachain_dir; - frequency_default_port=$((30333)) - frequency_default_rpc_port=$((9944)) - frequency_port="${Frequency_PORT:-$frequency_default_port}" - frequency_rpc_port="${Frequency_RPC_PORT:-$frequency_default_rpc_port}" + recurrency_default_port=$((30333)) + recurrency_default_rpc_port=$((9944)) + recurrency_port="${Recurrency_PORT:-$recurrency_default_port}" + recurrency_rpc_port="${Recurrency_RPC_PORT:-$recurrency_default_rpc_port}" ./scripts/run_collator.sh \ - --chain="frequency-paseo-local" --alice \ + --chain="recurrency-paseo-local" --alice \ --base-path=$parachain_dir/data \ --wasm-execution=compiled \ --force-authoring \ - --port "${frequency_port}" \ - --rpc-port "${frequency_rpc_port}" \ + --port "${recurrency_port}" \ + --rpc-port "${recurrency_rpc_port}" \ --rpc-external \ --rpc-cors all \ --rpc-methods=Unsafe \ @@ -225,14 +225,14 @@ start-frequency-container) $offchain_params \ ;; -register-frequency-paseo-local) +register-recurrency-paseo-local) echo "reserving and registering parachain with relay via first available slot..." cd scripts/js/onboard npm i && npm run register "ws://0.0.0.0:9946" "//Alice" ;; -onboard-frequency-paseo-local) +onboard-recurrency-paseo-local) echo "Onboarding parachain with runtime '$parachain' and id '$para_id'..." onboard_dir="$base_dir/onboard" @@ -241,35 +241,35 @@ onboard-frequency-paseo-local) # THE `-r` is important for it to be binary instead of hex if [ "$docker_onboard" == "true" ]; then - genesis=$(docker run -it {REPO_NAME}/frequency:${frequency_docker_image_tag} export-genesis-state --chain="frequency-paseo-local") - docker run -it {REPO_NAME}/frequency:${frequency_docker_image_tag} export-genesis-wasm --chain="frequency-paseo-local" -r > $wasm_location + genesis=$(docker run -it {REPO_NAME}/recurrency:${recurrency_docker_image_tag} export-genesis-state --chain="recurrency-paseo-local") + docker run -it {REPO_NAME}/recurrency:${recurrency_docker_image_tag} export-genesis-wasm --chain="recurrency-paseo-local" -r > $wasm_location else - genesis=$(./target/release/frequency export-genesis-state --chain="frequency-paseo-local") - ./target/release/frequency export-genesis-wasm --chain="frequency-paseo-local" -r > $wasm_location + genesis=$(./target/release/recurrency export-genesis-state --chain="recurrency-paseo-local") + ./target/release/recurrency export-genesis-wasm --chain="recurrency-paseo-local" -r > $wasm_location fi cd scripts/js/onboard npm i && npm run onboard "ws://0.0.0.0:9946" "//Alice" ${para_id} "${genesis}" "${wasm_location}" ;; -offboard-frequency-paseo-local) +offboard-recurrency-paseo-local) echo "cleaning up parachain for id '$para_id'..." cd scripts/js/onboard npm i && npm run cleanup "ws://0.0.0.0:9946" "//Alice" ${para_id} ;; -upgrade-frequency-paseo-local) +upgrade-recurrency-paseo-local) root_dir=$(git rev-parse --show-toplevel) echo "root_dir is set to $root_dir" # Due to defaults and profile=debug, the target directory will be $root_dir/target/debug cargo build \ - --package frequency-runtime \ - --features frequency-local + --package recurrency-runtime \ + --features recurrency-local - wasm_location=$root_dir/target/debug/wbuild/frequency-runtime/frequency_runtime.compact.compressed.wasm + wasm_location=$root_dir/target/debug/wbuild/recurrency-runtime/recurrency_runtime.compact.compressed.wasm ./scripts/runtime-upgrade.sh "//Alice" "ws://0.0.0.0:9944" $wasm_location @@ -277,17 +277,17 @@ upgrade-frequency-paseo-local) ;; -upgrade-frequency-no-relay) +upgrade-recurrency-no-relay) root_dir=$(git rev-parse --show-toplevel) echo "root_dir is set to $root_dir" # Due to defaults and profile=debug, the target directory will be $root_dir/target/debug cargo build \ - --package frequency-runtime \ - --features frequency-no-relay + --package recurrency-runtime \ + --features recurrency-no-relay - wasm_location=$root_dir/target/debug/wbuild/frequency-runtime/frequency_runtime.compact.compressed.wasm + wasm_location=$root_dir/target/debug/wbuild/recurrency-runtime/recurrency_runtime.compact.compressed.wasm ./scripts/runtime-dev-upgrade.sh "//Alice" "ws://0.0.0.0:9944" $wasm_location diff --git a/scripts/kill_freq.sh b/scripts/kill_freq.sh index b94af2d..3581ccd 100755 --- a/scripts/kill_freq.sh +++ b/scripts/kill_freq.sh @@ -2,10 +2,10 @@ set -e -PID=$(lsof -i tcp:9944 | grep frequency | xargs | awk '{print $2}') +PID=$(lsof -i tcp:9944 | grep recurrency | xargs | awk '{print $2}') if [ -n "${PID}" ] then kill -9 ${PID} - echo "Frequency has been killed. 💀" + echo "Recurrency has been killed. 💀" fi diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index f1f4b11..373b9ba 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -28,7 +28,7 @@ ALL_CUSTOM_PALLETS=( \ handles \ time-release \ capacity \ - frequency-tx-payment \ + recurrency-tx-payment \ passkey \ ) @@ -167,7 +167,7 @@ then OVERHEAD=overhead fi -RUNTIME=${PROJECT}/target/${PROFILE_DIR}/frequency +RUNTIME=${PROJECT}/target/${PROFILE_DIR}/recurrency BENCHMARK="${RUNTIME} benchmark " echo "Running benchmarks for the following pallets:\ @@ -182,7 +182,7 @@ function run_benchmark() { ${BENCHMARK} pallet \ --pallet=${1} \ --extrinsic "*" \ - --chain="frequency-bench" \ + --chain="recurrency-bench" \ --heap-pages=4096 \ --wasm-execution=compiled \ --steps=${2} \ @@ -198,7 +198,7 @@ function run_benchmark() { if [[ ${skip_build} == false ]] then - CMD="cargo build --profile=${PROFILE} --features=runtime-benchmarks,frequency-lint-check --workspace" + CMD="cargo build --profile=${PROFILE} --features=runtime-benchmarks,recurrency-lint-check --workspace" echo ${CMD} ${CMD} || exit_err fi @@ -232,6 +232,6 @@ then fi echo "Running tests..." -CMD="cargo test --profile=${PROFILE} --features=runtime-benchmarks,frequency-lint-check --workspace" +CMD="cargo test --profile=${PROFILE} --features=runtime-benchmarks,recurrency-lint-check --workspace" echo ${CMD} ${CMD} || exit_err diff --git a/scripts/run_collator.sh b/scripts/run_collator.sh index 05b2d58..05e33c3 100755 --- a/scripts/run_collator.sh +++ b/scripts/run_collator.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# this script runs the frequency after fetching +# this script runs the recurrency after fetching # appropriate bootnode IDs set -e -o pipefail -ctpc="${Frequency_BINARY_PATH:-./target/release/frequency}" +ctpc="${Recurrency_BINARY_PATH:-./target/release/recurrency}" if [ ! -x "$ctpc" ]; then echo "FATAL: $ctpc does not exist or is not executable" diff --git a/scripts/run_e2e_tests.sh b/scripts/run_e2e_tests.sh index 54c09e1..21c841d 100755 --- a/scripts/run_e2e_tests.sh +++ b/scripts/run_e2e_tests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -function get_frequency_pid () { - lsof -i tcp:9944 | grep frequency | xargs | awk '{print $2}' +function get_recurrency_pid () { + lsof -i tcp:9944 | grep recurrency | xargs | awk '{print $2}' } function cleanup () { @@ -20,9 +20,9 @@ function cleanup () { if [ -n "${PID}" ] then kill -9 ${PID} - echo "Frequency has been killed. 💀" + echo "Recurrency has been killed. 💀" else - echo "Frequency was not started by this script." + echo "Recurrency was not started by this script." fi ;; esac @@ -80,42 +80,42 @@ case "${CHAIN}" in NPM_RUN_COMMAND="test:relay" CHAIN_ENVIRONMENT="paseo-testnet" - read -p "Enter the seed phrase for the Frequency Paseo account funding source: " FUNDING_ACCOUNT_SEED_PHRASE + read -p "Enter the seed phrase for the Recurrency Paseo account funding source: " FUNDING_ACCOUNT_SEED_PHRASE ;; esac echo "The E2E test output will be logged on this console" -echo "The Frequency node output will be logged to the file frequency.log." -echo "You can 'tail -f frequency.log' in another terminal to see both side-by-side." +echo "The Recurrency node output will be logged to the file recurrency.log." +echo "You can 'tail -f recurrency.log' in another terminal to see both side-by-side." echo "" -echo -e "Checking to see if Frequency is running..." +echo -e "Checking to see if Recurrency is running..." -if [ -n "$( get_frequency_pid )" ] +if [ -n "$( get_recurrency_pid )" ] then - echo "Frequency is already running." + echo "Recurrency is already running." else if [ "${CHAIN_ENVIRONMENT}" = "paseo-local" ] then - echo "Frequency is not running." + echo "Recurrency is not running." echo "The intended use case of running E2E tests with a chain environment" - echo "of \"paseo-local\" is to run the tests against a locally running Frequency" + echo "of \"paseo-local\" is to run the tests against a locally running Recurrency" echo "chain with locally running Polkadot relay nodes." exit 1 fi - echo "Building a no-relay Frequency executable..." + echo "Building a no-relay Recurrency executable..." if ! make build-no-relay then - echo "Error building Frequency executable; aborting." + echo "Error building Recurrency executable; aborting." exit 1 fi - echo "Starting a Frequency Node with block sealing ${LOCAL_NODE_BLOCK_SEALING}..." + echo "Starting a Recurrency Node with block sealing ${LOCAL_NODE_BLOCK_SEALING}..." case ${LOCAL_NODE_BLOCK_SEALING} in - "instant") ${RUNDIR}/init.sh start-frequency-instant >& frequency.log & + "instant") ${RUNDIR}/init.sh start-recurrency-instant >& recurrency.log & ;; - "manual") ${RUNDIR}/init.sh start-frequency-manual >& frequency.log & + "manual") ${RUNDIR}/init.sh start-recurrency-manual >& recurrency.log & ;; esac @@ -123,18 +123,18 @@ else declare -i i=0 while (( !PID && i < timeout_secs )) do - PID=$( get_frequency_pid ) + PID=$( get_recurrency_pid ) sleep 1 (( i += 1 )) done if [ -z "${PID}" ] then - echo "Unable to find or start a Frequency node; aborting." + echo "Unable to find or start a Recurrency node; aborting." exit 1 fi echo "---------------------------------------------" - echo "Frequency running here:" + echo "Recurrency running here:" echo "PID: ${PID}" echo "---------------------------------------------" fi @@ -149,15 +149,15 @@ else npm run fetch:local npm run --silent build cd dist - echo "Packaging up into js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz" + echo "Packaging up into js/api-augment/dist/rustadot-api-augment-0.0.0.tgz" npm pack --silent cd ../../.. fi cd e2e -echo "Installing js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz" -npm i ../js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz +echo "Installing js/api-augment/dist/rustadot-api-augment-0.0.0.tgz" +npm i ../js/api-augment/dist/rustadot-api-augment-0.0.0.tgz npm install echo "---------------------------------------------" echo "Starting Tests..." diff --git a/tools/ci/release-notes/release-notes.md.tera b/tools/ci/release-notes/release-notes.md.tera index 20a1dca..a6ad49c 100644 --- a/tools/ci/release-notes/release-notes.md.tera +++ b/tools/ci/release-notes/release-notes.md.tera @@ -4,7 +4,7 @@ This release contains the changes from `{{env.PREVIOUS_RELEASE_TAG}}` to `{{env. This release candidate contains the changes from `{{env.PREVIOUS_RELEASE_TAG}}` to `{{env.NEW_RELEASE_TAG}}`. {% endif %} -Full changelog: https://github.com/frequency-chain/frequency/compare/{{env.PREVIOUS_RELEASE_TAG}}...{{env.NEW_RELEASE_TAG}} +Full changelog: https://github.com/rustadot/recurrency/compare/{{env.PREVIOUS_RELEASE_TAG}}...{{env.NEW_RELEASE_TAG}} ## Versions - Rust Toolchain: `{{env.RUST_TOOLCHAIN}}` @@ -13,8 +13,8 @@ Full changelog: https://github.com/frequency-chain/frequency/compare/{{env.PREVI {% if env.IS_FULL_RELEASE == 'true' %} ## Deployed -- Frequency-Paseo Testnet: [TBD]() -- Frequency Mainnet: [TBD]() +- Recurrency-Paseo Testnet: [TBD]() +- Recurrency Mainnet: [TBD]() {% endif %} ## What's Changed @@ -37,7 +37,7 @@ The information about the runtimes included in this release can be found below. {% endfor -%} ``` -### Frequency Paseo Testnet +### Recurrency Paseo Testnet {% set runtime = env.RUNTIME_PASEO_INFO | split(pat='|') -%} ``` diff --git a/tools/ci/scripts/test-changelog-sanitizer.sh b/tools/ci/scripts/test-changelog-sanitizer.sh index 89a924a..204bb84 100755 --- a/tools/ci/scripts/test-changelog-sanitizer.sh +++ b/tools/ci/scripts/test-changelog-sanitizer.sh @@ -6,7 +6,7 @@ set -x changelog='### Major Changes|n| - Restrict Pays:No call in batches #1452|n| - - refactor: feature frequency-local => frequency-paseo-local #1511|n| + - refactor: feature recurrency-local => recurrency-paseo-local #1511|n| |n||n|### Uncategorized Changes|n||n| - [Handles] Testing Cleanup #1445|n| - fix type definition mismatch for schemas #1443|n| @@ -20,7 +20,7 @@ changelog='### Major Changes|n| - add CI base image #1468|n| - clear metadata mismatch label on Verify PR workflow start #1480|n| - switch Merge PR workflow to EKS runners #1459|n| - - 1401 Build/run Frequency runtime without a relay chain #1464|n| + - 1401 Build/run Recurrency runtime without a relay chain #1464|n| - Bump robinraju/release-downloader from 1.7 to 1.8 #1473|n| - Update README.md #1489|n| - Update README.md #1490|n| diff --git a/tools/genesis-data/schemas.mjs b/tools/genesis-data/schemas.mjs index a7f9e05..d5946f1 100644 --- a/tools/genesis-data/schemas.mjs +++ b/tools/genesis-data/schemas.mjs @@ -2,7 +2,7 @@ import { getSchemas } from "./getSchema.mjs"; -const SOURCE_URL = "wss://1.rpc.frequency.xyz"; +const SOURCE_URL = "wss://1.rpc.recurrency.xyz"; async function main() { try { diff --git a/tools/scripts/show-runtime-version.sh b/tools/scripts/show-runtime-version.sh index 2557a3c..f382c56 100755 --- a/tools/scripts/show-runtime-version.sh +++ b/tools/scripts/show-runtime-version.sh @@ -12,5 +12,5 @@ EOF exit 1 fi -(git cat-file -p "${1}:runtime/frequency/src/lib.rs" | grep "spec_version:") 2>/dev/null \ +(git cat-file -p "${1}:runtime/recurrency/src/lib.rs" | grep "spec_version:") 2>/dev/null \ || (git cat-file -p "${1}:runtime/mrc/src/lib.rs" | grep "spec_version:" ) diff --git a/tools/state-copy/schemas.mjs b/tools/state-copy/schemas.mjs index 8a853c1..1321adb 100644 --- a/tools/state-copy/schemas.mjs +++ b/tools/state-copy/schemas.mjs @@ -2,7 +2,7 @@ import { copy } from "./copy.mjs"; -const SOURCE_URL = "wss://1.rpc.frequency.xyz"; +const SOURCE_URL = "wss://1.rpc.recurrency.xyz"; const DEST_URL = "ws://127.0.0.1:9944"; const STORAGE_KEY = "0xeec6f3c13d26ae2507c99b6751e19e76"; const FILTER_OUT = [