Package subhost is a test fixture for realm.Sub sub-identity presentation across a real package boundary. It plays two roles:
- Host: ActAsSub mints a sub of its OWN live cur and crosses into an observer with it.
- Observer: Observe reads the presented identity (cur.Previous) that a caller crossed in with, and asserts unsafe.PreviousRealm parity.
Consumers:
- gnovm/tests/files/zrealm_sub_foreign_present.gno crosses into Observe directly with a sub minted in the caller's own realm, to check cross-realm identity presentation + Subpath() through a cross.
- gno.land/pkg/integration/testdata/subrealm_run_parity.txtar enters via MsgRun, crosses into ActAsSub, which mints a sub and crosses into Observe — the MsgRun-entry counterpart to the MsgCall-entry parity filetest zrealm_sub1.gno.