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

Update "Deploy Linked Token" GH action to support Proxy upgrade pattern #854

Draft
wants to merge 74 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
06fc678
Add test script and workflow
mb1896 Mar 12, 2024
cbc70b1
test
mb1896 Mar 12, 2024
d9395a9
Continue testing
mb1896 Mar 12, 2024
76219f5
Continue
mb1896 Mar 12, 2024
60a52d0
Add addr converter
mb1896 Mar 13, 2024
b376607
Fix issue in npm install
mb1896 Mar 13, 2024
9c80d3b
Integrate all parts together
mb1896 Mar 13, 2024
c806179
test
mb1896 Mar 13, 2024
0738527
test
mb1896 Mar 13, 2024
27075e2
Fix script path
mb1896 Mar 13, 2024
e3f1bb2
test
mb1896 Mar 13, 2024
131955c
Future fix
mb1896 Mar 13, 2024
1933f10
Add deposit related checks
mb1896 Mar 13, 2024
c693f67
Increase the time window to check for top-down msg propagation
mb1896 Mar 13, 2024
4896d98
Increase window size
mb1896 Mar 13, 2024
fada127
Workflow add dependency
mb1896 Mar 13, 2024
108c0f6
Fix workflow
mb1896 Mar 13, 2024
d7df01b
Fix
mb1896 Mar 13, 2024
e5b1830
fix
mb1896 Mar 13, 2024
e56cf67
fix
mb1896 Mar 13, 2024
9c9af60
fix
mb1896 Mar 13, 2024
c5849a6
use head_ref
mb1896 Mar 13, 2024
0ba6808
inherit secret
mb1896 Mar 13, 2024
b2d00d5
Fix grep
mb1896 Mar 15, 2024
5917949
Small fix
mb1896 Mar 15, 2024
5403bba
linked token upgrade using Tranparent Proxy and forge scripts
snissn Mar 22, 2024
ad5ec01
update to the same paradigm used by the deploy script
snissn Mar 22, 2024
4dc0ddc
add test to test upgraded controller and replica linked proxies
snissn Mar 22, 2024
d3fd438
linked token tests that code works after upgrading to a new implement…
snissn Mar 22, 2024
38e5cb7
test for upgrade and new functionality working correctly in linked token
snissn Mar 22, 2024
be02170
move token information to the env config
snissn Mar 22, 2024
712d6a3
prettier
snissn Mar 22, 2024
fb2cf8e
Merge branch 'main' into mikers/linkedTokenUpgrades
raulk Apr 1, 2024
181d2de
fmt sdk with prettier.
raulk Apr 2, 2024
acd5d45
Merge branch 'linked_token_deployment' into mikers/merge-linked_token…
snissn Apr 2, 2024
e3df555
update deploy linked token script to support the proxy pattern
snissn Apr 2, 2024
b6ed054
Merge branch 'main' into mikers/linkedTokenUpgrades
raulk Apr 2, 2024
12c811f
extras/linked-token: fmt.
raulk Apr 2, 2024
02527a4
Linked token upgrades reinitializer fix (#856)
snissn Apr 2, 2024
c127b82
use address(0) not 0x0000000000000000000000000000000000000000
snissn Apr 2, 2024
8d5b688
convention is to put the UUPSUpgradeable initializer last
snissn Apr 2, 2024
f3225cb
fix tests from merge conflict issue
snissn Apr 2, 2024
72c4b12
do not need to store token name and symbol in state
snissn Apr 2, 2024
948c8dc
extract IpcHandler Interface to a shared module, so that both the IPC…
snissn Apr 3, 2024
bbb33c2
rename USDCTest to Original Token when it is being used in the makefile.
snissn Apr 3, 2024
33a513a
replace Calibration network with Origin Net
snissn Apr 3, 2024
a021e51
use LinkedTokenReplicaProxy and LinkedTokenControllerProxy in config
snissn Apr 3, 2024
ac89bd0
prettier
snissn Apr 3, 2024
6f238e1
Merge branch 'mikers/linkedTokenUpgrades-nameFixes' into mikers/merge…
snissn Apr 3, 2024
88e4612
bugfix attempt to fix copmile errors
snissn Apr 3, 2024
afca884
Revert "bugfix attempt to fix copmile errors"
snissn Apr 3, 2024
59c93df
Linked token upgrades name fixes (#859)
snissn Apr 3, 2024
e1e81fc
add version to debug
snissn Apr 3, 2024
c202b81
linked token use library for data
snissn Apr 3, 2024
cbad398
make fmt.
raulk Apr 3, 2024
3b3b388
clean up make file for usdctest -> original token
snissn Apr 3, 2024
a832e44
organize makefile + fmt
snissn Apr 3, 2024
c6041a7
Linked token upgrades - clarify makefile usage (#862)
snissn Apr 3, 2024
cf77d0d
Merge branch 'mikers/linkedTokenUpgrades' of github.com:consensus-shi…
snissn Apr 3, 2024
b4b9ced
fix IIpcContract import
snissn Apr 3, 2024
3e33961
fix IIpcContract import
snissn Apr 3, 2024
72d7df6
merge
snissn Apr 3, 2024
95453b0
debug
snissn Apr 3, 2024
e1fd80c
linked token make commands renaming usdc -> token
snissn Apr 3, 2024
f637806
use subnet and origin notation for makefile env
snissn Apr 3, 2024
c4196c5
rm any previous config file in linked token deploy script
snissn Apr 4, 2024
34b706a
config cleanup
snissn Apr 4, 2024
cbb6901
increase fund amount
snissn Apr 4, 2024
5447035
merge
snissn Apr 4, 2024
3ad6a34
use 4th wallet for the linked token test
snissn Apr 8, 2024
b85f34c
use 4th wallet for the linked token test
snissn Apr 8, 2024
6bd8213
use 4th wallet for the linked token test
snissn Apr 9, 2024
526b463
fix default wallet bug
snissn Apr 9, 2024
9eb3fa2
use 4th wallet for the linked token test
snissn Apr 9, 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
3 changes: 0 additions & 3 deletions .github/workflows/auto-deploy-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ jobs:
- name: Checkout the branch that triggered this run
uses: actions/checkout@v4
with:
# TODO(jie): After switch to workflow_dispatch only, we should use ref_name.
# head_ref only works for workflow triggered by pull requests.
# ref: ${{ github.ref_name }}
ref: ${{ github.head_ref }}
submodules: recursive

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/deploy-linked-token-to-dedicated-host.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy LinkedToken contracts to dedicated host running IPC subnet

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- contracts/**

concurrency:
# Only allow one run at a time for this workflow
group: deploy-linked-token-to-dedicated-host
cancel-in-progress: true

jobs:
deploy-subnet-to-dedicated-host:
uses: ./.github/workflows/deploy-subnet-to-dedicated-host.yaml
secrets: inherit
deploy-linked-token-to-dedicated-host:
runs-on: ubuntu-latest
needs: [deploy-subnet-to-dedicated-host]
steps:
- name: Checkout code repo
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Copy deployment script files to the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: ubuntu
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
source: "scripts/deploy_linked_token_to_subnet.sh"
target: "/home/ubuntu"
- name: Run deploy scripts on the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: ubuntu
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
script: bash -il /home/ubuntu/scripts/deploy_linked_token_to_subnet.sh ${{ github.head_ref }}
command_timeout: 40m
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ name: Deploy to calibration net on a dedicated server

on:
workflow_dispatch:
workflow_call:

concurrency:
# Only allow one run at a time for this workflow
group: deploy-to-dedicated-host
group: deploy-subnet-to-dedicated-host
cancel-in-progress: true

jobs:
deploy_to_dedicated_host:
deploy-subnet-to-dedicated-host:
runs-on: ubuntu-latest
steps:
- name: Checkout code repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ github.head_ref }}
- name: Copy deployment script files to the host
uses: appleboy/[email protected]
with:
Expand All @@ -38,7 +39,7 @@ jobs:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: ubuntu
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
script: rm -rf /home/ubuntu/.ipc && cp -r /home/ubuntu/scripts/deploy_subnet_under_calibration_net/.ipc /home/ubuntu/
script: rm -vrf /home/ubuntu/.ipc && cp -r /home/ubuntu/scripts/deploy_subnet_under_calibration_net/.ipc /home/ubuntu/
- name: Create wallet file locally
run: |
echo '${{ secrets.CI_TEST_WALLET_JSON }}' > evm_keystore.json
Expand All @@ -56,5 +57,5 @@ jobs:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: ubuntu
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
script: bash -il /home/ubuntu/scripts/deploy_subnet_under_calibration_net/deploy.sh ${{ github.ref_name }}
script: bash -il /home/ubuntu/scripts/deploy_subnet_under_calibration_net/deploy.sh ${{ github.head_ref }}
command_timeout: 50m
1 change: 0 additions & 1 deletion extras/linked-token/test/LinkedTokenController.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {IpcEnvelope, CallMsg, IpcMsgKind} from "@ipc/src/structs/CrossNet.sol";

import {SubnetActorDiamond} from "@ipc/src/SubnetActorDiamond.sol";
import {LinkedTokenController} from "../src/LinkedTokenController.sol";
//import {InvalidOriginContract, InvalidOriginSubnet} from "../src/@ipc/src/examples/cross-token/IpcCrossTokenErrors.sol";
import {USDCTest} from "../src/USDCTest.sol";

import "openzeppelin-contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
Expand Down
1 change: 0 additions & 1 deletion extras/linked-token/test/LinkedTokenReplica.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {IpcEnvelope, CallMsg, IpcMsgKind} from "@ipc/src/structs/CrossNet.sol";

import {SubnetActorDiamond} from "@ipc/src/SubnetActorDiamond.sol";
import {LinkedTokenController} from "../src/LinkedTokenController.sol";
//import {InvalidOriginContract, InvalidOriginSubnet} from "@ipc/src/examples/cross-token/IpcCrossTokenErrors.sol";
import {USDCTest} from "../src/USDCTest.sol";
import {InvalidOriginContract, InvalidOriginSubnet} from "../src/LinkedToken.sol";

Expand Down
1 change: 1 addition & 0 deletions extras/tools/fvm-eth-address-converter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 11 additions & 0 deletions extras/tools/fvm-eth-address-converter/fvm-addr-to-eth-addr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ethAddressFromDelegated } from '@glif/filecoin-address'

if (process.argv.length != 3) {
console.log('Usage: npx ts-node fvm-addr-to-eth-addr.ts <fvm_address>')
process.exit(1)
}

const fvmAddress = process.argv[2]
const ethAddress: string = ethAddressFromDelegated(fvmAddress)

console.log(ethAddress)
Loading
Loading