This module contains a canister used for XNet integration test.
In order to build it, run:
cargo build --target wasm32-unknown-unknown --release
State of the XNet messaging.
Request sent by the "fanout" method.
Various metrics observed by this canister, e.g. message latency distribution.
The configuration of the subnets that should be specified in the init
argument on canister install. A
Pad requests AND responses to this size (in bytes) if smaller.
Number of requests to send to each subnet (other than ours) every round.
The pseudo-random number generator we use to pick the next canister to talk to. It doesn't need to be cryptographically secure, we just want it to be simple and fast. The default values for state and stream parameters come from the official documentation: https://rust-random.github.io/rand/rand_pcg/struct.Lcg64Xsh32.html
Whether this canister is generating traffic.
State of the messaging that we use to check invariants (e.g., sequence numbers).
Calls "msg_reply" with reply being argument encoded as Candid.
An internal endpoint that sends a messages to a random canister on each of the remote subnets. This endpoint is repeatedly triggered from the "start" call.
Endpoint that handles requests from canisters located on remote subnets.
Returns true if this canister should continue generating traffic.
Appends a message to the log, ensuring log size stays below 2000 bytes.
Query call that serializes metrics as a candid message.
Callback for handling reject responses from "handle_request".
Callback for handling replies from "handle_request".
Initializes network topology and instructs this canister to start sending requests to other canisters.
Returns system time in nanoseconds.