forked from kaspanet/rusty-kaspa
-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: Rule Engine #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
WIP: Rule Engine #17
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
916db06 to
d295430
Compare
561b165 to
4a6eea6
Compare
b775289 to
024ec6e
Compare
coderofstuff
commented
Feb 12, 2025
| } else if !is_finality_recent { | ||
| trace!("Finality period is old. Timestamp: {}. Sync rate: {:.2}", finality_point_timestamp, rate); | ||
| } | ||
|
|
Owner
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simpler worker loop
6146f9b to
d122532
Compare
* deactivate tn11 * wip fork params * wip fork params (2) * we are not forking the timestamp deviation tolerance param * min difficulty len can be defined only once * forked param * use only a single (crescendo) activation flag. fix tx related activation tests to calc storage mass correctly * rename _len -> _size for consistency * wip bps forking * wip bps forking: filter non activated blocks from DAA window * bps forking logic * fix gated feature tests * media time window should exclude non activated blocks as well * unused * ghostdag k forking logic * coinbase reward forking logic * parents and mergeset size limits forking logic * merge depth and finality depth forking logic * pruning point forking logic * fix doc test * various todos and leftovers * mempool-related forking logic, more todos * KIP-13 (part of crescendo) (kaspanet#639) * kip13 * inline tracking per mass unit * various small fixes * docs * ghostdag: comments; extract var and reuse; handle origin edge case * permanent -> persistent * use bool -> option -> iter and remove code duplication * coinbase misc * header misc * comments * log the hardfork (initial) * fix block depth origin case * initial ascii art + human readable difficulty print * countdown log * utxo-related forking activation should be based on block daa score and not pov daa score * todo * handle edge cases related to trusted blocks being checked for activation * Generalized KIP9--storage mass plurality (Crescendo) (kaspanet#641) * implement storage mass plurality * move plurality calculation to mass module and add a useful trait for accessing it * utxo cell * consume outputs iterator only once, fix theoretic overflow * add sanity check for plurality limits, align comments * optimize input iterator consumption * extended comment rewrite * fix doc build * inline the relaxed formula conditions * test_storage_mass_pluralities * Change expected pruning point to chain qualification check (Crescendo) (kaspanet#642) * change expected pruning point check from header validity to chain qualification * adjust `pruning points valid chain` verification to the new rule change * tx limits forking logic * coinbase maturity forking logic * finalize tx-related limit values * delete todo * post fork activation: log window sizes with frequency 100 * KIP-15 (kaspanet#636) * feat(consensus): implement kip-15 1. Accepted-ID-MR = Hash ( SP.Accepted-ID-MR, MR of Accepted-TXs ) * fix(consensus): after rebase ... * fix: after review * log activation of UTXO state processing rules * comment * Smooth transition of pruning points/samples (Crescendo) (kaspanet#643) * add a simpa activation test * print * wip (working w/o fork) * wip * working prototype (up to storage) * inline * print stats * comments and asserts * pruning samples database storage (todo: database upgrade; syncee import) * fix tests * syncee import * database upgrade procedure * minor * logs * database upgrade: populate past pruning points * save to store during pruning points valid chain check * next pruning points sanity checks * reposition log call, add comments * use headers store; more comments * address most review comments * adjust todo within daa_score timestamp estimate * adjust todo for tx log aggregation * next pruning points: keep the candidate valid also post v2 call * add a test explicitly verifying the emission schedule (long; ignored) * Add n-testnet-10.kaspa.ws DNS seeder (kaspanet#644) Co-authored-by: supertypo <[email protected]> * add assert * use ghostdag data from ctx * unrelated to crescendo: minor fix to `are_pruning_points_in_valid_chain` for the case where the syncer is sending a deep pruning point (e.g., a future archive) * fix text of comments * specialized info logs [CRND ] * use a const for keyword * set TN10 activation date and bump version to 0.17.0 * fix and extend subsidy tests --------- Co-authored-by: Ro Ma <[email protected]> Co-authored-by: supertypo <[email protected]> Co-authored-by: supertypo <[email protected]>
* initial tn10 crescendo instructions doc * add specs * version links * mbit/s is more clear * additional cmd options * typo
* move genesis log to debug * disable p2p server if connect is active * log inbound/outbound counts * use local cache for pruning proof build for saving ram (the proof is held in memory) * do the same (local cache) for pruning proof received via p2p * prettify * logs (and 2x cache capacity) * fix rare edge case * fix comment * bump version to 0.17.1
- monitor sync state and update anything that cares about is_sycned to use the updated rules - sync rate rule: allow mining if sync rate is below threshold and finality point is recent Move most is_nearly_synced logic to mining_rule_engine - instantiate Hub in daemon - Reverse the dependency of flow context and MRE - remove the async_is_nearly_synced consensus api - add get_sink_daa_score_timestamp consensus API Move is_nearly_synced logic from params to rule engine
- Overrides TX selection to instead automatically return an empty vec
- Includes only the logic that uses the rule - Make all reds "bad reds" when selected parents - Select 100% top blue work parents - Trigger logic not present yet
- Add BlueParentsOnly Rule - Add stub for NoTransactionsRule
- Makes it look like any other mining rule
88080d3 to
b43e97a
Compare
b43e97a to
b59e332
Compare
* Implement Retention Period support - new cli flag retention_period_days allows the user to retain more days of data * Replace get_source with get_retention_root * Set retention period default to 0 * Rename references to source to retention root * Update retention root advancement to use pruning point samples * Default retention period point to pruning point only and not including history root * Move new root check outside * Rename history root to retention checkpoint * Use Option for retention_period_days * Fix get timestamp; change end condition of retention root advance loop * Show logs for retention period disk usage and require min 3 days if set * Minor comment fixes * Consistent naming to retention period root * consistent comments * simplify retention root search loop * important: handle archival upgrade correctly * daemon check: fix constants and msg * ergonomic rust style * keep retention root in place for archives * update tn10 doc to the upcoming version --------- Co-authored-by: Michael Sutton <[email protected]>
Trigger condition: - if submit_block_bad_merkle_root_count > 0 && submit_block_success_count == 0 (no submit block calls rpcs succeeded in this 10s period) Recovery conditions: - if submit_block_success_count > 0 (any submit block call succeeded, even if there are any that errored out), OR - two cooldown periods have passed
e0510cc to
c3c950f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.