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

Replaying Blob Transactions #6037

Open
vpahari opened this issue Dec 10, 2024 · 1 comment
Open

Replaying Blob Transactions #6037

vpahari opened this issue Dec 10, 2024 · 1 comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working

Comments

@vpahari
Copy link

vpahari commented Dec 10, 2024

Hi there,

I am trying to replay a blob transaction on a forked chain, and I get an error saying "InvalidArgumentsError: unexpected string". I think this is because the hardhat network is not allowing a blob transaction, because if I send a transaction that is not a blob transaction, then it works. I read that the cancun hardfork is the default on the hardhat network, so I am not sure what else the problem could be.

Here is my current code for it.

const hre = require("hardhat");
const helpers = require("@nomicfoundation/hardhat-toolbox/network-helpers");

async function main() {
	var blockNumber = 21322632;

    await network.provider.request({
          method: "hardhat_reset",
          params: [
            {
              forking: {
                jsonRpcUrl: "http://ethereum-archive:8545",
                blockNumber: blockNumber - 1,
              },
              mining: {
                  mempool: {
                      order: "fifo"
                      }
                  }		
            },
          ],
        });

    var blockNumber = await network.provider.send("eth_blockNumber", []);
    console.log(parseInt(blockNumber,16));

    await network.provider.send("evm_setAutomine", [false]);

    // corresponds to transaction hash 0x8497bc598cad731c3c8d1adc5487a24fe54288e3dbd6082032b2221d801c347e
    var currRawTx = "0x03f9011b0183098ba28504aa7a2200855c080d3ca882520894ff000000000000000000000000000000000084538080c084ee6b2800f8a5a001f335b89df901355897d68065ecf778359381dcb604051d7d16af950dbbdb88a001a53b2f74956ce7e91774d9327012b3a8381c5246e6c1f98b01b4638f554b47a001a96f47d3ad7704bbc98eb095fc18505a479c05f2d0d76999294de164b818d3a001229d3fc8df2e3e4d9437c581b685dafb173bd9d708f6decc208728dcb422bca00105be5c6d03c7ad2f3c7f3fd95fac5d30a4befae08b12a7c1b72b4b0f3250b980a00fb1ca7b497e6c9af5b8210c3a6708546f6ffc644229299f13ffe1236e96c003a052471f402dac614cb12765fd6abd16094bc23b451890b792527c431fc1cefedb";

    var sentTxs = await network.provider.send("eth_sendRawTransaction", [currRawTx]);

    var blockSent = await network.provider.send("evm_mine", []);

}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Here is the error that I receive

InvalidArgumentsError: unexpected string
at EdrProviderWrapper.request (..../node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:451:19)
at main (..../scripts/test-execute.js:40:19)

@ChristopherDedominici
Copy link
Contributor

I can reproduce the error; we need to investigate further.

@ChristopherDedominici ChristopherDedominici added status:ready This issue is ready to be worked on type:bug Something isn't working and removed status:triaging labels Dec 17, 2024
@ChristopherDedominici ChristopherDedominici removed their assignment Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants
@ChristopherDedominici @vpahari and others