Skip to content

Commit

Permalink
Update work score with Native Token Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Nov 24, 2023
1 parent 14102f1 commit 2d33b5b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tips/TIP-0045/tip-0045.md
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,10 @@ Let the work score of a transaction be defined as follows.
serialized _Transaction_.
- Let `Input Score` be `Inputs Count * Work Score Parameters::Input`.
- Let `Context Input Score` be `Context Inputs Count * Work Score Parameters::Context Input`.
- Let `Output Score` be the sum of work scores of each output `Output` in `Outputs`:
- Let `Native Token Score` be `Work Score Parameters::Native Token * Native Tokens Count` if `Output` contains
`Native Tokens`, `0` otherwise.
- Let `Outputs Score` be the sum of work scores of each output `Output` in `Outputs`, where the work score of `Output`
is defined as:
- Let `Native Token Score` be `Work Score Parameters::Native Token` if `Output` contains a `Native Token Feature`, `0`
otherwise.
- Let `Token Scheme Score` be `Work Score Parameters::Native Token` if `Output` contains a _Simple Token Scheme_, `0`
otherwise.
- Let `Staking Score` be `Work Score Parameters::Staking` if `Output` contains a _Staking Feature_, `0` otherwise.
Expand All @@ -1151,7 +1152,7 @@ Let the work score of a transaction be defined as follows.
- Let `Allotment Score` be `Work Score Parameters::Allotment * Allotments Count`.
- Let `Signature Score` be the sum of work scores of the signatures contained in _Signature Unlocks_ within `Unlocks`.
- Signature work scores are defined in TIP-46.
- Return `Size Score + Input Score + Context Input Score + Output Score + Allotment Score + Signature Score`.
- Return `Size Score + Input Score + Context Input Score + Outputs Score + Allotment Score + Signature Score`.

## Validation

Expand Down

0 comments on commit 2d33b5b

Please sign in to comment.