Skip to content

Commit

Permalink
Add Candidacy Announcement work score
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Jan 22, 2024
1 parent 5625e7f commit 474511f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tips/TIP-0046/tip-0046.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,12 @@ information. As such, blocks usually contain a payload. The detailed specificati
of this TIP. The following table lists all currently specified payloads that can be part of a block and links to their
specification:

| Payload Name | Type Value | TIP |
| ------------ | ---------- | --------------------------------- |
| No Payload | - | - |
| Tagged Data | 0 | [TIP-53](../TIP-0053/tip-0053.md) |
| Transaction | 1 | [TIP-45](../TIP-0045/tip-0045.md) |
| Payload Name | Type Value | TIP |
| ---------------------- | ---------- | --------------------------------------------------------------------------------- |
| No Payload | - | - |
| Tagged Data | 0 | [TIP-53](../TIP-0053/tip-0053.md) |
| Transaction | 1 | [TIP-45](../TIP-0045/tip-0045.md) |
| Candidacy Announcement | 2 | [TIP-40 (Candidacy Announcement)](../TIP-0040/tip-0040.md#candidacy-announcement) |

### Work Score

Expand All @@ -490,8 +491,12 @@ Let the work score of a _Basic Block_ be defined as follows.
- Let `Payload Score` be the work score of the contained `Payload` if it exists, or `0` if it does not exist.
- If the type is _Tagged Data_ the work score is `Work Score Parameters::Data Byte * Tagged Data Size` where:
- `Tagged Data Size` is the size of the serialized _Tagged Data_.
- If the type is _Transaction_ the work score is defined in TIP-45.
- Return `Work Score Parameters::Block + Payload Score`.
- If the type is _Candidacy Announcement_ the work score is
`Work Score Parameters::Data Byte * Candidacy Announcement Size` where:
- `Candidacy Announcement Size` is the size of the serialized _Candidacy Announcement_.
- If the type is _Transaction_ the work score is defined in [TIP-45 (Work Score)](../TIP-0045/tip-0045.md#work-score).
- Let `Signature Score` be the work score of the `Signature`.
- Return `Work Score Parameters::Block + Payload Score + Signature Score`.

## Validation Block

Expand Down

0 comments on commit 474511f

Please sign in to comment.