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

[Docs] Claim expiration #649

Merged
merged 4 commits into from
Jul 5, 2024

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Jul 2, 2024

Summary

  • Add "Claim Expiration" sub-section to "Session Window & On-Chain Parameters".
  • Update the table of contents.

Issue

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

Documentation changes (only if making doc changes)

  • make docusaurus_start; only needed if you make doc changes

Local Testing (only if making code changes)

  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • See quickstart guide for instructions

PR Testing (only if making code changes)

  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.
    • THIS IS VERY EXPENSIVE, so only do it after all the reviews are complete.
    • Optionally run make trigger_ci if you want to re-trigger tests without any code changes
    • If tests fail, try re-running failed tests only using the GitHub UI as shown here

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and reference any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

Summary by CodeRabbit

  • Documentation
    • Enhanced the explanation of claim expiration due to a missing proof within the proof window, leading to forfeiture of rewards by the supplier.
    • Added a new subsection on claim expiration under "Session Windows & On-Chain Parameters."
    • Detailed the consequences of claim expiration and the importance of closing the proof window for operational efficiency.

@bryanchriswhite bryanchriswhite added documentation Improvements or additions to documentation on-chain On-chain business logic labels Jul 2, 2024
@bryanchriswhite bryanchriswhite self-assigned this Jul 2, 2024
Copy link

coderabbitai bot commented Jul 2, 2024

Warning

Review failed

The pull request is closed.

Walkthrough

This update enhances documentation on claim expiration by detailing the process and reasons for expiring claims when proofs are not submitted within the proof window, leading to forfeiture of rewards. It elaborates on operational efficiency and the necessity of timely closing the proof window.

Changes

File Path Change Summary
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md Added [Claim Expiration] under [Session Windows & On-Chain Parameters]. Detailed the expiration process, consequences, and reasons for closing the proof window.

Possibly related issues

Poem

In the realm of chains, claims must expire,
Proofs unspoken, dreams retire.
Timely windows, close with grace,
Rewards forlorn, a distant trace.
Efficiency reigns, with purpose clear,
The network hums, no burden to bear.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@bryanchriswhite bryanchriswhite marked this pull request as ready for review July 2, 2024 14:34
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between aec367e and 442c8c3.

Files selected for processing (1)
  • docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md (3 hunks)
Additional context used
LanguageTool
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md

[duplication] ~20-~20: Possible typo: you repeated a word
Context: ...Claim Expiration](#claim-expiration) - Session - Session Duration - [Sessi...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~134-~134: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...a Supplier fails to submit a Proof prior to the Proof Window closing, the claim w...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[grammar] ~140-~140: The plural noun “claims” cannot be used with the article “a”. Did you mean “a claim” or “claims”?
Context: ...lement SHOULD be limited to considering a claims created within a rolling window of bloc...

(A_NNS)


[uncategorized] ~349-~349: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... the Proof Window, the Claim will expire and the supplier will forfeit rewards for t...

(COMMA_COMPOUND_SENTENCE_2)

Markdownlint
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md

133-133: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


350-350: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)

Additional comments not posted (1)
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md (1)

18-19: Update Table of Contents for Consistency

Ensure that the new section "Claim Expiration" is consistently formatted and aligned with other sections in the Table of Contents.

bryanchriswhite and others added 2 commits July 4, 2024 08:42
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 442c8c3 and 7f58e06.

Files selected for processing (1)
  • docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md (3 hunks)
Additional context used
LanguageTool
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md

[duplication] ~20-~20: Possible typo: you repeated a word
Context: ...Claim Expiration](#claim-expiration) - Session - Session Duration - [Sessi...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~139-~139: Possible missing comma found.
Context: ...ur while the application stake is still locked and applications must be allowed comple...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~139-~139: Possible missing preposition found.
Context: ...locked and applications must be allowed complete unstaking in finite time. 1. Claim sett...

(AI_HYDRA_LEO_MISSING_TO)

Markdownlint
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md

142-142: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


141-141: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

Additional comments not posted (5)
docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md (5)

131-132: Remove trailing space.

Trailing spaces should be removed to maintain clean formatting.

-### Claim Expiration 
+### Claim Expiration

133-135: Add comma before "and".

Use a comma before “and” if it connects two independent clauses.

-submit a `Proof` during the Proof Window, the Claim will expire and the supplier will forfeit rewards for the claimed
+submit a `Proof` during the Proof Window, the Claim will expire, and the supplier will forfeit rewards for the claimed

133-135: Simplify wording.

Replace "prior to" with "before" to improve readability.

-If a claim requires a proof (as determined by [Probabilistic Proofs](probabilistic_proofs.md)) and a `Supplier` fails 
-to submit a `Proof` prior to the `Proof Window` closing, the claim will expire and the `Supplier` will forfeit any
-rewards for the work done.
+If a claim requires a proof (as determined by [Probabilistic Proofs](probabilistic_proofs.md)) and a `Supplier` fails
+to submit a `Proof` before the `Proof Window` closes, the claim will expire and the `Supplier` will forfeit any
+rewards for the work done.

140-140: Fix grammar issue.

The plural noun “claims” cannot be used with the article “a”. Use "claims" without the article "a".

-1. Claim settlement SHOULD be limited to considering a claims created within a rolling window of blocks to decouple settlement from a long-tail accumulation of unsettled claims.
+1. Claim settlement SHOULD be limited to considering claims created within a rolling window of blocks to decouple settlement from a long-tail accumulation of unsettled claims.

18-19: Fix duplicated word in the table of contents.

Remove the repeated "Session" word for clarity.

- - [Session](#session)
+ - [Session](#session)

Likely invalid or redundant comment.

@@ -15,6 +15,8 @@ to all readers.
:::

- [Introduction](#introduction)
- [Session Windows & On-Chain Parameters](#session-windows--on-chain-parameters)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you ever merge in your mermaid diagram with the sequence of steps for the window that you left in a PR comment once?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote it as the gantt chart that's in this section. The timeline diagram doesn't support concurrent events, which is necessary to describe the grace period.

@@ -126,6 +128,17 @@ gantt

- [`poktroll.shared.Params` / `sharedtypes.Params`](https://github.com/pokt-network/poktroll/blob/main/proto/poktroll/shared/params.proto)

### Claim Expiration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General feedback (not actionable right now).

This sort of documentation is very accurate and very correct but it reminds me of IEEE RFCs: https://datatracker.ietf.org/doc/html/rfc7951

If we're doing is as a reference for ourselves and AIs, no changes.

As you iterate on docs in the future, just keep in mind that 99% of people will want to:

  1. Read 1-2 sentences
  2. See colors and titles
  3. Look at pictures
  4. Move on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deliverable was to capture this detail. This seemed like the most appropriate place to do so. I couldn't think of a way to make a picture out of this at the time.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@bryanchriswhite bryanchriswhite merged commit 6c3dd65 into main Jul 5, 2024
8 of 9 checks passed
@bryanchriswhite bryanchriswhite deleted the issues/419/docs/claim-proof-expiration branch July 5, 2024 12:00
bryanchriswhite added a commit that referenced this pull request Jul 6, 2024
…bility

* pokt/main:
  [Relayminer] refactor: query `min_relay_difficulty_bits` param (#655)
  [Docs] Claim expiration (#649)
  [LoadTest] Passing non-existing plans variable (#661)
bryanchriswhite added a commit that referenced this pull request Jul 6, 2024
…lays

* pokt/main:
  [Docs] Update observability docusaurus & godocs (#654)
  [Relayminer] refactor: query `min_relay_difficulty_bits` param (#655)
  [Docs] Claim expiration (#649)
  [LoadTest] Passing non-existing plans variable (#661)
bryanchriswhite added a commit that referenced this pull request Jul 6, 2024
…elayer-session-manager

* issues/553/fix/replay-observable:
  chore: go imports
  chore: update comment
  chore: update comment
  chore: review feedback improvements
  [Relayminer] refactor: query `min_relay_difficulty_bits` param (#655)
  [Docs] Claim expiration (#649)
  [LoadTest] Passing non-existing plans variable (#661)
  Tiny: updating labels in tiltfile
  [Load Testing] fix: relay stress test duration calculation (#651)
  [LocalNet] Grafana stress test dashboard changes (#641)
okdas pushed a commit that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation on-chain On-chain business logic
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants