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

chore: merge with main and resolve conflicts, after sync with latest upstream #35

Merged
merged 109 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
1ebaae7
fix: service registry and multisig migrations (#487)
eguajardo Jul 8, 2024
d4f9cc2
docs: update compatibility matrix (#475)
cgorenflo Jun 26, 2024
a5679f9
feat(minor-ampd): support ed25519 keygen and sign (#465)
haiyizxx Jun 27, 2024
34db91f
fix(ampd): enable derive for der crate (#477)
haiyizxx Jun 27, 2024
87ef101
refactor: generalize msg access control (#473)
cgorenflo Jun 28, 2024
f927704
fix(ampd): directly pass interval to queued broadcaster and ignore fi…
maancham Jun 28, 2024
399675a
feat(minor-router): add command to freeze all chains (#472)
cgorenflo Jul 3, 2024
8454033
feat(multisig): query to check caller authorization status (#478)
maancham Jul 3, 2024
ab4152d
fix(ampd): increase number of retries when fetching block events (#484)
cjcobb23 Jul 3, 2024
b3f82a3
feat(minor-voting-verifier): consistent gas cost for voting (#476)
cjcobb23 Jul 3, 2024
a75b744
feat: improve msg permission control with derive macro (#479)
cgorenflo Jul 4, 2024
e13d982
refactor(coordinator): use generalized permission control (#485)
cgorenflo Jul 5, 2024
18b9112
fix(minor-router): use singular form for address in event attribute (…
haiyizxx Jul 5, 2024
06df09c
feat(minor-multisig)!: add command to enable and disable signing (#483)
cjcobb23 Jul 8, 2024
299e4be
docs: update compatibility matrix (#490)
cgorenflo Jul 9, 2024
25a65aa
docs: fix broken link to contribution documentation (#492)
cgorenflo Jul 9, 2024
62a8c6f
fix(minor-multisig): prevent instantiation with 0 length signing sess…
cgorenflo Jul 9, 2024
df3240f
refactor: hide internal structure of msg_id module (#495)
cgorenflo Jul 9, 2024
c050daa
chore: replace deprecated cargo config file format (#496)
cgorenflo Jul 9, 2024
061117a
feat(minor-voting-verifier): allow restarting expired polls (#481)
cjcobb23 Jul 10, 2024
0934d81
feat(minor-voting-verifier): add poll id to quorum reached event (#500)
cjcobb23 Jul 10, 2024
e1ea66d
feat: add support for Solana base58 msg id (#494)
eloylp Jul 10, 2024
c188e31
fix(ampd): reconfiguration of queued_broadcaster tests (#486)
maancham Jul 10, 2024
f76dc8a
fix(coordinator): update permission control to set active verifiers t…
eguajardo Jul 10, 2024
17dd9a7
chore: add configuration for codecov patch checks (#503)
cgorenflo Jul 11, 2024
cdf477d
fix(minor-ampd): multisig handler supports multiple key types (#504)
haiyizxx Jul 11, 2024
02dc15e
feat(minor-voting-verifier): added the source chain attribute to the …
cgorenflo Jul 11, 2024
5e6ec15
fix(router): whitelist nexus gateway to allow routing (#507)
cgorenflo Jul 11, 2024
c60c1c9
feat(minor-ampd): support tofnd v1 ed25519 sig encoding (#509)
milapsheth Jul 11, 2024
6d4a31b
feat(minor-multisig)!: authorize and unauthorize vector of addresses …
cjcobb23 Jul 11, 2024
95257b0
feat(coordinator): add registered provers migration to new state (#506)
eguajardo Jul 12, 2024
3a184af
feat(ampd): sui verify verifier set confirmation (#501)
fish-sammy Jul 12, 2024
7e878bb
chore: use different rust caches for each ci check (#518)
cgorenflo Jul 16, 2024
938c5cf
chore: force cosmwasm-check install for build wasm release check (#519)
cgorenflo Jul 16, 2024
ed0327d
fix(multisig-prover): drop checksum check for destination chain (#513)
haiyizxx Jul 16, 2024
5152aec
chore: release ampd 0.6.0 [skip ci]
Jul 16, 2024
9c7990b
feat(gateway): add permission control to gateway (#508)
cgorenflo Jul 16, 2024
681af1f
refactor(minor-integration-tests): use rewards query for contract wra…
maancham Jul 16, 2024
e4220a6
feat(minor-voting-verifier): query poll by id (#505)
haiyizxx Jul 16, 2024
7a53c19
feat(rewards): add permission control to rewards contract (#517)
cgorenflo Jul 16, 2024
7393fa4
chore: give github workflows more fitting names (#520)
cgorenflo Jul 17, 2024
d896952
chore(infra): log crates.toml to figure out issues with caching and u…
talalashraf Jul 17, 2024
f8a7fe7
chore: release router 0.4.0 [skip ci]
Jul 17, 2024
c1e80ca
chore: update compatibility matrix (#521)
cjcobb23 Jul 17, 2024
600f247
feat(ampd): integrate ampd queued broadcaster with the axelar batch r…
fish-sammy Jul 18, 2024
596b214
feat(minor-ampd): make handle sleep and max_attempts parameters confi…
maancham Jul 18, 2024
a7f3b99
revert: chore: force cosmwasm-check install for build wasm release ch…
talalashraf Jul 19, 2024
deab56a
chore(fmt): enforce unique import sorting in PR checks (#524)
cgorenflo Jul 19, 2024
ac966f1
docs: add bullet points to all chapters of SUMMARY.md (#529)
maancham Jul 22, 2024
546b5e1
feat(multisig-prover): add permission control to multisig-prover (#526)
cgorenflo Jul 22, 2024
638454c
feat: return structured errors from contracts (#527)
cgorenflo Jul 22, 2024
7a7f9bf
feat(minor): add legacy (uppercase) chain name support (#523)
cgorenflo Jul 23, 2024
8ee688f
feat(nexus-gateway): add permission control to nexus-gateway (#530)
cgorenflo Jul 23, 2024
c5e8bef
refactor: remove unnecessary allow dead_code flags (#531)
maancham Jul 23, 2024
b4cf22f
feat(minor-voting-verifier): add permission control to the voting-ver…
cgorenflo Jul 24, 2024
b93c3db
feat(service-registry): add permission control to the service-registr…
cgorenflo Jul 24, 2024
febb75b
revert(ampd): revert "integrate ampd queued broadcaster with the axel…
fish-sammy Jul 24, 2024
e4ef307
refactor(minor): make the main flow msgs consistent (#539)
cgorenflo Jul 24, 2024
216f153
refactor(minor): remove "get" from function names (#537)
cgorenflo Jul 24, 2024
7e27cb7
ci: use cosmwasm-check v1.3.x for consistency with wasmvm version (#534)
milapsheth Jul 24, 2024
3359fc3
ci(ampd): build ampd in gh actions (#533)
milapsheth Jul 24, 2024
852e68b
fix(minor-router): unambiguous message hash computation (#542)
milapsheth Jul 25, 2024
0ac9bde
feat(ampd): retry fetching block height (#543)
cjcobb23 Jul 25, 2024
562aff5
ci(amplifier): add r2 support for releases (#541)
maancham Jul 25, 2024
770a488
refactor(minor): rename id field in CrosschainId to message_id (#538)
cgorenflo Jul 26, 2024
8624493
feat: add interchain token service encoding/decoding api (#482)
milapsheth Jul 27, 2024
5def6f3
fix(ampd): copy ITS folder to docker image for ampd build (#546)
milapsheth Jul 29, 2024
aba3433
ci: update description for contract build action to include tags (#547)
talalashraf Jul 29, 2024
3a64ad6
feat(minor-voting-verifier): validate source address (#545)
haiyizxx Jul 29, 2024
957099c
fix(ci): add extra condition for get-tag step to also check input bra…
maancham Jul 29, 2024
cb73476
fix(minor-gateway): do not override outgoing messages (#550)
haiyizxx Jul 29, 2024
52e3c52
fix(multisig-prover): better error message on chain name mismatch (#544)
cjcobb23 Jul 30, 2024
d6a727d
fix(minor-voting-verifier): length prefix verifier set when hashing (…
milapsheth Jul 30, 2024
d21ad0f
feat(multisig): add chain name to signing_completed event (#548)
cgorenflo Jul 30, 2024
5230961
feat(minor-multisig)!: migrate verifier set hashes in multisig (#552)
cjcobb23 Jul 31, 2024
32b6b39
fix(minor-multisig-prover): generate payload id uniquely (#553)
milapsheth Jul 31, 2024
063c85f
feat(minor-multisig-prover)!: better error message for confirm_verifi…
cjcobb23 Jul 31, 2024
f86528e
feat(major): signifier for v1 release (#557)
cgorenflo Jul 31, 2024
c03a9b6
feat(major): upgrade all packages to v1.0.0 (#558)
cgorenflo Jul 31, 2024
e515aed
chore: add major/minor commit message signifiers for release action (…
cgorenflo Jul 31, 2024
e5d7ef1
chore: release router 1.0.0
Jul 31, 2024
ff195ca
chore: release rewards 1.0.0
Jul 31, 2024
d0badad
chore: release multisig 1.0.0
Jul 31, 2024
ec12cd3
chore: release coordinator 1.0.0
Jul 31, 2024
acfccc0
chore: release service-registry 1.0.0
Jul 31, 2024
e4d651f
chore: release voting-verifier 1.0.0
Jul 31, 2024
81cd54d
chore: release nexus-gateway 1.0.0
Jul 31, 2024
2c00c62
chore: release gateway 1.0.0
Jul 31, 2024
ca9da13
chore: release multisig-prover 1.0.0
Jul 31, 2024
bb58d24
chore: release ampd 1.0.0
Jul 31, 2024
f7acd1b
fix(gateway): copy instantiate function to migration to keep contract…
cgorenflo Aug 1, 2024
12937f5
refactor: minor improvements to code quality (#560)
cgorenflo Aug 1, 2024
d434b63
refactor(ci): rename r2 pre-releases and releases folder to cosmwasm …
maancham Aug 1, 2024
f8318cd
refactor(ci): r2 internal path re-structure (#564)
maancham Aug 1, 2024
5c02b14
fix(router-api): restrict chain names to be short and only use ascii …
milapsheth Aug 1, 2024
8bad6cd
refactor(gateway): inline internal contract module (#563)
cgorenflo Aug 1, 2024
bf11cc6
refactor: add derive feature to axelar-wasm-std (#566)
cgorenflo Aug 2, 2024
a0ee664
refactor(service-registry): remove unused config from state file (#569)
maancham Aug 2, 2024
7cdfe85
feat: rust implementation for some of the Cairo types (#18)
ctoyan Apr 29, 2024
c1abf95
feat: add CallContract starknet event parsing logic (#19)
ctoyan Apr 30, 2024
a64673f
feat: contract_call event capture (#20)
ctoyan May 10, 2024
134d4ea
feat: verify the Axelar message by comparing with the ContractCall ev…
ctoyan May 29, 2024
7f9b643
chore: migrate to ampd v4 (#23)
ctoyan Jun 19, 2024
80162b9
fix: starknet ampd ethers_core and cosmrs types (#26)
ctoyan Jul 1, 2024
3c9db65
chore: merge with main and resolve conflicts, after sync with upstrea…
ctoyan Jul 1, 2024
1391763
make like main
ctoyan Aug 7, 2024
c03f465
make like main
ctoyan Aug 7, 2024
f003acd
Merge branch 'starknet' into chore/rebase
ctoyan Aug 7, 2024
d779d1e
fix merge
ctoyan Aug 7, 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
93 changes: 83 additions & 10 deletions .github/workflows/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cache build artifacts
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/[email protected]
id: cache
with:
shared-key: "cache"
shared-key: "cache-tests"

- name: Log crates.toml
if: steps.cache.outputs.cache-hit == 'true'
run: cat /home/runner/.cargo/.crates.toml

- name: Run tests
uses: actions-rs/cargo@v1
Expand All @@ -54,12 +59,27 @@ jobs:
profile: minimal
toolchain: 1.78.0
target: wasm32-unknown-unknown
default: true
override: true

- name: Install cosmwasm-check compatible toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.75.0
target: wasm32-unknown-unknown
default: false
override: false

- name: Cache build artifacts
uses: useblacksmith/rust-cache@v3
id: cache
uses: useblacksmith/[email protected]
with:
shared-key: "cache"
shared-key: "cache-cosmwasm-compilation"

- name: Log crates.toml
if: steps.cache.outputs.cache-hit == 'true'
run: cat /home/runner/.cargo/.crates.toml

- name: Build wasm release
run: |
Expand All @@ -69,17 +89,24 @@ jobs:
(cd $C && cargo build --release --lib --target wasm32-unknown-unknown --locked)
done

- name: Build ITS release
working-directory: ./interchain-token-service
run: cargo build --release --target wasm32-unknown-unknown --locked

# cosmwasm-check v1.3.x is used to check for compatibility with wasmvm v1.3.x used by Axelar
# Older rust toolchain is required to install cosmwasm-check v1.3.x
- name: Install cosmwasm-check
uses: actions-rs/cargo@v1
with:
command: install
args: --version 1.5.5 --locked cosmwasm-check
toolchain: 1.75.0
args: --version 1.3.4 --locked cosmwasm-check

- name: Check wasm contracts
run: cosmwasm-check ./target/wasm32-unknown-unknown/release/*.wasm

lints:
name: Lints
ampd-compilation:
name: Ampd Release Compilation
runs-on: blacksmith-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
Expand All @@ -89,18 +116,56 @@ jobs:
with:
profile: minimal
toolchain: 1.78.0
target: wasm32-unknown-unknown
override: true

- name: Install protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cache build artifacts
id: cache
uses: useblacksmith/[email protected]
with:
shared-key: "cache-ampd-compilation"

- name: Log crates.toml
if: steps.cache.outputs.cache-hit == 'true'
run: cat /home/runner/.cargo/.crates.toml

- name: Build ampd
working-directory: ./ampd
run: cargo build --release --locked

lints:
name: Lints
runs-on: blacksmith-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4

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

- name: Install protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cache build artifacts
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/[email protected]
id: cache
with:
shared-key: "cache"
shared-key: "cache-lints"

- name: Log crates.toml
if: steps.cache.outputs.cache-hit == 'true'
run: cat /home/runner/.cargo/.crates.toml

- name: Install cargo-sort
uses: baptiste0928/cargo-install@v2
Expand All @@ -113,6 +178,14 @@ jobs:
command: fmt
args: --all -- --check

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.78.0
components: clippy
override: true

- name: Run cargo sort
uses: actions-rs/cargo@v1
with:
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/build-ampd-and-push-to-r2.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build-ampd-main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Amplifier - Build main branch
name: ampd (push to main) - Build and push image to ECR

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ampd-release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Amplifier - Build Release
name: ampd - Build and release binary and image

on:
workflow_dispatch:
Expand Down
164 changes: 164 additions & 0 deletions .github/workflows/build-contracts-and-push-to-r2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Amplifier wasm contracts - Upload wasm binaries to Cloudflare R2 bucket

on:
push:
branches:
- main
tags:
- '*-v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
ref:
description: Github branch or tag to checkout for compilation
required: true
default: main
type: string


jobs:
compile-and-upload:
name: Compile contracts and push to R2
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Get tag
id: get-tag
run: |
echo "github_ref=$GITHUB_REF"
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "tag=${GITHUB_REF#refs/tags/}"
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
input_ref="${{ github.event.inputs.ref }}"
if [[ $input_ref =~ ^([a-zA-Z-]+)-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
echo "tag=$input_ref"
echo "tag=$input_ref" >> $GITHUB_OUTPUT
else
echo "tag="
echo "tag=" >> $GITHUB_OUTPUT
fi
else
echo "tag="
echo "tag=" >> $GITHUB_OUTPUT
fi


- name: Check for release information from tag
id: check-release
run: |
tag="${{ steps.get-tag.outputs.tag }}"
is_release="false"

if [[ $tag =~ ^([a-zA-Z-]+)-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
is_release="true"
crate_name="${BASH_REMATCH[1]}"
crate_version="${BASH_REMATCH[2]}"

echo "Is release: $is_release"
echo "Crate Name: $crate_name"
echo "Crate Version: $crate_version"

echo "is-release=$is_release" >> $GITHUB_OUTPUT
echo "crate-name=$crate_name" >> $GITHUB_OUTPUT
echo "crate-version=$crate_version" >> $GITHUB_OUTPUT
else
echo "Is release: $is_release"
echo "Not a release tag. Skipping crate name and version extraction."
echo "is-release=$is_release" >> $GITHUB_OUTPUT
fi


- name: Determine checkout ref
id: get-checkout-ref
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "ref=$GITHUB_REF" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" == "push" ]; then
echo "ref=main" >> $GITHUB_OUTPUT
else
echo "ref=${{ inputs.ref }}" >> $GITHUB_OUTPUT
fi


- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: "0"
path: axelar-amplifier
submodules: recursive
ref: ${{ steps.get-checkout-ref.outputs.ref }}


- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}


- name: Compile all amplifier contracts
id: compile-contracts
run: |
cd axelar-amplifier
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/optimizer:0.16.0

commit_hash=$(git rev-parse --short HEAD)
cd ..
mkdir -p ./$commit_hash/
cp -R axelar-amplifier/artifacts/* ./$commit_hash/
echo "wasm-directory=./$commit_hash" >> $GITHUB_OUTPUT


- name: Prepare and sign release artifacts
if: steps.check-release.outputs.is-release == 'true'
id: prepare-release
run: |
cd ${{ steps.compile-contracts.outputs.wasm-directory }}
crate_name="${{ steps.check-release.outputs.crate-name }}"
crate_version="${{ steps.check-release.outputs.crate-version }}"
wasm_file=$(find . -name "${crate_name//-/_}.wasm")
checksum_file=$(find . -name "checksums.txt")

if [ -z "$wasm_file" ]; then
echo "Error: Could not find .wasm file for $crate_name"
exit 1
fi

mkdir -p "../${crate_version}"
cp "$wasm_file" "../${crate_version}/${crate_name}.wasm"
cp "$checksum_file" "../${crate_version}/"

gpg --armor --detach-sign ../${crate_version}/${crate_name}.wasm
gpg --armor --detach-sign ../${crate_version}/checksums.txt

echo "release-artifacts-dir=./${crate_version}" >> $GITHUB_OUTPUT
echo "r2-destination-dir=./releases/cosmwasm/${crate_name}" >> $GITHUB_OUTPUT


- uses: ryand56/r2-upload-action@latest
if: steps.check-release.outputs.is-release == 'true'
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CF }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CF }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: ${{ steps.prepare-release.outputs.release-artifacts-dir }}
destination-dir: ${{ steps.prepare-release.outputs.r2-destination-dir }}


- uses: ryand56/r2-upload-action@latest
if: steps.check-release.outputs.is-release != 'true'
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CF }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CF }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: ${{ steps.compile-contracts.outputs.wasm-directory }}
destination-dir: ./pre-releases/cosmwasm/
Loading
Loading