Add pow field to filter JSON object

This commit is contained in:
Yuki Kishimoto 2024-09-23 14:47:57 -04:00
parent 4e73e94d41
commit ad5dff52bb
No known key found for this signature in database
GPG Key ID: 8D3DCD04249619D1

15
13.md
View File

@ -96,6 +96,21 @@ function countLeadingZeroes(hex) {
} }
``` ```
Filter
------
A new `pow` field is introduced for `REQ` messages from clients:
```jsonc
{
// other fields on filter object...
"pow": <integer between 0 and 255>
}
```
`pow` field is an integer (between 0 and 255) that represent the minimum `difficulty` that an event ID must have.
Relays SHOULD discard from query result all events with a difficulty lower than `pow`.
Delegated Proof of Work Delegated Proof of Work
----------------------- -----------------------