Skip to content
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

Wallet subsystem transaction generator updates #400

Merged
merged 19 commits into from
Jan 23, 2024

Conversation

aspect
Copy link
Collaborator

@aspect aspect commented Jan 20, 2024

This PR updates the transaction generator logic to account for storage mass.

The following changes have been made:

  • Restructure tx generator to calculate and check storage mass
  • Optimizations for execution pathways using various pre-checks
  • Restructure unit tests to validate mass calculations
  • Copy and break-down storage mass calculation into components within the wallet subsystem MassCalculator
  • Introduce provisional "mass combining" for future changes to mass handling in tn11 (switching to Max will require updates to unit tests)
  • Various improvements to unit tests and error handling
  • Fix incorrect use of sigop and minimum signature values in unit tests

@aspect aspect requested a review from michaelsutton January 20, 2024 19:01
@michaelsutton michaelsutton merged commit e6069af into kaspanet:master Jan 23, 2024
6 checks passed
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jan 23, 2024
* replace NetworkType with NetworkId in the tx generator and related APIs

* fix url path rendering in format_url

* Improve mass related errors

* refactor fee handling

* renaming fee variants

* mass combination strategy

* wip - storage mass

* additional unit tests and limit checks

* Introduce per-network configurable additional compound transaction compute mass (currently set to 100 on tn10 and tn11)

* expand sanity checks to handle 0 value outputs

* documentation updates

* code formatting

* Set new input sequence to 0

* change aggregate input value check to use saturating_sub() to prevent potential overflows (re github feedback)

* change storage mass fee calc to return u64::MAX if the resulting mass is None (re GitHub feedback)
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jan 23, 2024
* replace NetworkType with NetworkId in the tx generator and related APIs

* fix url path rendering in format_url

* Improve mass related errors

* refactor fee handling

* renaming fee variants

* mass combination strategy

* wip - storage mass

* additional unit tests and limit checks

* Introduce per-network configurable additional compound transaction compute mass (currently set to 100 on tn10 and tn11)

* expand sanity checks to handle 0 value outputs

* documentation updates

* code formatting

* Set new input sequence to 0

* change aggregate input value check to use saturating_sub() to prevent potential overflows (re github feedback)

* change storage mass fee calc to return u64::MAX if the resulting mass is None (re GitHub feedback)
@humoud19801
Copy link

The overall goal appears to be enhancing the transaction generator logic to better handle storage mass, improving the efficiency of execution pathways, and preparing for future changes in mass handling. The inclusion of unit tests and error handling improvements suggests a focus on code reliability and robustness. It's good practice to ensure that code changes are thoroughly tested and errors are handled appropriately.

KashProtocol pushed a commit to Kash-Protocol/rusty-kash that referenced this pull request Feb 26, 2024
* replace NetworkType with NetworkId in the tx generator and related APIs

* fix url path rendering in format_url

* Improve mass related errors

* refactor fee handling

* renaming fee variants

* mass combination strategy

* wip - storage mass

* additional unit tests and limit checks

* Introduce per-network configurable additional compound transaction compute mass (currently set to 100 on tn10 and tn11)

* expand sanity checks to handle 0 value outputs

* documentation updates

* code formatting

* Set new input sequence to 0

* change aggregate input value check to use saturating_sub() to prevent potential overflows (re github feedback)

* change storage mass fee calc to return u64::MAX if the resulting mass is None (re GitHub feedback)
smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this pull request Jun 18, 2024
* replace NetworkType with NetworkId in the tx generator and related APIs

* fix url path rendering in format_url

* Improve mass related errors

* refactor fee handling

* renaming fee variants

* mass combination strategy

* wip - storage mass

* additional unit tests and limit checks

* Introduce per-network configurable additional compound transaction compute mass (currently set to 100 on tn10 and tn11)

* expand sanity checks to handle 0 value outputs

* documentation updates

* code formatting

* Set new input sequence to 0

* change aggregate input value check to use saturating_sub() to prevent potential overflows (re github feedback)

* change storage mass fee calc to return u64::MAX if the resulting mass is None (re GitHub feedback)
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jul 12, 2024
* replace NetworkType with NetworkId in the tx generator and related APIs

* fix url path rendering in format_url

* Improve mass related errors

* refactor fee handling

* renaming fee variants

* mass combination strategy

* wip - storage mass

* additional unit tests and limit checks

* Introduce per-network configurable additional compound transaction compute mass (currently set to 100 on tn10 and tn11)

* expand sanity checks to handle 0 value outputs

* documentation updates

* code formatting

* Set new input sequence to 0

* change aggregate input value check to use saturating_sub() to prevent potential overflows (re github feedback)

* change storage mass fee calc to return u64::MAX if the resulting mass is None (re GitHub feedback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants