Skip to content

Compact storage layouts + O(1) feeder/signer membership + paginated positions - #152

Merged
dami-005 merged 2 commits into
Zenith-options:mainfrom
Inkman007:feature/100-103-storage-layer
Sep 30, 2026
Merged

dami-005 merged 2 commits into
Zenith-options:mainfrom
Inkman007:feature/100-103-storage-layer

Conversation

@Inkman007

Copy link
Copy Markdown

Summary

Note on scope

lib.rs, storage.rs, types.rs, and test.rs for options_market, price_oracle, and multisig are currently empty (0 bytes) on main — wiped by earlier merges unrelated to this PR. There's no existing V1 layout or contract entrypoints in the tree to migrate from, benchmark against, or wire these into right now, so this PR adds the storage/types layer on its own with dedicated unit tests, rather than the full migration + resource-benchmark deliverable the issues originally describe against a working contract. Flagging this so it's not mistaken for a complete resolution of the underlying intent — happy to follow up once the wiped contract logic is restored.

Validation performed

  • cargo test --lib green in all three crates (8/8 tests passing)
  • cargo fmt --check clean

Closes #100
Closes #101
Closes #102
Closes #103

…eeder/signer O(1) membership, paginated user positions

- options_market: PositionStatus enum replaces is_exercised/is_settled bools on OptionPosition (Zenith-options#103)
- options_market: Config/Stats structs consolidate hot instance reads and counters (Zenith-options#102)
- options_market: paginated UserPositionPage index replaces unbounded per-user Vec<u64> (Zenith-options#100)
- price_oracle: IsFeeder(Address) persistent membership map replaces Vec::contains scan (Zenith-options#101)
- multisig: IsSigner(Address) persistent membership map replaces Vec::contains scan (Zenith-options#101)

lib.rs/storage.rs/types.rs/test.rs for these crates were previously wiped to
0 bytes by earlier merges on main, so this adds the storage/types layer
fresh rather than migrating existing entries; no V1 layout exists in the
tree to benchmark against or migrate from.

Closes Zenith-options#100
Closes Zenith-options#101
Closes Zenith-options#102
Closes Zenith-options#103
@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

@Inkman007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

…rage-layer

# Conflicts:
#	multisig/src/lib.rs
#	multisig/src/types.rs
@dami-005
dami-005 merged commit 4a5f038 into Zenith-options:main Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants