Skip to content

Transaction failure when using account creator's pub_key as note input #1267

@partylikeits1983

Description

@partylikeits1983

Packages versions

0.8.1

When attempting to create a note using the account's pub_key as the note inputs, the transaction fails with the following error:

Number of account storage slots exceeds the maximum limit of 255

I pass the public key into the note inputs as shown here: note_signature_check_test.rs#L141

This error is particularly interesting. It appears that the VM does not accept the public key used to create the note to be used as note inputs.

For example, the following works:

let note_inputs = [
    alice_pub_key[0],
    alice_pub_key[1],
    alice_pub_key[2],
    Felt::new(alice_pub_key[3].as_int() - 1),
];

And this also works:

let note_inputs = [
    alice_pub_key[0],
    alice_pub_key[1],
    alice_pub_key[2],
    Felt::new(alice_pub_key[3].as_int() + 1),
];

However, this does not:

let note_inputs = [
    alice_pub_key[0],
    alice_pub_key[1],
    alice_pub_key[2],
    Felt::new(alice_pub_key[3].as_int() + 0),
];

Bug description

Should be able to pass in the associated pub_key used to create the note as NoteInputs.

How can this be reproduced?

To reproduce this issue clone this repository and run this test:

git clone git@github.com:partylikeits1983/miden-clob-designs.git
cd miden-clob-designs
cargo test --release  falcon512_signature_check_note -- --nocapture

Relevant log output

thread 'falcon512_signature_check_note' panicked at tests/note_signature_check_test.rs:179:10:
called `Result::unwrap()` on an `Err` value: TransactionExecutorError(TransactionProgramExecutionFailed(FailedAssertion { clk: RowIndex(1214), err_code: 131412, err_msg: Some("Number of account storage slots exceeds the maximum limit of 255") }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test falcon512_signature_check_note ... FAILED

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions