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
verity_contract accepts exactly one storage_namespace declaration (Verity/Macro/Syntax.lean:54-55 + the grammar's (verityNamespaceSpec)? line at 81). This works for contracts with a single ERC-7201 namespace, but rules out faithful translations of upstream Solidity contracts that compose multiple namespaced storage layouts in one address.
Concrete blocker
UnlinkPool.sol (unlink-xyz/monorepo@4bc46c1f) carries three logically distinct ERC-7201 namespaces:
unlink.storage.State (in State.sol)
unlink.storage.UnlinkPoolRelayers (in UnlinkPool.sol)
The implicit unlink.storage.LazyIMTData carried by InternalLazyIMT
In cases/unlink_xyz/pool (feat/unlink-pool-port-scratchpad-helpers), the case currently flattens all three into a single storage_namespace "unlink.storage.UnlinkPoolRelayers" block, which loses the per-namespace slot rebasing that Solidity uses.
Proposal
Either:
(a) Multiple storage_namespace blocks — verityNamespaceSpec becomes * instead of ?. Subsequent storage blocks attach to the most recent namespace declaration. The macro would walk the namespace list and rebase each storage block onto its keccak-namespace key.
(b) storage_block "<namespace>" { ... } form — a single verity_contract hosts multiple keyword blocks, each carrying its own ERC-7201 layout. Existing storage_namespace "..." + storage ... form remains as the single-namespace shortcut.
#1730 (Axis 4 — automatic ERC-7201 namespaced storage) discusses making the namespace automatic per contract. That conversation is broader than this single-vs-multi-namespace gap. We're filing this as a self-contained ticket because:
Summary
verity_contractaccepts exactly onestorage_namespacedeclaration (Verity/Macro/Syntax.lean:54-55 + the grammar's(verityNamespaceSpec)?line at 81). This works for contracts with a single ERC-7201 namespace, but rules out faithful translations of upstream Solidity contracts that compose multiple namespaced storage layouts in one address.Concrete blocker
UnlinkPool.sol(unlink-xyz/monorepo@4bc46c1f) carries three logically distinct ERC-7201 namespaces:unlink.storage.State(inState.sol)unlink.storage.UnlinkPoolRelayers(inUnlinkPool.sol)unlink.storage.LazyIMTDatacarried byInternalLazyIMTIn
cases/unlink_xyz/pool(feat/unlink-pool-port-scratchpad-helpers), the case currently flattens all three into a singlestorage_namespace "unlink.storage.UnlinkPoolRelayers"block, which loses the per-namespace slot rebasing that Solidity uses.Proposal
Either:
(a) Multiple
storage_namespaceblocks —verityNamespaceSpecbecomes*instead of?. Subsequentstorageblocks attach to the most recent namespace declaration. The macro would walk the namespace list and rebase each storage block onto its keccak-namespace key.(b)
storage_block "<namespace>" { ... }form — a singleverity_contracthosts multiple keyword blocks, each carrying its own ERC-7201 layout. Existingstorage_namespace "..."+storage ...form remains as the single-namespace shortcut.Relation to #1730
#1730 (Axis 4 — automatic ERC-7201 namespaced storage) discusses making the namespace automatic per contract. That conversation is broader than this single-vs-multi-namespace gap. We're filing this as a self-contained ticket because:
Definition of done
verity_contractaccepts ≥1storage_namespace/storageblock pairs.Contracts/Smoke.leanexercises two namespaces in one contract (with#check_contractverifying storage-slot derivation).#guard_msgstest pinning the rejection diagnostic when the same namespace key appears twice.cases/unlink_xyz/poolre-translation lands separate State / RelayerStorage / PoolStorage namespaces.Subsumes the "W7" workaround listed in the spec-review of verity-benchmark#42.