-
Notifications
You must be signed in to change notification settings - Fork 34
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
Notes don't get a commit height #201
Comments
I spent some time trying to reproduce this and was not able to. I tried the script used in the workshops and different permutations of commands, using both the remote node and a local one. Without a way to reproduce it's hard to investigate from the client. If there are still clients that we have with note IDs that did not get inclusion data on a sync, I can think of a couple of ways of moving forward with the investigation:
|
Got it, I suggest we keep the issue open for a while and see if it happens again. If we can't reproduce it anymore, the bug might be gone. |
So it seems that while attempting to make integration tests concurrent as part of #215, @mFragaBA might have stumbled upon this issue. The problem is on the node when creating more than one note per block. Here is the error that is logged:
And the culprit code: for note in notes.iter() {
let note_metadata = NoteMetadata::new(
note.sender.try_into()?,
note.tag
.try_into()
.expect("tag value is greater than or equal to the field modulus"),
);
let index = note.note_index as u64;
entries.push((index, note.note_id.into()));
entries.push((index + 1, note_metadata.into()));
} When there is more than one note, index 0 and index 1 of the tree are occupied by the first note and its metadata respectively, but then the second note occupies index 1 as well, which results in the above error. As a consequence of this, the block is built without the correct tree and after syncing there is no new note data (although blocks continue to be built) It feels like this is the fix to the error, but this might have side implications (it doesn't seem like it after a few quick tests) cc @hackaugusto @bobbinth @polydez. As an additional problem the node might have to handle node tree creation failures (and anything similar) differently since it does seem that the transactions get included anyway (could be wrong about this). |
I added a comment on the commit: 0xPolygonMiden/miden-node@3c202e7 |
I created an issue in the node to tackle the bigger problem: 0xPolygonMiden/miden-node#276 |
Is this actively being worked on again? |
I'm pretty sure this is the problem you were alluding to when creating this issue. I think the code I proposed fixes it but according to 0xPolygonMiden/miden-node#276 it seems it might be solved as part of the bigger refactor. In any case it's an issue that is to be fixed on the node and so I believe we could close this now (or keep it linked to issue 276 on the node to track advancements). |
Then, let's close it, since it is an issue in the Miden node |
Sometimes the notes don't get commit height even if we don't do a sync first, it doesn't happen consistently (e.g., i created 2 notes and it worked fine). But we just did this from scratch on a different machine, and even if all steps were followed properly, the notes don't get commit height.
It might be related to this explanation:
The text was updated successfully, but these errors were encountered: