-
Notifications
You must be signed in to change notification settings - Fork 810
eth_getBlockTransactionCountByNumber: cannot unmarshal non-string into Go value of type hexutil.Uint #364
Comments
Hi @cypherhat - thanks for reporting this. By any chance can you get hold of the problematic request to and response from Ganache and post them here? Without seeing that, I can't say for certain what's wrong, but my best guess would be that we're either returning a response with neither a If it's the first issue, the the latest beta release may help. I've done a fair amount of work there on better error reporting. Also if you're having trouble getting the request/response, try running |
Also you keep saying chain ID, but Ganache doesn't have a mechanism for allowing you to set chain ID. Perhaps you mean network ID (fetched via |
Getting the raw request/response is a little tricky at the moment - the error happens inside the go-ethereum codebase. The distinction between network ID and chain ID is pretty poorly documented. Most places where both are discussed, within the context of private networks, they are treated as having the same value - But, you're right - I was conflating the two. I restored Ganache to its default network ID ( My expectation was that when I make an RPC call to Ganache using the go-ethereum API, that I wouldn't get a marshaling error. I will try the new build soon. Is the expectation that Ganache works just like a Geth node from a client's perspective? |
For posterity's sake: @davidmurdoch believes this may be related to trufflesuite/ganache#59 |
@cypherhat, I wasn't able to reproduce the issue you describe here so I'm going to go ahead and close this one. If you are still experiencing problems with Ganache's Thanks again for reporting this. |
I am trying to use Ganache as a testnet. I am using a Golang client with the latest release of Geth (1.8.1). I am trying to retrieve the eth_getBlockTransactionCountByNumber for an account that Ganache did not generate. Instead of returning 0 (zero) - which is what Geth returns when I use that for a testnet - Ganache errors out in:
With:
* json: cannot unmarshal non-string into Go value of type hexutil.Uint
Expected Behavior
I expect Ganache to return
0
.Current Behavior
Ganache fails.
Possible Solution
Steps to Reproduce (for bugs)
1977
and8545
respectively.Context
I am building an Ethereum Wallet based on HashiCorp Vault: link here
Your Environment
Version used:
Ganache 1.0.2
Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):
Server type and version:
Operating System and version:
Mac OS 10.12.6
Link to your project:
https://github.com/immutability-io/vault-ethereum
The text was updated successfully, but these errors were encountered: