502 Commits

Author SHA1 Message Date
ardocrat bce5a7144b Merge branch 'master' into grim
Continuous Integration / Linux Tests (api) (push) Has been cancelled
Continuous Integration / Linux Tests (chain) (push) Has been cancelled
Continuous Integration / Linux Tests (core) (push) Has been cancelled
Continuous Integration / Linux Tests (keychain) (push) Has been cancelled
Continuous Integration / Linux Tests (p2p) (push) Has been cancelled
Continuous Integration / Linux Tests (pool) (push) Has been cancelled
Continuous Integration / Linux Tests (servers) (push) Has been cancelled
Continuous Integration / Linux Tests (src) (push) Has been cancelled
Continuous Integration / Linux Tests (store) (push) Has been cancelled
Continuous Integration / Linux Tests (util) (push) Has been cancelled
Continuous Integration / macOS Tests (push) Has been cancelled
Continuous Integration / Windows Tests (push) Has been cancelled
# Conflicts:
#	p2p/Cargo.toml
2026-06-11 10:35:27 +03:00
ardocrat b41a0cc209 Merge branch 'staging' into grim
# Conflicts:
#	store/src/lmdb.rs
2026-06-11 10:34:22 +03:00
David Burkett a25fde9674 Bump version to v5.4.1 2026-06-10 20:50:21 -04:00
David Burkett 62e5ace442 pibd: bound segment decoding allocations (#3850) 2026-06-10 12:02:01 -04:00
wiesche cf2ed3f3be propagate lmdb iterator page errors (#3849) 2026-06-07 21:57:43 +02:00
ardocrat 386ac1ed5c Merge remote-tracking branch 'grin_ardocrat/lmdb_update' into grim 2026-06-04 17:47:57 +03:00
ardocrat 110e0e143f Migrate from lmdb-zero to heed (#3825)
* db: migrate from lmdb-zero to heed

* fix: check resizing operation and wait to avoid crash with multiple batches, fix exists check at batch

* build: fix missing deps at Cargo.lock

* lmdb: single environment, migrate existing databases with provided non-default environment name

* fix: revert chunk size to 128mb

* lmdb: ability to use multiple shared environments

* build: remove unused dependency

* fix: resize to have correct multiplier of the system page size

* lmdb: speed up prefix iter by storing keys

* lmdb: default env name

* lmdb: wait db resize before read, reduce timeout before resizing

* lmdb: use static reader for iterator, count existing batches for stable resize

* fix: check batches count on resize waiting

* lmdb: use separate databases instead of prefixes, use default db for values without prefixes, migrate old environment

* fix: pop pos key

* lmdb: count all open transactions to finish before resizing

* lmdb: immediate resize if there are no open transactions

* lmdb: remove env state when there are no more stores

* lmdb: use atomic for resize and resize checking flags

* lmdb: sleep 10ms when waiting all opened txs to be closed

* lmdb: use atomic open txs and stores count

* lmdb: use index to detect separator, ignore unknown db key to not have a panic

* lmdb: store max 10k keys in the iterator

* lmdb: check iter result on getting total

* lmdb: handle errors at iterator

* lmdb: handle an error when db with provided key not found

* lmdb: fix iterate over 10k keys

* lmdb: document migration resize safety

* lmdb: fix iter test

* lmdb: clear new db after unsuccessful migration, handle read error on migration to interrupt process

* store: bring back old key methods to reproduce data migration

* lmdb: return an error on unsuccessful migration

* lmdb: migration test, clean data after allocate test

* lmdb: info migration log

* fix: move iterator before handling an error to allow skip bad value

* lmdb: return an error if removal of old DB file failed after migration

* lmdb: lifetime for iterator, use write transaction at batch iterator

* lmdb: migration progress

* fix: tests

* lmdb: immediately set resizing flag, ignore resizing flag while there are more than 0 opened txs to avoid stuck, optimize tx counter for some operations

* lmdb: key for successful migration

* lmdb: fix put database creation at separate block to avoid lifetime issues when returning an error on migration
2026-06-02 13:53:53 +02:00
ardocrat ebcf7feb28 lmdb: migration progress 2026-06-01 17:29:53 +03:00
ardocrat 00685a45c3 Merge branch 'staging' into lmdb_update 2026-06-01 14:48:24 +03:00
Noobvie 8688a98e4f Change default IP address for P2PConfig to IPv6 (#3843)
* Change default IP address for P2PConfig to IPv6

Feature request: Change default P2P listen host from 0.0.0.0 to :: for dual-stack IPv4+IPv6 support.
As tested on several windows/linux machines and not found issue. Worked with ipv4 or ipv6 or dual ipv4+ipv6.

* docs+config add p2p listen host options

---------

Co-authored-by: Joerg <wiesche89@googlemail.com>
2026-05-27 21:34:48 +02:00
ardocrat f3796fa27b Merge branch 'lmdb_update' into grim 2026-05-26 16:30:10 +03:00
ardocrat 6d10beaaa2 lmdb: lifetime for iterator, use write transaction at batch iterator 2026-05-25 21:48:05 +03:00
ardocrat dc7b49004d Merge branch 'lmdb_update' into grim 2026-05-20 20:08:28 +03:00
ardocrat 22e34311b8 Merge branch 'pibd_peers_fix' into grim 2026-05-20 20:05:52 +03:00
ardocrat a24f30e3ae Merge branch 'staging' into lmdb_update 2026-05-18 23:25:36 +03:00
ardocrat fc66b73e5b lmdb: handle errors at iterator 2026-05-17 12:36:31 +03:00
ardocrat 2d0ce2d526 Merge branch 'rust_edition' into grim
# Conflicts:
#	.github/workflows/publish-ghcr.yaml.yml
#	p2p/Cargo.toml
#	p2p/src/msg.rs
#	p2p/tests/peer_handshake.rs
2026-05-14 22:52:52 +03:00
ardocrat 048453f989 peers: keep blocked list into memory till restart or pibd finish 2026-05-14 22:32:01 +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 86eaa7b7ac fix: add missed build to grin_p2p from staging branch 2026-05-14 12:57:01 +03:00
ardocrat fde914d11a Merge branch 'staging' into rust_edition 2026-05-14 12:33:41 +03:00
ardocrat 473f9f33ad build: update rust edition 2021 2026-05-14 11:57:20 +03:00
ardocrat 0321bf5b14 fix: peers iterator to unblock blocked 2026-05-14 11:54:54 +03:00
ardocrat 894d9e5551 Include git info into docker build, show git ref at version (#3829)
* ci: include .git directory into build

* p2p: include git ref into version for user agent, show git commit hash instead of last tag into log

* p2p: do not show anything after version if git commit hash is empty

* fix: user agent typo
2026-05-13 20:17:26 +02:00
ardocrat fb87a26d3f p2p: fix test for user agent 2026-05-02 21:14:36 +03:00
ardocrat 5bebacd605 node: include git hash into user agent 2026-05-02 20:55:32 +03:00
ardocrat 95486a4bc0 node: custom agent test 2026-05-01 12:44:45 +03:00
ardocrat 0ea779e777 node: custom agent 2026-05-01 12:31:52 +03:00
ardocrat 2164f6098f Merge branch 'lmdb_update' into grim 2026-04-27 22:28:14 +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 13cfef93ec Merge branch 'lmdb_update' into grim 2026-04-24 18:14:55 +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 ab907508c7 Merge branch 'master' into pibd_peers_fix 2026-04-22 11:08:02 +03:00
ardocrat 0c3e18a913 Merge branch 'refs/heads/lmdb_update' into grim 2026-04-16 14:54:33 +03:00
ardocrat 1036ca6ac1 db: migrate from lmdb-zero to heed 2026-04-16 12:12:34 +03:00
ardocrat 90dab5fcc6 More reliable peers check (#3824)
* peer: unknown state for new peers, check peers state on every monitor (128 healthy non-connected + 128 defuncts + 128 unknown), mark peer as defunct when ping not passed, do not crash on toml parse with dns failure

* p2p: cleanup before selection at monitor, add outbound to connected list only when there is not enough peers + disconnect extra peer immediately, reconnect to seeds at monitor to avoid stuck, update only defunct state to unknown when received existing peer address

* p2p: reduced amount of total peers to check at monitor

* p2p: do not check healthy and defunct peers more often than once per hour, store last connection attempt, do not ask for more peers when there is enough outbound

* peer: update last_attempt when changing peer state to other than Banned

* fix: log of peers amount to check
2026-04-09 11:55:22 -04:00
ardocrat cc555a22fb Merge branch 'refs/heads/peers_fix' into grim 2026-04-09 04:40:16 +03:00
ardocrat b172256d0b peer: update last_attempt when changing peer state to other than Banned 2026-04-09 04:22:02 +03:00
ardocrat 1258b844f3 p2p: do not check healthy and defunct peers more often than once per hour, store last connection attempt, do not ask for more peers when there is enough outbound 2026-04-09 04:15:19 +03:00
ardocrat 3787881673 Merge remote-tracking branch 'grin_ardocrat/peers_fix' into grim 2026-04-06 02:27:21 +03:00
ardocrat 9585c02135 p2p: cleanup before selection at monitor, add outbound to connected list only when there is not enough peers + disconnect extra peer immediately, reconnect to seeds at monitor to avoid stuck, update only defunct state to unknown when received existing peer address 2026-04-06 01:44:22 +03:00
ardocrat ab9715d9a9 peer: unknown state for new peers, check peers state on every monitor (128 healthy non-connected + 128 defuncts + 128 unknown), mark peer as defunct when ping not passed, do not crash on toml parse with dns failure 2026-04-04 01:58:35 +03:00
ardocrat 464babc7ef peer: block only non-blocked to not increase times for several requests 2026-03-30 23:09:09 +03:00
ardocrat d9bca1c776 pibd: choose peers based on minimal height, temporary block peers for stale segments disconnecting only outbound, force request for output and rangeproof segments to avoid stuck at this case 2026-03-30 15:26:29 +03:00
David Burkett 2ec7b4d5cd Bump version to v5.4.0 2026-03-09 10:44:03 -04:00
ardocrat 376c85bab5 Fix PIBD sync stuck (#3817)
* pibd: record segment peer to exclude it from re-request

* desegmenter is blocked on a missing kernel

* segment iter

* add indexing

* pibd: log excluded peer

* segment batch optimization

* pibd: debug logging for stale requests

* pibd: filter excluded peer

* pibd: check existing kernel segment identifier

* pibd: simplify peer selection condition

---------

Co-authored-by: Joerg <wiesche89@googlemail.com>
2026-01-08 14:40:59 -05: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 d1b7ae5352 warning cleanup (#3759) 2024-01-29 09:23:38 +00:00
Yeastplume c48ba3e365 update development version 2024-01-25 12:08:34 +00:00