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

Wrong version of starknet in katana and gas price #2539

Closed
chudkowsky opened this issue Oct 15, 2024 · 0 comments · Fixed by #2543 or #2547
Closed

Wrong version of starknet in katana and gas price #2539

chudkowsky opened this issue Oct 15, 2024 · 0 comments · Fixed by #2543 or #2547
Assignees
Labels
bug Something isn't working katana This issue is related to Katana

Comments

@chudkowsky
Copy link
Contributor

chudkowsky commented Oct 15, 2024

When I fetch data from a block forked by Katana, I get the following status:

{
AcceptedOnL2,     
block_hash: 0x5a80b5062fe93ce7689655ae0ce5a4bd24c43e2359d6cc46c5b4780d024b934, 
parent_hash: 0x7f04e2c19cd9df393a638e766cc13bcf692a0348b5883d10ba8e0d5b9f7dace,
block_number: 239226,
starknet_version: "0.12.2",
 l1_data_gas_price: ResourcePrice { price_in_fri: 0x0, price_in_wei: 0x0}
...

Notice the version here and the l1 data gas price.
However, when I directly make a request, via

     --url https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_7/my_api_key \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "starknet_getBlockWithTxHashes",
  "params": [
    {
      "block_number": 239226
    }
  ]
}
'

I get the following response:

{
  "block_hash": "0x5a80b5062fe93ce7689655ae0ce5a4bd24c43e2359d6cc46c5b4780d024b934",
  "block_number": 239226,
  "starknet_version": "0.13.2.1"
 "l1_data_gas_price": {
            "price_in_fri": "0x186a0",
            "price_in_wei": "0x186a0"
        },
}
...

The version is key here, and the "0.12.2" version is incorrect, so as gas price values .

To Reproduce

let rpc_client = RpcClient::new("http://localhost:5050");
let mut block_with_txs = match rpc_client.starknet_rpc().get_block_with_txs(block_id).await.unwrap() {
        MaybePendingBlockWithTxs::Block(block_with_txs) => block_with_txs,
        MaybePendingBlockWithTxs::PendingBlock(_) => {
            panic!("Block is still pending!");
        } 
    };
println!({},block_with_txs);

Expected behavior
Provided starknet version and should match the actual one

Additional context
As provider I use katana cargo run --bin katana -- --fork-block-number 239226 --rpc-url https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_7/api-key

@chudkowsky chudkowsky added the bug Something isn't working label Oct 15, 2024
@kariy kariy self-assigned this Oct 15, 2024
@kariy kariy added the katana This issue is related to Katana label Oct 15, 2024
@kariy kariy reopened this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working katana This issue is related to Katana
Projects
None yet
2 participants