Commit Graph

313 Commits

Author SHA1 Message Date
ardocrat dedaea205f lmdb: info migration log 2026-05-19 21:50:37 +03:00
ardocrat a24f30e3ae Merge branch 'staging' into lmdb_update 2026-05-18 23:25:36 +03:00
ardocrat 7a387d434b lmdb: migration test, clean data after allocate test 2026-05-18 13:22:24 +03:00
ardocrat 2dd726f17b lmdb: return an error on unsuccessful migration 2026-05-18 12:48:17 +03:00
ardocrat 9f29af8e14 store: bring back old key methods to reproduce data migration 2026-05-17 13:43:27 +03:00
ardocrat 7bf460992d lmdb: clear new db after unsuccessful migration, handle read error on migration to interrupt process 2026-05-17 13:35:32 +03:00
ardocrat 17cd0b9ed4 lmdb: fix iter test 2026-05-17 13:25:15 +03:00
ardocrat b97fa28aa4 lmdb: document migration resize safety 2026-05-17 13:14:36 +03:00
ardocrat cbf2cafd69 lmdb: fix iterate over 10k keys 2026-05-17 13:09:53 +03:00
ardocrat 630bb2e565 lmdb: handle an error when db with provided key not found 2026-05-17 12:51:42 +03:00
ardocrat fc66b73e5b lmdb: handle errors at iterator 2026-05-17 12:36:31 +03:00
ardocrat 418d865c01 lmdb: check iter result on getting total 2026-05-16 12:51:25 +03:00
ardocrat d217bda12e lmdb: store max 10k keys in the iterator 2026-05-16 12:44:21 +03:00
ardocrat 7d251d2267 lmdb: use index to detect separator, ignore unknown db key to not have a panic 2026-05-15 18:38:25 +03:00
ardocrat aa28adc6bd lmdb: use atomic open txs and stores count 2026-05-15 18:20:13 +03:00
ardocrat 22bc944918 lmdb: sleep 10ms when waiting all opened txs to be closed 2026-05-15 10:53:20 +03:00
ardocrat f921f8758c lmdb: use atomic for resize and resize checking flags 2026-05-15 10:52:09 +03:00
ardocrat 55d465beb2 Update rust edition to 2021 (#3834)
* build: update rust edition 2021

* fix: add missed build to grin_p2p from staging branch

* cargo: format all
2026-05-14 12:15:44 +02:00
ardocrat 9d0925ab08 lmdb: remove env state when there are no more stores 2026-05-01 01:30:33 +03:00
ardocrat d52cfe173b lmdb: immediate resize if there are no open transactions 2026-04-29 23:36:37 +03:00
ardocrat f41d188dc9 lmdb: count all open transactions to finish before resizing 2026-04-29 22:25:56 +03:00
ardocrat 9ca157d24c lmdb: use separate databases instead of prefixes, use default db for values without prefixes, migrate old environment 2026-04-27 12:37:01 +03:00
ardocrat e22f5acb11 fix: check batches count on resize waiting 2026-04-24 18:25:07 +03:00
ardocrat deb5b49310 lmdb: use static reader for iterator, count existing batches for stable resize 2026-04-24 18:13:30 +03:00
ardocrat 70040d2160 lmdb: wait db resize before read, reduce timeout before resizing 2026-04-24 13:27:28 +03:00
ardocrat eef000dfe8 lmdb: default env name 2026-04-23 00:27:22 +03:00
ardocrat b18f453fa8 lmdb: speed up prefix iter by storing keys 2026-04-22 19:23:28 +03:00
ardocrat b5eeb37641 fix: resize to have correct multiplier of the system page size 2026-04-21 18:46:04 +03:00
ardocrat 5adec7ad13 build: remove unused dependency 2026-04-20 21:13:50 +03:00
ardocrat f9a04ff100 lmdb: ability to use multiple shared environments 2026-04-20 21:08:26 +03:00
ardocrat 08e95ce197 fix: revert chunk size to 128mb 2026-04-17 01:26:45 +03:00
ardocrat fcf0884b34 lmdb: single environment, migrate existing databases with provided non-default environment name 2026-04-17 00:44:09 +03:00
ardocrat 02cce56741 fix: check resizing operation and wait to avoid crash with multiple batches, fix exists check at batch 2026-04-16 14:30:36 +03:00
ardocrat 1036ca6ac1 db: migrate from lmdb-zero to heed 2026-04-16 12:12:34 +03:00
David Burkett 2ec7b4d5cd Bump version to v5.4.0 2026-03-09 10:44:03 -04:00
Yeastplume 9a23cfe483 Rust 1.80+ fixes & accumulated warning cleanup (#3796)
* Update versioning on master to 5.4.0-alpha.0

* updates for 1.80 and other accumulated warnings

* further warning cleanups

* move dead code tag to function defn rather than module
2024-09-12 20:59:40 +01:00
Yeastplume 503527c2e7 Update versioning on master to 5.4.0-alpha.0 (#3789) 2024-05-20 09:30:00 +01:00
Yeastplume 163ca397f4 Update versioning for 5.3.0, update grin_secp256k1zkp dependency (#3786) 2024-04-18 12:31:25 +01:00
Yeastplume 43b43d9749 croaring-rs upgrade 0.5.2 -> 1.0.1 (#3779)
* first pass compilation of croaring update

* cargo.lock

* add roaring arch flag into CI build scripts

* revert CI to use windows 2019 image

* add more debug

* more debug info

* update range arguments to bitmap remove_range function calls

* remove unnecessary cast
2024-02-06 16:33:32 +00:00
Yeastplume c48ba3e365 update development version 2024-01-25 12:08:34 +00:00
Yeastplume 70d45465c3 version number update for 5.2.0 tag 2024-01-25 10:53:10 +00:00
Yeastplume 5e2aa59a15 Update core references in grin_store crate to grin_core (#3771)
* update core references in grin_store

* remove redundant as clause
2023-10-03 09:15:47 +01:00
ard'O'crat 059ae0390d build: update croaring crate to fix bindgen errors for recent C compilers (#3770) 2023-09-28 11:58:11 +01:00
Yeastplume 94277bba9d update versioning to 5.2.0-beta.3 (#3766)
* update versioning to 5.2.0-beta.3

* cargo lock
2023-08-02 10:22:25 +01:00
Yeastplume b69f18d0a2 Update versioning for 5.2.0-beta.2 (#3760) 2023-06-28 10:46:28 +01:00
Yeastplume fd1410ebeb version change to 5.2.0-beta.1 for tag (#3753) 2023-06-12 10:10:42 +01:00
Yeastplume 684f0a387a updats to warnings, cargo.lock, version number (#3739) 2022-10-21 13:17:39 +01:00
Yeastplume 030bd0e1d9 [DNM] PIBD Task / Issue Tracker (#3695)
* [PIBD_IMPL] Introduce PIBD state into sync workflow (#3685)

* experimental addition of pibd download state for testnet only

* fixes to bitmap number of segments calculation + conversion of bitmap accumulator to bitmap

* attempt to call a test message

* add p2p methods for receiving bitmap segment and applying to desegmenter associated with chain

* fixes to state sync

* add pibd receive messages to network, and basic calls to desegmenter from each (#3686)

* [PIBD_IMPL] PIBD Desegmenter State (#3688)

* add functions to desegmenter to report next desired segments, begin to add state to determine which segments have been requested

* add segmentidentifier type to id requested segments uniquely

* make a call on where to keep track of which PIBD segments have been requested

* move segmenttype definition, add functions to manipulate peer segment list

* remove desegmenter state enum

* change chain desegmenter function to provide rwlock

* trace, warning cleanup

* udpate to test compliation

* [PIBD_IMPL] Bitmap accumulator reconstruction + TxHashset set reconstruction (#3689)

* application of received bitmap segments to local accumulator

* add all required elements to send/receive output segment requests and responses

* testing of output sync

* add special cases to pmmr segment request

* [PIBD_IMPL] PMMR Reassembly from Segments (#3690)

* update pibd copy test to use new desgmenter structure

* begin reconstruction of output pmmr

* clean up hash/leaf insertion logic

* push pruned subtree appears to be working, now also calculates left hand hashes correctly

* factor out ordering of segment/hash order array

* refactor for pmmr application code

* test of chain copy appears to be working

* add rangeproof functions to desegmenter

* add kernel functions, attempt refactor

* small test cleanup, reconstruction of live chain working in manual copy test

* [PIBD_IMPL] PIBD tree sync via network and kill/resume functionality (#3691)

* add functions to determing latest verifiable block height for the given pibd state

* attempting to allow for pibd to resume after killing process

* fix to ensure prune list is properly flushed during pibd sync

* removal of unneeded code

* ignore test for now (fix before full merge)

* [PIBD_IMPL] Finalize PIBD download and move state to chain validation (#3692)

* investigations as to why a slight rewind is needed on startup during PIBD

* move validation code into desegmenter validation thread (for now)

* ensure genesis entries in pmmrs are removed if they're removed in the first segment

* validation all working except for verifying kernel sums

* remove unneeded pmmr rollbacks on resume now root cause was found

* updates to remove unpruned leaves from leaf set when rebuilding pmmr

* remove + 1 to segment traversal iter length

* [PIBD_IMPL] PIBD Stats + Retry on validation errors (#3694)

* start to add stats and reset chain state after errors detected

* add functions to reset prune list when resetting chain pibd state

* debug statement

* remove test function

* [PIBD_IMPL] Update number of simultaneous peer requests for segments (#3696)

* cleanup of segment request list

* allow for more simultaneous requests during state sync

* up number of simultaneous peer requests for segments

* [PIBD_IMPL] Thread simplification + More TUI Updates + Stop State Propagation (#3698)

* change pibd stat display to show progress as a percentage of downloaded leaves

* attempt some inline rp validation

* propagate shutdown state through kernel validation

* change validation loop timing

* simplify validator threading

* add more detailed tracking of kernel history validation to tui, allow stop state during

* adding more stop state + tui progress indication

* remove progressive validate

* test fix

* revert to previous method of applying segments (#3699)

* fix for deadlock issue (#3700)

* update Cargo.lock for next release

* [PIBD_IMPL] Catch-Up functionality + Fixes based on testing (#3702)

* ensure desegmenter attempts to apply correct block after a resumte

* ensure txhashset's committed implementation takes into account output bitmap for summing purposes

* remove check to de-apply outputs during segment application

* return removal of spent outputs during pibd

* remove unneeded status

* remove uneeded change to rewind function

* documentation updates + todo fixes (#3703)

* add pibd abort timeout case (#3704)

* [PIBD_IMPL] BitmapAccumulator Serialization Fix (#3705)

* fix for writing / calculating incorrect length for negative indices

* update capabilities with new version of PIBD hist

* remove incorrect comment

* fix capabilities flag, trace output

* test fix

* Merge DNSSeed scope changes into pibd impl branch (#3708)

* update Cargo.lock for next release

* visibility scope tweaks to aid seed test utilities (#3707)

* move all PIBD-related constants into pibd_params modules (#3711)

* remove potential double read lock during compaction
2022-10-18 09:23:29 +01:00
Yeastplume a14a8e3123 Thiserror changeover (#3728)
* WIP remove failure from all `Cargo.toml`

* WIP remove `extern crate failure_derive`

* Use `thiserror` to fix all errors

* StoreErr is still a tuple

* Remove another set of unnecessary `.into()`s

* update fuzz tests

* update pool/fuzz dependencies in cargo.lock

* small changes based on feedback

Co-authored-by: trevyn <trevyn-git@protonmail.com>
2022-07-14 11:08:13 +01:00
Yeastplume 63c65605bb [SYNC PERFORMANCE] Adjust DifficultyIterator to no longer deserialize PoW proof nonces (#3671)
* replace bitvec with more efficient bitpack algorithm

* optimise proof_unpack_len

* move proof pack length calculation

* small refactor

* first pass attempt at not deserializing proof nonces in difficulty iter

* another 10 seconds gained by not deserialising the proof from the difficulty iterator

* add new deser parameters to tests where needed

* add skip_proof variants to store

* remove hash from difficulty iterator struct, rename HeaderInfo to HeaderDifficultyInfo

* replace bitvec with more efficient bitpack algorithm

* optimise proof_unpack_len

* move proof pack length calculation

* small refactor

* first pass attempt at not deserializing proof nonces in difficulty iter

* another 10 seconds gained by not deserialising the proof from the difficulty iterator

* add new deser parameters to tests where needed

* add skip_proof variants to store

* remove hash from difficulty iterator struct, rename HeaderInfo to HeaderDifficultyInfo
2021-12-10 11:39:39 +00:00