Skip to content

refactor!: fixing illogical code locations#16891

Merged
benesjan merged 1 commit into
nextfrom
09-09-refactor_fixing_illogical_code_locations
Sep 10, 2025
Merged

refactor!: fixing illogical code locations#16891
benesjan merged 1 commit into
nextfrom
09-09-refactor_fixing_illogical_code_locations

Conversation

@benesjan

@benesjan benesjan commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

With my recent PR, location of the event and note emission related code became illogical. In this PR i reshuffle it around.

I perceive it as quite important to have this merged relatively quickly as that will allow devs to deal with 1 migration instead of 2.

benesjan commented Sep 9, 2025

Copy link
Copy Markdown
Contributor Author

@benesjan benesjan changed the title refactor: fixing illogical code locations refactor!: fixing illogical code locations Sep 9, 2025
@benesjan benesjan marked this pull request as ready for review September 9, 2025 11:00
@AztecBot AztecBot force-pushed the 09-09-refactor_moving_emit_note_func branch from 8570bd3 to e986ade Compare September 9, 2025 13:39
@benesjan benesjan changed the base branch from 09-09-refactor_moving_emit_note_func to graphite-base/16891 September 9, 2025 14:04
@benesjan benesjan force-pushed the 09-09-refactor_fixing_illogical_code_locations branch from 47cdd19 to f6c9f9f Compare September 9, 2025 14:55
@benesjan benesjan changed the base branch from graphite-base/16891 to next September 9, 2025 14:55
Comment on lines +99 to +101
- `CONSTRAINED_ONCHAIN`: For on-chain delivery with cryptographic guarantees that recipients can discover and decrypt messages. Uses constrained encryption but is slower to prove. Best for critical messages that contracts need to verify.
- `UNCONSTRAINED_ONCHAIN`: For on-chain delivery without encryption constraints. Faster proving but trusts the sender. Good when the sender is incentivized to perform encryption correctly (e.g. they are buying something and will only get it if the recipient sees the note). No guarantees that recipients will be able to find or decrypt messages.
- `UNCONSTRAINED_OFFCHAIN`: For off-chain delivery (e.g. cloud storage) without constraints. Lowest cost since no on-chain storage needed. Requires custom infrastructure for delivery. No guarantees that messages will be delivered or that recipients will ever find them.

@benesjan benesjan Sep 9, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied this from a section above in the file that described the changes related to notes as the description was better.

@benesjan benesjan requested a review from nventuro September 10, 2025 09:29

@nventuro nventuro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for keeping things tidy.

/// over unconstrained encryption and is slower to prove (requiring more constraints).
///
/// There are three available delivery modes described below.
// TODO(#16771): This is now used by notes as well. Move it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this PR address this issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove it. Thanks for noticing it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove in that other PR of mine as I'm AFK now and don't want to then wait 3 hours for it to merge.

@benesjan benesjan added this pull request to the merge queue Sep 10, 2025
Merged via the queue into next with commit 639711c Sep 10, 2025
12 checks passed
@benesjan benesjan deleted the 09-09-refactor_fixing_illogical_code_locations branch September 10, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants