Skip to content

Commit

Permalink
Chore: update the proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
IDX GitLab Automation committed Jan 7, 2025
1 parent c1337b8 commit 5d32596
Showing 1 changed file with 37 additions and 30 deletions.
67 changes: 37 additions & 30 deletions rs/boundary_node/rate_limits/mainnet/rate_limit_upgrade.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Upgrade the Rate-Limit Canister to Commit ab29295
# Install the Rate-Limit Canister from Commit ab29295

__Proposer__: DFINITY Foundation

Expand All @@ -10,56 +10,63 @@ __Source code__: [ab29295b39258e753aafaaad72c740d938d61e35][new-commit]

Following the adoption of the motion proposal addressing [incident handling](https://dashboard.internetcomputer.org/proposal/134031) within the framework of the new decentralized boundary node architecture, we propose the deployment of the new rate-limit canister.

This canister will enable API boundary nodes to enforce rate-limiting rules issued by an authorized Dfinity principal, hence protecting the Internet Computer during incidents. Canister is designed as an append-only storage model, ensuring transparency and auditability of rate-limit rules after incidents disclosure.
This canister will enable API boundary nodes to enforce rate-limiting rules issued by an authorized DFINITY principal, hence protecting the ICP during incidents. Canister is designed as an append-only storage model, ensuring transparency and auditability of rate-limit rules after incidents disclosure.

The authorized principal responsible for pushing new rate-limit configurations and disclosing them is specified through the upgrade arguments in this proposal.

## Upgrade Arguments
## Verifying the installation

```candid
(record {authorized_principal = opt principal "2igsz-4cjfz-unvfj-s4d3u-ftcdb-6ibug-em6tf-nzm2h-6igks-spdus-rqe"; registry_polling_period_secs = 60;})
First, make sure your Git repo has the right information.

```
# Option A. Get a fresh copy of the code.
git clone [email protected]:dfinity/ic.git && cd ic
# Option B. If you already have a copy of the ICP repo.
git fetch
```

## Verification
Second, checkout the right version of the code.

See the general instructions on [how to verify] proposals like this. A "quick
start" guide is provided here.
```
git checkout ab29295b39258e753aafaaad72c740d938d61e35
```

[how to verify]: https://github.com/dfinity/ic/tree/ab29295b39258e753aafaaad72c740d938d61e35/rs/nervous_system/docs/proposal_verification.md
### Argument Verification

The [didc][latest_didc] tool is required.

### WASM Verification
[latest_didc]: https://github.com/dfinity/candid/releases/latest

See ["Building the code"][prereqs] for prerequisites.

[prereqs]: https://github.com/dfinity/ic/tree/ab29295b39258e753aafaaad72c740d938d61e35/README.adoc#building-the-code
Fingerprint the canister argument:

```
# 1. Get a copy of the code.
git clone [email protected]:dfinity/ic.git
cd ic
# Or, if you already have a copy of the ic repo,
git fetch
git checkout ab29295b39258e753aafaaad72c740d938d61e35
didc encode \
-d rs/boundary_node/rate_limits/canister/interface.did \
-t '(InitArg)' \
'(record {
authorized_principal = opt principal "2igsz-4cjfz-unvfj-s4d3u-ftcdb-6ibug-em6tf-nzm2h-6igks-spdus-rqe";
registry_polling_period_secs = 60;
})' | xxd -r -p | sha256sum
```

# 2. Build canisters.
./ci/container/build-ic.sh -c
This should match `arg_hash` field of this proposal.

# 3. Fingerprint the result.
sha256sum ./artifacts/canisters/rate-limit-canister.wasm.gz
```
### WASM Verification

This should match `wasm_module_hash` field of this proposal.
See ["Building the code"][prereqs] for prerequisites.

[prereqs]: https://github.com/dfinity/ic/tree/ab29295b39258e753aafaaad72c740d938d61e35/README.adoc#building-the-code

### Upgrade Arguments Verification
Build the release version of canisters:

[`didc`][latest-didc] is required.
```
./ci/container/build-ic.sh -c
```

[latest-didc]: https://github.com/dfinity/candid/releases/latest
Fingerprint the canister module:

```
didc encode '(record {authorized_principal = opt principal "2igsz-4cjfz-unvfj-s4d3u-ftcdb-6ibug-em6tf-nzm2h-6igks-spdus-rqe"; registry_polling_period_secs = 60;})' | xxd -r -p | sha256sum
sha256sum ./artifacts/canisters/rate-limit-canister.wasm.gz
```

This should match the `arg_hash` field of this proposal.
This should match `wasm_module_hash` field of this proposal.

0 comments on commit 5d32596

Please sign in to comment.