diff --git a/.gitmodules b/.gitmodules index e6b2f03..a91f77f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "ethereum-consensus"] path = ethereum-consensus - url = git@github.com:ralexstokes/ethereum-consensus.git + url = https://github.com/ralexstokes/ethereum-consensus.git diff --git a/Cargo.toml b/Cargo.toml index 0167f59..9b253ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lazy-etherscan" -version = "0.1.1" +version = "1.0.0" edition = "2021" authors = ["woxjro "] license = "MIT" diff --git a/README.md b/README.md index ca0e34f..c3e5fa4 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This software has been tested and verified to work correctly on the following op - `macOS Ventura 13.2` ```sh -$ git clone https://github.com/woxjro/lazy-etherscan +$ git clone --recursive https://github.com/woxjro/lazy-etherscan $ cd lazy-etherscan $ cargo run -- ``` diff --git a/docs/src/guide/configuration.md b/docs/src/guide/configuration.md index 761b863..ff37b7e 100644 --- a/docs/src/guide/configuration.md +++ b/docs/src/guide/configuration.md @@ -1,7 +1,7 @@ # Configuration ## Endpoint -The default endpoint is https://eth.public-rpc.com, and you can also set your preferred endpoint. +The default endpoint is https://eth.llamarpc.com, and you can also set your preferred endpoint. You can find free endpoints from [ChainList](https://chainlist.org/chain/1). To set your endpoint, run with a `--endpoint` option. ```sh diff --git a/src/main.rs b/src/main.rs index 52e15b1..939b296 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ use tokio::sync::Mutex; #[command(author, version, about, long_about = None)] struct Args { /// Json-RPC URL - #[arg(short, long, default_value = "https://eth.public-rpc.com")] + #[arg(short, long, default_value = "https://eth.llamarpc.com")] endpoint: String, } diff --git a/src/ui/home/block/fee_info.rs b/src/ui/home/block/fee_info.rs index e8b37b7..0b925e9 100644 --- a/src/ui/home/block/fee_info.rs +++ b/src/ui/home/block/fee_info.rs @@ -40,7 +40,7 @@ pub fn render( ), ]; - let details = vec![ + let mut details = vec![ Line::from( if app.block_detail_list_state.selected() == Some(SelectableBlockDetailItem::FeeRecipient.into()) @@ -53,21 +53,17 @@ pub fn render( fee_recipient_spans }, ), - //ref: https://docs.alchemy.com/docs/how-to-calculate-ethereum-miner-rewards#calculate-a-miner-reward - //format!("Block Reward: {} ETH", /* TODO */): - Line::from( - Span::raw(format!( - "{:<20}: {}", - "Total Difficulty", - block.total_difficulty.unwrap() - )) - .fg(Color::White), - ), Line::from( Span::raw(format!("{:<20}: {} bytes", "Size", block.size.unwrap())).fg(Color::White), ), ]; + if let Some(total_difficulty) = block.total_difficulty { + details.push(Line::from( + Span::raw(format!("{:<20}: {}", "Total Difficulty", total_difficulty)).fg(Color::White), + )); + } + let paragraph = Paragraph::new(details) .block(detail_block.to_owned()) .alignment(Alignment::Left) diff --git a/utils/SETUP_NODE.sh b/utils/SETUP_NODE.sh new file mode 100755 index 0000000..adb91ad --- /dev/null +++ b/utils/SETUP_NODE.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +GETH_LOG_FILE="./logs/geth.log" +LIGHTHOUSE_LOG_FILE="./logs/lighthouse.log" + +echo "Starting Ethereum Execution Node (geth)..." +geth --authrpc.addr localhost \ + --authrpc.port 8551 \ + --authrpc.vhosts localhost \ + --authrpc.jwtsecret ~/.ethereum/geth/jwtsecret>> "$GETH_LOG_FILE" 2>&1 & + +echo "Starting Beacon Node (lighthouse)..." +lighthouse bn \ + --network mainnet \ + --execution-endpoint http://localhost:8551 \ + --execution-jwt ~/.ethereum/geth/jwtsecret \ + --disable-deposit-contract-sync \ + --http>> "$LIGHTHOUSE_LOG_FILE" 2>&1 & +# --http \ +# --checkpoint-sync-url https://beaconstate.info>> "$LIGHTHOUSE_LOG_FILE" 2>&1 & diff --git a/utils/SHUTDOWN_NODE.sh b/utils/SHUTDOWN_NODE.sh new file mode 100755 index 0000000..df92325 --- /dev/null +++ b/utils/SHUTDOWN_NODE.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Shutting down Ethereum Execution Node (geth)..." +pkill geth + +echo "Shutting down Beacon Node (lighthouse)..." +pkill lighthouse

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