Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 824aa51

Browse files
committed
Merge branch 'dev'
2 parents e90b7e6 + 7d3f646 commit 824aa51

File tree

7 files changed

+53
-2
lines changed

7 files changed

+53
-2
lines changed

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "ethereum-consensus"]
2+
path = ethereum-consensus
3+
url = git@github.com:ralexstokes/ethereum-consensus.git

‎Cargo.toml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ futures = "0.3.28"
2121
ratatui = { version = "0.22.0", features = ["all-widgets"] }
2222
serde_json = "1.0.104"
2323
tokio = { version = "1.29.1", features = ["full"] }
24-
clap = { version = "4.3.23", features = ["derive"] }
24+
clap = { version = "4.5.3", features = ["derive"] }
2525
log = "0.4.20"
2626
simplelog = "0.12.1"
2727
serde = "1.0.189"
2828
url = "2.4.1"
2929
tempfile = "3.9.0"
3030
anyhow = "1.0.79"
31+
beacon-api-client = { path = "ethereum-consensus/beacon-api-client" }
32+
ethereum-consensus = { path = "ethereum-consensus/ethereum-consensus" }
3133

3234
[dependencies.crossterm]
3335
version = "0.26.1"

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ This software has been tested and verified to work correctly on the following op
5757
- `macOS Ventura 13.2`
5858

5959
```sh
60-
$ git clone https://github.com/woxjro/lazy-etherscan
60+
$ git clone --recursive https://github.com/woxjro/lazy-etherscan
6161
$ cd lazy-etherscan
6262
$ cargo run --
6363
```

‎ethereum-consensus‎

Submodule ethereum-consensus added at a52eabf

‎examples/get_beacon_block.rs‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
use beacon_api_client::{mainnet::Client, BlockId};
2+
use ethereum_consensus::primitives::Root;
3+
use ethers::utils::hex;
4+
use url::Url;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let url = Url::parse("http://localhost:5052").unwrap();
9+
let client = Client::new(url);
10+
11+
let root_hex =
12+
hex::decode("421c16805c3416150aa04533fdfe7fc3f0880d0ed86cee33fa58011f10dd95c8").unwrap();
13+
let _root = Root::try_from(root_hex.as_ref()).unwrap();
14+
let id = BlockId::Finalized;
15+
16+
let block = client.get_beacon_block(id).await.unwrap();
17+
dbg!(block);
18+
}

‎utils/SETUP_NODE.sh‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
GETH_LOG_FILE="./logs/geth.log"
4+
LIGHTHOUSE_LOG_FILE="./logs/lighthouse.log"
5+
6+
echo "Starting Ethereum Execution Node (geth)..."
7+
geth --authrpc.addr localhost \
8+
--authrpc.port 8551 \
9+
--authrpc.vhosts localhost \
10+
--authrpc.jwtsecret ~/.ethereum/geth/jwtsecret >> "$GETH_LOG_FILE" 2>&1 &
11+
12+
echo "Starting Beacon Node (lighthouse)..."
13+
lighthouse bn \
14+
--network mainnet \
15+
--execution-endpoint http://localhost:8551 \
16+
--execution-jwt ~/.ethereum/geth/jwtsecret \
17+
--disable-deposit-contract-sync \
18+
--http >> "$LIGHTHOUSE_LOG_FILE" 2>&1 &
19+
# --http \
20+
# --checkpoint-sync-url https://beaconstate.info >> "$LIGHTHOUSE_LOG_FILE" 2>&1 &

‎utils/SHUTDOWN_NODE.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
echo "Shutting down Ethereum Execution Node (geth)..."
4+
pkill geth
5+
6+
echo "Shutting down Beacon Node (lighthouse)..."
7+
pkill lighthouse

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /