Skip to content

Use constants from the kernel::memory module directly #2415

@Fumuran

Description

@Fumuran

Similar to #2168, though now we should get rid of the simple pushing procedures in the memory module.

For example, we can remove procedures such as

pub proc get_output_vault_root_ptr
    push.OUTPUT_VAULT_ROOT_PTR
end

and use the OUTPUT_VAULT_ROOT_PTR constant directly:

use &kernel::memory::OUTPUT_VAULT_ROOT_PTR

...

        # prepare stack for reading output note assets
        push.OUTPUT_VAULT_ROOT_PTR dup.2 exec.memory::get_output_note_asset_data_ptr dup
        # => [assets_start_ptr, assets_start_ptr, output_vault_root_ptr, num_assets, note_data_ptr,
        #     output_notes_end_ptr]

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerskernelsRelated to transaction, batch, or block kernels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions