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

Trouble with forking Calibration network(filecoin testnet) in hardhat test environment. #4892

Closed
parva-jain opened this issue Feb 20, 2024 · 4 comments
Assignees
Labels
status:needs-more-info There's not enough information to start working on this issue

Comments

@parva-jain
Copy link

I am deploying contracts on filecoin and for testing locally, I'm trying to fork calibration network by adding the following config:

forking: {
        url: CALIBRATION_RPC_URL,
        blockNumber: 1369000
},

But when I run the tests, I get the following error:

An unexpected error occurred:

InvalidResponseError: Invalid JSON-RPC response's result.

Errors: Invalid value undefined supplied to : RpcBlockWithTransactions | null/transactions: RpcTransaction Array/0: RpcTransaction/gasPrice: QUANTITY, Invalid value undefined supplied to : RpcBlockWithTransactions | null/transactions: RpcTransaction Array/1: RpcTransaction/gasPrice: QUANTITY

Any help is really appreciated!

@kanej
Copy link
Member

kanej commented Feb 20, 2024

Hey, Hardhat forking likely won't work against a Filecoin network.

Hardhat is designed to allow development against Ethereum networks, a large part of which is running Solidity in an EVM execution environment - but not all.

You can leverage Hardhat in the Filecoin context for running Solidity code against a development EVM execution environment; but forking implies far more than just mirroring the EVM execution, it gets into replicating the internal details of the network node. I suspect that Filecoin network nodes and Ethereum network nodes are just too different to allow for leveraging of forking.

@parva-jain
Copy link
Author

The interesting thing is that till few weeks before, the tests were running in the filecoin fork as well(sometimes it was failing with same reason). But now from last 2 weeks, its falling everytime. Let me know if there's any hack around it or how should I test functionalities specific to filecoin??

@kanej
Copy link
Member

kanej commented Feb 26, 2024

@parva-jain that sounds like something changed about the Filecoin network (rather than Hardhat). We don't have experience with Filecoin, is there any experience or suggestions in the Filecoin community with forking tests?

@kanej kanej added status:needs-more-info There's not enough information to start working on this issue and removed status:triaging labels Feb 26, 2024
@schaable
Copy link
Member

I'm closing this for lack of response, but feel free to reopen if you think we can provide any help.

@schaable schaable closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Mar 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:needs-more-info There's not enough information to start working on this issue
Projects
Archived in project
Development

No branches or pull requests

3 participants