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

eth.getBlock fails with "Number can only safely store up to 53 bits" #231

Open
MaxXor opened this issue May 11, 2020 · 2 comments
Open

eth.getBlock fails with "Number can only safely store up to 53 bits" #231

MaxXor opened this issue May 11, 2020 · 2 comments
Assignees
Labels
bug Something isn't working important

Comments

@MaxXor
Copy link

MaxXor commented May 11, 2020

Re-opening the issue here (from: web3/web3.js#3512) as it was suggested that this might be a problem with the custom EVM.

Expected behavior

Get the block.

Actual behavior

Error "Number can only safely store up to 53 bits"

Example code

        this.web3.eth.getBlock(number, function(error, result) {
            if (error) {
                console.log(error);
                return;
            }
            console.log(result.timestamp);
        });

Ethereum Studio example: https://studio.ethereum.org/5eb924ed26b4730012351a47?openFile=app/app.js Lines (133-145)

Steps to reproduce the behavior

  1. Load the Ethereum Studio example
  2. Deploy the contract
  3. See the error in console log

Environment

Javascript with web3.js version 1.2.7

@javier-tarazaga
Copy link
Contributor

Hi @MaxXor !

Lets use take a look as they have pointed out correctly, might be an issue with the custom EVM Ethereum Studio implements.

@afanasy
Copy link

afanasy commented May 22, 2021

The patch from @dvcrn seems to fix it: https://github.com/dvcrn/web3.js/commit/b868c5fece70fba6d34b577ef59f3fa3159390ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important
Projects
None yet
Development

No branches or pull requests

4 participants