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
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Version 2.6.1 upgraded the dependency on web3-provider-engine from version 14.1.0 to version 14.2.0. This version upgrade contains a regression (also reported in MetaMask/web3-provider-engine#317).
The regression is a deviation from the rpc hex encoding specification described in https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding. 0 values are now encoded as "0x" when they should be "0x0". This causes errors in rpc client libraries that expect strict correctness like go-ethereum.
Expected Behavior
Calls to rpc methods which contain results including 0 values should correctly encode them as "0x0"
Current Behavior
Calls to rpc methods which contain results including 0 values encode them as "0x"
Possible Solution
This could be solved by either downgrading the web3-provider-engine dependency back to 14.1.0 or getting an upstream fix into web3-provider-engine and upgrading. If there are no other reasons why 14.2.0 is required, downgrading seems like the easiest immediate fix.
Steps to Reproduce (for bugs)
The following code will print the difficulty returned by ganache-core as 0x when running with 2.6.1 and 0x0 when running 2.6.0.
Version 2.6.1 upgraded the dependency on
web3-provider-engine
from version 14.1.0 to version 14.2.0. This version upgrade contains a regression (also reported in MetaMask/web3-provider-engine#317).The regression is a deviation from the rpc hex encoding specification described in https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding.
0
values are now encoded as"0x"
when they should be"0x0"
. This causes errors in rpc client libraries that expect strict correctness like go-ethereum.Expected Behavior
Calls to rpc methods which contain results including 0 values should correctly encode them as "0x0"
Current Behavior
Calls to rpc methods which contain results including 0 values encode them as "0x"
Possible Solution
This could be solved by either downgrading the web3-provider-engine dependency back to 14.1.0 or getting an upstream fix into web3-provider-engine and upgrading. If there are no other reasons why 14.2.0 is required, downgrading seems like the easiest immediate fix.
Steps to Reproduce (for bugs)
The following code will print the difficulty returned by ganache-core as
0x
when running with 2.6.1 and0x0
when running 2.6.0.Context
This came up trying to use ganache along with go-ethereum which forces strict adherence to the hex encoding in
https://github.com/ethereum/go-ethereum/blob/dbb03fe9893dd19f6b1de1ee3b768317f22fd135/common/hexutil/json.go#L358.
Specifically calls to SubscribeNewHead result in a JSON unmarshalling error due to this problem.
Your Environment
The text was updated successfully, but these errors were encountered: