Skip to content

About

Conformance harness for MRC-13 validator metadata registry deployments on Monad: standardized behavioral checks against any live registry.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

monad-mrc13-conformance

A conformance harness for MRC-13 (Validator Metadata Registry) deployments on Monad. Point it at any deployed registry and it runs the standard behavioral checks against the live contract and prints a pass/fail checklist.

This complements an implementation's own unit tests rather than repeating them. A project's tests prove that project's contract; this harness verifies that a deployed instance behaves to spec, so several independent implementations can show the same checklist. It follows the same idea as monad-rpc-conformance: falsifiable checks against a live target, with the evidence in the report.

What it checks

Only the standardized MRC-13 behavior. Delegation naming and deleteMetadata are implementation-defined extensions and are left out of the core checks.

  • read.getMetadata.shape - the six-field struct (name, website, description, logo, socials, additionalInfo)
  • read.getName.consistency - getName equals getMetadata().name
  • read.hasMetadata.consistency - hasMetadata agrees with whether a record exists
  • read.event.decodable - MetadataUpdated decodes to the standard shape
  • sim.unauthorized.rejected - a non-authority setMetadata reverts (eth_call, no funds)
  • sim.unknownValidator.rejected - setMetadata for a validator with no staking authority reverts
  • write.setMetadata.persistsAndEmits - a record written by the authority persists and emits MetadataUpdated
  • write.updateMetadataField.single - updateMetadataField changes one field and leaves the rest

Modes

Read-only and simulation checks need only an RPC and the registry address. The two write checks need a signer that is a validator's staking authority; they mutate that validator's record and restore it afterwards. Without a key the harness runs read-only plus simulation and marks the write checks inconclusive.

Usage

npm install

# read-only + simulation
npm run check -- --rpc <url> --registry <addr> --network monad-testnet --validator <id>

# full run (write checks): signer must be the validator's authority
MRC13_PRIVATE_KEY=0x... npm run check -- \
  --rpc <url> --registry <addr> --network monad-testnet --validator <id> --out reports/run

Flags: --rpc, --registry, --network, --validator <id>, --key-env <VAR> (default MRC13_PRIVATE_KEY), --key <hex> (discouraged), --out <dir>, --fail-on-violation.

The private key is read from an environment variable by default so it stays out of shell history.

A live run

Against the reference deployment on Monad testnet (0x3f084CAF88F8894f6c83cf40b9cA7e792D9F221B, validator 267 as the test record): all eight checks conform, and the validator's record is restored afterwards. The generated report is in reports/.

Roadmap

  • Local anvil mode with a mock staking precompile, so the checks run in CI with no funds and no live deployment
  • More cases as the MRC-13 Test Cases section of the spec firms up (delegation scoping, rotation retirement, deleteMetadata for implementations that include it)

License

MIT

About

Conformance harness for MRC-13 validator metadata registry deployments on Monad: standardized behavioral checks against any live registry.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages