Bitcoin Core Github
44 subscribers
120K links
Download Telegram
💬 virtu commented on pull request "contrib: asmap-tool - Compare ASMaps with respect to specific addresses":
(https://github.com/bitcoin/bitcoin/pull/30246#discussion_r1657278263)
Moving `sys` doesn't fully fix the import block because it is separated from the next function definition by only one newline. If I added another newline below the import block fix it, I should probably also add additional newlines between function definitions for consistency's sake. Not sure if any/how much refactoring should be included here. wdyt?
💬 ryanofsky commented on issue "RFC: Misused LogError and LogWarning macros":
(https://github.com/bitcoin/bitcoin/issues/30348#issuecomment-2194927972)
re: https://github.com/bitcoin/bitcoin/issues/30348#issuecomment-2194832230

> @ryanofsky all those unnecessary macros add complexity and more ducks to keep in a row -- for no benefit.

I agree with that and your other points. I particularly agree the current implementation of the macros is complicated and inconsistent, and I wrote #29256 to make all the macros accept the same parameters and use the [same implementation](https://github.com/ryanofsky/bitcoin/blob/38d3298ea7e547797871140a02df3
...
💬 virtu commented on pull request "contrib: asmap-tool - Compare ASMaps with respect to specific addresses":
(https://github.com/bitcoin/bitcoin/pull/30246#discussion_r1657285832)
Good idea. Total change is now broken down into migrations (from one AS to another), assignments (previously unassigned, now assigned to an AS) and unassignments (vice versa).

`Summary: 371 (1.37%) of 27,050 addresses were reassigned (migrations=242, assignments=125, unassignments=4)`
💬 ajtowns commented on pull request "RFC: Instanced logs":
(https://github.com/bitcoin/bitcoin/pull/30338#issuecomment-2194940918)
> this will allow us to instantiate a per-context logger, which is necessary for the kernel.

I don't understand where this is coming from. Libraries can export globals, eg `stdin`, so I don't see why you're claiming it's necessary for the kernel when it's not even necessary for libc.
🤔 instagibbs reviewed a pull request: "cluster mempool: cluster linearization algorithm"
(https://github.com/bitcoin/bitcoin/pull/30126#pullrequestreview-2116172410)
a couple general comments:

1) The bespoke DepGraphFormatter is pretty artisanal and as a reviewer I'm relying heavily on the cluster->depgraph->check depgraph matches -> serialization round-trip for asserting correctness. Unit tests-as-documentation is one thing I'm kind of missing, especially with the more involved parts.
2) Matching the actual LIMO commit with the LIMO literature/theory available is difficult for me(e.g., what's sufficient vs necessary). I know there's a new writeup coming
...
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1638465834)
Should we `Assume()`/short-circuit if `parent == child`
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1640177227)
could leave an assert to this effect right after this
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1638438741)
`Cluster<TestBitSet> cluster(num_tx, std::make_pair(FeeFrac{0, 1}, TestBitSet()));` should work?
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1638472774)
Where does the amortization come in?
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1644863011)
```Suggestion
Assume(!m_ancestor_set_feerates[first].IsEmpty());
anc_feerate = m_ancestor_set_feerates[first];
```
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1640177309)
could leave an assert to this effect right after this
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1638488625)
```Suggestion
LIMITED_WHILE(provider.remaining_bytes() > 0, TestBitSet::Size() * TestBitSet::Size()) {
```
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1638450101)
```Suggestion
// Read (parent, child) pairs, and add them to the cluster and depgraph.
```
💬 instagibbs commented on pull request "cluster mempool: cluster linearization algorithm":
(https://github.com/bitcoin/bitcoin/pull/30126#discussion_r1644945090)
it'd be worth it to have `del_set` be sometimes overcomplete, including random subsets of `~todo` which should be handled internally by being dropped. Alternatively it could be disallowed via `Assume()`?
💬 ajtowns commented on issue "RFC: Misused LogError and LogWarning macros":
(https://github.com/bitcoin/bitcoin/issues/30348#issuecomment-2194982649)
> I just don't see a significant distinction between different syntaxes `LogDebug(...)` or `LogPrint(BCLog::Debug, ...)` or even `log.Debug(...)` so have not been trying to raise syntax as an issue.

The second one is an extra 13 characters of noise each time (20 if you don't do something to avoid having to type `BCLog::Level::Debug`); for the third one, C++ doesn't allow you to have it be a magic macro where the arguments aren't even evaluated when debug logging isn't enabled. Far better to h
...
📝 Sjors opened a pull request: "[WIP] libbitcoin_net"
(https://github.com/bitcoin/bitcoin/pull/30350)
Sjors closed a pull request: "[WIP] libbitcoin_net"
(https://github.com/bitcoin/bitcoin/pull/30350)
💬 Sjors commented on pull request "[WIP] libbitcoin_net":
(https://github.com/bitcoin/bitcoin/pull/30350#issuecomment-2195009062)
Sorry, was trying to open this against my own fork.
💬 ajtowns commented on issue "RFC: Misused LogError and LogWarning macros":
(https://github.com/bitcoin/bitcoin/issues/30348#issuecomment-2195019443)
> Looking at the code I found 58 cases where `LogError` appeared to be use correctly, in conditions that would lead to full or partial shutdowns, and 61 cases where it appeared to be used incorrectly to report errors that would not cause shutdowns and were potentially transient.

#30347 doesn't seem to actually fix any of the 61 incorrect cases? Maybe have a PR to manually fix the incorrect ones, then a scripted diff to convert everything to the new names?
💬 kevkevinpal commented on pull request "test: Added coverage to Block not found error using gettxoutsetinfo":
(https://github.com/bitcoin/bitcoin/pull/30340#issuecomment-2195027831)
thanks @tdb3 and @alfonsoromanz I added a log in [82c454c](https://github.com/bitcoin/bitcoin/pull/30340/commits/82c454c65658439481b50fe71ed097ecb8d70737)

---

Also @tdb3 I tried doing
```
b1hash = index_node.getblockhash(1)
index_node.invalidateblock(b1hash)

self.log.info("Test obtaining info for a non-existent block hash")
assert_raises_rpc_error(-5, "Block not found", index_node.gettxoutsetinfo, hash_type="none", hash_or_height=b1hash, use_index=True)

index_node.reconsiderblock
...