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

[Bug] Can't deploy program importing a program with self.signer comparison #848

Open
MaciejNadolski98 opened this issue Feb 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MaciejNadolski98
Copy link
Contributor

🐛 Bug Report

Sometimes the deployment process will fail at Verifying the deployment and fees step. This seems to have something to do with importing other programs and potentially access to self.caller or self.signer variables.

Steps to Reproduce

Deploy foo.aleo. The error happens when trying to deploy example.aleo using await programManager.deploy(program, fee);. The same programs are deployed without issue when using snarkos developer deploy CLI command.

Code snippet to reproduce

foo.leo:

// The 'foo' program.
program foo.aleo {
    transition main(value: address) {
        assert_eq(self.signer, value);
    }
}

example.leo:

import foo.aleo;

// The 'example' program.
program example.aleo {
    transition main_() {
        foo.aleo/main(aleo12ux3gdauck0v60westgcpqj7v8rrcr3v346e4jtq04q7kkt22czsh808v2);
    }
}

Stack trace & error message

Spawning 4 threads
Program example.aleo does not exist on the network, deploying...
Fetching proving keys from url https://testnet3.parameters.aleo.org/fee_public.prover.634f153
Fetching verifying keys fee_public.verifier.09eeb4f
Creating deployment transaction
Checking program has a valid name
Checking program imports are valid and add them to the process
Importing program: foo.aleo
Creating deployment
Ensuring the fee is sufficient to pay for the deployment
Inserting externally provided fee proving and verifying keys
Authorizing Fee
Executing fee
Verifying fee execution
Verifying the deployment and fees

node:internal/process/esm_loader:97
    internalBinding('errors').triggerUncaughtException(
                              ^
Failed to synthesize the circuit for 'main_': Failed to execute instruction (call foo.aleo/main aleo12ux3gdauck0v60westgcpqj7v8rrcr3v346e4jtq04q7kkt22czsh808v2;): Failed to evaluate instruction (assert.eq self.signer r0 ;): 'assert.eq' failed: 'aleo1awmks0m6qdszc49v4zq7u46h272jlaygqwwalt8vmt3xa000uqrqp2ag2n' is not equal to 'aleo12ux3gdauck0v60westgcpqj7v8rrcr3v346e4jtq04q7kkt22czsh808v2' (should be equal)
(Use `node --trace-uncaught ...` to show where the exception was thrown)

Expected Behavior

The program gets deployed succesfully

Your Environment

  • sdk 0.6.9
  • cargo 1.75.0
@MaciejNadolski98 MaciejNadolski98 added the bug Something isn't working label Feb 6, 2024
@Lol4ikek
Copy link

hello

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
None yet
Development

No branches or pull requests

2 participants