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

fix: sync solana branch with upstream main #11

Merged
merged 55 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
40c861e
fix: use correct key id to generate pub key (#234)
haiyizxx Jan 17, 2024
ee447b5
update contract to split execute and query (#240)
eguajardo Jan 19, 2024
dec716e
feat: add expiry field of u64 to SigningStarted event (#243)
maancham Jan 23, 2024
4197d82
docs: axe-2947-update-ampd-docs (#236)
maancham Jan 24, 2024
aac6602
feat: add message ids to proof under construction event (#224)
cgorenflo Jan 25, 2024
196416d
chore: work in progress - removing grace from multisig config (#245)
maancham Jan 25, 2024
98430b8
feat(voting-verifier): query to check messages consensus (#231)
eguajardo Jan 25, 2024
35607fe
refactor: move finalizer picker into finalizer module (#241)
cgorenflo Jan 25, 2024
ef961ec
feat: axe-2989-Handle-Expired-Signing-Skip (#246)
maancham Jan 26, 2024
d41029f
docs: update voting_verifier.md (#237)
maancham Jan 26, 2024
8b7f76f
fix(multisig-prover): don't prevent signing due to multiple workerset…
cjcobb23 Jan 26, 2024
b9074b5
chore: add release pipeline (#239)
Jan 29, 2024
ad64f68
feat: axe-2791 first step, add denounce chain support to service regi…
maancham Jan 31, 2024
d6cf113
fix!: event processor stops when one of the handlers fails (#244)
cgorenflo Jan 31, 2024
dc60c6e
feat: add support deregistration to ampd src (#248)
maancham Jan 31, 2024
f87a9fc
feat: check if image tag exists before push (#250)
RiceAndMeet Feb 1, 2024
67e3714
feat(ampd): add timeout to the EVM/SUI JSON-RPC clients (#254)
fish-sammy Feb 1, 2024
e0c68ab
feat: add signature to public key registration (#249)
eguajardo Feb 1, 2024
081a650
refactor: migrate base service registry test setup to test utils (#252)
maancham Feb 2, 2024
4d1535d
feat(multisig): prevent duplicate public key registration (#255)
eguajardo Feb 2, 2024
271dba1
fix(cargo): avoid linking libssl (#257)
jcs47 Feb 5, 2024
8d2d1be
chore: expose encoding modules as part of the crate public API (#242)
tilacog Feb 6, 2024
cb469b5
refactor: service registry tests (#256)
maancham Feb 7, 2024
2b83c03
chore: fix compiler warnings (#262)
cgorenflo Feb 9, 2024
c88d8b0
fix(optimizer): revert rust version to 1.73 (#264)
jcs47 Feb 9, 2024
69124ee
fix(ampd): optimize broadcaster (#261)
cjcobb23 Feb 12, 2024
9de4d9e
chore(connection-router): remove todo comment about message hashing (…
cjcobb23 Feb 12, 2024
69e7bf0
chore(infra): add a seed job for building releases for ampd and fix n…
Feb 13, 2024
c26a374
fix(ampd): skip events from unknown contracts (#259)
cjcobb23 Feb 13, 2024
f362e07
docs: service-registry-doc (#268)
maancham Feb 13, 2024
4f00800
fix(minor-rewards)!: handle signing rewards for different chains (#253)
haiyizxx Feb 14, 2024
ece3349
refactor(connection-router-api): replace the code with the latest (#272)
fish-sammy Feb 15, 2024
8f99242
refactor: isolate mutability and emit missing events (#260)
cgorenflo Feb 15, 2024
0ced191
feat(multisig): add optional signature validation callback (#270)
eguajardo Feb 15, 2024
e7a2301
feat: add contract abstraction to connection router (#267)
maancham Feb 16, 2024
96eadd5
feat(ampd): retry event handling with timeout and max attemmpts (#251)
fish-sammy Feb 16, 2024
1521676
ci: use blacksmith runners for gh actions (#271)
milapsheth Feb 16, 2024
360560d
feat: add ampd build job (#258)
kalidax Feb 16, 2024
671777b
fix(ampd): retry fetching blocking results on error (#265)
cjcobb23 Feb 16, 2024
6e5157f
refactor: update aggregate verifier tests to utilize contract trait (…
maancham Feb 20, 2024
70f6283
refactor(connection-router-api): replace dependencies of connection-r…
fish-sammy Feb 21, 2024
2644fba
refactor: contract trait voting verifier (#276)
maancham Feb 21, 2024
c454d48
refactor: connection router picks up gateway-api (#277)
fish-sammy Feb 21, 2024
1ad088c
fix(infra): differentiate between tags and semvers (#278)
Feb 21, 2024
ba7b422
chore: remove unused batching contract (#279)
cgorenflo Feb 21, 2024
f86bbe1
refactor: change gateway get messages query name (#281)
maancham Feb 26, 2024
155f87f
refactor: remove mock contracts from voting verifier tests and use mo…
eguajardo Feb 26, 2024
2557b81
docs: write gateway.md (#283)
maancham Feb 29, 2024
f2dfea8
docs(ampd): add ampd README (#275)
cjcobb23 Feb 29, 2024
6026ed8
refactor: remove block height log after broadcasting from ampd (#282)
maancham Feb 29, 2024
b93af44
fix(multisig): normalize compressed and uncompressed public keys for …
eguajardo Mar 1, 2024
aad015b
chore: fix typos across the repo (#286)
cgorenflo Mar 4, 2024
e120fa8
refactor: simplify complexity in verify() signature implementation (#…
eguajardo Mar 4, 2024
0be4b7d
ci: allow core team to merge workflow changes (#289)
milapsheth Mar 4, 2024
e16b55a
Merge remote-tracking branch 'origin/main' into solana-sync-fork
eloylp Mar 6, 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
1 change: 0 additions & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[alias]
wasm = "build --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude ampd"
unit-test = "test --lib"
schema = "run --bin schema"

[build]
rustflags = ["--cfg", "tracing_unstable"]
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
# Each line is a file pattern followed by one or more owners.

* @axelarnetwork/core
.github/workflows/* @axelarnetwork/devops @axelarnetwork/core
.github/actions/* @axelarnetwork/devops @axelarnetwork/core
**/Dockerfile @axelarnetwork/devops @axelarnetwork/core
164 changes: 164 additions & 0 deletions .github/actions/release/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
name: 'Release'
description: 'Wrapper around the Semver library to create releases'
inputs:
binary-to-release:
description: "Name of binary to release"
required: true
default: 'ampd'
dry-run:
description: "When true, just output plan"
required: true
default: 'true'
major-pattern:
description: "major pattern match string"
minor-pattern:
description: "minor pattern match string"
change-path:
description: "paths to observe for changes"

runs:
using: "composite"
steps:
- name: Print inputs
id: print-inputs
shell: bash
run: |
echo "binary-to-release:
${{ inputs.binary-to-release }}"
echo "dry-run:
${{ inputs.dry-run }}"
echo "major-pattern:
${{ inputs.major-pattern }}"
echo "minor-pattern:
${{ inputs.minor-pattern }}"
echo "change-path:
${{ inputs.change-path }}"

- name: Determine next semantic version
id: semantic-version
uses: paulhatch/[email protected]
with:
major_pattern: ${{ inputs.major-pattern }}
minor_pattern: ${{ inputs.minor-pattern }}
change_path: ${{ inputs.change-path }}
tag_prefix: ${{ inputs.binary-to-release }}-v
version_from_branch: false

- name: Print determined semantic version
id: print-semantic-version
shell: bash
run: |
echo "MAJOR:
${{ steps.semantic-version.outputs.major }}"
echo "MINOR:
${{ steps.semantic-version.outputs.minor }}"
echo "PATCH:
${{ steps.semantic-version.outputs.patch }}"
echo "VERSION:
${{ steps.semantic-version.outputs.version }}"
echo "VERSION-TAG:
${{ steps.semantic-version.outputs.version_tag }}"
echo "VERSION-TYPE:
${{ steps.semantic-version.outputs.version_type }}"
echo "IS-TAGGED:
${{ steps.semantic-version.outputs.is_tagged }}"
echo "CHANGED:
${{ steps.semantic-version.outputs.changed }}"
echo "PREVIOUS-VERSION:
${{ steps.semantic-version.outputs.previous_version }}"

- name: Check if tag already exists (possible collision with an orphaned
commit tagged as patch)
id: validate-tag
shell: bash
if: ${{ steps.semantic-version.outputs.changed == 'true' }}
run: |
if [[
! -z "$(git tag -l ${{ steps.semantic-version.outputs.version_tag }})"
]]; then
cat << EOF
Tag already exists: ${{ steps.semantic-version.outputs.version_tag }}
This means that there is a commit tagged as patch that is not part of
the main branch. Under these circumstances the preferred way to
release is to create a new minor release from the main branch

However, if you must release a patch, please follow the steps below

Please check the tags and use the patch commit as the base for the
new release.

Retrieve the latest patch commit from the tag:
git tag --list ${{inputs.binary-to-release}}-v*

Checkout the tag:
git checkout <latest-existing-patch>

Create a new branch from the commit:
git checkout -b patch/${{inputs.binary-to-release}}/<new-patch>

Cherry pick current changes to the new branch:
git cherry-pick ${{ github.sha }}

Push the new branch:
git push origin <branch-name>

Create a PR from the new branch to the previous patch tag
hub pull-request -b <previous-latest-patch-tag>

Once the PR is approved, run the release workflow and choose the
branch created above as the base branch. Note that this patch will not
be part of the main branch unless explicitly merged into it. And none
of the commits from the main branch since the last patch will be part
of this release.
EOF
exit 1
else
echo "Tag is unique. OK to proceed"
fi

- name: Check major and minor releases are from main branch only
id: validate-branch
shell: bash
if:
steps.semantic-version.outputs.changed == 'true' &&
(steps.semantic-version.outputs.version_type == 'major' ||
steps.semantic-version.outputs.version_type == 'minor')
run: |
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
echo "Major and Minor releases are only allowed from main branch"
exit 1
else
echo "Release from main branch. OK to proceed"
fi

- name: Install cargo-release
shell: bash
working-directory: ${{ runner.temp }}
run: |
wget -q https://github.com/crate-ci/cargo-release/releases/download/v0.25.4/cargo-release-v0.25.4-x86_64-unknown-linux-gnu.tar.gz
tar -zxf cargo-release-v0.25.4-x86_64-unknown-linux-gnu.tar.gz
mv cargo-release /home/runner/.cargo/bin/cargo-release

- name: Release cargo crate (dry run)
shell: bash
if:
inputs.dry-run == 'true' &&
steps.semantic-version.outputs.changed == 'true'
run: |
cargo release -p ${{ inputs.binary-to-release }} \
${{ steps.semantic-version.outputs.version_type }} \
-v

- name: Release cargo crate
shell: bash
if:
inputs.dry-run == 'false' &&
steps.semantic-version.outputs.changed == 'true'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Axelar DevOps"
cargo release -x \
--no-confirm \
-p ${{ inputs.binary-to-release }} \
${{ steps.semantic-version.outputs.version_type }}
20 changes: 11 additions & 9 deletions .github/workflows/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ name: Basic
jobs:
test:
name: Test Suite
runs-on: ubuntu-8-core-32-gb
runs-on: blacksmith-32vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.71.1
toolchain: 1.73.0
override: true

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

- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
uses: useblacksmith/rust-cache@v3
with:
shared-key: "cache"

Expand All @@ -42,20 +44,20 @@ jobs:

cosmwasm-compilation:
name: Cosmwasm Compilation
runs-on: ubuntu-8-core-32-gb
runs-on: blacksmith-32vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.71.1
toolchain: 1.73.0
target: wasm32-unknown-unknown
override: true

- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
uses: useblacksmith/rust-cache@v3
with:
shared-key: "cache"

Expand All @@ -78,15 +80,15 @@ jobs:

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

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

Expand All @@ -96,7 +98,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
uses: useblacksmith/rust-cache@v3
with:
shared-key: "cache"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Build and push latest docker image
name: Amplifier - Build main branch

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build-and-push-latest-docker-image:
strategy:
matrix:
os:
- ubuntu-20.04
runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
env:
REPOSITORY: axelar-amplifier
IMAGE_TAG: ${{ github.sha }}
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -33,12 +33,19 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: check if an image already build on same commit hash
id: image-tag-check
run: |
image_tag_exists=$(aws ecr batch-get-image --repository-name ${REPOSITORY} --image-ids "imageTag=${IMAGE_TAG}" | jq '.images | length')
echo "image_tag_exists=${image_tag_exists}" >> $GITHUB_OUTPUT

- uses: docker/setup-buildx-action@v3
if: steps.image-tag-check.outputs.image_tag_exists == 0

- uses: docker/build-push-action@v5
if: steps.image-tag-check.outputs.image_tag_exists == 0
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: axelar-amplifier
IMAGE_TAG: ${{ github.sha }}
with:
context: .
push: true
Expand Down
Loading
Loading