Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor transaction kernel events and errors #768

Open
Dominik1999 opened this issue Jun 24, 2024 · 1 comment · May be fixed by #819
Open

Refactor transaction kernel events and errors #768

Dominik1999 opened this issue Jun 24, 2024 · 1 comment · May be fixed by #819
Assignees
Milestone

Comments

@Dominik1999
Copy link
Collaborator

Dominik1999 commented Jun 24, 2024

We need to refactor the kernel a bit in how we handle storage-related procedures.

  • Procedures in api.masm handle:
    • Authentication checks (as they do now).
    • Emitting events.
  • Procedures in the subsequent files, like kernels/tx/account.masm handle:
    • Slot type checks.
    • The actual update of the storage.
  • For get/set_account_item and get/set_account_map_item we should have corresponding procedures kernels/tx/account.masm.

If we don't do this in this PR, let's create an issue for it.

Originally posted by @bobbinth in #758 (comment)

@Dominik1999
Copy link
Collaborator Author

Should we only do storage-related procedures in this PR or should we move all events into api.masm? For example, we also have some events in tx.masm

# EVENTS
# =================================================================================================

# Event emitted before a new note is created.
const.NOTE_BEFORE_CREATED_EVENT=131083
# Event emitted after a new note is created.
const.NOTE_AFTER_CREATED_EVENT=131084

# Event emitted before an ASSET is added to a note
const.NOTE_BEFORE_ADD_ASSET_EVENT=131085
# Event emitted after an ASSET is added to a note
const.NOTE_AFTER_ADD_ASSET_EVENT=131086

@Dominik1999 Dominik1999 linked a pull request Aug 6, 2024 that will close this issue
@Dominik1999 Dominik1999 moved this from In Progress to Blocked in User's testnet Aug 12, 2024
@bobbinth bobbinth modified the milestones: v0.5, v0.6 Aug 27, 2024
@bobbinth bobbinth modified the milestones: v0.6, v0.7 Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Blocked
Development

Successfully merging a pull request may close this issue.

2 participants