Skip to content

Commit

Permalink
separate non-zero exit code for doppelganger detection (#3728)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored Jun 10, 2022
1 parent 65cecc5 commit cc5f95d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion beacon_chain/gossip_processing/eth2_processor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ proc checkForPotentialDoppelganger(
validatorIndex,
validatorPubkey,
attestation = shortLog(attestation)
quit QuitFailure

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

proc attestationValidator*(
self: ref Eth2Processor, src: MsgSource,
Expand Down
9 changes: 8 additions & 1 deletion docs/the_nimbus_book/src/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can pass any `nimbus_beacon_node` options to the `prater` and `mainnet` scri
To see a list of the command line options availabe to you, with descriptions, run:

```
build/./nimbus_beacon_node --help
build/nimbus_beacon_node --help
```

You should see the following output:
Expand Down Expand Up @@ -128,3 +128,10 @@ num-threads = 0
trusted-node-url = "http://192.168.1.20:5052"
```

# Exit Codes

| Exit code | Description |
|-----------|---------|
| 0 | Successful exit |
| 1 | Generic failure or unspecified error |
| 1031 | Doppelganger detection; one might prefer not to restart automatically |

0 comments on commit cc5f95d

Please sign in to comment.