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.
Create checkpoints with 12 (or less) bytes of work in the old V1 format,
otherwise V2. This will make checkpoint files easier to review.
This un-deprecates the V1 format in StoredBlock, since it's no longer
planned to remove that in the forseeable future.
This also reverts recent changes to the bundled checkpoints
(commit de8afc67ca).
* `BuildCheckpoints` now always creates checkpoints with 32 byte chain work
* `CheckpointManager` knows how to read both 12 and 32 byte chain work
Also updates the bundled checkpoints to the new format and a test.
Trixie doesn't carry OpenJDK 21 any more. Because OpenJDK support
under Debian is a moving target, it's better to remove it until
Trixie is released. Otherwise, CI builds will start failing at any
time.
This is a fix for Issue #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".
The listener wasn't being removed properly, because using a method
reference in both add and remove generated two different objects and
therefore the remove method wasn't finding and removing the listener
that was previously added.
By saving the listener created by the method reference, we can remove
it later.
These are old, unsupported, and almost certainly do not work as is.
We separately plan on replacing the JavaScript example on the documentation
site with a Kotlin example.
There are use cases where an already parsed address needs to be validated
for a specific network. In one use case the address came from an external
source and needs validation with an error message displayed: that's what
`isValidAddress(Address)` is for. In the other case we can treat the invalid
address as a fatal error. That's `checkAddress(Address)`.
GitHub has bumped macos-latest to be macos-14 (and ARM) so our tests
are currently broken. This PR is a short-term fix to restore the status quo
and makes the minimum change to fix the broken build.