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

Addition of seed-check logic to top-level crate #3801

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

yeastplume
Copy link
Member

@yeastplume yeastplume commented Nov 20, 2024

This PR adds a tools module to the top-level crate, which for now only contains a single utility called seed_check. For now the idea is to include a seed_check command to the grin executable that wil probe all defined seeds and determine whether they're available and responding to handshake requests.

  • Adds grin seed-check command, with argument flags for testnet and output files (see help documentation for details)
  • Note the seedcheck command creates and removes a temporary directory while it's operationg to store peer information.

@yeastplume yeastplume changed the title [WIP] Addition of seed-check logic to top-level crate Addition of seed-check logic to top-level crate Nov 26, 2024
@yeastplume yeastplume merged commit b93d88b into mimblewimble:master Nov 27, 2024
12 checks passed
@Anynomouss
Copy link

Anynomouss commented Dec 1, 2024

When I run on Windows 11 grin.exe seedcheck, no output is returned. I compiled from the main branch. I expected something to be returned, even if an error.
Find below the information from the grin-server.log:

20241201 09:37:33.330 INFO grin_util::logger - log4rs is initialized, file level: Info, stdout level: Warn, min. level: Info
20241201 09:37:33.331 INFO grin - Using configuration file at C:\Users\anyno.grin\main\grin-server.toml
20241201 09:37:33.331 INFO grin - This is Grin version 5.4.0-alpha.0 (git v5.3.3_rebuild-2-gb93d88b), built for x86_64-pc-windows-msvc by rustc 1.83.0 (90b35a623 2024-11-26).
20241201 09:37:33.332 INFO grin - Chain: Mainnet
20241201 09:37:33.332 INFO grin - Accept Fee Base: 500000
20241201 09:37:33.332 INFO grin - Future Time Limit: 300
20241201 09:37:33.332 INFO grin - Feature: NRD kernel enabled: false
20241201 09:37:33.333 INFO grin::tools::seedcheck - Checking seed health for mainnet.seed.grin.lesceller.com
20241201 09:37:33.342 INFO grin::tools::seedcheck - FAIL - No dns entries found for mainnet.seed.grin.lesceller.com
20241201 09:37:33.342 INFO grin::tools::seedcheck - Checking seed health for mainnet.seed.grin.prokapi.com
20241201 09:37:33.342 INFO grin::tools::seedcheck - FAIL - No dns entries found for mainnet.seed.grin.prokapi.com
20241201 09:37:33.342 INFO grin::tools::seedcheck - Checking seed health for grinseed.revcore.net
20241201 09:37:33.343 INFO grin::tools::seedcheck - FAIL - No dns entries found for grinseed.revcore.net
20241201 09:37:33.343 INFO grin::tools::seedcheck - Checking seed health for mainnet-seed.grinnode.live
20241201 09:37:33.343 INFO grin::tools::seedcheck - FAIL - No dns entries found for mainnet-seed.grinnode.live
20241201 09:37:33.343 INFO grin::tools::seedcheck - Checking seed health for mainnet.grin.punksec.de
20241201 09:37:33.344 INFO grin::tools::seedcheck - FAIL - No dns entries found for mainnet.grin.punksec.de
20241201 09:37:33.344 INFO grin::tools::seedcheck - Checking seed health for grinnode.30-r.com
20241201 09:37:33.344 INFO grin::tools::seedcheck - FAIL - No dns entries found for grinnode.30-r.com
20241201 09:37:33.421 ERROR grin_util::logger -
thread 'main' panicked at 'Unable to delete temporary files: Os { code: 32, kind: Uncategorized, message: "The process cannot access the file because it is being used by another process." }': src/bin\tools\seedcheck.rs:164 0: backtrace::backtrace::trace
1: backtrace::capture::Backtrace::new
2: grin_util::logger::init_logger
3: alloc::boxed::impl$50::call
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/alloc\src\boxed.rs:2468
std::panicking::rust_panic_with_hook
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:809
4: std::panicking::begin_panic_handler::closure$0
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:674
5: std::sys::backtrace::__rust_end_short_backtracestd::panicking::begin_panic_handler::closure_env$0,never$
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\sys\backtrace.rs:170
6: std::panicking::begin_panic_handler
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:665
7: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src\panicking.rs:74
8: core::result::unwrap_failed
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src\result.rs:1700
9: grin::info_strings
10: grin::info_strings
11: std::sys::backtrace::__rust_begin_short_backtrace
12: std::rt::lang_start::{{closure}}
13: std::rt::lang_start_internal::closure$1
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\rt.rs:174
std::panicking::try::do_call
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:557
std::panicking::try
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:520
std::panic::catch_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panic.rs:358
std::rt::lang_start_internal
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\rt.rs:174
14: main
15: invoke_main
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
__scrt_common_main_seh
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
16: BaseThreadInitThunk
17: RtlUserThreadStart

20241201 12:36:54.432 INFO grin_util::logger - log4rs is initialized, file level: Info, stdout level: Warn, min. level: Info
20241201 12:36:54.433 INFO grin - Using configuration file at C:\Users\anyno.grin\main\grin-server.toml
20241201 12:36:54.434 INFO grin - This is Grin version 5.4.0-alpha.0 (git v5.3.3_rebuild-2-gb93d88b), built for x86_64-pc-windows-msvc by rustc 1.83.0 (90b35a623 2024-11-26).
20241201 12:36:54.434 INFO grin - Chain: Mainnet
20241201 12:36:54.434 INFO grin - Accept Fee Base: 500000
20241201 12:36:54.434 INFO grin - Future Time Limit: 300
20241201 12:36:54.434 INFO grin - Feature: NRD kernel enabled: false
20241201 12:36:54.435 INFO grin::tools::seedcheck - Checking seed health for mainnet.seed.grin.lesceller.com
20241201 12:37:08.950 INFO grin::tools::seedcheck - FAIL - Unable to handshake at any known DNS resolutions for mainnet.seed.grin.lesceller.com
20241201 12:37:08.950 INFO grin::tools::seedcheck - Checking seed health for mainnet.seed.grin.prokapi.com
20241201 12:37:18.273 INFO grin::tools::seedcheck - FAIL - Unable to handshake at any known DNS resolutions for mainnet.seed.grin.prokapi.com
20241201 12:37:18.273 INFO grin::tools::seedcheck - Checking seed health for grinseed.revcore.net
20241201 12:37:20.445 INFO grin::tools::seedcheck - FAIL - Unable to handshake at any known DNS resolutions for grinseed.revcore.net
20241201 12:37:20.445 INFO grin::tools::seedcheck - Checking seed health for mainnet-seed.grinnode.live
20241201 12:37:30.534 INFO grin::tools::seedcheck - SUCCESS - Performed Handshake with seed for mainnet-seed.grinnode.live at 176.9.86.219:3414. MW/Grin 5.3.2 - HEADER_HIST | TXHASHSET_HIST | PEER_LIST | TX_KERNEL_HASH | PIBD_HIST | BLOCK_HIST | PIBD_HIST_1
20241201 12:37:30.534 INFO grin::tools::seedcheck - Checking seed health for mainnet.grin.punksec.de
20241201 12:37:32.830 INFO grin::tools::seedcheck - FAIL - Unable to handshake at any known DNS resolutions for mainnet.grin.punksec.de
20241201 12:37:32.830 INFO grin::tools::seedcheck - Checking seed health for grinnode.30-r.com
20241201 12:37:39.231 INFO grin::tools::seedcheck - SUCCESS - Performed Handshake with seed for grinnode.30-r.com at 96.74.120.4:3414. MW/Grin 5.2.0-beta.3 - HEADER_HIST | TXHASHSET_HIST | PEER_LIST | TX_KERNEL_HASH | PIBD_HIST | BLOCK_HIST | PIBD_HIST_1
20241201 12:37:39.316 ERROR grin_util::logger -
thread 'main' panicked at 'Unable to delete temporary files: Os { code: 32, kind: Uncategorized, message: "The process cannot access the file because it is being used by another process." }': src/bin\tools\seedcheck.rs:164 0: backtrace::backtrace::trace
1: backtrace::capture::Backtrace::new
2: grin_util::logger::init_logger
3: alloc::boxed::impl$50::call
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/alloc\src\boxed.rs:2468
std::panicking::rust_panic_with_hook
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:809
4: std::panicking::begin_panic_handler::closure$0
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:674
5: std::sys::backtrace::__rust_end_short_backtracestd::panicking::begin_panic_handler::closure_env$0,never$
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\sys\backtrace.rs:170
6: std::panicking::begin_panic_handler
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:665
7: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src\panicking.rs:74
8: core::result::unwrap_failed
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/core\src\result.rs:1700
9: grin::info_strings
10: grin::info_strings
11: std::sys::backtrace::__rust_begin_short_backtrace
12: std::rt::lang_start::{{closure}}
13: std::rt::lang_start_internal::closure$1
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\rt.rs:174
std::panicking::try::do_call
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:557
std::panicking::try
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panicking.rs:520
std::panic::catch_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\panic.rs:358
std::rt::lang_start_internal
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\library/std\src\rt.rs:174
14: main
15: invoke_main
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
__scrt_common_main_seh
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
16: BaseThreadInitThunk
17: RtlUserThreadStart

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

Successfully merging this pull request may close these issues.

2 participants