From 6574f7477ad5c80cb4d626f6c441abf9aba0d173 Mon Sep 17 00:00:00 2001 From: David Palm Date: Fri, 16 Feb 2024 16:34:34 +0100 Subject: [PATCH 1/3] chore: rename sequencer to certificate producer --- .../workflows/frontend:erc20-messaging.yml | 12 +- .github/workflows/topos:integration-tests.yml | 14 +- .../workflows/topos:sequencer-contracts.yml | 126 ------------------ README.md | 8 +- 4 files changed, 15 insertions(+), 145 deletions(-) delete mode 100644 .github/workflows/topos:sequencer-contracts.yml diff --git a/.github/workflows/frontend:erc20-messaging.yml b/.github/workflows/frontend:erc20-messaging.yml index 8134414..1cb1574 100644 --- a/.github/workflows/frontend:erc20-messaging.yml +++ b/.github/workflows/frontend:erc20-messaging.yml @@ -11,8 +11,8 @@ on: type: choice default: light options: - - light - - full + - light + - full local-erc20-messaging-infra-ref: description: "Git ref of local-erc20-messaging-infra" required: false @@ -152,13 +152,13 @@ jobs: if: failure() run: docker ps - - name: Debug sending sequencer + - name: Debug sending Certificate Producer if: failure() - run: docker logs topos-sequencer + run: docker logs topos-certificate-producer - - name: Debug receiving sequencer + - name: Debug receiving Certificate Producer if: failure() - run: docker logs incal-sequencer + run: docker logs incal-certificate-producer - name: Debug topos node 1 if: failure() diff --git a/.github/workflows/topos:integration-tests.yml b/.github/workflows/topos:integration-tests.yml index e4227fc..04227f0 100644 --- a/.github/workflows/topos:integration-tests.yml +++ b/.github/workflows/topos:integration-tests.yml @@ -78,7 +78,7 @@ jobs: TOPOS_CORE_SALT: ${{ secrets.TOPOS_CORE_SALT }} TOPOS_CORE_PROXY_SALT: ${{ secrets.TOPOS_CORE_PROXY_SALT }} ERC20_MESSAGING_SALT: ${{ secrets.ERC20_MESSAGING_SALT }} - SUBNET_REGISTRATOR_SALT: ${{ secrets.SUBNET_REGISTRATOR_SALT }} + SUBNET_REGISTRATOR_SALT: ${{ secrets.SUBNET_REGISTRATOR_SALT }} TOPOS_VERSION: ${{ env.TOPOS_DOCKER_TAG }} TOPOS_MESSAGING_PROTOCOL_CONTRACTS_VERSION: ${{ env.CONTRACTS_DOCKER_TAG }} @@ -151,11 +151,11 @@ jobs: ERC20_MESSAGING_SALT: ${{ secrets.ERC20_MESSAGING_SALT }} SUBNET_REGISTRATOR_SALT: ${{ secrets.SUBNET_REGISTRATOR_SALT }} - - name: Run target sequencer cert delivery test + - name: Run target Certificate Producer cert delivery test run: > cd infra && source .env && - ./tests/test_cert_sequencer_delivery.sh + ./tests/test_cert_certificate_producer_delivery.sh env: DOCKER_DEFAULT_PLATFORM: linux/amd64 PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} @@ -183,13 +183,13 @@ jobs: if: failure() run: docker ps - - name: Debug sending sequencer + - name: Debug sending Certificate Producer if: failure() - run: docker logs topos-sequencer + run: docker logs topos-certificate-producer - - name: Debug receiving sequencer + - name: Debug receiving Certificate Producer if: failure() - run: docker logs incal-sequencer + run: docker logs incal-certificate-producer - name: Debug TCE boot node if: failure() diff --git a/.github/workflows/topos:sequencer-contracts.yml b/.github/workflows/topos:sequencer-contracts.yml deleted file mode 100644 index 7852db5..0000000 --- a/.github/workflows/topos:sequencer-contracts.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Sequencer Topos-Smart-Contracts - -on: - pull_request: - branches: - - main - workflow_dispatch: - inputs: - topos-ref: - description: "Git ref of topos" - required: false - topos-smart-contracts-ref: - description: "Git ref of topos-smart-contracts" - required: false - polygon-edge-docker-tag: - description: "Docker tag of polygon-edge" - required: false - -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: -Dwarnings - RUST_BACKTRACE: 1 - rust_clippy: 1.62.1 - POLYGON_EDGE_DOCKER_TAG: ${{ inputs.polygon-edge-docker-tag || 'develop' }} - -jobs: - # Wait for topos to have a release pipeline. In the meantime => use main if no input - # topos-metadata: - # uses: ./.github/workflows/util:get-latest-release.yml - # with: - # organization: topos-protocol - # repository: topos - - contracts-metadata: - uses: ./.github/workflows/util:get-latest-release.yml - with: - organization: topos-protocol - repository: topos-smart-contracts - - e2e: - strategy: - fail-fast: false - matrix: - target: - - { - name: Linux, - os: ubuntu-latest-16-core, - triple: x86_64-unknown-linux-gnu, - } - version: - - stable - - nightly - name: ${{ matrix.version }} - runs-on: ${{ matrix.target.os }} - env: - TOPOS_REF: ${{ inputs.topos-ref || 'main' }} - CONTRACTS_REF: ${{ inputs.topos-smart-contracts-ref || needs.contracts-metadata.outputs.latest-release }} - needs: - - contracts-metadata - steps: - - name: Display stack component versions - run: > - echo "topos ref: ${{ env.TOPOS_REF }}" && - echo "contracts ref: ${{ env.CONTRACTS_REF }}" && - echo "polygon-edge docker tag: ${{ env.POLYGON_EDGE_DOCKER_TAG }}" - - - name: Checkout topos repo - uses: actions/checkout@v3 - with: - repository: topos-protocol/topos - ref: ${{ env.TOPOS_REF }} - path: topos - - - name: Install Rust ${{ matrix.version }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.version }} - components: - override: true - - - name: Set up rust cache - uses: Swatinem/rust-cache@v1 - - - name: Install Protoc - uses: arduino/setup-protoc@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout topos-smart-contracts repo - uses: actions/checkout@v3 - with: - repository: topos-protocol/topos-smart-contracts - ref: ${{ env.CONTRACTS_REF }} - path: contracts - - - name: Set up NodeJS - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: "npm" - cache-dependency-path: contracts/package-lock.json - - - name: Install dependencies - working-directory: contracts - run: npm ci - - - name: Build contracts - working-directory: contracts - run: npm run build - - - name: Move contract artifacts - run: mv contracts/artifacts topos - - - name: Install anvil - run: | - curl -L https://foundry.paradigm.xyz -o install_foundry.sh - bash install_foundry.sh - source /home/runner/.bashrc - /home/runner/.config/.foundry/bin/foundryup - - - name: Run all workspace tests - working-directory: topos - run: | - export PATH=$PATH:/home/runner/.config/.foundry/bin - cd crates/topos-sequencer-subnet-runtime - cargo test -- --nocapture diff --git a/README.md b/README.md index 066f33c..7750c1c 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,13 @@ E2E-Tests is the end-to-end test suite testing all components of the Topos stack ![example workflow](https://github.com/topos-protocol/e2e-tests/actions/workflows/frontend:erc20-messaging.yml/badge.svg) -![example workflow](https://github.com/topos-protocol/e2e-tests/actions/workflows/topos:sequencer-contracts.yml/badge.svg) +![example workflow](https://github.com/topos-protocol/e2e-tests/actions/workflows/topos:certificate-producer-contracts.yml/badge.svg) [![](https://dcbadge.vercel.app/api/server/7HZ8F8ykBT?style=flat)](https://discord.gg/7HZ8F8ykBT) -## Development - -Contributions are very welcomed, the guidelines are outlined in [`CONTRIBUTING.md`](./CONTRIBUTING.md). - ## Support Feel free to [open an issue](https://github.com/topos-protocol/e2e-tests/issues/new) if you have any feature request or bug report.
-If you have any questions, do not hesitate to reach us on [Discord](https://discord.gg/7HZ8F8ykBT)! +If you have any questions, do not hesitate to reach out to us on [Discord](https://discord.gg/7HZ8F8ykBT)! ## Resources From 1391242df041196c84a2cdc8417216f26e369056 Mon Sep 17 00:00:00 2001 From: David Palm Date: Fri, 16 Feb 2024 16:36:03 +0100 Subject: [PATCH 2/3] chore: rename workflow file --- .../topos:certificate-producer-contracts.yml | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 .github/workflows/topos:certificate-producer-contracts.yml diff --git a/.github/workflows/topos:certificate-producer-contracts.yml b/.github/workflows/topos:certificate-producer-contracts.yml new file mode 100644 index 0000000..e5c6d80 --- /dev/null +++ b/.github/workflows/topos:certificate-producer-contracts.yml @@ -0,0 +1,126 @@ +name: Certificate Producer Topos-Smart-Contracts + +on: + pull_request: + branches: + - main + workflow_dispatch: + inputs: + topos-ref: + description: "Git ref of topos" + required: false + topos-smart-contracts-ref: + description: "Git ref of topos-smart-contracts" + required: false + polygon-edge-docker-tag: + description: "Docker tag of polygon-edge" + required: false + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: -Dwarnings + RUST_BACKTRACE: 1 + rust_clippy: 1.62.1 + POLYGON_EDGE_DOCKER_TAG: ${{ inputs.polygon-edge-docker-tag || 'develop' }} + +jobs: + # Wait for topos to have a release pipeline. In the meantime => use main if no input + # topos-metadata: + # uses: ./.github/workflows/util:get-latest-release.yml + # with: + # organization: topos-protocol + # repository: topos + + contracts-metadata: + uses: ./.github/workflows/util:get-latest-release.yml + with: + organization: topos-protocol + repository: topos-smart-contracts + + e2e: + strategy: + fail-fast: false + matrix: + target: + - { + name: Linux, + os: ubuntu-latest-16-core, + triple: x86_64-unknown-linux-gnu, + } + version: + - stable + - nightly + name: ${{ matrix.version }} + runs-on: ${{ matrix.target.os }} + env: + TOPOS_REF: ${{ inputs.topos-ref || 'main' }} + CONTRACTS_REF: ${{ inputs.topos-smart-contracts-ref || needs.contracts-metadata.outputs.latest-release }} + needs: + - contracts-metadata + steps: + - name: Display stack component versions + run: > + echo "topos ref: ${{ env.TOPOS_REF }}" && + echo "contracts ref: ${{ env.CONTRACTS_REF }}" && + echo "polygon-edge docker tag: ${{ env.POLYGON_EDGE_DOCKER_TAG }}" + + - name: Checkout topos repo + uses: actions/checkout@v3 + with: + repository: topos-protocol/topos + ref: ${{ env.TOPOS_REF }} + path: topos + + - name: Install Rust ${{ matrix.version }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.version }} + components: + override: true + + - name: Set up rust cache + uses: Swatinem/rust-cache@v1 + + - name: Install Protoc + uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout topos-smart-contracts repo + uses: actions/checkout@v3 + with: + repository: topos-protocol/topos-smart-contracts + ref: ${{ env.CONTRACTS_REF }} + path: contracts + + - name: Set up NodeJS + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: "npm" + cache-dependency-path: contracts/package-lock.json + + - name: Install dependencies + working-directory: contracts + run: npm ci + + - name: Build contracts + working-directory: contracts + run: npm run build + + - name: Move contract artifacts + run: mv contracts/artifacts topos + + - name: Install anvil + run: | + curl -L https://foundry.paradigm.xyz -o install_foundry.sh + bash install_foundry.sh + source /home/runner/.bashrc + /home/runner/.config/.foundry/bin/foundryup + + - name: Run all workspace tests + working-directory: topos + run: | + export PATH=$PATH:/home/runner/.config/.foundry/bin + cd crates/topos-certificate-producer-subnet-runtime + cargo test -- --nocapture From 1c5d3abca973a9a5bc82e085035996a444ac6859 Mon Sep 17 00:00:00 2001 From: David Palm Date: Fri, 16 Feb 2024 16:39:26 +0100 Subject: [PATCH 3/3] chore: fix wording and typos in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7750c1c..d3f3b2c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ E2E-Tests is the end-to-end test suite testing all components of the Topos stack ## Support -Feel free to [open an issue](https://github.com/topos-protocol/e2e-tests/issues/new) if you have any feature request or bug report.
+Feel free to [open an issue](https://github.com/topos-protocol/e2e-tests/issues/new) if you have a feature request or bug report.
If you have any questions, do not hesitate to reach out to us on [Discord](https://discord.gg/7HZ8F8ykBT)! ## Resources