Skip to content

Commit 1d50640

Browse files
committed
Fixes some typos and formating
1 parent 2419d22 commit 1d50640

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

13-watchtowers.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ The signature must be performed following [Data serialisation and signing](#data
351351

352352
#### Rationale
353353

354-
Freeing expired appointment from the tower (after a channel clousure or breach) should be beneficial for both parties. From the tower side, it allows to reduce the load and free space, for the user side, it recovers space that was used by expired appointments, so it can be used to back up new channel updates.
354+
Freeing expired appointment from the tower (after a channel clousure or breach) is beneficial for both parties. From the tower side, it reduces the load and free space, for the user side, it recovers space that was used by expired appointments, so it can be used to back up new channel updates.
355355

356356
### The `deletion_accepted` message
357357

@@ -427,15 +427,15 @@ Sample code (python) for the client to prepare the `encrypted_blob`:
427427

428428
def encrypt(penalty_tx, commitment_txid):
429429
# The SHA256 of the commitment txid is used as secret key, and 0 (12-byte long) as nonce.
430-
sk = sha256(commitment_txid).digest()
431-
nonce = bytearray(12)
430+
sk = sha256(commitment_txid).digest()
431+
nonce = bytearray(12)
432432

433-
# Encrypt the data
434-
cipher = ChaCha20Poly1305(sk)
435-
encrypted_blob = cipher.encrypt(nonce=nonce, data=penalty_tx, associated_data=None)
436-
encrypted_blob = hexlify(encrypted_blob).decode("utf8")
433+
# Encrypt the data
434+
cipher = ChaCha20Poly1305(sk)
435+
encrypted_blob = cipher.encrypt(nonce=nonce, data=penalty_tx, associated_data=None)
436+
encrypted_blob = hexlify(encrypted_blob).decode("utf8")
437437

438-
return encrypted_blob
438+
return encrypted_blob
439439
440440
## Payment modes
441441

@@ -447,11 +447,11 @@ The three most common ways of paying a tower are:
447447

448448
**Subscription**. Watchtower is periodically rewarded / paid for their service to the customer. (e.g. over the lightning network or fiat subscription).
449449

450-
The bounty approach has the benefit of paying the tower only if the job is done, but lets the customer hire many Watchtowers and only one Watchtower will be rewarded upon collecting the bounty (O(N) storage for each tower). On top of that, the onchain bounty allows a network-wise DoS attack for free. However, it also has the benefit of allowing fee-bumping via CPFP by including an output dedicated to the tower.
450+
The bounty approach has the benefit of paying the tower only if the job is done, but lets the customer hire many Watchtowers and only one Watchtower will be rewarded upon collecting the bounty (O(N) storage for each tower). On top of that, the onchain bounty allows a network-wise DoS attack for free on the watchtower network. However, it also has the benefit of allowing fee-bumping via CPFP by including an output dedicated to the tower.
451451

452452
The micropayment approach can be achieved using the same method as the subscription approach but setting the `appointment_slots` to one. Both micropayments and subscriptions are favourable for a Watchtower.
453453

454-
The ideal approach could be something in between. The tower is paid via a subscription to cover the storage costs and making DoS attacks having a financial cost. On top of that, the penalty transactions can include an output for the tower so
454+
The ideal approach could be something in between. The tower is paid via a subscription to cover the storage costs and making DoS attacks have a financial cost. On top of that, the penalty transactions can include an output for the tower so
455455
the tower is encouraged to watch for beaches whilst allowing fee-bumping.
456456

457457
## Data serialisation and signing
@@ -471,9 +471,9 @@ For example, for a deletion request of appointment identified by locator `4a5e1e
471471
The storage requirements for a Watchtower can be reduced (linearly) by implementing [shachain](https://github.com/rustyrussell/ccan/blob/master/ccan/crypto/shachain/design.txt), therefore storing the parts required to build the transaction and the corresponding signing key instead of the full transaction. For now, we have decided to keep the hiring protocol simple. Storage is relatively cheap and we can revisit this standard if it becomes a problem.
472472

473473
## Attacks on towers
474-
There are three main factors that define how easy is, for a malicious user, to attack a tower: the `cost` of hiring the tower, the level of user `privacy` achieved by the service, and who has `access` to the tower's services.
474+
There are three main factors that define how easy it is, for a malicious user, to attack a tower: the `cost` of hiring the tower, the level of user `privacy` achieved by the service, and who has `access` to the tower's services.
475475

476-
The most vulnerable Watchtower will, therefore, be a cheap, public, and completely privacy preserving tower. Privacy being our mail goal, we've defined parts of this BOLT to prevent cheap attacks, such as favouring subscriptions over single appointments. Here's an example of what subscriptions try to protect from:
476+
The most vulnerable Watchtower will, therefore, be a cheap, public, and completely privacy preserving tower. Privacy being our mail goal, we have defined parts of this BOLT to prevent cheap attacks, such as favouring subscriptions over single appointments. Here's an example of what subscriptions try to protect from:
477477

478478
### Locator reuse attack
479479

@@ -484,7 +484,7 @@ Given a locator `l`, a tower that provides a per-appointment hiring service (app
484484

485485
The tower will need to store all appointments, since it has no clue which of them is the valid one (if any). On the other hand, the cost for the attacker will only be `n * appointment_cost + txfee`.
486486

487-
Upon detection a breach, the tower will need to decrypt and analyse `n` transactions and left with the decision of what of them to broadcast (if any).
487+
Upon detecting a breach, the tower will need to decrypt and analyse `n` transactions and left with the decision of which of them to broadcast (if any).
488488

489489
Using subscriptions, the tower will only store a single appointment, since all appointments with the same `l` will be seen as updates. An attacker will need `n` different subscriptions to attempt the same attack. Assuming a subscription has a minimum size of `m` appointments (`m >> 1`), the cost for the attacker will be `n * m * appointment_cost + txfee`.
490490

0 commit comments

Comments
 (0)