Skip to content

Commit

Permalink
feat: move sp1-ics07-tendermint repo here (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk authored Nov 29, 2024
1 parent cea5f92 commit 169400e
Show file tree
Hide file tree
Showing 145 changed files with 6,952 additions and 422 deletions.
21 changes: 11 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Mnemonic used in base script (not e2e)
export MNEMONIC="YOUR_MNEMONIC"
# Which type of ethereum testnet to run locally (pow|pos)
ETH_TESTNET_TYPE="pow"

# SP1_PROVER={network|local|mock}
SP1_PROVER=mock

# Private key with the permission to use the network prover (optional if you use SP1_PROVER=mock)
SP1_PRIVATE_KEY="PRIVATE_KEY"
# Private key which the operator uses to sign the transactions in Eth Sepolia testnet
PRIVATE_KEY="PRIVATE-KEY"

# Which type of ethereum testnet to run locally (pow|pos)
ETH_TESTNET_TYPE="pow"

# Optional field to specify the revision (in the form of a commit hash) of the SP1 operator
# If not specified the default revision from justfile will be used when building the operator with `just install-operator`
# Format: SP1_OPERATOR_REV={a commit hash of `https://github.com/cosmos/sp1-ics07-tendermint`}
# Example: SP1_OPERATOR_REV=f67f5fec9423a4744092ee98b62bc60e3354f223
# URL of the Tendermint RPC node
TENDERMINT_RPC_URL=http://public-celestia-mocha4-consensus.numia.xyz/
# URL of the Ethereum RPC node
# use https://ethereum-sepolia.publicnode.com/ for the Eth Sepolia testnet
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
# Address of the light client contract
CONTRACT_ADDRESS="CONTRACT-ADDRESS"
45 changes: 23 additions & 22 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ on:
- 'bun.lockb'
env:
FOUNDRY_PROFILE: ci
SP1_OPERATOR_REV: f67f5fec9423a4744092ee98b62bc60e3354f223
permissions:
contents: read

Expand Down Expand Up @@ -67,6 +66,20 @@ jobs:
- TestWithIbcEurekaTestSuite/TestICS20TransferTimeoutFromEthereumToCosmosChain_Groth16
- TestWithIbcEurekaTestSuite/TestICS20TransferTimeoutFromEthereumToCosmosChain_Plonk
- TestWithRelayerTestSuite/TestRelayerInfo
- TestWithSP1ICS07TendermintTestSuite/TestDeploy_Groth16
- TestWithSP1ICS07TendermintTestSuite/TestDeploy_Plonk
- TestWithSP1ICS07TendermintTestSuite/TestUpdateClient_Groth16
- TestWithSP1ICS07TendermintTestSuite/TestUpdateClient_Plonk
- TestWithSP1ICS07TendermintTestSuite/TestMembership_Groth16
- TestWithSP1ICS07TendermintTestSuite/TestMembership_Plonk
- TestWithSP1ICS07TendermintTestSuite/TestUpdateClientAndMembership_Groth16
- TestWithSP1ICS07TendermintTestSuite/TestUpdateClientAndMembership_Plonk
- TestWithSP1ICS07TendermintTestSuite/TestDoubleSignMisbehaviour_Groth16
- TestWithSP1ICS07TendermintTestSuite/TestDoubleSignMisbehaviour_Plonk
- TestWithSP1ICS07TendermintTestSuite/TestBreakingTimeMonotonicityMisbehaviour_Groth16
- TestWithSP1ICS07TendermintTestSuite/TestBreakingTimeMonotonicityMisbehaviour_Plonk
- TestWithSP1ICS07TendermintTestSuite/Test100Membership_Groth16
- TestWithSP1ICS07TendermintTestSuite/Test25Membership_Plonk
name: ${{ matrix.test }}
runs-on: ubuntu-latest
env:
Expand All @@ -85,47 +98,35 @@ jobs:
check-latest: true
cache-dependency-path: e2e/interchaintestv8/go.sum

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy

- name: "Cache Operator"
id: cache-operator
uses: actions/cache@v4
with:
path: ~/.cargo/bin/operator
key: ${{ runner.os }}-operator-${{ env.SP1_OPERATOR_REV }}

- name: "Cache Relayer"
- name: "Cache Relayer and Operator"
id: cache-relayer
uses: actions/cache@v4
with:
path: ~/.cargo/bin/relayer
key: ${{ runner.os }}-relayer-${{ hashFiles('Cargo.lock', 'packages/**', 'relayer/**') }}
path: |
~/.cargo/bin/relayer
~/.cargo/bin/operator
key: ${{ runner.os }}-relayer-${{ hashFiles('Cargo.lock', 'packages/**', 'programs/**') }}

- name: Install SP1 toolchain
if: (steps.cache-operator.outputs.cache-hit != 'true') || (steps.cache-relayer.outputs.cache-hit != 'true')
if: (steps.cache-relayer.outputs.cache-hit != 'true')
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up --token ${{ secrets.GITHUB_TOKEN }}
~/.sp1/bin/cargo-prove prove --version
- name: Install operator
if: steps.cache-operator.outputs.cache-hit != 'true'
if: steps.cache-relayer.outputs.cache-hit != 'true'
uses: actions-rs/cargo@v1
with:
command: install
args: --git https://github.com/cosmos/sp1-ics07-tendermint --rev ${{ env.SP1_OPERATOR_REV }} sp1-ics07-tendermint-operator --bin operator --locked
args: --bin operator --path programs/operator --locked

- name: Install relayer
if: steps.cache-relayer.outputs.cache-hit != 'true'
uses: actions-rs/cargo@v1
with:
command: install
args: --bin relayer --path relayer --locked
args: --bin relayer --path programs/relayer --locked

- name: Setup Kurtosis
if: env.ETH_TESTNET_TYPE == 'pos'
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
~/.sp1/bin/sp1up --token ${{ secrets.GITHUB_TOKEN }}
~/.sp1/bin/cargo-prove prove --version
- name: Install just
uses: extractions/setup-just@v2
- name: Build SP1 Programs
run: just build-sp1-programs

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -75,3 +80,24 @@ jobs:
with:
command: build
args: --bin relayer --release --locked

build-operator:
name: build-operator
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: "Set up environment"
uses: ./.github/setup
- name: Install SP1 toolchain
shell: bash
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up --token ${{ secrets.GITHUB_TOKEN }}
~/.sp1/bin/cargo-prove prove --version
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --bin operator --release --locked
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ broadcast/*/31337/

# Rust
target
elf

# Config files and test artifacts
relayer/config.json
programs/relayer/config.json
scripts/genesis.json
Loading

0 comments on commit 169400e

Please sign in to comment.