Bitcoin Core Github
44 subscribers
119K links
Download Telegram
💬 furszy commented on issue "Indexes stuck on unknown best block after unclean shutdown":
(https://github.com/bitcoin/bitcoin/issues/33208#issuecomment-3197313401)
> That's the sha256 hash digest of the MuHash object, not the full `MuHash3072`. I think [@mzumsande](https://github.com/mzumsande) is correct that we can't roll `m_muhash` back if the blocks are not available.

Yeah ok, that was close. I missed the uint256 there.
🤔 mzumsande reviewed a pull request: "index: fix wrong assert of current_tip == m_best_block_index"
(https://github.com/bitcoin/bitcoin/pull/32878#pullrequestreview-3128891694)
Code Review ACK 3aef38f44b76dfda77f47dc1a0e1fdc6ff3c7766
💬 alexanderwiederin commented on pull request "kernel: Introduce initial C header API":
(https://github.com/bitcoin/bitcoin/pull/30595#discussion_r2282769073)
Yes, I agree.
👍 hodlinator approved a pull request: "refactor: Header sync optimisations & simplifications"
(https://github.com/bitcoin/bitcoin/pull/32740#pullrequestreview-3128785887)
ACK 50e61f448eedfe0ccfa07f3124aeef9c7762a69b

PR improves the code in several minor ways, such as:
* Computing PoW for a `CBlockHeader` (or `CBlock`) without having to jump through temporarily constructed `CBlockIndex` (552b9c3a565c1817074468bf71fb4526f3a47f42).
* Removing `CBlock::GetBlockHeader()` leaves less room for forgetting to properly set fields in the new `CBlockHeader` instance (67aa62c80e7d2faa485ba020cefe262f479190f4).
* Changes `const CBlockIndex* m_chain_start` to a reference
...
💬 hodlinator commented on pull request "refactor: Header sync optimisations & simplifications":
(https://github.com/bitcoin/bitcoin/pull/32740#discussion_r2282695753)
(Still have a slight preference for using the original way of formatting the `HeadersSyncState` initializer-list for optimal `git blame` integrity, but this is tolerable compared to the previous push, I see it matches `PeerManagerImpl`).
🤔 ismaelsadeeq reviewed a pull request: "Add functional test for IPC interface"
(https://github.com/bitcoin/bitcoin/pull/33201#pullrequestreview-3128857140)
Approach ACK

First pass initial comments
💬 ismaelsadeeq commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282752457)
In "ci: add functional test for IPC interface" https://github.com/bitcoin/bitcoin/commit/3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

This currently does not work on macOs when the pycapnp uses system installed capnproto and the system installed capnproto is installed from homebrew.

Editing it to

```python
imports = ["/opt/homebrew/opt/capnp/include", str(src_dir), str(mp_dir)]
```

I thought of two ways to fix it but was not successful.
1. Whether we can get the path to the include
...
💬 ismaelsadeeq commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282735877)
In "ci: add functional test for IPC interface" 3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

Should modules be a test parameter initialised in `set_test_params` so that we can later reuse in mining test?
💬 ismaelsadeeq commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282757571)
In "ci: add functional test for IPC interface" https://github.com/bitcoin/bitcoin/commit/3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

Should be abstracted away as a helper since to be reused ?
```python
async def parse_and_deserialize_block(self, block_template, ctx):
block_data = BytesIO((await block_template.result.getBlock(ctx)).result)
block = CBlock()
block.deserialize(block_data)
return block
```
```suggestion
block = await self.parse
...
💬 ismaelsadeeq commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282776829)
In "ci: add functional test for IPC interface" https://github.com/bitcoin/bitcoin/commit/3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

Is their benefit of having context for each test, else we can just have a global context?
💬 ismaelsadeeq commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282772502)
In "ci: add functional test for IPC interface" https://github.com/bitcoin/bitcoin/commit/3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

Also add a branch for when we have a better template based on increase in transaction fees in the mempool above the fee threshold.

```suggestion
assert_equal(len(block2.vtx), 1)
# Wait for another, get one after increase in fees in the mempool.
waitnext = template2.result.waitNext(ctx, waitoptions)
self.nodes[0
...
💬 ismaelsadeeq commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282774168)
In "ci: add functional test for IPC interface" https://github.com/bitcoin/bitcoin/commit/3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

nit: use our internal assertion helpers for better errors?
💬 maflcko commented on issue "ci: failure in `logging_tests`":
(https://github.com/bitcoin/bitcoin/issues/33195#issuecomment-3197464559)
> Edit: running the test from the flash drive just made the test so slow that it was triggering the [20s reset window,](https://github.com/bitcoin/bitcoin/blob/7b4a1350dfd6b3892a9c314eeff28b22ef0c1a73/src/test/logging_tests.cpp#L459) causing the log test to fail because the suppression status was reset. This is however not what happened in https://cirrus-ci.com/task/5318274667249664?logs=ci#L721, as the test started and failed all in a span of a few milliseconds.

I guess it is rare that someone
...
💬 josibake commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282780835)
These commands for unstalling via a venv dont work for me on macos or linux. I'm also not sure about installing via pip, since we need to be sure we are installing the package with capnproto bundled. Instead, I think `pycapnp` should be installed from source (venv or otherwise):

```
git clone https://github.com/capnproto/pycapnp.git
cd pycapnp
pip install . -C force-bundled-libcapnp=True
```

This approach worked on macos and linux for me (inside a venv on both).
💬 josibake commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282782619)
AFAICT, this only works when capnproto is bundled inside `pycapnp`.
👍 josibake approved a pull request: "Add functional test for IPC interface"
(https://github.com/bitcoin/bitcoin/pull/33201#pullrequestreview-3128923018)
ACK https://github.com/bitcoin/bitcoin/pull/33201/commits/3f7ff4849e6165a6bcc4d5977c35a467fd7fc232

Thanks for picking this up! I think the docs and multiplatform support still need a bit of work but that can be tackled in a follow-up(s), considering the main benefit I see here is getting a basic functional test in place that can be extended later.
💬 fjahr commented on pull request "index: Fix coinstats overflow":
(https://github.com/bitcoin/bitcoin/pull/30469#discussion_r2282801398)
Fixed, I missed that this had changed.
💬 josibake commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#issuecomment-3197489074)
> the include paths used in the python test are a guess. It'd be nice to pass through the location of the capnp installation from the build system to the tests

I took a stab at this, ended up being harder than expected and I don't yet have something that works. But I think this is the correct longterm approach, instead of trying to guess in the functional test itself.
💬 josibake commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282815035)
FWIW, this worked for me on macos: https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282780835. I'd recommend we have the docs tell users to install `pycapnp` from source, since that should "just work" everywhere due to this line: `cpp_capnp_dir = Path(capnp.__path__[0]).parent`.

Eventually, we can replace this recommendation once we have CMake automatically finding the include directory for capnproto and making the test framework aware.
💬 fanquake commented on pull request "Add functional test for IPC interface":
(https://github.com/bitcoin/bitcoin/pull/33201#discussion_r2282839448)
> `venv/bin/python3 test/functional/interface_ipc.py`

This should be `build/test/functional/interface_ipc.py`. Otherwise the test wont run.