-
Notifications
You must be signed in to change notification settings - Fork 54
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
Transaction proof fails to verify for new accounts #454
Comments
Do you mean on "existing accounts"? |
Correct, apologies for the confusion |
@phklive - as the first step, let's create a "prove" test which tests consumption of a note into a new account. I'm expecting this test will fail with a similar message. I'll look into what could be causing this. |
The root of the issue is pretty simple:
One way to fix this is to change how we construct This will also help us eliminate the TODO we left for error checking of transaction inputs in the |
Add the test in miden-base? Asking because I believe it could also live in miden-client. |
I think having it in |
So, I think we should do the following here:
Hopefully, everything else will work without any additional changes. |
Hello @bobbinth I have implemented your requests and am working on testing it now. Thinking through it I have not fully understood the reason why we would want to pass Also when we are talking about a
Because the account could be recorded in the store and have a nonce of 0 right, like the accounts generated at genesis. Thank you |
The prover actually does get the full initial state of the account - but the way it is provided to the VM is via advice inputs rather than stack inputs. The VM then verifies that for new accounts the prover can also provide a valid account seed (i.e., that hashing (code root, storage root etc. of the initial account state together with the seed yields the expected account ID). The verifier, however, does not need to know the initial account state for new accounts. In case of new accounts, we are basically saying that: (1) there was some new account with an initial state which was consistent with the specified account ID, (2) a transaction was executed against this new account, and (3) here is the resulting state. From the verifier/node standpoint.
This is a very good question and we may actually need to change slightly how genesis account generation works. Basically, a new account is the one that has nonce |
A few questions:
|
A few questions:
|
The full initial state is all underlying info about the account (not just a commitment). This includes full info about account code, storage, vault etc.
No - In this context, It may actually be a good thing to write up in the docs (there are some comments about this in the code, but they are probably scattered and difficult to follow). Once you go through the code and have a deeper understanding of the process - could you write up a few paragraphs and add them to the docs?
Yes, there is a MASM implementation of this function which is actually used in the VM.
Depends on what you mean by "handles." The prover/VM needs to know the entire account state to execute a transaction. The verifier just needs to know a limited set of public inputs to verify the same transaction. For new accounts, for example, the verifier does not need to know the initial state - it just needs to know that the transaction involved a new account. |
When running transactions on new accounts, proofs do not verify:
On
newexisting accounts, it does verify correctly:Note that this is verifying locally, before submitting to the node (the branch
igamigo-test-verification
adds verification step before submitting for testing this problem). Also, this is using the accounts generated by the node withmake-genesis
and thetesting
flag on.@phklive might be able to expand on this as he was working on 0xPolygonMiden/miden-node#171, to which this is related. After discussing on a call, we are not sure what could be causing the problem but guess that there are some inputs missing on the proof, specifically related to the account seed.
The text was updated successfully, but these errors were encountered: