Skip to content

Note should not include debug decorators info #1812

@igamigo

Description

@igamigo

Doing some tests against devnet, @SantiagoPittella found out that a test that compared a local note (only on 0.11) versus the note we were syncing from the node was failing. After debugging a bit we found out that the problem is that debug decorators were kept when serializing and deserializing from the node. This includes directories (local to the person who created the note) such as AsmOp(AssemblyOp { location: Some(Location { uri: Uri("/Users/igamigo/repos/miden-client/target/release/build/miden-lib-8dc62ff0bc78bb2e/out/asm/note_scripts/P2ID.masm"). This caused a test to fail because we were comparing the full Note object (eg assert_eq!(note, received_note)) originally.

In the node, because the table is normalized and only keeps one copy of a script (and then further requests match against script roots), further requests to notes that reference this script root will download debug decorator data from whoever pushed that note script first. So we should look into stripping this data when serializing the note (or providing an alternative method). Additionally maybe Eq implementations should not involve these either, but not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions