Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added a poc relayer implementation #123

Merged
merged 77 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0000000
style: renamed src to contracts
srdtrk Nov 19, 2024
0000000
fix: src -> contracts
srdtrk Nov 19, 2024
0000000
style: moved fixture test file
srdtrk Nov 19, 2024
0000000
imp: fixed remappings and regenerated abi
srdtrk Nov 19, 2024
0000000
feat: created a rust project with solidity types
srdtrk Nov 19, 2024
0000000
imp: created relayer project
srdtrk Nov 20, 2024
0000000
imp: added listener interface
srdtrk Nov 20, 2024
0000000
refactor: listener lib
srdtrk Nov 20, 2024
0000000
imp: improved event
srdtrk Nov 20, 2024
0000000
feat: added listener service for chain
srdtrk Nov 20, 2024
0000000
imp: stashh progress
srdtrk Nov 20, 2024
0000000
feat: implemented listener serv for cosmos sdk
srdtrk Nov 21, 2024
0000000
refactor: chain
srdtrk Nov 21, 2024
0000000
imp: defined submitter interface
srdtrk Nov 21, 2024
0000000
imp: defined new trait
srdtrk Nov 21, 2024
0000000
imp: improved listeners
srdtrk Nov 21, 2024
0000000
imp: wip
srdtrk Nov 21, 2024
0000000
imp: saving progress
srdtrk Nov 23, 2024
e9d63fe
deps: updated sp1-ics07
srdtrk Nov 23, 2024
b21a6fd
imp: using flakes.nix
srdtrk Nov 23, 2024
8944a19
imp: save progress
srdtrk Nov 24, 2024
04ff5eb
imp: buf lint passing
srdtrk Nov 25, 2024
05990b1
imp: added buf linter and reorganized dirs
srdtrk Nov 25, 2024
8ca157d
imp: wrote eth eureka submitter
srdtrk Nov 25, 2024
7e7c437
imp: improved listener interface
srdtrk Nov 25, 2024
8356a83
imp: added streaming to relayer service
srdtrk Nov 25, 2024
e995475
imp: simplify proto for now
srdtrk Nov 25, 2024
893efaa
imp: using tonic
srdtrk Nov 26, 2024
72ecd41
imp: added relayer trait
srdtrk Nov 26, 2024
7f406d7
feat: started implementing server
srdtrk Nov 26, 2024
edd924b
feat: implemented a relayer module
srdtrk Nov 26, 2024
82ab596
imp: added relayer name
srdtrk Nov 26, 2024
a2e7a43
imp: defined basic configuration
srdtrk Nov 26, 2024
12ac769
imp: defined a basic cli
srdtrk Nov 26, 2024
f3d00c3
imp: implemented new
srdtrk Nov 26, 2024
862adfe
imp: added basic tracing
srdtrk Nov 26, 2024
f656300
style: renamed config
srdtrk Nov 26, 2024
d881d49
imp: added basic builder
srdtrk Nov 27, 2024
305be8a
imp: implemented serve
srdtrk Nov 27, 2024
c317729
feat: added boilerplate for bin
srdtrk Nov 27, 2024
3888eaf
merge: branch 'main' into serdar/xxx-rust-project
srdtrk Nov 27, 2024
e42e486
imp: added build-relayer to justfile
srdtrk Nov 27, 2024
3e6920f
fix: linter
srdtrk Nov 27, 2024
25360b2
imp: interface
srdtrk Nov 27, 2024
c64bdf1
imp: started building
srdtrk Nov 27, 2024
eabe73a
imp: added server start
srdtrk Nov 27, 2024
2da05b3
imp: included example config
srdtrk Nov 27, 2024
0779883
imp: updated config
srdtrk Nov 27, 2024
75e8856
imp: server seems to start
srdtrk Nov 27, 2024
d59aca6
imp: go code generates successfully
srdtrk Nov 27, 2024
d27faea
e2e: added new test suite
srdtrk Nov 27, 2024
93ed784
e2e: added first test
srdtrk Nov 27, 2024
ccd8328
imp: updated operator
srdtrk Nov 27, 2024
8233ca0
imp: seems to work
srdtrk Nov 27, 2024
6a4045e
imp: added wait
srdtrk Nov 27, 2024
8f56732
ci: added test
srdtrk Nov 27, 2024
2319706
ci: imp
srdtrk Nov 27, 2024
66853cf
deps: updated deps
srdtrk Nov 27, 2024
7ed3991
ci: imp ci
srdtrk Nov 27, 2024
8782a5a
ci: try to fix
srdtrk Nov 27, 2024
b8001ed
ci: trying to fix ci
srdtrk Nov 27, 2024
0f7f322
ci: attempt to fix
srdtrk Nov 27, 2024
94e8c29
ci: fix
srdtrk Nov 27, 2024
f340104
ci: attempt to fix
srdtrk Nov 27, 2024
4f3e9c7
ci: fix
srdtrk Nov 27, 2024
9bfe1f5
Merge branch 'main' into serdar/xxx-rust-project
srdtrk Nov 27, 2024
debc0ad
docs: updated README
srdtrk Nov 27, 2024
41cf232
docs: added README for relayer
srdtrk Nov 27, 2024
06b92e2
imp: added log level to config
srdtrk Nov 27, 2024
f246719
e2e: updated relayer config
srdtrk Nov 27, 2024
696183c
ci: fixed relayer caching
srdtrk Nov 27, 2024
1cb48c9
style: review items
srdtrk Nov 28, 2024
6f0e5e3
style: more review items
srdtrk Nov 28, 2024
7f1280a
docs: update docs
srdtrk Nov 28, 2024
f3fffb5
deps: updated sp1-ics07 contracts
srdtrk Nov 28, 2024
552161c
imp: regenerated abi
srdtrk Nov 28, 2024
407711e
style: renamed to tx_builder
srdtrk Nov 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ 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=07e23bba5000c9d67dfc1d975ac477164e56db1f
# Example: SP1_OPERATOR_REV=f67f5fec9423a4744092ee98b62bc60e3354f223
10 changes: 9 additions & 1 deletion .github/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ runs:
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"
- name: "Install Bun"
uses: "oven-sh/setup-bun@v2"
- name: "Install the Node.js dependencies"
shell: bash
run: "bun install"
run: bun install
- name: Setup Protoc
uses: taiki-e/install-action@protoc
32 changes: 23 additions & 9 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
- 'bun.lockb'
env:
FOUNDRY_PROFILE: ci
SP1_OPERATOR_REV: 07e23bba5000c9d67dfc1d975ac477164e56db1f
SP1_OPERATOR_REV: f67f5fec9423a4744092ee98b62bc60e3354f223
permissions:
contents: read

Expand Down Expand Up @@ -66,6 +66,7 @@ jobs:
- TestWithIbcEurekaTestSuite/TestICS20TransferNativeCosmosCoinsToEthereumAndBack_Plonk
- TestWithIbcEurekaTestSuite/TestICS20TransferTimeoutFromEthereumToCosmosChain_Groth16
- TestWithIbcEurekaTestSuite/TestICS20TransferTimeoutFromEthereumToCosmosChain_Plonk
- TestWithRelayerTestSuite/TestRelayerInfo
name: ${{ matrix.test }}
runs-on: ubuntu-latest
env:
Expand All @@ -80,39 +81,52 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"
check-latest: true
cache-dependency-path: e2e/interchaintestv8/go.sum

- name: Install rust toolchain
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-10-11
toolchain: stable
components: rustfmt, clippy

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

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

- name: Install SP1 toolchain
if: steps.cache-operator.outputs.cache-hit != 'true'
if: (steps.cache-operator.outputs.cache-hit != 'true') || (steps.cache-relayer.outputs.cache-hit != 'true')
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up
~/.sp1/bin/sp1up --token ${{ secrets.GITHUB_TOKEN }}
~/.sp1/bin/cargo-prove prove --version

- name: Install operator
if: steps.cache-operator.outputs.cache-hit != 'true'
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2024-10-11
command: install
args: --git https://github.com/cosmos/sp1-ics07-tendermint --rev ${{ env.SP1_OPERATOR_REV }} sp1-ics07-tendermint-operator --bin 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

- name: Setup Kurtosis
if: env.ETH_TESTNET_TYPE == 'pos'
run: |
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
name: rust

on:
push:
branches: [main]
pull_request:

jobs:
lints:
name: fmt-and-clippy
runs-on: ubuntu-latest
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: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy

tests:
name: unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- 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: "Set up environment"
uses: ./.github/setup
- name: Install just
uses: extractions/setup-just@v2
- name: Run unit tests
run: just test-cargo
env:
RUST_BACKTRACE: 1

build-relayer:
name: build-relayer
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 relayer --release --locked
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ broadcast/*/31337/
# ide files
.idea/
*.iml

# Rust
target

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