Conversation
This is a fix for Issue bitcoinj#3410 that will allow main net blocks above 849,137 to be processed. As of block 849,138 we can no longer fit total chainwork in a 12-byte *signed* field. This fix "kicks the can down the road" by making the field 12-bytes *unsigned*. We should open a new issue to address the long term need for bigger values. Note that converting the field to 12-byte unsigned precludes us from using the most-significant bit as a flag for a new format, but we should be able to pick some arbitrary value, say 0xA0 as a version flag and declare that values less than 0xA0 are "unversioned". This is BACKPORT to the 0.16 branch. In the master/0.17 branch the bigIntegerToBytes method has been moved to base.internal.BytUtils, so this commit differs in that one respect.
The old format will soon run out of bytes for the chain work value.
898691f to
3cc5f29
Compare
|
Windows CI build fails at . I guess this is not related to the code changes. |
… backport of the chainwork bugfix. See bisq-network/bitcoinj#45 Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
|
Not sure if it's worth the effort, but in order to lower the risk of regressions you could leave out the
If you decide you don't need more recent checkpoints for the next couple of weeks at all (again, the impact will be minimal at first), then you could also exclude the changes related to In other words: For a hotfix, only the changes related to In any case, I'd strongly recommend developing a strategy to update bitcoinj at least to version 0.16.x which we will probably support with critical updates for some time. |
Thanks! OK, I will remove those commits. I did not plan to provide checkpoint updates in that release, only the minimal fixes, but for sure lowers the risk in such a quick hotfix. Yes we are aware that its very bad that we are such far behind the upstream version, but as Musig on Bisq 2 will use BDK and we put all dev efforts into that, we tried to limit efforts on Bisq 1 - which went obviously too far by not following up better with this issue... |
|
On another note, I'm confused about the presence of a backport of our "kicking the can down the road" hotfix on this PR. I thought Bisq has already hotfixed this when the issue came up in June 2024? Are you sure this PR is against the correct branch that is actually used in Bisq? |
|
@schildbach Do you think the failed test (#45 (comment)) is critical? It seems to me a CI environment issue with timing. I tried a bit with newer versions but that caused then other issues. |
This gets rid of several bytes to/from string conversions.
This is meant to make sure the buffer position is always right.
It's available as a field already.
Existing V1 files are automatically migrated to V2 format. Includes a test for migration from V1 to V2 format. This requires `getRingCursor()` to be changed from private to package-private.
- Use protobuf-java:3.18.0 instead of protobuf-java:3.6.1 - Use mavenCentral instead of jcenter
Yes, the latest Bisq release used commit |
3cc5f29 to
7dc0851
Compare
I don't think it's caused by a regression introduced by this PR. More likely it's a fluke of these |
Before it was failing on Windows with Java 15 now with Java 11. So its not persistent, but seems Windows is mostly affected. |
… backport of the chainwork bugfix. See bisq-network/bitcoinj#45
|
utACK |
… backport of the chainwork bugfix. See bisq-network/bitcoinj#45
This cherry-picked the commits suggested in:
bitcoinj#3975 (comment)
but excluding the checkpoint related commits as suggested by @schildbach in #45 (comment) to reduce risks and as those changes are not strictly required for the hotfix.
Additional commits for missing methods and updates in build files and CI config have been applied as well.