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
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:
Provider
struct for immutability{API_KEY}
placeholderProviderId
type aliasImplement post-upgrade actions to add, remove, and update one or more providersstableSize
andstableRead
canister methodsauthorize
,deauthorize
, andgetAuthorized
canister methodsFreeRpc
authPriorityRpc
auth as well asgetOpenRpcAccess
andsetOpenRpcAccess
PrincipalStorable
structAdd optionalpublic_url
to each providerdemo
flag to locally use EVM RPC canister without cycles payments, e.g. through Candid UIContent-Type
header