Skip to content

Conversation

rjl493456442
Copy link
Member

This pull request modifies the behavior of --synctarget to terminate the node
only when --exitWhenSynced is explicitly specified.

@rjl493456442
Copy link
Member Author

If exitwhensynced is specified, then

INFO [07-04|19:53:30.110] Waiting for peers to retrieve sync target
INFO [07-04|19:53:31.283] New local node record                    seq=1,748,495,301,014 id=0675dea4fd3489a3 ip=122.247.51.135 udp=31666 tcp=31666
INFO [07-04|19:53:40.113] Removing old bloom bits database in progress... elapsed=10.003s
INFO [07-04|19:53:40.310] Block synchronisation started
WARN [07-04|19:53:40.311] Retrieved pivot header from local        number=5,163,530 hash=bff7fe..02866c latest=5,163,594 oldest=5,163,594
INFO [07-04|19:53:40.652] Removing old bloom bits database finished elapsed=10.542s
INFO [07-04|19:53:45.310] Full-sync target reached                 number=5,163,594 hash=b9c677..2a0cb1
INFO [07-04|19:53:45.310] Terminating the node
INFO [07-04|19:53:45.310] HTTP server stopped                      endpoint=127.0.0.1:4778
INFO [07-04|19:53:45.311] HTTP server stopped                      endpoint=127.0.0.1:5778
INFO [07-04|19:53:45.311] HTTP server stopped                      endpoint=127.0.0.1:6666
INFO [07-04|19:53:45.311] IPC endpoint closed                      url=/home/gary/eth-sepolia-hash/el/geth.ipc
INFO [07-04|19:53:47.485] Ethereum protocol stopped
INFO [07-04|19:53:47.485] Transaction pool stopped
INFO [07-04|19:53:47.551] Blockchain stopped

@MariusVanDerWijden
Copy link
Member

Whats the idea behind this? Couldn't you just write a script that sends a SIGTERM once the node is synced up, if you want the node to exit when its synced?

Copy link
Contributor

@jwasinger jwasinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me. We already have this flag anyways.

@rjl493456442
Copy link
Member Author

Whats the idea behind this? Couldn't you just write a script that sends a SIGTERM once the node is synced up, if you want the node to exit when its synced?

The issue is we always terminate the Geth when the target is reached, by default. With this PR, the behavior is changed, keeping Geth running unless exitwhensynced is specified

@rjl493456442 rjl493456442 merged commit e71487b into ethereum:master Jul 8, 2025
3 of 4 checks passed
@rjl493456442 rjl493456442 added this to the 1.16.2 milestone Jul 8, 2025
howjmay pushed a commit to iotaledger/go-ethereum that referenced this pull request Aug 27, 2025
…ereum#32149)

This pull request modifies the behavior of `--synctarget` to terminate
the node only when `--exitWhenSynced` is explicitly specified.
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.

3 participants