Skip to content

Commit

Permalink
Doppelganger exit code changed from 1031 to 129 (addresses #3973) (#3977
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zah authored Aug 17, 2022
1 parent fa9e2b4 commit ca3245c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Nimbus `v22.6.0` brings support for the merge testnets Ropsten and Sepolia (plea
https://github.com/status-im/nimbus-eth2/pull/3679
https://github.com/status-im/nimbus-eth2/pull/3780

* The custom error code `1031` will signal a detected doppelganger on the network. This can be handled in the Nimbus's service supervisor to prevent an automatic restart:
* The custom error code `129` will signal a detected doppelganger on the network. This can be handled in the Nimbus's service supervisor to prevent an automatic restart:
https://github.com/status-im/nimbus-eth2/pull/3728

* The Nimbus status bar can be configured to display the current version number:
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/gossip_processing/eth2_processor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ proc checkForPotentialDoppelganger(

# Avoid colliding with
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Process%20Exit%20Codes
const QuitDoppelganger = 1031
const QuitDoppelganger = 129
quit QuitDoppelganger

proc processAttestation*(
Expand Down
2 changes: 1 addition & 1 deletion docs/the_nimbus_book/src/beacon-node-systemd.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ curl -s https://raw.githubusercontent.com/status-im/nimbus-eth2/stable/scripts/p
The format of service files is documented in the [systemd manual](https://www.freedesktop.org/software/systemd/man/systemd.service.html).

!!! tip
Automatic restarts increase the risk that the doppelganger detection fails - set `RestartPreventExitStatus=1031` to prevent this from happening
Automatic restarts increase the risk that the doppelganger detection fails - set `RestartPreventExitStatus=129` to prevent this from happening

### 3. Configure your service

Expand Down
10 changes: 5 additions & 5 deletions docs/the_nimbus_book/src/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ Here is an example config file illustrating all of the above:

## Exit Codes

| Exit code | Description |
|-----------|---------|
| 0 | Successful exit |
| 1 | Generic failure or unspecified error |
| 1031 | Doppelganger detection; one might prefer not to restart automatically |
| Exit code | Description |
|-----------|-----------------------------------------------------------------------|
| 0 | Successful exit |
| 1 | Generic failure or unspecified error |
| 129 | Doppelganger detection; one might prefer not to restart automatically |
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ TimeoutSec=1200
Restart=always

# Don't restart when Doppelganger detection has been activated
RestartPreventExitStatus=1031
RestartPreventExitStatus=129

ExecStart=/usr/bin/nimbus_beacon_node \
--network=${NETWORK} \
Expand Down

0 comments on commit ca3245c

Please sign in to comment.