You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing complex programs with views against expected state can be a pain since the unconstrained views are executed against a db that is possibly in progress of committing data. To work around it I added a wait of 5s in my test after every transaction, but that feels horrible. As a user I would expect that when the tx is "mined" and I have the receipt I should be able to execute something on top of that state.
In the snippet, the 4 values read is a slot, and the two first elements are updated in the same txs. The first value is literally dependent on the second changing, but when i read, you will see that the first value gets read before the update but the second after.
The waitForReceipt is checking that blocks have been received, but seem to not check that the state was updated before it is giving back the receipt. This is unexpected for the user, who as mentioned above, want to execute stuff on top of it.
Testing complex programs with views against expected state can be a pain since the unconstrained views are executed against a db that is possibly in progress of committing data. To work around it I added a wait of 5s in my test after every transaction, but that feels horrible. As a user I would expect that when the tx is "mined" and I have the receipt I should be able to execute something on top of that state.
In the snippet, the 4 values read is a slot, and the two first elements are updated in the same txs. The first value is literally dependent on the second changing, but when i read, you will see that the first value gets read before the update but the second after.
#1554
The
waitForReceipt
is checking that blocks have been received, but seem to not check that the state was updated before it is giving back the receipt. This is unexpected for the user, who as mentioned above, want to execute stuff on top of it.aztec-packages/yarn-project/aztec.js/src/contract/sent_tx.ts
Line 83 in a78d939
The function is depending on, which should probably make sure that the state is updated as the name alludes.
aztec-packages/yarn-project/aztec-rpc/src/synchroniser/synchroniser.ts
Line 271 in a78d939
The text was updated successfully, but these errors were encountered: