You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
On a clean checkout, run forge build, then node scripts/js/release-metadata.mjs build --tag base --out /tmp/base --addresses false.
Change a comment in contracts/store/LabelStore.sol.
Run forge build, then node scripts/js/release-metadata.mjs changedset --previous /tmp/base/codehashes.json.
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.
Component
Other
Priority
P2
What happened?
changedsetinscripts/js/release-metadata.mjsreportsStoreFactoryas 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 incontracts/that deploys others withnew.Expected behavior
changedsetreports a contract only when its code changed, so a comment-only edit never makes a release require aStoreFactoryupgrade.Reproduction
forge build, thennode scripts/js/release-metadata.mjs build --tag base --out /tmp/base --addresses false.contracts/store/LabelStore.sol.forge build, thennode scripts/js/release-metadata.mjs changedset --previous /tmp/base/codehashes.json.StoreFactoryis listed.Additional context
LabelStore.solandILabelStore.solputStoreFactoryin itschangedset.changedsetignores the metadata solc appends to a contract's bytecode, but onlyStoreFactory's own. The creation code ofLabelStore,UserStore,UpgradeableBeaconandBeaconProxyis embedded inStoreFactory's bytecode, each copy with its own metadata, and those copies still count.codehashes.jsonattached to every release carries the same hashes, so comparing two releases' files gives the same result.