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

Debug symbols too large #10546

Open
iAmMichaelConnor opened this issue Dec 9, 2024 · 1 comment
Open

Debug symbols too large #10546

iAmMichaelConnor opened this issue Dec 9, 2024 · 1 comment
Labels
T-bug Type: Bug. Something is broken.

Comments

@iAmMichaelConnor
Copy link
Contributor

iAmMichaelConnor commented Dec 9, 2024

As part of #10486, the debug_symbols field of some contracts, inexplicably grew to be larger than the string limit of the system. In particular, the StatefulTest contract, function create_note_no_init_check and create_note. If you look at the first function, it doesn't look like it should have a massive debug_symbols field, given the amount of extra stuff that many other functions do:
Image

Within foundation/src/abi/abi.ts, the function getFunctionArtifact calls getFunctionDebugMetadata, which tries to inflate the debug_symbols string, and that's where this error arises.

I chatted with @sirasistant briefly, and we couldn't figure out why this is happening. Possibly a Noir compiler bug in the way it creates debug_symbols?

For now, within the PR, I just gracefully catch the error and throw a warning. In such cases, the debugMetadata is not returned from getFunctionDebugMetadata function; instead undefined is returned (which was an already-possible option for the function anyway).

@iAmMichaelConnor iAmMichaelConnor added the T-bug Type: Bug. Something is broken. label Dec 9, 2024
@iAmMichaelConnor
Copy link
Contributor Author

These are the current big debug_symbols functions:

Image

iAmMichaelConnor added a commit that referenced this issue Dec 10, 2024
Remove outgoing logs from aztec.nr.
Remove outgoing note discovery flows from typescript-land.

Outgoing viewing keys are retained, but now aren't used anywhere.

2 weird problems encountered on this journey:
- #10546 <-- an
inexplicable blow-up in the debug_symbols field of two functions in the
StateFulTestContract, despite features only being removed from that
contract.
- #10558 <-- a
debug log keeping the NFT contract from breaking

---------

Co-authored-by: Jan Beneš <[email protected]>
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue Dec 11, 2024
Remove outgoing logs from aztec.nr.
Remove outgoing note discovery flows from typescript-land.

Outgoing viewing keys are retained, but now aren't used anywhere.

2 weird problems encountered on this journey:
- AztecProtocol/aztec-packages#10546 <-- an
inexplicable blow-up in the debug_symbols field of two functions in the
StateFulTestContract, despite features only being removed from that
contract.
- AztecProtocol/aztec-packages#10558 <-- a
debug log keeping the NFT contract from breaking

---------

Co-authored-by: Jan Beneš <[email protected]>
lucasxia01 pushed a commit that referenced this issue Dec 11, 2024
Remove outgoing logs from aztec.nr.
Remove outgoing note discovery flows from typescript-land.

Outgoing viewing keys are retained, but now aren't used anywhere.

2 weird problems encountered on this journey:
- #10546 <-- an
inexplicable blow-up in the debug_symbols field of two functions in the
StateFulTestContract, despite features only being removed from that
contract.
- #10558 <-- a
debug log keeping the NFT contract from breaking

---------

Co-authored-by: Jan Beneš <[email protected]>
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
None yet
Development

No branches or pull requests

1 participant