Skip to content
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

getBlock by number or hash does not work on Quorum #2766

Closed
oktapodia opened this issue May 1, 2019 · 4 comments
Closed

getBlock by number or hash does not work on Quorum #2766

oktapodia opened this issue May 1, 2019 · 4 comments
Labels
Bug Addressing a bug

Comments

@oktapodia
Copy link

oktapodia commented May 1, 2019

Description

The getBlock method with a hash or a number as parameter does not work with a quorum permisionless blockchain

Expected behavior

Calling `await web3.eth.getBlock(1)` or `await web3.eth.getBlock('0x000...')` should return an object.

Actual behavior

Calling `await web3.eth.getBlock(1)` or `await web3.eth.getBlock('0x000...')` is throwing an error `Number can only safely store up to 53 bits` from bn.js.

Steps to reproduce the behavior

Install a quorum chain, connect to it and then

const web3 = new Web3('http://localhost:20200');
const block = await web3.eth.getBlock(1);
//const block = await web3.eth.getBlock('0x000...');

console.log(block);

// Throw 'Number can only safely store up to 53 bits'

Error Logs

'Number can only safely store up to 53 bits'

Versions

  • web3.js: 1.0.0-beta.53
  • nodejs: v11.14.0
  • ethereum node: N/A
  • Quorum node: 2.2.0
@nivida
Copy link
Contributor

nivida commented May 1, 2019

Thanks for opening this issue! I'm currently testing different BigInt solutions to find a solution for the issue #2171. The improvement of the BigInt handling will also improve the method specific number handling.

@nivida nivida added the Bug Addressing a bug label May 1, 2019
@nivida nivida closed this as completed in 180ddf9 May 1, 2019
nivida added a commit that referenced this issue May 1, 2019
…rum-nodes

[Quorum] Fix #2766, timestamp is not present on a Quorum node
@nivida nivida reopened this May 1, 2019
@oktapodia
Copy link
Author

Thank you, do you have an ETA to publish the new web3 release, please?

@nivida
Copy link
Contributor

nivida commented May 1, 2019

Thank you, do you have an ETA to publish the new web3 release, please?

I've planned to release tomorrow a version beta.54 with this quick fix.

Sorry for bothering you but I will close this issue again because it's a duplication of #1905

@nivida nivida closed this as completed May 1, 2019
@oktapodia
Copy link
Author

No worries, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

2 participants