Exposing Message ID or Message Order in a block to motoko

I guess if simple pseudo randomness, seeded with the available information to the canister, is enough, it could be a Motoko feature that doesn’t require changes to the Internet Computer. But the Motoko team isn’t really overstaffed at the moment, so I’m not sure how fast we can do it.

It might be an interesting task for someone who wants to get involved with Motoko developent, though!

(But first write an issue with a rough design outline and get approval from Andreas first before pouring work into this. It would probably a single prim returning a Nat64, and the internals a simple PRNG, seeded with canister id and reseeded with, say, time and message size and other data upon every message invocation; that would be implemented in the RTS code.)

2 Likes