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

EVM Bridge Issue for private chain - Error: RPC response error -32002: Transaction simulation failed: Blockhash not found #444

Open
0xSiXx opened this issue Apr 24, 2023 · 0 comments

Comments

@0xSiXx
Copy link

0xSiXx commented Apr 24, 2023

Problem

We are trying to setup the native to EVM bridge and keep getting the this response:

Error: RPC response error -32002: Transaction simulation failed: Blockhash not found

When running this command:
./velas evm transfer-to-evm --url http://127.0.0.1:8899 --keypair ../../config/bootstrap-validator/identity.json ETHEREUM_WALLET_ADDRESS AMOUNT_TO_SEND

Below I listed out all of our steps, operating system, and commands utilized as well as the flags utilized. If anyone can help us figure this out that would be great we have been having issues with it for about a week now.

Computer specifications

  • Operating System = Mac OS Monterey 12.6.5
  • Rust Version = rust: stable 1.68.2 (bottled)

Steps we run

1. Clone to your computer
git clone https://github.com/velas/velas-chain

2. Install dependencies

curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup component add rustfmt
rustup update

3. Enter directory and build:
cd velas-chain && cargo build --release

4. Build genesis:
NDEBUG=1 ./multinode-demo/setup.sh

Output:

Creation time: 2023-04-24T00:43:22+00:00
Cluster type: MainnetBeta
Genesis hash: 7mfKLzajXfL4AiLcSDGNPw52JdabGxvGSNZ3spBRW31Y
Shred version: 4007
Ticks per slot: 64
Hashes per tick: Some(12500)
Target tick duration: 6.25ms
Slots per epoch: 432000
Warmup epochs: enabled
Slots per year: 78892314.984
Inflation { initial: 0.08, terminal: 0.005, taper: 0.15, foundation: 0.05, foundation_term: 7.0, __unused: 0.0 }
Rent { lamports_per_byte_year: 3480, exemption_threshold: 2.0, burn_percent: 50 }
FeeRateGovernor { lamports_per_signature: 9500, target_lamports_per_signature: 10000, target_signatures_per_slot: 20000, min_lamports_per_signature: 5000, max_lamports_per_signature: 100000, burn_percent: 50 }
Capitalization: 35000003.9626412 VLX in 23 accounts
Native instruction processors: []
Rewards pool: {}
EVM chain id: 1234

Error 1 in output
[2023-04-24T00:43:22.124909000Z ERROR velas_genesis] EVM root was not found but genesis was compiled with with_evmfeature error: The argument 'evm-root' wasn't found

Warning in output

   Compiling evm-rpc v0.1.0 (/Users/username/Desktop/Velas/velas-chain/evm-utils/evm-rpc)
warning: unreachable pattern
   --> sdk/src/genesis_config.rs:250:17
    |
250 |                 cluster_type => {
    |                 ^^^^^^^^^^^^
    |
    = note: `#[warn(unreachable_patterns)]` on by default

warning: `solana-sdk` (lib) generated 1 warning

5. Start bootnode:
NDEBUG=1 ./multinode-demo/bootstrap-validator.sh

6. Start bridge in new terminal window

cd target/release
export RUST_LOG=info
export rpc=trace
./evm-bridge ../../config/bootstrap-validator/identity.json http://127.0.0.1:8899 127.0.0.1:8545 1234

Output

[2023-04-21T23:50:11Z WARN  evm_bridge] Value of "--min-gas-price" is not set or unable to parse. Default value is: 2100000000
[2023-04-21T23:50:11Z INFO  evm_bridge] EVM chain id 1234
[2023-04-21T23:50:11Z INFO  evm_bridge] Trying to create rpc client with addr: http://127.0.0.1:8899
[2023-04-21T23:50:11Z INFO  evm_bridge] Loading keypair from: ../../config/bootstrap-validator/identity.json
[2023-04-21T23:50:11Z INFO  evm_bridge] Creating mempool...
[2023-04-21T23:50:11Z INFO  evm_bridge] Creating server with: 127.0.0.1:8545
[2023-04-21T23:50:11Z INFO  evm_bridge] Creating websocket server: 127.0.0.1:8546
[2023-04-21T23:50:11Z INFO  parity_ws] Listening for new connections on 127.0.0.1:8546.
[2023-04-21T23:50:11Z INFO  evm_bridge::pool] Running cleaner task...
[2023-04-21T23:50:11Z INFO  evm_bridge::pool] Running signature checker task...
[2023-04-21T23:50:11Z INFO  evm_bridge::pool] Worker checks signatures
[2023-04-21T23:50:11Z INFO  evm_bridge::pool] Running deploy worker task...
[2023-04-21T23:51:11Z INFO  evm_bridge::pool] Worker checks signatures
[2023-04-21T23:52:11Z INFO  evm_bridge::pool] Worker checks signatures

The command to bridge from native to EVM:
./velas evm transfer-to-evm --url http://127.0.0.1:8899 --keypair ../../config/bootstrap-validator/identity.json ETHEREUM_WALLET_ADDRESS AMOUNT_TO_SEND

Note: we replace the Ethereum address with one created on MetaMask and the amount to send is typically set to 5.

Error message when trying to send tokens from native to the EVM
Error: RPC response error -32002: Transaction simulation failed: Blockhash not found

Configurations

EVM side of the chain configuration:

[2023-04-21T23:50:11Z INFO  evm_bridge] EVM chain id 1234
[2023-04-21T23:50:11Z INFO  evm_bridge] Trying to create rpc client with addr: http://127.0.0.1:8899
[2023-04-21T23:50:11Z INFO  evm_bridge] Loading keypair from: ../../config/bootstrap-validator/identity.json
[2023-04-21T23:50:11Z INFO  evm_bridge] Creating mempool...
[2023-04-21T23:50:11Z INFO  evm_bridge] Creating server with: 127.0.0.1:8545
[2023-04-21T23:50:11Z INFO  evm_bridge] Creating websocket server: 127.0.0.1:8546
[2023-04-21T23:50:11Z INFO  parity_ws] Listening for new connections on 127.0.0.1:8546.

Node Configuration

Command

cd target/release
./velas config get

Output

Config File: /Users/username/.config/velas-chain/cli/config.yml
RPC URL: https://rpc-main-1.test.network/rpc 
WebSocket URL: wss://rpc-main-1.test.network/rpc (computed)
Keypair Path: /Users/username/.config/velas-chain/id.json 
Commitment: confirmed 
@0xSiXx 0xSiXx changed the title EVM-ROOT not found when building the genesis EVM Bridge Issue for private chain - Error: RPC response error -32002: Transaction simulation failed: Blockhash not found Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant