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

ci: 466 initiate btp node for archway on icon testnet #480

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
85cbe95
ci: add workflow to deploy contracts on testnet and update score address
DeepakBomjan Jul 6, 2023
169bc9d
ci: update ci variable
DeepakBomjan Jul 6, 2023
5766b7d
ci: debug
DeepakBomjan Jul 6, 2023
fc6c655
ci: fix score deployment error
DeepakBomjan Jul 10, 2023
902542e
ci: check archway testnet deployment
DeepakBomjan Jul 10, 2023
08e2673
ci: debug
DeepakBomjan Jul 10, 2023
2f40d6e
ci: debug
DeepakBomjan Jul 10, 2023
735fd07
ci: debug
DeepakBomjan Jul 10, 2023
ec42ecb
ci: debug
DeepakBomjan Jul 10, 2023
6e23a80
ci: debug
DeepakBomjan Jul 10, 2023
dcda40e
ci: debug
DeepakBomjan Jul 10, 2023
2b0232b
ci: debug
DeepakBomjan Jul 10, 2023
90ea1c4
ci: debug
DeepakBomjan Jul 10, 2023
d71a59f
ci: debug
DeepakBomjan Jul 10, 2023
7920f22
ci: debug
DeepakBomjan Jul 10, 2023
1a1b104
ci: debug
DeepakBomjan Jul 10, 2023
6ed355f
ci: debug
DeepakBomjan Jul 10, 2023
afc1241
ci: debug
DeepakBomjan Jul 10, 2023
1f6ffcb
ci: debug
DeepakBomjan Jul 10, 2023
5d3b18f
ci: debug
DeepakBomjan Jul 10, 2023
68c476a
ci: debug
DeepakBomjan Jul 10, 2023
37b885e
ci: add expect script
DeepakBomjan Jul 10, 2023
913e3cd
ci: debug
DeepakBomjan Jul 11, 2023
af38934
ci: debug
DeepakBomjan Jul 11, 2023
4ebe4b9
ci:debug
DeepakBomjan Jul 11, 2023
f3f95db
ci:debug
DeepakBomjan Jul 11, 2023
89bc656
ci:debug
DeepakBomjan Jul 11, 2023
d4da3b5
ci:debug
DeepakBomjan Jul 11, 2023
e776070
ci: add git submodule
DeepakBomjan Jul 11, 2023
12db9f7
ci: add submodule
DeepakBomjan Jul 11, 2023
87e5ef5
ci: add submodule
DeepakBomjan Jul 11, 2023
1a48ab6
ci: deploy contracts
DeepakBomjan Jul 11, 2023
1ee16dc
ci: deploy contracts
DeepakBomjan Jul 11, 2023
fe28942
ci: deploy contracts
DeepakBomjan Jul 11, 2023
819b59a
ci: deploy contracts
DeepakBomjan Jul 11, 2023
7acb340
chore: update contract address of xcall-connection,xcall-multi-protoc…
DeepakBomjan Jul 11, 2023
639c74e
ci: correct syntax error
DeepakBomjan Jul 11, 2023
da0f9ab
ci: debug
DeepakBomjan Jul 11, 2023
1de6206
ci: debug
DeepakBomjan Jul 11, 2023
c4bb919
ci: deploy contract
DeepakBomjan Jul 11, 2023
2bb3ca4
ci: debug
DeepakBomjan Jul 11, 2023
8fc5c56
ci:debug
DeepakBomjan Jul 11, 2023
f76b721
fix: archway channel event (#458)
izyak Jul 4, 2023
9678ca3
chore: handle merkle prefix empty on javascore (#469)
viveksharmapoudel Jul 4, 2023
10bd16e
chore: check size of wasm files (#447)
DeepakBomjan Jul 5, 2023
c607fc3
fix: remove callback data (#475)
ibrizsabin Jul 5, 2023
cdca980
feat: Update xCall and IBC connection to lates spec and update spec (…
AntonAndell Jul 6, 2023
aebe034
feat: finalize xcall multi (#457)
ibrizsabin Jul 7, 2023
3b38138
feat: e2e testing (#482)
redlarva Jul 11, 2023
0921c57
fix: empty message root encoding (#477)
ibrizsabin Jul 11, 2023
a274af9
fix: xcall multi add default connection (#483)
viveksharmapoudel Jul 12, 2023
bf7519d
fix: next proof context hash (#478)
ibrizsabin Jul 12, 2023
8ac4046
fix: Use complete packet when writing ack in IBC XCall Connection (#481)
AntonAndell Jul 12, 2023
d36f683
ci: check archway testnet deployment
DeepakBomjan Jul 10, 2023
ad9911a
ci: rebased with main
DeepakBomjan Jul 11, 2023
dae5ed6
ci: deploy contracts
DeepakBomjan Jul 11, 2023
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: 1 addition & 0 deletions .github/workflows/basic-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- "**"
paths:
- "contracts/cosmwasm-vm/**"
- "libraries/common/rust/**"
- ".github/workflows/basic-rust.yml"
push:
branches:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codecov-javascore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
# pull_request:
# branches:
# - main
paths:
- 'contracts/javascore/**'
# - 'contracts/javascore/**'
- '.github/workflows/codecov-javascore.yml'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cosmwasm-contracts-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- "**"
paths:
- "contracts/cosmwasm-vm/**"
- "libraries/common/rust/**"
- ".github/workflows/cosmwasm-contracts-code-coverage.yml"
push:
branches:
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/deploy-cosmwasm-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- fix/use-complete-packet-data-for-write-ack
# pull_request:
# branches:
# - main
# paths:
- contracts/cosmwasm-vm/**
- libraries/common/rust/**
- .github/workflows/deploy-cosmwasm-contracts.yml

jobs:
Build:
name: Build & Deploy Cosmasm Contracts
Expand Down Expand Up @@ -36,14 +39,14 @@ jobs:
override: true
profile: minimal

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
# - name: Cache Rust dependencies
# uses: Swatinem/rust-cache@v2

- name: Compile WASM
run: |
rustup component add rustfmt --toolchain 1.69.0-x86_64-unknown-linux-gnu
rustup component add clippy --toolchain 1.69.0-x86_64-unknown-linux-gnu
bash ./optimize_build.sh
make optimize-cosmwasm

- name: Check WASM Size
run: |
Expand All @@ -63,7 +66,7 @@ jobs:
- name: Deploy WASM
run: |
container=$(docker ps --format '{{.Names}}')
rm -rf artifacts/cw_common.wasm
rm -rf artifacts/archway/cw_common.wasm
cp -r {artifacts,scripts/deploy_cosmwasm.sh} contracts/cosmwasm-vm/archway/contracts
docker ps -a
docker exec $container chmod +x /contracts/deploy_cosmwasm.sh
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/java-contracts-test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Test Java contracts

on:
pull_request:
branches:
- '**'
paths:
- 'contracts/javascore/**'
# pull_request:
# branches:
# - '**'
# paths:
# - 'contracts/javascore/**'
push:
branches:
- main
paths:
- 'contracts/javascore/**'
# paths:
# - 'contracts/javascore/**'

jobs:
unit-test:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/testnet-deploy-java-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy javascore contracts to Berlin testnet

on:
push:
branches:
- "main"
# - "466-initiate-btp-node-for-archway-on-icon-testnet"

jobs:
deploy-contracts-testnet:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Retrieve the secret and decode it to a file
working-directory: contracts/javascore
env:
BERLIN_TESTNET_KEYSTORE_B64: ${{ secrets.BERLIN_TESTNET_KEYSTORE_B64 }}
run: |
echo $BERLIN_TESTNET_KEYSTORE_B64 | base64 -d > key.json

- name: Deploy all contracts on UAT environment
working-directory: contracts/javascore
env:
BERLIN_TESTNET_KEYSTORE_PATH: ./key.json
BERLIN_TESTNET_PASSWD: ${{ secrets.BERLIN_TESTNET_PASSWD }}
run: |
./gradlew clean build
./gradlew optimizedJar
./gradlew deployToBerlin -PdeploymentENV=berlin -PkeystoreName=$BERLIN_TESTNET_KEYSTORE_PATH -PkeystorePass=$BERLIN_TESTNET_PASSWD
142 changes: 142 additions & 0 deletions .github/workflows/testnet-deploy-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Deploy cosmwasm contracts to Contestine testnet

on:
push:
branches:
- "main"
- "466-initiate-btp-node-for-archway-on-icon-testnet"

jobs:
deploy-contracts-testnet:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

# Install and setup go
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19

# setup gopath
- name: Set PATH
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
fingerprint: "C787AB518A0C08B7AE1E1ADA2809A1A84E32159A"
trust_level: 5

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

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

# - name: Download and Install archwayd
# working-directory: contracts/cosmwasm-vm/archway
# run: make install

# - name: Retrieve the secret and decode it to a file

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

# - name: Cache Rust dependencies
# uses: Swatinem/rust-cache@v2

- name: Download and Install archwayd
run: |
sudo curl -L -o /usr/local/bin/archwayd https://github.com/archway-network/archway/releases/download/v1.0.1/archwayd_linux_amd64
sudo chmod +x /usr/local/bin/archwayd

- name: Retrieve the secret and decode it to a file
working-directory: contracts/javascore
env:
CONSTANTINE_TESTNET_KEY: ${{ secrets.CONSTANTINE_TESTNET_KEY }}
CONSTANTINE_PASSPHRASE: ${{ secrets.CONSTANTINE_PASSPHRASE }}
run: |
pass init C787AB518A0C08B7AE1E1ADA2809A1A84E32159A
echo $CONSTANTINE_TESTNET_KEY | base64 -d > temp.key
gpgconf --kill gpg-agent
echo "$CONSTANTINE_PASSPHRASE" | /home/runner/go/bin/archwayd keys import constantine3Wallet temp.key --keyring-backend test
archwayd keys list

- name: Compile WASM
run: |
rustup component add rustfmt --toolchain 1.69.0-x86_64-unknown-linux-gnu
rustup component add clippy --toolchain 1.69.0-x86_64-unknown-linux-gnu
bash ./optimize_build.sh

- name: Check WASM Size
run: |
max_size=800
echo "Check if size of wasm file exceeds $max_size kilobytes..."
for file in artifacts/*.wasm
do
size=$(du -k "$file" | awk '{print $1}')
if [[ $size -gt $max_size ]]; then
echo "Error: $file : $size KB has exceeded maximum contract size limit of 800KB."
exit 1
fi
echo "$file : $size KB"
done
echo "The size of all contracts is well within the 800 KB limit."

- name: Deploy WASM
# run: |
# archwayd keys list
# archwayd query bank balances archway1z6r0f8r735mfrtrd4uv6x9f77tc6dsqzxtj7j4 --node https://rpc.constantine.archway.tech:443
# bash -x scripts/deploy_cosmwasm.sh testnet
# echo $CONSTANTINE_TESTNET_KEY | base64 -d > key.json
# echo "CONSTANTINE_PASSPHRASE" | archwayd keys import constantine3_wallet key.json
# archwayd keys list

# - name: Compile WASM
# run: |
# rustup component add rustfmt --toolchain 1.69.0-x86_64-unknown-linux-gnu
# rustup component add clippy --toolchain 1.69.0-x86_64-unknown-linux-gnu
# bash ./optimize_build.sh

# - name: Check WASM Size
# run: |
# max_size=800
# echo "Check if size of wasm file exceeds $max_size kilobytes..."
# for file in artifacts/*.wasm
# do
# size=$(du -k "$file" | awk '{print $1}')
# if [[ $size -gt $max_size ]]; then
# echo "Error: $file : $size KB has exceeded maximum contract size limit of 800KB."
# exit 1
# fi
# echo "$file : $size KB"
# done
# echo "The size of all contracts is well within the 800 KB limit."

# - name: Deploy WASM
# run: |
# container=$(docker ps --format '{{.Names}}')
# rm -rf artifacts/cw_common.wasm
# cp -r {artifacts,scripts/deploy_cosmwasm.sh} contracts/cosmwasm-vm/archway/contracts
# docker ps -a
# docker exec $container chmod +x /contracts/deploy_cosmwasm.sh
# docker exec $container /contracts/deploy_cosmwasm.sh
run: bash -x scripts/deploy_cosmwasm.sh
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
[submodule "contracts/cosmwasm-vm/archway"]
path = contracts/cosmwasm-vm/archway
url = https://github.com/archway-network/archway.git


[submodule "contracts/cosmwasm-vm/icon-ibc-setup"]
path = contracts/cosmwasm-vm/icon-ibc-setup
url = https://github.com/izyak/icon-ibc-setup.git
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
"contracts/cosmwasm-vm/cw-mock-dapp",
"contracts/cosmwasm-vm/cw-mock-ibc-core",
"contracts/cosmwasm-vm/cw-xcall-ibc-connection",
"contracts/cosmwasm-vm/cw-xcall-app",
"contracts/cosmwasm-vm/cw-xcall-multi",
"contracts/cosmwasm-vm/cw-integration",
"contracts/cosmwasm-vm/cw-mock-dapp-multi",
]
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ export GO111MODULE = on

protoVer=0.11.1
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
openJdkImage=adoptopenjdk/openjdk11
containerProtoGenGo=$(PROJECT_NAME)-proto-gen-go-$(protoVer)
containerProtoGenRust=$(PROJECT_NAME)-proto-gen-rust-$(protoVer)
containerOptimizedJar=$(PROJECT_NAME)-optimized-jar
containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer)

proto-all: proto-format proto-lint proto-gen
Expand All @@ -36,6 +38,15 @@ proto-gen-rust:
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenRust}$$"; then docker start -a $(containerProtoGenRust); else docker run --name $(containerProtoGenRust) -v $(CURDIR):/workspace --workdir /workspace -d $(protoImageName) \
sh ./scripts/protocgen_rust.sh; fi

optimize-jar:
@echo "Generating optimized jar for ICON contracts"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerOptimizedJar}$$"; then docker start -a ${containerOptimizedJar}; else docker run --name $(containerOptimizedJar) -v $(CURDIR):/workspace --workdir /workspace -d $(openJdkImage) \
sh ./scripts/optimize-jar.sh; fi

optimize-cosmwasm:
@echo "Generating optimized cosmwasm for Archway contracts"
sh ./scripts/optimize-cosmwasm.sh

gobuild:
go build .

Expand Down
Loading