Commit Graph

2552 Commits

Author SHA1 Message Date
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 af0c1dca02 pibd: fix check for next required kernel segment (#3822) 2026-03-25 08:29:15 -04:00
David Burkett 2ec7b4d5cd Bump version to v5.4.0 2026-03-09 10:44:03 -04:00
David Burkett 41e50cda8f Fix macOS x86 release workflow 2026-03-08 14:49:22 -04:00
David Burkett 789ff2859c Prep for release 2026-03-08 14:32:26 -04:00
ardocrat c2abf1ecf0 GHCR: add arm platform, crash fixes (#3819)
* ghcr: add arm platform, remove attestation

* ghcr: checkout code to get version

* ghcr: fix tag var format

* docker: --no-tui flag for entrypoint

* docker: install ca-certificates to be able to use grin client inside container

* docker: add default volume, expose API port exposable by making IP address public
2026-02-27 11:52:31 -05: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
ardocrat ddea797c0a Disable TUI on binary launch (#3818)
* adding --no-tui

* revert next line

* english comments

* bin: more detailed no-tui flag description

---------

Co-authored-by: Jörg Wieschebrock <Joerg.Wieschebrock@krone.de>
2026-01-08 14:40:42 -05:00
ardocrat da7b6b5c50 Docker package build (#3816)
* bin: ability to use chain type argument for 'run' subcommand

* docker: single image for mainnet and testnet, update build docs

* docker: root user

* github: ghcr publish

* github: build image for master branch only

* docs: fix paths

* docker: move 'server run' to command

* Revert "bin: ability to use chain type argument for 'run' subcommand"

This reverts commit fc2d9199c3ff80c5c7305e3fc5b1f6fe86e8dacf.

* docker: disable tui at config
2026-01-06 13:39:18 -05:00
ardocrat dc6f8d2520 GitHub ci/cd fix (#3815)
* cd: windows-latest

* ci: windows-latest

* ci: windows-2022

* cd: windows-2022

* build: update built lib
2025-11-22 15:56:35 +01:00
wiesche cda55ce6fc Extension Grin Node API during synchronization #3813 (#3814) 2025-11-20 12:10:51 -05:00
Yeastplume 8e79856168 Upgrade Tokio to v1.x and Hyper to v0.14 (#3804)
* update of tokio and related dependencies to 1.x

* update to hyper 0.14

* fixes to http connector for tests
2025-03-08 11:54:13 +00:00
Yeastplume b93d88b58c Addition of seed-check logic to top-level crate (#3801)
* Addition of initial seed check logic

* updated to call from command line, now need to do something about peer store root output

* rework check to delete temp files, add output options, testing
2024-11-27 14:01:38 +00:00
Yeastplume 6c012043c0 Add Devcontainer Support (#3799)
* attempt at dual mac builds

* add initial devcontainer

* correct dependency import
2024-11-13 12:04:02 +00:00
yeastplume 118f885468 add rustup target to mac x86_64 build 2024-11-05 10:46:06 +00:00
Yeastplume 2d60c5178b attempt at dual mac builds (#3798) 2024-11-05 10:25:24 +00:00
aglkm 01b25650e2 Chain type field (#3790)
* Adding chain type field into get_status rpc

* formatting
2024-09-12 21:03:51 +01: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 845c41de13 Remove Merkle Proof Generation from Foreign API get_outputs (#3792)
* Update versioning on master to 5.4.0-alpha.0

* Remove merkle proof generation from foreign API
2024-06-18 11:44:17 +01:00
Yeastplume 503527c2e7 Update versioning on master to 5.4.0-alpha.0 (#3789) 2024-05-20 09:30:00 +01:00
Yeastplume c0f48f1528 Update grin_secp to 0.7.14 (#3788) 2024-05-13 13:19:27 +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 c5efaa4e7c more chrono warnings, update cursive lib (#3778) 2024-01-29 12:50:45 +00:00
Yeastplume d1b7ae5352 warning cleanup (#3759) 2024-01-29 09:23:38 +00:00
Quentin Le Sceller a9f45dee2b Remove Azure Pipelines and add Github Actions (#3765)
* Remove Azure Pipelines and add Github Actions

* Trigger CI on push and pull request
2024-01-26 12:58:52 +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 05ec6fda38 [PIBD] Fix to restart of PIBD download on corrupted data or mismatched roots (#3775)
* process restart

* remove trace statements

* remove further debug statement

* remove further debug statement
2023-10-31 12:18:17 +00:00
ard'O'crat 213dfd4f19 Handle invalid MMR root to prevent sync thread panic (#3774)
* fix: handle invalid mmr root to prevent sync thread panic

* test: fix roots check
2023-10-31 11:23:19 +00:00
Yeastplume 5dcbe96d5c set tail height to include genesis (#3773) 2023-10-04 08:55:19 +01: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
John Tromp 399fb19c30 Fix leading zeroes bugs (#3763)
* remove two unneeded mut's

* ensure correct size for leading_zeros()
2023-07-20 14:25:53 +01:00
Yeastplume b69f18d0a2 Update versioning for 5.2.0-beta.2 (#3760) 2023-06-28 10:46:28 +01:00
Yeastplume 2273ea986d PIBD - Revert earlier pibd_aborted flag in sync logic (#3757)
* revert earlier pibd_aborted flag in sync logic

* formatting
2023-06-22 14:39:19 +01:00
ard'O'crat 45ebc8ae50 pibd: save latest_block_height to request less data from db when checking progress (#3756) 2023-06-20 12:13:15 +01:00
Yeastplume fd1410ebeb version change to 5.2.0-beta.1 for tag (#3753) 2023-06-12 10:10:42 +01:00
Yeastplume 01370d74ff Foreign API: Bulk block request (#3751)
* remove non-mainnet check for PIBD requests

* add first version of get blocks function

* .\api\src\foreign.rs

* add a max value to get_blocks, documentation

* typo

* updates based on feedback
2023-06-12 09:41:08 +01:00
Yeastplume 0649ba9645 'Turn on' PIBD on main-net, in advance of 5.2.0 release (#3750)
* remove non-mainnet check for PIBD requests

* remove surplus flag

* use matches! macro

* fix match logic

* correct match logic
2023-06-06 12:24:26 +01:00
Yeastplume f6b3d5a8f6 Update Cargo.lock (#3749) 2023-06-06 11:36:16 +01:00
Yeastplume c31921f4d9 core wrapper function for subtract signature function (#3748)
* core wrapper function for subtract signature function

* revert to cargo lock from master
2023-05-25 13:43:10 +01:00
Yeastplume 11b5cdb7d6 update working version of rust-secp256k1-zkp to 0.7.12 2023-05-17 09:23:35 +01:00
chives101 de94f95cda feat: Add nix/flake support (#3743)
* CI update - Ubuntu Image

* Add nix/flake support

Example:

nix build github:mimblewimble/grin

./result/bin/grin --help

* Ignore ./result in git repo

result is the default symlink output for nix build

---------

Co-authored-by: chives101 <chives101@users.noreply.github.com>
2023-05-02 19:34:37 +02:00
Yeastplume 684f0a387a updats to warnings, cargo.lock, version number (#3739) 2022-10-21 13:17:39 +01:00
Yeastplume 34d23f5235 update seed lists for mainnet and testnet (#3738) 2022-10-21 09:03:50 +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
thaddeus 529ce44219 Override global one times. (#3737)
* Minor update for foreign api docs. Peers seems to be no longer needed as an arg in the grin_api::Foreign::new.

* This changes foreign_rpc and owner_rpc modules to public so the helper modules for the rpc clients can be accessible in external projects.

* Updated test seeds.

* Added functions that override the one time globals. This is needed for the grin-gui so it can change the global contexts when it needs to switch from testnet to mainnet.

* Refactor

* Fix panick at 'attempt to subtract with overflow' when grin-wallet sends in a start_index of 0 for new wallets.

* Fix overflow panic using saturating_sub(1).
2022-10-07 10:37:32 +01:00