From e90b7e627aaaf0e44b43ff57e229933e8ffe8aac Mon Sep 17 00:00:00 2001 From: woxjro Date: 2024年1月26日 05:22:29 +0900 Subject: [PATCH 1/6] v1.0.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7d6332e..ca7af94 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" From 9e969e76707eae0e620e1b864eb7037a09a2c535 Mon Sep 17 00:00:00 2001 From: woxjro Date: 2024年3月20日 22:43:31 +0900 Subject: [PATCH 2/6] [feat]: Add script for starting and shutting down a node --- utils/SETUP_NODE.sh | 20 ++++++++++++++++++++ utils/SHUTDOWN_NODE.sh | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100755 utils/SETUP_NODE.sh create mode 100755 utils/SHUTDOWN_NODE.sh 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 From 7d3f646acb0b4d31434315d2c9d5d11f21103f4a Mon Sep 17 00:00:00 2001 From: woxjro Date: 2024年3月20日 22:49:36 +0900 Subject: [PATCH 3/6] [docs]: update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- ``` From 3174b295ab0ba3a7255ab72781b5a3a2982ce75c Mon Sep 17 00:00:00 2001 From: woxjro Date: 2024年3月20日 22:58:57 +0900 Subject: [PATCH 4/6] [fix]: Used https instead of ssh --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 42d9b1b43e6783ffb6e78e74053d00252f89c8d2 Mon Sep 17 00:00:00 2001 From: haturatu Date: 2025年4月19日 19:53:52 +0900 Subject: [PATCH 5/6] [chore]: eth.public-rpc.com -> eth.llamarpc.com --- docs/src/guide/configuration.md | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, } From 2e71b2f8700f43fb3deaec4610846f795303108b Mon Sep 17 00:00:00 2001 From: woxjro Date: 2025年4月20日 20:32:03 +0900 Subject: [PATCH 6/6] [refactor]: display Total Difficulty conditionally --- src/ui/home/block/fee_info.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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)

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