Skip to content

[Bug]: changedset reports StoreFactory as changed after comment-only edits to its dependencies #322

Description

@re-gius

Component

Other

Priority

P2

What happened?

changedset in scripts/js/release-metadata.mjs reports StoreFactory as changed when only a comment changed in a contract it deploys. StoreFactory's code is identical in both builds.

Affected contract: StoreFactory, the only contract in contracts/ that deploys others with new.

Expected behavior

changedset reports a contract only when its code changed, so a comment-only edit never makes a release require a StoreFactory upgrade.

Reproduction

  1. On a clean checkout, run forge build, then node scripts/js/release-metadata.mjs build --tag base --out /tmp/base --addresses false.
  2. Change a comment in contracts/store/LabelStore.sol.
  3. Run forge build, then node scripts/js/release-metadata.mjs changedset --previous /tmp/base/codehashes.json.
  4. StoreFactory is listed.

Additional context

  • Found in feat: rename lite/full to device and personhood names, with legacy gateway entrypoints #321, whose NatSpec-only edits to LabelStore.sol and ILabelStore.sol put StoreFactory in its changedset.
  • changedset ignores the metadata solc appends to a contract's bytecode, but only StoreFactory's own. The creation code of LabelStore, UserStore, UpgradeableBeacon and BeaconProxy is embedded in StoreFactory's bytecode, each copy with its own metadata, and those copies still count.
  • The codehashes.json attached to every release carries the same hashes, so comparing two releases' files gives the same result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Tetiary Prioritytype: bugBug report

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions