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

Some acir functions blow up 20x in size after Fix poor handling of aliased references in flattening pass #6574

Open
sirasistant opened this issue Nov 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sirasistant
Copy link
Contributor

Aim

Expected Behavior

Bug

After this PR #6434 some private functions in aztec have grown 20x in the size of ACIR bytecode.

To Reproduce

use dep::aztec::macros::aztec;

#[aztec]
contract StatefulTest {
    use dep::aztec::{
        initializer::assert_is_initialized_private,
        macros::{functions::{initializer, noinitcheck, private, public, view}, storage::storage},
    };
    use dep::aztec::prelude::{AztecAddress, FunctionSelector, Map, PrivateSet, PublicMutable};
    use dep::value_note::{balance_utils, utils::{decrement, increment}, value_note::ValueNote};

    #[storage]
    struct Storage<Context> {
        notes: Map<AztecAddress, PrivateSet<ValueNote, Context>, Context>,
        public_values: Map<AztecAddress, PublicMutable<Field, Context>, Context>,
    }


    #[private]
    fn create_note(owner: AztecAddress, outgoing_viewer: AztecAddress, value: Field) {
        if (value != 0) {
            let loc = storage.notes.at(owner);
            increment(loc, value, owner, outgoing_viewer, outgoing_viewer);
        }
    }

}

Nargo.toml

[package]
name = "test"
type = "contract"
authors = [""]
compiler_version = ">=0.18.0"

[dependencies]
aztec = { path = "PATH_TO_AZTEC_PACKAGES/noir-projects/aztec-nr/aztec" }
value_note = { path = "PATH_TO_AZTEC_PACKAGES/noir-projects/aztec-nr/value-note" }

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

Blocker

Blocker Context

Blocking build

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@sirasistant sirasistant added the bug Something isn't working label Nov 21, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant