Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address Tracker for subscriptions to changed UTXOs notifications (kas…
…panet#427) * Add an integration test covering UTXOs propagation * Refactor daemon_utxos_propagation_test() * Add heap profiling feature * Cover VirtualDaaScoreChanged notifications in test * Merge branch 'master' into rpc-memory-benchmark * Assert all changed UTXOs * Use UtxosChangedScope ctor * Make active non-blanket UtxosChanged subscription unique * Refactor broadcaster subscription unregistering * Add Display to Connection trait * Save creation of UtxosChanged address vec on listener unregistration * Reduce UtxosChangedSubscription memory footprint on mutation * Add gRPC client timeout to every request & remove tpc keep alive * Reconnect gRPC client on broken pipe * Disable gRPC server http2 keepalive * Add a test benchmarking UtxosChanged notifications memory footprint * Fix log * Merge branch 'master' into rpc-memory-benchmark * Remove tokio dependency in crate notify * Add a UtxosChanged mutation policy to the notification system * Share subscriptions between listeners and broadcasters * Replace UtxoAddress with Address * Refactor Single::mutate * Refactor `UtxosChangedSubscription` internals * Make `UtxosChangedSubscription::hash()` cheaper to compute * mimalloc * mimalloc disable purge_decommits * Add to simpa and integration tests * remove redundant unix and replace with win/linux/mac * Add comment * Add comment * Sort out features * Remove request timeout from `heap` feature * Enhance `Broadcaster` memory release and logs * Track global `UtxosChangedSubscription` count * Fix heap profile * Let the number of broadcasters in gRPC server be configurable * Identify an active and filtering UtxosChangedSubscription with a ListenerId * Give address.rs its folder * Address tracker, indexing and counting registrations * Add a sharable subscription context to the notification system * Use a subscription context in `Notification` trait and in `single::UtxosChangedSubscription` * Add an index counter and use short names * Use a subscription context in `compounded::UtxosChangedSubscription` and in `Subscription` trait * Rely on hash sets & maps instead of sorted vectors in single and compounded UtxosChanged subscriptions * fix lint * Add an optional maximum capacity to the address tracker * Introduce a mutation outcome * Remove unneeded CompoundedClone::clone_arc * Provide inner mutability to `Indexes` and `Counters` * Restore the filtering of UtxosChanged notifications based on compounded subscriptions in RPC core, gRPC server and wRPC server * Measure memory footprint of CounterMap * Extend `UtxosChangedSubscription` inner mutability to its state * Group all wildcard `UtxosChangedSubscription` in broadcaster plan * Have kaspad use a single `SubscriptionContext` * Add event_type() to Scope * Reduce the number of mutation clones * Log some memory stats in a file * Consume the address vector of UtxosChangedScope * Retain the original address vector of a UtxosChanged mutation along the full chain of notifiers up to the IndexProcessor * Enhance the termination of all gRPC server connections * Put `UtxosChangedSubscription` state and indexes under the same lock * Some Tracker lock fairness enhancements * Preallocate static UtxosChanged subscriptions * Address new lint rules * Move memory_monitor * Silent on simnet * Add a shutdown listener to `Core` * Add a `Task` trait and implement some tasks * New daemon memory benchmark running in its own child process * Refactor `ClientPool` with a start fn returning a vector of `JoinHandle` * Add start and shutdown signaling to `ClientPool` * Add full miner, tx sender, subscriber tasks and all their sub-tasks * Use the tasks in fn utxos_changed_subscriptions_client * Cleaning * Fix a rare case potentially preventing subscriber tasks to exit * Fill the mempool up to the target * Run actual memory benchmarks * Add a main task to `TasksRunner` * Move tasks * Move tasks (2) * Rename full to group * Rename full to group (2) * Fix cargo syntax error * Add a stopper status to some tasks * Let the main task run before adding sub tasks that need it alive * Mempool benchmark based on tasks * Small adjustments on the utxos changed subscribe benchmark * Prevent a race condition * Refactor * Move the core shutdown request signaling into `RpcCoreService` * Add a signal indicating the gRPC server has started * Recycle emptied tracker entries * Add `max-tracked-addresses` argument * Rename `UtxosChangedMutationPolicy` `AllOrNothing` to `Wildcard` * Cleaning: remove R&D code * Merge branch 'master' into address-tracker-subscriptions * Some comments and documentation * Use a preset listener id in direct mode * Add lower and upper bounds to the tracker max address count & change the default value * For each event type the notifier can have at most one subscriber * Add and document `GrpcClient::connect_with_args` * Some doc * Complete `UtxosChangedMutationPolicy` description * Validate --max-tracked-addresses argument * remove unused AddressesHash * fix minor warnings under `devnet-prealloc` feature code
- Loading branch information