V28.0
Major updates
Bounded Block Backlog
The Bounded Block Backlog (BBB) adds a maximum limit for unconfirmed transactions (currently 100,000), helping prevent resource exhaustion attacks & ensuring more consistent confirmation rates during high network load.
Traffic Shaping
Traffic shaping complements the fair queuing system implemented in V27, by managing outbound network traffic more intelligently. This helps ensure more equal distribution of bandwidth between peers, reduces network congestion, & helps maintain performance during peak network usage.
RocksDB Optimizations
Nano's RocksDB implementation has been updated to V9.7.2, and the default configuration settings have been updated to match current best practices. Additionally, a range of improvements related to memory usage, thread handling, & lock management have been included, improving stability and performance for nodes using the RocksDB database backend.
Vote Generation Improvements
The vote generation system has been redesigned to be more resource-efficient, reducing CPU usage, improving priority vote processing, & bundling votes more intelligently.
Vote Filter Implementation
A new vote filter implements sophisticated deduplication and relevancy checks, eliminating redudant votes, reducing bandwidth usage, lowering memory usage, & reducing overall network load.
Vote Rebroadcasting Overhaul
The vote_rebroadcaster component was overhauled, making vote rebroadcasting smarter & more efficient. Previously we used a simple queue with a naive filter which rebroadcasted all processed votes. Since a vote can contain up to 255 hashes and the same vote can be processed multiple times depending on the exact timing of election activation, this introduced a rather significant inefficiency where we could rebroadcast the same vote multiple times, wasting bandwidth. The vote rebroadcaster overhaul significantly improves this by improving tracking & filtering of vote rebroadcasts.
Bootstrap & Database Optimizations
Bulk frontier scanning has been added to the ascending bootstrapper, processing up to 1,000 accounts simultaneously. I/O overhead has also been reduced through smart caching and optimised database queries. Additionally, a new fork_cache
& block bootstrapping improvements were added, speeding up fork resolution during certain bootstrap scenarios.
Legacy Code Removal
The legacy bootstrapper has been completely removed, simplifying the codebase & improving code maintability.
Bug fixes
Several bugs were fixed, including race conditions, missing notifications, & dependency issues.
Upgrade notices
RPC changes
Bootstrap RPCs
The following bootstrap related RPC commands have been extended, modified, or added:
bootstrap_status
: previously this returned the status of legacy bootstrap; modified to return the status of ascending bootstrapbootstrap_reset
: resets ascending bootstrap state, both priority and blocking sets are clearedbootstrap_priorities
: dumps info about priority and blocking sets to aid in debugging any potential problems
Please note that the above bootstrap RPC commands are internal/diagnostic RPCs, & may not be stable.
Confirmation_info RPC
This is a backwards compatible change that updated the confirmation_info
RPC call to include a list of representatives_final
(representatives that have voted with final votes). Thanks to MajorChump for submitting this PR!
Ratio & Conversion related RPCs
Xrb_ratio has been removed and replaced with nano_ratio:
Existing name | ratio | Value | New name |
---|---|---|---|
Gxrb_ratio | 10^33 | 1000 nano | Knano_ratio |
Mxrb_ratio | 10^30 | 1 nano | nano_ratio |
kxrb_ratio | 10^27 | 0.001 nano | removed |
xrb_ratio | 10^24 | 0.000001 | removed |
The following deprecated RPC endpoints for conversion have been removed:
krai_from_raw
krai_to_raw
mrai_from_raw
mrai_to_raw
rai_from_raw
rai_to_raw
For alternatives, see Unit Conversion RPCs
Other RPC Changes
An optional include_linked_account
parameter was added to the account_history
, block_info
, and blocks_info
RPC endpoints. When enabled, the response will include a new field linked_account
, which returns the linked account associated with the block (or "0" if no linked account exists/was found e.g. due to pruning). Thanks to Exxenoz for submitting this PR!
Config changes
While the previous toml for database backend configuration is still supported for now, it is being replaced by database_backend = "lmdb"
or database_backend = "rocksdb"
under [node]
.
Consider reviewing and updating your configuration files with the --update_config
or --generate_config
CLI parameters. Review the toml config quick reference, or the CLI documentation for additional details.
Known Issues
Bootstrapping from scratch with pruning enabled causes the node to crash. As a potential workaround, node operators may be able to bootstrap with pruning disabled, and then enable pruning after bootstrapping is complete. A higher max_pruning_depth may also reduce the frequency of crashes. Pruning is considered experimental, so use it at your own risk - pruning is not currently recommended for important production services.
Docker Image
The official Docker tag for the V28.0 release is nanocurrency/nano:V28.0
.
See Pulling the Docker Image for more details.
Changelog
Bootstrapping
- Use chrono timestamps in ascending bootstrap code by @pwojcikdev in #4687
- Revert account store iterator in
bootstrap_server
by @pwojcikdev in #4688 - Ascending bootstrap dependency resolution by @pwojcikdev in #4692
- Fix handling of
gap_previous
by @pwojcikdev in #4696 - More bootstrap fixes by @pwojcikdev in #4699
- Bootstrap config tuning by @pwojcikdev in #4698
- Update live network bootstrap weights by @clemahieu in #4710
- Bootstrap weights in plain text by @RickiNano in #4703
- Frontier scan client by @pwojcikdev in #4739
- Remove legacy bootstrap by @pwojcikdev in #4777
- Bootstrap tuning by @pwojcikdev in #4784
- Optimize Vote Request Behavior During Bootstrapping by @gr0vity-dev in #4798
- Bootstrap tuning by @pwojcikdev in #4806
- Handle
gap_epoch_open_pending
block status when bootstrapping by @pwojcikdev in #4821 - Fix incorrect tag hash when requesting blocks by frontier by @simpago in #4845
- Decay bootstrap blocking set by @pwojcikdev in #4844
- Rate limiter for bootstrap server by @pwojcikdev in #4818
- Updated bootstrap weights by @RickiNano in #4843
Database / Ledger
- Revert ledger account iterator by @pwojcikdev in #4706
- Partially revert receivable iterator by @clemahieu in #4711
- Perform ledger upgrade in batches by @pwojcikdev in #4714
- Fix database iterator-transaction lifetimes by @pwojcikdev in #4713
- Rocksdb overhaul and clean up by @RickiNano in #4730
- Migration progress in percentage by @RickiNano in #4725
- Rocksdb tx cleanup by @clemahieu in #4737
- Database scan improvements by @pwojcikdev in #4734
- Simplified RocksDb migration logic by @RickiNano in #4740
- Database scan fix by @pwojcikdev in #4742
- Various cleanups to store classes by @clemahieu in #4760
- Pass transaction in to end iterator for future use. by @clemahieu in #4761
- Convert store iterators to variants rather than using polymorphism. by @clemahieu in #4759
- Use unique_ptr with LMDB resources to prevent leaks by @clemahieu in #4770
- Exit migration if existing rocksdb ledger found by @RickiNano in #4778
- Fix database write guard by @pwojcikdev in #4780
- Fix out of order ledger notifications by @pwojcikdev in #4824
- Pass node config directly to make_store function by @RickiNano in #4826
- Extract pruning class by @pwojcikdev in #4825
- Database backend configuration by @RickiNano in #4828
Consensus / Elections / Voting / Confirmation
- Bound the growth of
election_winner_details
set by @pwojcikdev in #4720 - Cementing fixes by @pwojcikdev in #4722
- Vote size histogram by @pwojcikdev in #4751
- Remove
election_winner_details
container by @pwojcikdev in #4755 - Activate cemented blocks by @pwojcikdev in #4757
- Simplify vote generator by @RickiNano in #4748
- Optimize vote distribution between PRs and non-PRs by @gr0vity-dev in #4766
- Offload block processor notifications by @pwojcikdev in #4763
- Fix vote generator stopping by @pwojcikdev in #4788
- Remove
node::process_confirmed (...)
by @pwojcikdev in #4758 - Rework random block sampling for rep crawler by @pwojcikdev in #4792
- Offload rollback notifications to background thread by @pwojcikdev in #4791
- Backlog scan refactoring by @pwojcikdev in #4790
- Bounded backlog by @pwojcikdev in #4787
- Make election behavior mutable to support dynamic behaviour transition by @gr0vity-dev in #4799
- Fix timing issue in active_elections.fork_replacement_tally by @gr0vity-dev in #4802
- Reduce likelyhood of race in node.fork_publish by @gr0vity-dev in #4804
- Use new priority timestamp in priority scheduler by @simpago in #4809
- Do not add processed live traffic into priorities by @gr0vity-dev in #4801
- Overhaul of
online_reps
class by @pwojcikdev in #4656 - Fix activate immediately logic by @pwojcikdev in #4822
- Extract
vote_rebroadcaster
by @pwojcikdev in #4830 - Only query confirmed blocks in rep crawler by @pwojcikdev in #4837
- Differentiate normal and final generator thread roles by @pwojcikdev in #4838
- Improve handling of rep weights snapshots by @pwojcikdev in #4847
- Online weight tracking improvements by @pwojcikdev in #4854
- Differentiate between final and non-final vote generator stats by @pwojcikdev in #4857
- Vote rebroadcasting overhaul by @pwojcikdev in #4849
- Rep crawler should track local representatives by @pwojcikdev in #4858
- Querying local reps wasn't throttled properly by @pwojcikdev in #4860
Networking / P2P / Telemetry
- Fixes for
port_mapping
by @pwojcikdev in #4690 - Disable telemetry replies by @pwojcikdev in #4695
- Add bucket that was accidentally removed during refactor of buckets. by @clemahieu in #4715
- Network filter for votes by @pwojcikdev in #4735
- Use channel as telemetry data key by @pwojcikdev in #4697
- Fix mismatched channel owners by @pwojcikdev in #4750
- Channel class cleanup by @pwojcikdev in #4749
- Fix
tcp_socket::type()
race by @pwojcikdev in #4775 - Per traffic type stats by @pwojcikdev in #4785
- Bucketing component by @pwojcikdev in #4794
- Traffic shaping by @pwojcikdev in #4786
- Change fanout to scale by std::log rather than std::sqrt by @clemahieu in #4835
- Filter channels with spare capacity when broadcasting by @pwojcikdev in #4848
RPC / API / Websocket
- Revert "Rewrite json_handler::unopened in terms of receivable iterators" by @clemahieu in #4707
- Fix regression account history when querying open state blocks by @clemahieu in #4709
- Add block hash to websocket
new_block_arrived
by @gr0vity-dev in #4729 - Move http callbacks logic out of node class by @pwojcikdev in #4816
- Websocket: Add
linked_account
to block content of confirmation topic by @Exxenoz in #4833 - RPC: Include optional
linked_account
field in account_history, block_info, and blocks_info RPCs by @Exxenoz in #4841 - Fix websocket confirmation options handling by @gr0vity-dev in #4855
- Extend bootstrap related RPC commands by @pwojcikdev in #4820
Testing / CI / Development Process
- Fix test logging by @pwojcikdev in #4693
- Rework
broadcast_block_on_arrival
test by @pwojcikdev in #4723 - Improve
nano::test::system::add_node (...)
by @pwojcikdev in #4731 - Log test system exceptions by @pwojcikdev in #4746
- GitHub workflow updates by @pwojcikdev in #4756
- Disable backtrace in CI build until backtrace log linking is resolved. by @clemahieu in #4764
- Enable reporting memory leaks when running sanitizers by @pwojcikdev in #4769
- Fix
epoch_conflict_confirm
test by @pwojcikdev in #4779 - Remove
Develop Branch Dockers Deploy
workflow by @pwojcikdev in #4796 - Fix
rep_self_vote
test by @pwojcikdev in #4797 - Fix flaky inactive_votes_cache.election_start test by @gr0vity-dev in #4803
- Fix ledger_priority.sequential_blocks testcase by @gr0vity-dev in #4805
- Organize socket tests by @pwojcikdev in #4808
- Request aggregator tests by @pwojcikdev in #4823
- Fix
bootstrap_fork_open
test by @pwojcikdev in #4827 - Tests for
frontier_scan
class by @pwojcikdev in #4829 - Disable
peer_container.list_fanout
test by @pwojcikdev in #4834 - Fix races in
optimistic_scheduler
tests by @pwojcikdev in #4850 - Include status code in assertions by @pwojcikdev in #4865
Configuration
- Rework configs for backlog, telemetry and bandwidth limiter by @pwojcikdev in #4728
- Compile time autumn2024 by @clemahieu in #4776
- Cleanup
tcp_config
class by @pwojcikdev in #4813 - Make network settings configurable by @pwojcikdev in #4839
Build System / Dependencies
- Update CPACK_PACKAGE_VERSION_MAJOR to 28 by @github-actions in #4686
- Update miniupnp to 2.3.6 by @clemahieu in #4700
- Fix two boost dependency issues by @clemahieu in #4716
- Update to RocksDb V9.7.2 by @RickiNano in #4753
- Update boost to 1.86 by @pwojcikdev in #4743
- Removing lines in build scripts because bash. by @clemahieu in #4765
- Link boost stacktrace appropriately for line information. by @clemahieu in #4771
- Remove unnecessary com file for Win by @RickiNano in #4863
- Use the latest c++ redist for windows build by @RickiNano in #4864
Code Quality / Refactoring / Performance / Documentation
- Fixed spelling in comments by @RickiNano in #4726
- Replace legacy XRB ratios by @RickiNano in #4733
- Updated gxrb -> knano ratio in comments by @RickiNano in #4738
- Rework
collect_container_info (..)
functions by @pwojcikdev in #4736 - Factor utility functions by @clemahieu in #4745
- Use spaceship comparisons by @pwojcikdev in #4767
- Rework
nano::thread_pool
by @pwojcikdev in #4762 - Modify
observer_set
to only accept and pass const ref arguments by @pwojcikdev in #4768 - Move assert to a dedicated header by @pwojcikdev in #4773
- Delete unused declarations by @RickiNano in #4781
- Prettify ledger constants by @pwojcikdev in #4793
- Readme update by @pwojcikdev in #4795
- Move network_constants to a dedicated header by @pwojcikdev in #4800
- Rename
blockprocessor
toblock_processor
for consistency by @pwojcikdev in #4812 - Use unique ptrs for all node components by @pwojcikdev in #4814
- Uniform indentation for nested namespaces by @pwojcikdev in #4817
- Remove unused
process_live_dispatcher
by @pwojcikdev in #4831 - Modify
nano::locked
to work in const contexts by @pwojcikdev in #4846
Logging & Diagnostics
- More comprehensive logging of wallet actions by @pwojcikdev in #4815
- Avoid unnecessary string allocations when logging by @pwojcikdev in #4832
- Remove unnecessary stacktrace call by @pwojcikdev in #4836
- Log ledger data path on startup by @pwojcikdev in #4852
- Avoid unnecessary stacktrace when logging expected errors by @pwojcikdev in #4856
Core / Bug Fixes
- Fix correctness, sanity check, and resolve shutdown issue. by @clemahieu in #4719
- Disallow database operations on network IO threads by @pwojcikdev in #4772
Full Changelog: V27.1...V28.0