-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: NNS-managed RPC providers (#252)
This PR makes significant changes to the EVM RPC canister to enable using NNS proposals in place of a trusted principal to add, remove, and update RPC providers. **Progress:** - [x] Refactor `Provider` struct for immutability - [x] Remove per-provider cycles accounting in favor of decentralized ownership - [x] Update JSON-RPC API configuration for default RPC providers - [x] Change URL and header config to use `{API_KEY}` placeholder - [x] Adjust URL / header validation logic - [x] Include more tests for URL / header validation - [x] Refactor to use `ProviderId` type alias - [x] ~~Implement post-upgrade actions to add, remove, and update one or more providers~~ - [x] Add new API key system - [x] Remove `stableSize` and `stableRead` canister methods - [x] Simplify principal authorization system - [x] Remove `authorize`, `deauthorize`, and `getAuthorized` canister methods - [x] Convert to using hard-coded RPC providers and service mappings - [x] Add sanity checks for hard-coded providers and service-provider mappings - [x] Remove `FreeRpc` auth - [x] Remove `PriorityRpc` auth as well as `getOpenRpcAccess` and `setOpenRpcAccess` - [x] Use a fixed number of subnet nodes (28) for all EVM RPC deployments - [x] Remove `PrincipalStorable` struct - [x] Include changes from [dfinity/ic#1027](dfinity/ic#1027) - [x] Include changes from [dfinity/ic#1113](dfinity/ic#1113) - [x] ~~Add optional `public_url` to each provider~~ - [x] Refactor URLs and headers to use enum variants - [x] Add `demo` flag to locally use EVM RPC canister without cycles payments, e.g. through Candid UI - [x] Remove header validation in favor of overwriting default `Content-Type` header - [x] Update state machine test runner logic to test new init/upgrade args - [x] Update existing tests - [x] Add unit tests for URL validation - [x] Test API key insertion - [x] Test simplified permission system - [x] Update Rust and Motoko E2E tests - [x] Add public URLs for all RPC providers --------- Co-authored-by: gregorydemay <[email protected]>
- Loading branch information
1 parent
8ce8414
commit 1e5ba9a
Showing
26 changed files
with
1,622 additions
and
2,581 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.