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

Emit unencrypted events more efficiently #885

Closed
benesjan opened this issue Jun 20, 2023 · 2 comments
Closed

Emit unencrypted events more efficiently #885

benesjan opened this issue Jun 20, 2023 · 2 comments

Comments

@benesjan
Copy link
Contributor

benesjan commented Jun 20, 2023

Currently when we emit an unencrypted event we receive each string char encoded in 1 field. This seems wasteful and should probably be addressed.

Example of ACVM fields received for "Balance set in constructor" event message:

    args  [
      '0x0000000000000000000000000000000000000000000000000000000000000042',
      '0x0000000000000000000000000000000000000000000000000000000000000061',
      '0x000000000000000000000000000000000000000000000000000000000000006c',
      '0x0000000000000000000000000000000000000000000000000000000000000061',
      '0x000000000000000000000000000000000000000000000000000000000000006e',
      '0x0000000000000000000000000000000000000000000000000000000000000063',
      '0x0000000000000000000000000000000000000000000000000000000000000065',
      '0x0000000000000000000000000000000000000000000000000000000000000020',
      '0x0000000000000000000000000000000000000000000000000000000000000073',
      '0x0000000000000000000000000000000000000000000000000000000000000065',
      '0x0000000000000000000000000000000000000000000000000000000000000074',
      '0x0000000000000000000000000000000000000000000000000000000000000020',
      '0x0000000000000000000000000000000000000000000000000000000000000069',
      '0x000000000000000000000000000000000000000000000000000000000000006e',
      '0x0000000000000000000000000000000000000000000000000000000000000020',
      '0x0000000000000000000000000000000000000000000000000000000000000063',
      '0x000000000000000000000000000000000000000000000000000000000000006f',
      '0x000000000000000000000000000000000000000000000000000000000000006e',
      '0x0000000000000000000000000000000000000000000000000000000000000073',
      '0x0000000000000000000000000000000000000000000000000000000000000074',
      '0x0000000000000000000000000000000000000000000000000000000000000072',
      '0x0000000000000000000000000000000000000000000000000000000000000075',
      '0x0000000000000000000000000000000000000000000000000000000000000063',
      '0x0000000000000000000000000000000000000000000000000000000000000074',
      '0x000000000000000000000000000000000000000000000000000000000000006f',
      '0x0000000000000000000000000000000000000000000000000000000000000072'
    ]
@benesjan benesjan added this to A3 Jun 20, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Jun 20, 2023
@benesjan benesjan changed the title Emit unencrypted events Emit unencrypted events more efficiently Jun 20, 2023
@benesjan benesjan added this to the 📣 Emit Events milestone Jun 20, 2023
@iAmMichaelConnor
Copy link
Contributor

we'll work on emitting the logs without oracles. Once we'll be working on that we'll totally refactor how the logs are handled and all the current code using oracles will be thrown away.

@benesjan how will logs be emitted without using an oracle?

E.g. if a function wants to emit a large log, it can only push the log_hash to the public inputs, so how is the 'preimage' of the log_hash retained without passing it to an oracle?

@benesjan
Copy link
Contributor Author

benesjan commented Jul 13, 2023

E.g. if a function wants to emit a large log, it can only push the log_hash to the public inputs, so how is the 'preimage' of the log_hash retained without passing it to an oracle?

@iAmMichaelConnor You are right, I was saying nonsense. Updated the issue to not confuse more people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants