Skip to content

[TXE] Incorrectly committing state #13221

@benesjan

Description

@benesjan

When working on this PR I stumbled upon an issue with TXENode::findLeavesIndexes function. The issue got triggered in that PR because this is the first time it seems to have been used because before the second part of the sync process (log processing via process_log function) was performed using the unconstrained oracle but with that PR the TXE oracle gets used instead.

This is because now we don't spin up a new simulator during the sync_notes function invocation. Instead one simulator instance is used during the whole process and this instance uses TXE.

Now to get to the point what the issue is. It seems that when we commit state by calling env.advance_blocks_by(...) we commit nullifiers to the nullifier tree but for whatever reason we then fail to find a block number for these nullifiers using the db.getBlockNumbersForLeafIndices method. In that PR I managed to workaround the issue just by not committing state at which point findLeavesIndexes fails to find the indexes and never requests the block number info.

Relevant slack discussion.

Metadata

Metadata

Assignees

Labels

T-bugType: Bug. Something is broken.team-fairiesNico's team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions