Overview
Starlight will replace A -= B, with A = A - B. However if B is unbracketed b +c then this will give A = A - b +c. This logic is not consistent with solidity.
Tasks
Describe which contracts are affected
// SPDX-License-Identifier: CC0
pragma solidity ^0.8.0;
contract Assign {
secret uint256 private a;
secret uint256 private b;
uint256 private b;
function add(secret uint256 value1, secret uint256 value2) public {
known a += value1;
known b += value2;
}
function remove(secret uint256 value) public {
a -= b + value;
}
}
Describe the bug that should be fixed
The logic should be fixed in orchestration and also the circuits.
Definition of done
When is this task complete?
The above contract should work successfully.
Overview
Starlight will replace A -= B, with A = A - B. However if B is unbracketed b +c then this will give A = A - b +c. This logic is not consistent with solidity.
Tasks
Describe which contracts are affected
// SPDX-License-Identifier: CC0
pragma solidity ^0.8.0;
contract Assign {
secret uint256 private a;
secret uint256 private b;
uint256 private b;
function add(secret uint256 value1, secret uint256 value2) public {
known a += value1;
known b += value2;
}
function remove(secret uint256 value) public {
a -= b + value;
}
}
Describe the bug that should be fixed
The logic should be fixed in orchestration and also the circuits.
Definition of done
When is this task complete?
The above contract should work successfully.