-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
standardsRelated to standard note scripts or account componentsRelated to standard note scripts or account components
Milestone
Description
Problem
Accounts which create notes sometimes contain note script roots. For example:
const.BURN_NOTE_ROOT=[6407337173854817345,5626358912819151014,703918618794810515,17401169215223723177]
This creates maintenance issues when note scripts change, as the hardcoded values must be manually updated and kept in sync.
Core Issue
The fundamental challenge is determining the best way to store note script roots inside accounts that create new notes. Currently, accounts need to know script roots to create notes with the correct recipients, but hardcoding these values is brittle.
Related comments:
- Stubbed out bridging-out flow:
B2AGGnote ->AggLayerBridgeOutcontract ->BURNnote #2023 (comment) - Stubbed out bridging-out flow:
B2AGGnote ->AggLayerBridgeOutcontract ->BURNnote #2023 (comment)
Proposed Solutions
- Runtime Resolution: Use host functions to resolve script roots dynamically from the existing
WellKnownNoteinfrastructure - Build-Time Generation: Generate constants at build time from compiled scripts in
build.rs - Account Storage: Store script roots in account storage slots and update them as needed
- Hex String Storage: Store note scripts as hex strings in account masm code, this doesn't solve the issue, it just looks slightly better (I think this is already supported)
This is a tracking issue that requires further analysis to determine the optimal approach. More time needs to be taken to evaluate the trade-offs between runtime flexibility, storage efficiency, and implementation complexity before selecting a solution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
standardsRelated to standard note scripts or account componentsRelated to standard note scripts or account components