From 913a23b4448bd4d55d38e3faebe794b0bfb8622e Mon Sep 17 00:00:00 2001 From: Baptiste Oueriagli Date: Thu, 23 Oct 2025 17:37:44 +0200 Subject: [PATCH] chore(solana): clean solana templates --- .../FACILITATORS.md | 25 +++++++++++++++---- .../template-mcm-program-upgrade/Makefile | 3 +-- .../template-mcm-program-upgrade/README.md | 16 +++--------- .../FACILITATORS.md | 6 ++--- .../template-mcm-set-pause-bridge/Makefile | 3 +-- .../template-mcm-set-pause-bridge/README.md | 18 +++---------- .../FACILITATORS.md | 13 +++------- .../template-mcm-signers-update/Makefile | 4 +-- .../template-mcm-signers-update/README.md | 18 +++---------- 9 files changed, 40 insertions(+), 66 deletions(-) diff --git a/solana/setup-templates/template-mcm-program-upgrade/FACILITATORS.md b/solana/setup-templates/template-mcm-program-upgrade/FACILITATORS.md index 278a34fb..5c678788 100644 --- a/solana/setup-templates/template-mcm-program-upgrade/FACILITATORS.md +++ b/solana/setup-templates/template-mcm-program-upgrade/FACILITATORS.md @@ -44,7 +44,7 @@ PROGRAM_BINARY= ### 1.3. Write buffer ```bash -make write-buffer +make step1-write-buffer ``` This will output a buffer address. Copy it. @@ -62,11 +62,26 @@ SPILL= Then transfer buffer authority to MCM: ```bash -make transfer-buffer +make step2-transfer-buffer ``` The buffer is now controlled by the MCM authority. +### 1.5. Generate set-buffer-authority artifacts (use solana explorer to get the signature of the set-buffer-authority tx) + +Set the following in `.env`: +```bash +SET_BUFFER_AUTHORITY_SIGNATURE= +``` + +Then generate the artifacts: + +```bash +make step2.5-generate-set-buffer-authority-artifacts +``` + +This will output a file called `artifacts/set-buffer-authority-artifacts.json`. + ## Phase 2: Create and Commit MCM Proposal ### 2.1. Update .env for proposal generation @@ -84,7 +99,7 @@ MCM_PROPOSAL_OUTPUT=proposal.json ### 2.2. Generate proposal ```bash -make mcm-proposal +make step3-create-proposal ``` This creates the proposal file (default `proposal.json` or whatever is set in `MCM_PROPOSAL_OUTPUT`). @@ -108,7 +123,7 @@ git push ## Phase 3: Coordinate with Signers and Collect Signatures -Coordinate with Signers to collect their signatures. Each Signer will run `make mcm-sign` and provide their signature. +Coordinate with Signers to collect their signatures. Each Signer will run `make sign` and provide their signature. Concatenate all signatures in the format: `0xSIG1,0xSIG2,0xSIG3` @@ -122,7 +137,7 @@ MCM_SIGNATURES=0xSIG1,0xSIG2,0xSIG3 ## Phase 4: Execute Proposal ```bash -make mcm-all +make step5-execute-proposal ``` This command executes all the necessary steps: diff --git a/solana/setup-templates/template-mcm-program-upgrade/Makefile b/solana/setup-templates/template-mcm-program-upgrade/Makefile index 3598df42..6abd2415 100644 --- a/solana/setup-templates/template-mcm-program-upgrade/Makefile +++ b/solana/setup-templates/template-mcm-program-upgrade/Makefile @@ -41,5 +41,4 @@ sign: .PHONY: step5-execute-proposal step5-execute-proposal: @echo "==> Step 5: Executing MCM proposal..." - make mcm-signatures-all - make mcm-proposal-all + make mcm-all diff --git a/solana/setup-templates/template-mcm-program-upgrade/README.md b/solana/setup-templates/template-mcm-program-upgrade/README.md index 5faa61d3..d0305e30 100644 --- a/solana/setup-templates/template-mcm-program-upgrade/README.md +++ b/solana/setup-templates/template-mcm-program-upgrade/README.md @@ -21,20 +21,10 @@ make deps Your Ledger needs to be connected and unlocked. The **Ethereum application** needs to be opened on Ledger with the message "Application is ready". -### 3. Review the proposal - -The Facilitator will provide you with the proposal details. Review: -- Program being upgraded: `PROGRAM` -- Buffer address: `BUFFER` -- MCM Program ID: `MCM_PROGRAM_ID` -- Valid until timestamp: `MCM_VALID_UNTIL` - -These values are in the `.env` file and the generated `proposal.json`. - -### 4. Sign the proposal +### 3. Sign the proposal ```bash -make mcm-sign +make sign ``` This command will: @@ -50,7 +40,7 @@ After signing, you will see output like: Signature: 1234567890abcdef... ``` -### 5. Send signature to Facilitator +### 4. Send signature to Facilitator Copy the **entire signature** and send it to the Facilitator via your secure communication channel. diff --git a/solana/setup-templates/template-mcm-set-pause-bridge/FACILITATORS.md b/solana/setup-templates/template-mcm-set-pause-bridge/FACILITATORS.md index 76926b6a..81c20303 100644 --- a/solana/setup-templates/template-mcm-set-pause-bridge/FACILITATORS.md +++ b/solana/setup-templates/template-mcm-set-pause-bridge/FACILITATORS.md @@ -47,7 +47,7 @@ PAUSED=true # or false to unpause ### 1.2. Generate proposal ```bash -make mcm-proposal +make step1-create-proposal ``` This creates the proposal file (default `proposal.json` or whatever is set in `MCM_PROPOSAL_OUTPUT`). @@ -71,7 +71,7 @@ git push ## Phase 2: Coordinate with Signers and Collect Signatures -Coordinate with Signers to collect their signatures. Each Signer will run `make mcm-sign` and provide their signature. +Coordinate with Signers to collect their signatures. Each Signer will run `make sign` and provide their signature. Concatenate all signatures in the format: `0xSIG1,0xSIG2,0xSIG3` @@ -85,7 +85,7 @@ MCM_SIGNATURES=0xSIG1,0xSIG2,0xSIG3 ## Phase 3: Execute Proposal ```bash -make mcm-all +make step3-execute-proposal ``` This command executes all the necessary steps: diff --git a/solana/setup-templates/template-mcm-set-pause-bridge/Makefile b/solana/setup-templates/template-mcm-set-pause-bridge/Makefile index 40a6435e..b5b4f68a 100644 --- a/solana/setup-templates/template-mcm-set-pause-bridge/Makefile +++ b/solana/setup-templates/template-mcm-set-pause-bridge/Makefile @@ -23,5 +23,4 @@ sign: .PHONY: step3-execute-proposal step3-execute-proposal: @echo "==> Step 3: Executing MCM proposal..." - make mcm-signatures-all - make mcm-proposal-all + make mcm-all diff --git a/solana/setup-templates/template-mcm-set-pause-bridge/README.md b/solana/setup-templates/template-mcm-set-pause-bridge/README.md index 328b932b..7dc982c7 100644 --- a/solana/setup-templates/template-mcm-set-pause-bridge/README.md +++ b/solana/setup-templates/template-mcm-set-pause-bridge/README.md @@ -21,22 +21,10 @@ make deps Your Ledger needs to be connected and unlocked. The **Ethereum application** needs to be opened on Ledger with the message "Application is ready". -### 3. Review the proposal - -The Facilitator will provide you with the proposal details. Review: -- Bridge program ID: `BRIDGE_PROGRAM_ID` -- Bridge account: `BRIDGE_ACCOUNT` -- Guardian: `GUARDIAN` -- Pause status: `PAUSED` (true to pause, false to unpause) -- MCM Program ID: `MCM_PROGRAM_ID` -- Valid until timestamp: `MCM_VALID_UNTIL` - -These values are in the `.env` file and the generated proposal file. - -### 4. Sign the proposal +### 3. Sign the proposal ```bash -make mcm-sign +make sign ``` This command will: @@ -52,7 +40,7 @@ After signing, you will see output like: Signature: 1234567890abcdef... ``` -### 5. Send signature to Facilitator +### 4. Send signature to Facilitator Copy the **entire signature** and send it to the Facilitator via your secure communication channel. diff --git a/solana/setup-templates/template-mcm-signers-update/FACILITATORS.md b/solana/setup-templates/template-mcm-signers-update/FACILITATORS.md index edc216ec..da028aae 100644 --- a/solana/setup-templates/template-mcm-signers-update/FACILITATORS.md +++ b/solana/setup-templates/template-mcm-signers-update/FACILITATORS.md @@ -45,12 +45,10 @@ MCM_GROUP_PARENTS=0,0 MCM_CLEAR_ROOT=false # or true if needed ``` -**Important**: Carefully review the signers configuration to ensure it matches the intended governance structure. - ### 1.2. Generate proposal ```bash -make mcm-proposal +make step1-create-proposal ``` This creates the proposal file (default `proposal.json` or whatever is set in `MCM_PROPOSAL_OUTPUT`). @@ -74,7 +72,7 @@ git push ## Phase 2: Coordinate with Signers and Collect Signatures -Coordinate with Signers to collect their signatures. Each Signer will run `make mcm-sign` and provide their signature. +Coordinate with Signers to collect their signatures. Each Signer will run `make sign` and provide their signature. Concatenate all signatures in the format: `0xSIG1,0xSIG2,0xSIG3` @@ -88,7 +86,7 @@ MCM_SIGNATURES=0xSIG1,0xSIG2,0xSIG3 ## Phase 3: Execute Proposal ```bash -make mcm-all +make step3-execute-proposal ``` This command executes all the necessary steps: @@ -97,15 +95,12 @@ This command executes all the necessary steps: - Finalize signatures - Set root - Execute proposal +- Print the new configuration ## Phase 4: Verification ### 4.1. Verify MCM configuration -```bash -make mcm-print-config -``` - Check that: - All new signers are present - Old signers (if removed) are no longer present diff --git a/solana/setup-templates/template-mcm-signers-update/Makefile b/solana/setup-templates/template-mcm-signers-update/Makefile index 17c396ed..15391353 100644 --- a/solana/setup-templates/template-mcm-signers-update/Makefile +++ b/solana/setup-templates/template-mcm-signers-update/Makefile @@ -23,5 +23,5 @@ sign: .PHONY: step3-execute-proposal step3-execute-proposal: @echo "==> Step 3: Executing MCM proposal..." - make mcm-signatures-all - make mcm-proposal-all + make mcm-all + make mcm-print-config diff --git a/solana/setup-templates/template-mcm-signers-update/README.md b/solana/setup-templates/template-mcm-signers-update/README.md index a7f4e4cc..d269dc21 100644 --- a/solana/setup-templates/template-mcm-signers-update/README.md +++ b/solana/setup-templates/template-mcm-signers-update/README.md @@ -21,22 +21,10 @@ make deps Your Ledger needs to be connected and unlocked. The **Ethereum application** needs to be opened on Ledger with the message "Application is ready". -### 3. Review the proposal - -The Facilitator will provide you with the proposal details. Review: -- New signers list: `MCM_NEW_SIGNERS` -- Signer groups configuration: `MCM_SIGNER_GROUPS` -- Group quorums: `MCM_GROUP_QUORUMS` -- Group parents: `MCM_GROUP_PARENTS` -- MCM Program ID: `MCM_PROGRAM_ID` -- Valid until timestamp: `MCM_VALID_UNTIL` - -These values are in the `.env` file and the generated proposal file. - -### 4. Sign the proposal +### 3. Sign the proposal ```bash -make mcm-sign +make sign ``` This command will: @@ -52,7 +40,7 @@ After signing, you will see output like: Signature: 1234567890abcdef... ``` -### 5. Send signature to Facilitator +### 4. Send signature to Facilitator Copy the **entire signature** and send it to the Facilitator via your secure communication channel.