-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
TxPool v2 General architecture #2162
Commits on Sep 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2e07d37 - Browse repository at this point
Copy the full SHA 2e07d37View commit details
Commits on Sep 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4cbb11c - Browse repository at this point
Copy the full SHA 4cbb11cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bef4aff - Browse repository at this point
Copy the full SHA bef4affView commit details
Commits on Sep 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 552af83 - Browse repository at this point
Copy the full SHA 552af83View commit details
Commits on Sep 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8d39499 - Browse repository at this point
Copy the full SHA 8d39499View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d1a1bb - Browse repository at this point
Copy the full SHA 3d1a1bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d65076 - Browse repository at this point
Copy the full SHA 3d65076View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19830cb - Browse repository at this point
Copy the full SHA 19830cbView commit details
Commits on Sep 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 795567e - Browse repository at this point
Copy the full SHA 795567eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67afb9d - Browse repository at this point
Copy the full SHA 67afb9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b956e2c - Browse repository at this point
Copy the full SHA b956e2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ed577e - Browse repository at this point
Copy the full SHA 9ed577eView commit details
Commits on Sep 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 29ec06d - Browse repository at this point
Copy the full SHA 29ec06dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a22983 - Browse repository at this point
Copy the full SHA 9a22983View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca38a25 - Browse repository at this point
Copy the full SHA ca38a25View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe9e995 - Browse repository at this point
Copy the full SHA fe9e995View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34c7e07 - Browse repository at this point
Copy the full SHA 34c7e07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4576797 - Browse repository at this point
Copy the full SHA 4576797View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8e86ec - Browse repository at this point
Copy the full SHA c8e86ecView commit details
Commits on Sep 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 16a7e8f - Browse repository at this point
Copy the full SHA 16a7e8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 60ada65 - Browse repository at this point
Copy the full SHA 60ada65View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0cf8835 - Browse repository at this point
Copy the full SHA 0cf8835View commit details -
Configuration menu - View commit details
-
Copy full SHA for b328bc8 - Browse repository at this point
Copy the full SHA b328bc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d69dc1 - Browse repository at this point
Copy the full SHA 0d69dc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75a9180 - Browse repository at this point
Copy the full SHA 75a9180View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87e5027 - Browse repository at this point
Copy the full SHA 87e5027View commit details
Commits on Sep 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4e3e3ce - Browse repository at this point
Copy the full SHA 4e3e3ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 826f13e - Browse repository at this point
Copy the full SHA 826f13eView commit details
Commits on Sep 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bafbf75 - Browse repository at this point
Copy the full SHA bafbf75View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed2302a - Browse repository at this point
Copy the full SHA ed2302aView commit details
Commits on Sep 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d4ebf3c - Browse repository at this point
Copy the full SHA d4ebf3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45d5296 - Browse repository at this point
Copy the full SHA 45d5296View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c1e5db - Browse repository at this point
Copy the full SHA 1c1e5dbView commit details
Commits on Sep 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6e5c7f8 - Browse repository at this point
Copy the full SHA 6e5c7f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a5aabd - Browse repository at this point
Copy the full SHA 2a5aabdView commit details -
Configuration menu - View commit details
-
Copy full SHA for e78544f - Browse repository at this point
Copy the full SHA e78544fView commit details
Commits on Sep 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dd7c095 - Browse repository at this point
Copy the full SHA dd7c095View commit details -
Update crates/services/txpool_v2/src/lib.rs
Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 14b9b53 - Browse repository at this point
Copy the full SHA 14b9b53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68b1157 - Browse repository at this point
Copy the full SHA 68b1157View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1074e5a - Browse repository at this point
Copy the full SHA 1074e5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f89174f - Browse repository at this point
Copy the full SHA f89174fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ddea7e - Browse repository at this point
Copy the full SHA 3ddea7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5ff2ab - Browse repository at this point
Copy the full SHA a5ff2abView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd9ef6e - Browse repository at this point
Copy the full SHA dd9ef6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f0476e2 - Browse repository at this point
Copy the full SHA f0476e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f5a199 - Browse repository at this point
Copy the full SHA 2f5a199View commit details
Commits on Sep 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ade8569 - Browse repository at this point
Copy the full SHA ade8569View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6beb83d - Browse repository at this point
Copy the full SHA 6beb83dView commit details
Commits on Sep 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3dde832 - Browse repository at this point
Copy the full SHA 3dde832View commit details
Commits on Sep 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f5ef031 - Browse repository at this point
Copy the full SHA f5ef031View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2bd0382 - Browse repository at this point
Copy the full SHA 2bd0382View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9c78fc - Browse repository at this point
Copy the full SHA e9c78fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for f955ee5 - Browse repository at this point
Copy the full SHA f955ee5View commit details
Commits on Sep 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3be0fc7 - Browse repository at this point
Copy the full SHA 3be0fc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24cc034 - Browse repository at this point
Copy the full SHA 24cc034View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa8cb24 - Browse repository at this point
Copy the full SHA aa8cb24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bbdaf5 - Browse repository at this point
Copy the full SHA 0bbdaf5View commit details -
REVIEWER NOTE : Review #2162 first for context ## Linked Issues/PRs Closes #2186 ## Description This PR allows you to insert `Transaction` in the `TxPool v2` service and so perform all the necessary verifications and the insertion. ### Changes in code logic from `TxPool v1` - The verifications are performed in a new order specified in #2186. The goal is to avoid making the computation heavy work if the simple checks aren't valid. In this new version we also ensure that verifications are done in order by having wrapper type around each step to allow only one verification path. - The insertion is performed in a separate thread pool, the goal is to not block the pool on any verifications/insertions and to manage the ressources we allocate to these works - The insertion rules and conditions has change to the following : - A transaction with dependencies can collide only with one other transaction - A transaction without dependencies can collide with multiple transaction - Rules to free up space for new transaction - If a transaction is colliding with another verify if deleting the colliding transaction and dependents subtree is enough otherwise refuses the tx - If a transaction is dependent and not enough space, don't accept transaction - If a transaction is executable, try to free has much space used by less profitable transactions as possible in the pool to include it - New limits on the size of the pool : `max_pool_bytes_size and max_pool_gas` ### Changes from the base branch `txpool-v2` All the tests has been refactored to be way more clearer to understand and easier to read. They also now all follow the naming and the GWT convention. ## Checklist - [x] Breaking changes are clearly marked as such in the PR description and changelog - [x] New behavior is reflected in tests - [x] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [x] I have created follow-up issues caused by this PR and linked them here --------- Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c128c75 - Browse repository at this point
Copy the full SHA c128c75View commit details
Commits on Sep 28, 2024
-
Minimized the number of
Result
in the code in places where we can't…… get an error. Handled more gracefully cases when transactions is not found the storage. Improved performance of the collision check in the parents by collecting all parents once. Removed dependency collections from the public API of the storage. Now we have a separate `has_dependencies` method. Extracted the logic about collision verification to the Pool level. Fixed the issues with `find_free_space` where we could subtract the same subtree several times. Fixed the issues with non updating the `number_dependents_in_chain` and `dependents_cumulative_bytes_size`. Changed the return type for `get` function to be `Option` instead of `Result`. Added handling of `None`. Reworked `gather_best_txs` function to not abandon the old iteration and continue it instead since it is harder to manipulate the algorithm. But still it is still has the same worse complexity as before. Minimized the number of places where we pass the storage and storage id. Instead, pass the `&StorageData`. It gurantees that the caller already got storage values from the storage(and handled cases when it is `None`). It is more safe from API perspective.
Configuration menu - View commit details
-
Copy full SHA for aeb2935 - Browse repository at this point
Copy the full SHA aeb2935View commit details -
Added fuzzer for TxPoolV1 and TxPoolV2 to create dependent graphs. It…
… creates a random graph and internal asserts catch the error or unexpected state. The tests verify at the end that all state is empty after full cycle of TxPoolV2 usage. Fixed several issues found by the fuzzer. Now `insert` method uses the output of the `can_insert_transaction` method. Now the logic is the same for insert and can insert(before it was a little bit different).
Configuration menu - View commit details
-
Copy full SHA for 8a746bf - Browse repository at this point
Copy the full SHA 8a746bfView commit details
Commits on Sep 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0fcb185 - Browse repository at this point
Copy the full SHA 0fcb185View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88cec23 - Browse repository at this point
Copy the full SHA 88cec23View commit details -
Moved the logic of collision and depdednencies verificaiton to the po…
…ol instead of the storage. It allows to not bye aware of the collisions in the storage level.
Configuration menu - View commit details
-
Copy full SHA for 47ebb4c - Browse repository at this point
Copy the full SHA 47ebb4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for eed0d13 - Browse repository at this point
Copy the full SHA eed0d13View commit details -
Configuration menu - View commit details
-
Copy full SHA for d88a016 - Browse repository at this point
Copy the full SHA d88a016View commit details -
Return the error earlier if transaciton has too many deodendencies
Configuration menu - View commit details
-
Copy full SHA for 2fd7c15 - Browse repository at this point
Copy the full SHA 2fd7c15View commit details -
Merge branch 'refs/heads/master' into txpool-v2
# Conflicts: # crates/services/txpool/src/transaction_selector.rs
Configuration menu - View commit details
-
Copy full SHA for 99da36b - Browse repository at this point
Copy the full SHA 99da36bView commit details
Commits on Sep 30, 2024
-
Reject transactions that creates diamond dependencies. It allows simp…
…lify the algorithm and to nto waste a lot of resources on cyclies handling. Removed subtracting of the collisions from the `can_fit_into_pool` method. Having this logic requires handling cases when collided transaction is sub transaction of the collision graph, or in the case of candidate graph in the `find_free_space` method. Added graph itegrity check to be sure that its state it valid after all manipualtions. Handle the case with zero inputs in stability test. Re-wrote the `remove_node_and_dependent_sub_graph_recursion` to be a bfs algorithm instead of dfs.
Configuration menu - View commit details
-
Copy full SHA for a540eda - Browse repository at this point
Copy the full SHA a540edaView commit details -
Make limits less strict for fuzzer. It is okay since we don't need to…
… be super precise.
Configuration menu - View commit details
-
Copy full SHA for b25b832 - Browse repository at this point
Copy the full SHA b25b832View commit details
Commits on Oct 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for acf0ab5 - Browse repository at this point
Copy the full SHA acf0ab5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6df300a - Browse repository at this point
Copy the full SHA 6df300aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d16424c - Browse repository at this point
Copy the full SHA d16424cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fe6d98 - Browse repository at this point
Copy the full SHA 6fe6d98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5def1d3 - Browse repository at this point
Copy the full SHA 5def1d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b7fc49 - Browse repository at this point
Copy the full SHA 3b7fc49View commit details
Commits on Oct 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 48090ea - Browse repository at this point
Copy the full SHA 48090eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1cd89e4 - Browse repository at this point
Copy the full SHA 1cd89e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a96d77 - Browse repository at this point
Copy the full SHA 1a96d77View commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for de93d33 - Browse repository at this point
Copy the full SHA de93d33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55e770f - Browse repository at this point
Copy the full SHA 55e770fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e86ddad - Browse repository at this point
Copy the full SHA e86ddadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 414a8c7 - Browse repository at this point
Copy the full SHA 414a8c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7e93c0 - Browse repository at this point
Copy the full SHA b7e93c0View commit details