-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 Web3@1.2.1 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 |
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.js
version1.2.8
beginning 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:
contenthash
feature (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
AbstractProvider
interface. (Add EIP-1193 compatible provider to AbstractProvider interface #3499)methods
andcall
. (web3-eth-contract: add typescript definitions formethods
andcall
#3454)Changed
web3-eth-abi
ABICoder dependency. (Update ABICoder dependency #3490)Fixed
dtslint
. (Fix CI build error fromdtslint
#3479)Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build-all
and tested the resulting files fromdist
folder in a browser.CHANGELOG.md
file in the root folder.