Skip to content

Commit

Permalink
discv5: require sending record when enr-seq == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Aug 31, 2020
1 parent 172c117 commit 92bbbd2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions discv5/discv5-wire.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ and signature sizes depend on the ENR identity scheme. For the "v4" identity sch
assume 64-byte signature size and 33 bytes of (compressed) public key size.

`authdata` starts with a fixed-size `authdata-head` component, followed by the ID
signature, ephemeral public key and optional node record. The `record` field may be
omitted if the `enr-seq` of WHOAREYOU is recent enough, i.e. when it matches the current
sequence number of the sending node.
signature, ephemeral public key and optional node record.

The `record` field may be omitted if the `enr-seq` of WHOAREYOU is recent enough, i.e.
when it matches the current sequence number of the sending node. If `enr-seq` is zero, the
record must be sent.

authdata = authdata-head || id-signature || eph-pubkey || record
authdata-size = 15 + sig-size + eph-key-size + len(record)
Expand Down

0 comments on commit 92bbbd2

Please sign in to comment.