-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Release - 1.2.8 #3510
Release - 1.2.8 #3510
Conversation
|
As part of the RC process, am doing some test installations in other projects and running their tests to see if everything.
This list will be actively edited:
Implementation notes for future reference:
|
|
Found a behavioral difference in the new abi decoder while running the synthetix unit tests, Negative numbers passed as The new behavior seems safer - perhaps we can just mention the difference in the release notes? [EDIT] One case where this change might be problematic is for testing underflow logic itself, as here at openzeppelin/math. Wouldn't immediately impact them because they're on @truffle/contract and [email protected] fwiw. JS test it('should revert when owner set the Target threshold to negative', async () => {
const thresholdPercent = -1;
await assert.revert(feePool.setTargetThreshold(thresholdPercent, { from: owner }));
});Solidity function setTargetThreshold(uint _percent) external optionalProxy_onlyOwner {
require(_percent >= 0, "Threshold should be positive");
require(_percent <= 50, "Threshold too high");
targetThreshold = _percent.mul(SafeDecimalMath.unit()).div(100);
}Error |
|
Looks like the some of the types changes might be breaking.... gnosis/dex-react tsc fails with: Can be tricked into passing by:
|
|
I think the version of the ABI coder Web3 was previously using was quite old, so there may be other important differences to try out.
|
|
I think it's worth reconsidering the option of vendoring that part of ethers v4. Otherwise, the risk of accidentally introducing a breaking change is high. |
|
Are there any precautions which could be taken which would make you feel more at ease with this? The case for upgrading (e.g. not vendoring) is to make encoding/decoding here more closely aligned with ongoing work at Ethers and and inherit improvements there. In two cases identified so far, web3 is accepting invalid inputs and a behavior change might be reasonable to consider as bug fixes:
A third change is automatic padding for byte values - it looks like efforts here to address that might be incomplete (but could be fixed). We've run the Synthetix and mosaicdao/mosaic unit tests (~1300) with 1.2.8-rc.0 and they're (basically) passing... Definitely agree that there's risk and some unknowns here. But am wondering how you would upgrade this dependency at all given the versioning constraints here. Do you think on balance this is not worth doing? |
|
I'm ok with the upgrade @cgewecke. It will have to happen eventually. I was just putting the other alternative on the table again, in case the upgrade path isn't complete fast enough. This was in the context of web3's future uncertainty and the npm stats issue. Otherwise, I wouldn't care about the time it takes to ship this change and just upgrade. |
|
From memory, does this seem like a complete list of the input validation changes between ABI Coder V4 / V5?
It looks like the approach we'd take here to minimize breaks is to pad bytes where possible and treat the additional strictness elsewhere as bug fixes. |
Update AbstractProvider and contract.methods TS definitions
Update AbiCoder param formatting
|
Thanks everyone. I have released |
cgewecke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-ran synthetix and gnosis/dex-react outside tests with 1.2.8-rc.1 and they're both good.
LGTM.
Description
This PR introduces
web3.jsversion1.2.8beginning with1.2.8-rc.0.Features
Alongside some Typescript improvements and patches for the Websocket Provider reconnection logic introduced in 1.2.7, this release contains two larger changes:
contenthashfeature (EIP 1577), which allows you to associate an IPFS or Swarm hash with an ENS domain. There's a nice introduction to content hashes in this ENS medium post. Docs for the newly added methods can be found here.Added
AbstractProviderinterface. (Add EIP-1193 compatible provider to AbstractProvider interface #3499)methodsandcall. (web3-eth-contract: add typescript definitions formethodsandcall#3454)Changed
web3-eth-abiABICoder dependency. (Update ABICoder dependency #3490)Fixed
dtslint. (Fix CI build error fromdtslint#3479)Type of change
Checklist:
npm run dtslintwith success and extended the tests and types if necessary.npm run test:unitwith success.npm run test:covand my test cases cover all the lines and branches of the added code.npm run build-alland tested the resulting files fromdistfolder in a browser.CHANGELOG.mdfile in the root folder.