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
let { state: newCounter, actionsHash: newActionsHash } =
this.reducer.reduce(
pendingActions,
// state type
Field,
// function that says how to apply an action
(state: Field, _action: Field) => {
return state.add(1);
},
{ state: counter, actionsHash }
);
Circuit.log('newCounter', newCounter);
Circuit.log('newActionsHash', newActionsHash);
The result of this is:
console.log
rolling up pending actions..
at Object.<anonymous> (src/actions.test.ts:229:17)
console.log
state before: 0
at Object.<anonymous> (src/actions.test.ts:231:17)
console.log
actionsHash 12935064460869035604753254773225484359407575580289870070671311469994328713165
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
pendingActions []
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
newCounter 0
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
newActionsHash 12935064460869035604753254773225484359407575580289870070671311469994328713165
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
actionsHash 12935064460869035604753254773225484359407575580289870070671311469994328713165
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
pendingActions [ [ '1', '1' ] ]
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
newCounter 0
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
newActionsHash 20181218591800334489462324119362690974902046257048050553209249805515233657889
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
actionsHash 12935064460869035604753254773225484359407575580289870070671311469994328713165
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
pendingActions [ [ '1', '1' ] ]
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
newCounter 0
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
console.log
newActionsHash 20181218591800334489462324119362690974902046257048050553209249805515233657889
at node_modules/snarkyjs/src/lib/circuit_value.ts:1058:13
I am submitting multiple transactions containing an action that is being included in the same block e.g., this block contains 2 https://berkeley.minaexplorer.com/block/3NL7njoFxYFhLXdVQmbtp47KR2qnAGsdvYgrxgkXT8mD1M9KLmx3
When I reduce this, i.e.,
The result of this is:
The sequence state of this account after these 2 actions have been included in the block is this. As the
newActionsHash
isn't the same the tx fails on a precondition. here https://berkeley.minaexplorer.com/transaction/5JtZjKU4jcmz8FXneSqXjmpqtvYS5rJARUvntTCPFm1Xy14ebkMMIf I run this with only one action in the block, it works just fine, updating the on-chain state to
newCounter
.Could there be an issue with the way the API is handling the data when there are multiple actions in the same block?
Should be labelled ITN-zkApps-E2E-testing
The text was updated successfully, but these errors were encountered: