0xSpaceShard / starknet-devnet-rs

A local testnet for Starknet... in Rust
https://0xspaceshard.github.io/starknet-devnet-rs/
MIT License
100 stars 56 forks source link

Starknet fork problems #510

Closed PhilippeR26 closed 2 weeks ago

PhilippeR26 commented 4 weeks ago

Describe the bug (observed vs expected behavior)

  1. Fork with a node with https: address is failing :

    LibraryError: RPC: starknet_getNonce with params {
    "contract_address": "0x304c822792da45bf6f8e6957aa9515bd7b365f05b5c1678f61ae0c46213251c",
    "block_id": "pending"
    }
        -1: Failed to read from state: Error in communication with origin: error sending request for url (https://free-rpc.nethermind.io/sepolia-juno/v0_7).: undefined
  2. When Forked with a local node, it works, but the console is flooded of anxiety-provoking messages :

    2024-06-22T16:46:37.038904Z  INFO starknet_devnet_core::starknet::defaulter: Origin response contains no 'result': {"jsonrpc":"2.0","error":{"code":20,"message":"Contract not found"},"id":0}

Not reproducible on testnet

To Reproduce Steps to reproduce the behavior: Any action that needs to interact with the real network.

Devnet version

System specifications

mikiw commented 3 weeks ago

what is 0x304c822792da45bf6f8e6957aa9515bd7b365f05b5c1678f61ae0c46213251c address? Is it predeployed account address with some seed?

PhilippeR26 commented 3 weeks ago

It's an account deployed in Sepolia.

mikiw commented 3 weeks ago

ok, I could reproduce it thanks

mikiw commented 2 weeks ago

Hi @PhilippeR26 what endpoint are you using?

PhilippeR26 commented 2 weeks ago

https://free-rpc.nethermind.io/sepolia-juno/v0_7

mikiw commented 2 weeks ago
image

We think it is not a problem on the devnet side but on the endpoint side, I tried it from postman and got the same results.

mikiw commented 2 weeks ago

@PhilippeR26 since this is an origin network/URL problem, not a devnet problem we plan to close this ticket.

What do you think about this? Do you have any input on that point?

PhilippeR26 commented 2 weeks ago

I would like to test different nodes and scripts, to try to have a better understanding of the situation. I keep you informed here.

PhilippeR26 commented 2 weeks ago

I tested with v0.1.2. This time, with a node url starting with https:, it works :

cargo run --release -- --seed 0 --fork-network https://free-rpc.nethermind.io/sepolia-juno/v0_7  --state-archive-capacity full 

With a local node, with address starting with http:, it's still worling.


cargo run --release -- --seed 0 --fork-network http://192.168.1.11:9545/rpc/v0_7  --state-archive-capacity full 
`