8000 Newsletters: add 131 (2020-01-13) by harding · Pull Request #503 · bitcoinops/bitcoinops.github.io · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Newsletters: add 131 (2020-01-13) #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 13, 2021

Conversation

harding
Copy link
Collaborator
@harding harding commented Jan 11, 2021

Note: this PR adds an old topic entry to eclipse attacks, which were described in an entry but didn't explicitly say "eclipse" so I didn't notice it when creating the Eclipse Attack topic. Relevant this week because we're linking to it.

@jnewbery
Copy link
Contributor

ACK c6554fb. Looks good so far. Thanks @harding

@murchandamus murchandamus force-pushed the 2021-01-13-newsletter branch from 8535749 to 001ad65 Compare January 11, 2021 17:18
Copy link
Collaborator
@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

Looks great so far.

I have strong opinions weakly held on bech32m, but maybe I'm too close to the proposal. My first reaction was to suggest a more detailed description of the bech32m proposal, but the more I tried coming up with concrete suggestions, the more I like it as a high-level description.


- **Bech32m** Pieter Wuille [posted][wuille bech32m post] to the
Bitcoin-Dev mailing list a [draft BIP][bech32m bip] for a modified
version of the [bech32][topic bech32] algorithm that increases the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional:

Suggested change
version of the [bech32][topic bech32] algorithm that increases the
version of the [bech32][topic bech32] address encoding that increases the

Comment on lines 56 to 57
for [taproot][topic taproot] addresses and possibly future new script
upgrades.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's emphasize this, because providing forward-compatible address types was one of the main design goals of bech32/bech32m.

Suggested change
for [taproot][topic taproot] addresses and possibly future new script
upgrades.
for [taproot][topic taproot] addresses and future native segwit address versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although "future native segwit address versions" is more precise, and so allows dropping the "possibly", I worry there are a lot of readers who don't really understand what a new address version implies. E.g., someone who went through the change from P2PKH to P2WPKH might think it's just a different way of encoding the same data, whereas the thing I think we want to communicate is that bech32m will be compatible with even major changes to script (e.g., you could in theory use bech32m to pay a Simplicity-based encumbrance).

Copy link
Collaborator
@murchandamus murchandamus Jan 12, 2021

Choose a reason for hiding this comment

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

Alright, no worries. 😃

q3="Starting from what number of inbound peers does eviction begin to occur?"
a3="Starting from 21 inbound peers, as at least 20 are protected by the
current logic: 4 by network group, 4 that sent us novel blocks passing
initial validity checks, 4 that sent us novel transactions accepted into
Copy link
Collaborator
@jonatack jonatack Jan 12, 2021

Choose a reason for hiding this comment

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

I hesitated to add "(with backup criteria)" to the blocks and the transactions here, or to link to the functions, and whether or not to mention the 8 non-tx-relay peers that sent us novel blocks to account for the difference between the minimum 20 and maximum 28 protected inbounds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do find the difference between 28 in the previous item and 20 in this item to be confusing. Maybe s/28 peers/20 inbound peers/ in the previous item?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe s/Up to 28/Between 20 and 28 inbound/ with the positions of q2 and q3 inversed

Copy link
Member
@adamjonas adamjonas left a comment

Choose a reason for hiding this comment

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

Looking good...


- [Bitcoin Core 0.21.0rc5][Bitcoin Core 0.21.0] is a release candidate
for the next major version of this full node implementation and its
associated wallet and other software.
Copy link
Member

Choose a reason for hiding this comment

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

Would we consider adding the 0.21 testing guide?

message that could be sent during connection negotiation. A peer
that understands the message won't send the node requesting
`disabletx` any transaction announcements and won't request any
transactions from the node. It also won't send some other gossip
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe s/It also won't/The BIP also recommends that it not/ as the BIP draft states: "It is RECOMMENDED that a node that has sent or received a disabletx message to/from a peer not send any of these messages to the peer: addr/getaddr, addrv2 (BIP 155)"

Copy link
Collaborator
@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Excellent newsletter! Three minor comments below and one above on the BIP draft.

Bitcoin Core [later][bitcoin core #6993] reused this mechanism for its
bandwidth-saving `-blocksonly` mode where a node requests that its
peers don't send it any unconfirmed transactions at all. Last year,
Bitcoin Core with default settings began opening a few
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe s/a few/up to two/

(it is now currently up to three, or a bit more than two, if the temporary block relay connections added in bitcoin/bitcoin#19858 are counted)

a2link="https://bitcoincore.reviews/20477#l-83"

q3="Starting from what number of inbound peers does eviction begin to occur?"
a3="Starting from 21 inbound peers, as at least 20 are protected by the
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/protected/protected from eviction/, especially if this question is inverted with the previous one as suggested in #503 (comment)

Comment on lines 100 to 101
must be taken to avoid exposing the node to attacker-triggered network
partitioning with this logic, so this code is critical.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this sentence. Our outbound connection logic is much more important for partition resistance.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's from https://github.com/bitcoin/bitcoin/blob/7b975639ef93b50537a3ec6326b54d7218afc8da/src/net.cpp#L969, though not necessarily viable content in this context.

a1="To make inbound slots available for honest peers in the network so that
new nodes can establish good outbound connections to them. Otherwise,
dishonest nodes could more easily attack new nodes by being available for
their outbound connections and by statically occupying inbound slots."
Copy link
Contributor

Choose a reason for hiding this comment

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

What does 'statically occupying inbound slots' mean? Do you mean occupy all the inbound slots of other listening nodes?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. I was trying to convey the idea of a more static network topology in the absence of evictions.

Comment on lines +125 to +132
valid transactions and blocks, and a few others. The longest-connected
remaining half are protected, including some onion peers. Of those that
remain, the youngest member of the network group with the most
connections is selected for disconnection. An attacker would have to be
simultaneously better than honest peers at all of these characteristics
to partition a node."
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a little bit too much detail. I'd suggest perhaps giving a higher-level answer here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This highlights a limitation of the review club format. I felt I was overly simplifying and yet don't touch the changes made by the PR other than "adds test coverage," because the details of the PR itself aren't particularly newsworthy or quiz-worthy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not worried about excess detail when the answer content is hidden by default and readers need to click to expand.

to partition a node."
a2link="https://bitcoincore.reviews/20477#l-83"

q3="Starting from what number of inbound peers does eviction begin to occur?"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this question is confusing. We only ever evict a peer if our inbound slots are full, and by default a listening node would have 115 inbound slots. Configuring a node to only have 20 inbound slots would be highly unusual config.

I pointed the same thing out in the PR: bitcoin/bitcoin#20477 (comment). I don't think it's a useful test, and is more confusing than anything else.

I suggest just removing this question.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think removing this Q/A also resolves the confusion in #503 (comment) between 20 vs 28.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree. I'm going to remove this.

transactions from the node. It also won't send some other gossip
messages such as `addr` messages used for IP address announcements.
The `disabletx` negotiation persists for the lifetime of the
connection, allowing peers to use different limits for disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably my lack of understanding, but what is meant by "different limits" here? It is not clear to me.

{% include functions/details-list.md
q0="Inbound or outbound peer selection: which one is our primary defense
against eclipse attacks?"
a0="Outbound peer selection, as outbound peers are far less under attacker
Copy link
Contributor

Choose a reason for hiding this comment

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

(?) s/far less under attacker/far less likely to be under attacker

@bitschmidty
Copy link
Contributor

Comment on lines 57 to 60
upgrades. This will allow wallets and services that adopt bech32m to
automatically be able to pay future wallets and services that upgrade
to taproot and many other proposed improvements (see [Newsletter
#45][news45 bech32 upgrade] for details).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good addition content-wise, but after bech32 always appeared with the qualifier 'address' prior, "adopt bech32m" here might make people think that they have to use bech32m addresses first before being able to send to others using it. How about:

Suggested change
upgrades. This will allow wallets and services that adopt bech32m to
automatically be able to pay future wallets and services that upgrade
to taproot and many other proposed improvements (see [Newsletter
#45][news45 bech32 upgrade] for details).
upgrades. Wallets and services implementing support for the bech32m address encoding will be able to pay future adopters of taproot and many other proposed improvements (see [Newsletter
#45][news45 bech32 upgrade] for details).

After a [problem][bech32 weakness] was discovered with bech32 error
detection for future upgrades under some rare circumstances, a new
bech32 modified (**bech32m**) format was proposed. The new format is
not backwards compatible with the original bech32 format, although it
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
not backwards compatible with the original bech32 format, although it
not forwards compatible with the original bech32 format, although it

The new interpreter can resolve data written using the old schema: backwards compatible.
The old interpreter can resolve data written using the new schema: forwards compatible.

Bech32 was supposed to be forwards compatible for all native segwit versions, but bech32m now explicitly breaks forwards compatibility.

- [Bitcoin Core #19055][] muhash FIXME:adamjonas
- [Bitcoin Core #19055][] adds the Muhash algorithm for future implementation
to calculate the UTXO set hash in `gettxoutsetinfo`. As covered in
[newsletter 123][muhash review club], MuHash is a rolling hash algorithm
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice idea linking to the previous review club feature

Copy link
Contributor
@jnewbery jnewbery left a comment
3D11

Choose a reason for hiding this comment

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

0bb9564 looks great to me, with one review comment inline.

Comment on lines 185 to 186
- [Bitcoin Core #19055][] adds the MuHash algorithm so that a future implementation
can use it. As covered in
Copy link
Contributor

Choose a reason for hiding this comment

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

"so that a future implementation can use it" is a bit tautological. I think the rest of the write-up explains well why and how this can be used, so how about:

- [Bitcoin Core #19055][] adds a C++ implementation of the [MuHash algorithm](https://cseweb.ucsd.edu/~mihir/papers/inchash.pdf).

as the first sentence?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jnewbery hopefully better now? It's still a bit of a tautology, but I do want to make it clear that there's no way for anyone to use the feature yet (excluding tests).

Control Protocol), the backward-compatible successor to NAT-PMP.

- [Bitcoin Core #19055][] adds the MuHash algorithm so that a future implementation
can use it. As covered in
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@adamjonas FYI, I dropped the mention of MuHash being used in gettxoutsetinfo here. That was correct (AFAIK) but I think the main goal for the hash function is to be able to quickly and automatically calculate the hash after every block has been processed, and then store the hash for that block in a database that can be queried later so that everyone can agree that the hash of the UTXO set at block xxxx was yyyy, so an assumeutxo state that also (mu)hashes to yyyy can be reasonably trusted.

By comparison, adding MuHash to gettxoutsetinfo is just an intermediate step that slots the new hash function into a place where we currently have a function that's too slow for practical every-block tracking.

Your text alludes to that ultimate purpose later on, so I think it's reasonably descriptive and that mentioning gettxoutsetinfo could accidentally confuse readers and make them think this merged PR was less important than it actually was.


Most of the discussion focused on understanding Bitcoin Core's peer eviction
logic.

{% include functions/details-list.md
q0="Inbound or outbound peer selection: which one is our primary defense
against eclipse attacks?"
a0="Outbound peer selection, as outbound peers are far less under attacker
a0="Outbound peer selection, as outbound peers are far less likely to be under attacker
Copy link
Collaborator

Choose a reason for hiding this comment

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

The changes in 7d8b09f LGTM except maybe this one, as it changes the meaning; my thinking was that "outbound peers are far less under attacker control" because we choose them, but maybe I'm misinterpreting and it could probably be better expressed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe just "are less under"

@jonatack
Copy link
Collaborator

Thanks @harding for the latest update.

@bitschmidty bitschmidty force-pushed the 2021-01-13-newsletter branch from bae280e to bfa73fa Compare January 13, 2021 13:06
@jonatack
Copy link
Collaborator

@bitschmidty some of the latest changes are missing from the last push.

@harding harding force-pushed the 2021-01-13-newsletter branch from bfa73fa to 2c9007e Compare January 13, 2021 13:15
@bitschmidty
Copy link
Contributor

ACK 2c9007e

@bitschmidty bitschmidty merged commit 1caa90f into bitcoinops:master Jan 13, 2021
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.

7 participants
0