dfinity / ic-hs

A haskell toolbox for the Internet Computer
Apache License 2.0
35 stars 6 forks source link

check effective canister id against subnets' canister ranges #210

Closed mraszyk closed 1 year ago

mraszyk commented 1 year ago

The effective canister ID in the URL of every request (update, query, read state request) must be contained in the canister ranges of a subnet (so that the request can be properly routed to that subnet by the BN in the mainnet implementation). This PR checks that condition in the reference implementation, fixes a test that did not satisfy the condition, and also adds tests that explicitly test for that condition.

Note. The conditions on effective canister IDs are specified in this section of the Interface Specification and should be updated, too.