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

Fix log oracle handlers #2306

Closed
LHerskind opened this issue Sep 14, 2023 · 1 comment
Closed

Fix log oracle handlers #2306

LHerskind opened this issue Sep 14, 2023 · 1 comment
Assignees
Labels
T-bug Type: Bug. Something is broken.

Comments

@LHerskind
Copy link
Contributor

The current unencrypted logs are practically broken since they can only be used to emit strictly defined data in the form of strings, which are structured with a u8 array. If passing a field directly to the function emit_unencrypted_log only the least significant byte will actually be emitted, so for event emission similarly to evm based chains it has some way to go.

@github-project-automation github-project-automation bot moved this to Todo in A3 Sep 14, 2023
@LHerskind LHerskind added the T-bug Type: Bug. Something is broken. label Sep 14, 2023
@benesjan
Copy link
Contributor

I was just investigating this and the issue seems to be fairly small. Noir serializes the data correctly but the oracle handler is incorrect because it accepts only one field.

Instead of
emitUnencryptedLog: message => {

it should accept all the fields:

emitUnencryptedLog: (...args) => {

and then concatenate them all to 1 buffer and include with the logs.

@benesjan benesjan added this to the 🪵 ABI Encoded Logs milestone Sep 15, 2023
@benesjan benesjan changed the title Broken unencrypted logs Fix log oracle handlers Sep 15, 2023
@benesjan benesjan self-assigned this Sep 28, 2023
@benesjan benesjan moved this from Todo to In Progress in A3 Sep 28, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in A3 Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: Bug. Something is broken.
Projects
Archived in project
Development

No branches or pull requests

2 participants