Skip to content

Conversation

@kirilaa
Copy link
Contributor

@kirilaa kirilaa commented Dec 4, 2025

Description

  • Adding Staking guide
  • Updating docs for Staking

Summary by CodeRabbit

  • Documentation
    • Expanded staking docs: validator vs delegator roles, 1,000-validator cap, 1-day epochs (including Genesis Epoch 0 rules), 7-epoch unbonding, priming/activation flows, and 75/10/10/5 reward split.
    • Added developer staking guide with step-by-step validator/delegator workflows, activation timelines, withdrawal/claim flows, security guidance for owner/operator/wallet roles, and governance safeguards (24‑hour delay).

✏️ Tip: You can customize this high-level summary in your review settings.

@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for genlayer-docs ready!

Name Link
🔨 Latest commit a215836
🔍 Latest deploy log https://app.netlify.com/projects/genlayer-docs/deploys/6932c40818f6e30008ce452d
😎 Deploy Preview https://deploy-preview-309--genlayer-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

Expanded and reorganized staking documentation and developer guide: added detailed validator/delegator roles, epoch and activation rules, reward/unbonding mechanics, Owner/Operator/ValidatorWallet concepts, and a new staking developer guide; updated navigation metadata.

Changes

Cohort / File(s) Summary
Staking Documentation
pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
Large content update: detailed Validators vs Delegators, Owner/Operator/ValidatorWallet concepts, strict cap of 1,000 active validators, 1-day epoch model with Genesis Epoch 0 rules, +2 epoch activation, shares vs stake behavior, ALPHA/BETA validator selection/weight model, reward sources and 75/10/10/5 split, 7-epoch unbonding with exit/claim flows, validator priming, unstaking/withdrawing procedures, governance controls and updated internal links.
Developer Staking Guide (new)
pages/developers/staking-guide.mdx
Added new developer guide with example-driven Solidity snippets and step-by-step workflows for validator and delegator onboarding, deposits, withdrawals, claims, activation timelines (including epoch 0 bootstrapping), priming/quarantine guidance, and best practices.
Navigation Metadata
pages/_meta.json
Reordered the partners entry position in the JSON object (no functional content change).
Developer Navigation
pages/developers/_meta.json
Added navigation key: "staking-guide": "Staking Contract Guide" to expose the new developer guide.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Focus review on correctness of protocol descriptions and numeric parameters (1,000 validator cap, epoch lengths, +2 activation, 7-epoch unbonding, 75/10/10/5 split).
  • Verify Solidity examples in pages/developers/staking-guide.mdx compile and reflect documented contract APIs and account/permission models (Owner/Operator/ValidatorWallet).
  • Check internal links and updated paths in staking docs for accuracy and no broken references.

Possibly related PRs

Suggested reviewers

  • cristiam86

Poem

🐇 I nibble on epochs, bright and spry,

validator carrots reach the sky,
Shares and stakes in rhythmic hop,
Primed and prim, I never stop,
Docs renewed — I bounce and sigh 🌱

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but covers the key changes. However, it lacks detail about what was updated, which issues it addresses, and the scope of modifications across multiple files. Expand the description to explain which documentation was updated, highlight key additions (e.g., validators vs delegators section, epoch system details), and clarify the relationship to any related issues.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: adding a staking guide and updating staking documentation. It follows Conventional Commits format and clearly identifies the scope and nature of the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch adding_staking_docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98276c6 and 25f07a4.

📒 Files selected for processing (3)
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx (1 hunks)
  • pages/validators/_meta.json (1 hunks)
  • pages/validators/staking-guide.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
pages/**/_meta.json

📄 CodeRabbit inference engine (CLAUDE.md)

pages/**/_meta.json: Navigation is controlled by _meta.json files in each directory
Edit _meta.json files to change page ordering or titles
Update corresponding _meta.json to include the new page when adding new pages

Files:

  • pages/validators/_meta.json
pages/**/*.mdx

📄 CodeRabbit inference engine (CLAUDE.md)

pages/**/*.mdx: All content is in MDX format supporting React components
Import and use custom components within MDX files
Create .mdx file in appropriate pages/ subdirectory when adding new pages
All content should support React components in MDX files

Files:

  • pages/validators/staking-guide.mdx
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur

Applied to files:

  • pages/validators/_meta.json
  • pages/validators/staking-guide.mdx
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/**/_meta.json : Update corresponding _meta.json to include the new page when adding new pages

Applied to files:

  • pages/validators/_meta.json
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/**/_meta.json : Edit _meta.json files to change page ordering or titles

Applied to files:

  • pages/validators/_meta.json
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur

Applied to files:

  • pages/validators/_meta.json
  • pages/validators/staking-guide.mdx
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases

Applied to files:

  • pages/validators/_meta.json
  • pages/validators/staking-guide.mdx
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur

Applied to files:

  • pages/validators/staking-guide.mdx
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : GenVM diagnostics integration affects the doctor command behavior and should be documented in the validator setup guide

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Enhance command documentation in setup-guide.mdx when new features are added to existing commands

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Genesis block numbers are specified for faster node startup (optional but recommended) and should be updated in documentation when network upgrades occur

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version references in download examples and version lists in setup-guide.mdx when new validator releases occur

Applied to files:

  • pages/validators/staking-guide.mdx
🪛 LanguageTool
pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx

[style] ~36-~36: To form a complete sentence, be sure to include a subject.
Context: ...rom the owner (hot wallet recommended). Can be changed by the owner but cannot be t...

(MISSING_IT_THERE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright E2E
🔇 Additional comments (5)
pages/validators/_meta.json (1)

3-3: Navigation entry correctly added for new staking guide.

The addition properly integrates the new staking guide into the validators section navigation, following the established pattern.

pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx (3)

5-14: Clear and informative validators vs delegators comparison.

The new table effectively contrasts the two roles with key metrics (stake, infrastructure, rewards), providing readers with quick understanding of role differences and expectations.


28-79: Excellent conceptual depth across new sections.

The Owner/Operator/ValidatorWallet explanation, Epoch System, Shares vs Stake mechanics, and Validator Selection/Weight formula sections are well-explained with concrete examples and parameters. The weight formula with ALPHA/BETA parameters clearly shows the incentive design.


137-139: Internal link path is correct.

The link /validators/staking-guide on line 139 correctly references the file at pages/validators/staking-guide.mdx and matches the Next.js pages router routing convention.

pages/validators/staking-guide.mdx (1)

1-321: Comprehensive staking guide with proper structure and valid cross-references.

The guide provides clear instructions for both validators and delegators with well-organized sections including validator operations (join, deposit, withdraw, claim), delegator operations, practical scenarios, best practices, troubleshooting table, and related resources. All internal links resolve correctly to existing documentation pages. The Callout components (info and warning types) and timeline diagrams enhance clarity and readability. Code examples are presented clearly with appropriate context for each operation.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (2)
pages/validators/staking-guide.mdx (2)

35-37: Enhance warning callouts with actionable next steps.

The three warning callouts (validator wallet address, shares not tokens × 2) effectively highlight critical information. Consider adding brief follow-up guidance to make them more actionable:

Example enhancement for line 35-37:

<Callout type="warning">
  Save the returned **ValidatorWallet address** - you'll need it for all future operations.
  Store it securely (e.g., in your deployment records or contract storage) to prevent operations from failing.
</Callout>

Also applies to: 89-91, 195-197


162-166: Provide quantitative guidance on validator selection and diversification.

The delegation strategy tips (lines 162-166) recommend diversifying across validators and selecting ones with "good uptime," but no concrete thresholds or metrics are provided. Consider adding:

  • Recommended minimum number of validators to delegate to
  • Suggested uptime threshold (e.g., "validators with 95%+ uptime")
  • How to check validator performance metrics
  • Reference to where performance metrics can be found
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25f07a4 and b50d53c.

📒 Files selected for processing (1)
  • pages/validators/staking-guide.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/**/*.mdx

📄 CodeRabbit inference engine (CLAUDE.md)

pages/**/*.mdx: All content is in MDX format supporting React components
Import and use custom components within MDX files
Create .mdx file in appropriate pages/ subdirectory when adding new pages
All content should support React components in MDX files

Files:

  • pages/validators/staking-guide.mdx
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : GenVM diagnostics integration affects the doctor command behavior and should be documented in the validator setup guide

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Genesis block numbers are specified for faster node startup (optional but recommended) and should be updated in documentation when network upgrades occur

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Enhance command documentation in setup-guide.mdx when new features are added to existing commands

Applied to files:

  • pages/validators/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version references in download examples and version lists in setup-guide.mdx when new validator releases occur

Applied to files:

  • pages/validators/staking-guide.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Redirect rules - genlayer-docs
  • GitHub Check: Header rules - genlayer-docs
  • GitHub Check: Pages changed - genlayer-docs
  • GitHub Check: Playwright E2E
🔇 Additional comments (8)
pages/validators/staking-guide.mdx (8)

1-1: Callout component import is correct and compatible.

The import of Callout from "nextra-theme-docs" is valid. The project uses nextra-theme-docs version 2.13.2, which includes the Callout component as a standard export. Both type="info" and type="warning" props used in this file are supported types in this version.


1-11: Internal link path is valid and correctly references existing documentation.

The link /api-references/genlayer-cli#staking-operations-testnet in line 10 is correct. The corresponding "Staking Operations (Testnet)" section exists in pages/api-references/genlayer-cli.mdx and will generate the expected anchor.


321-325: All related resource links in the staking guide are valid and accessible. The referenced concept pages and CLI documentation with the staking-operations-testnet anchor all exist in the documentation structure.


74-91: This verification request cannot be completed in the documentation repository context.

The review comment requests verification of the validatorView() function signature, state array indices, and share calculation logic against the actual GenStaking contract implementation. However, this repository (genlayerlabs/genlayer-docs) contains only documentation—not the smart contract source code. The contract implementation exists in a separate repository and is not available here.

The documented code snippet (lines 77-80) reflects the intended API as documented. Verifying contract implementation details requires access to the actual smart contract repository, which is outside this documentation repository's scope. This is a documentation-only repository that documents the API usage, not the implementation.


23-33: This review comment is not applicable to a documentation repository.

The file pages/validators/staking-guide.mdx is a documentation guide, not a smart contract codebase. The Solidity code examples are illustrative usage patterns shown to guide developers, not actual contract implementations. Contract function signatures cannot be verified in the genlayer-docs repository because the GenStaking contract implementation resides in a separate smart contracts repository, not in this documentation codebase. For a documentation file, presenting example usage patterns without importing or verifying against actual contract code is standard and appropriate.

Likely an incorrect or invalid review comment.


184-193: Verify delegator contract function signatures against the actual GenLayer staking contract.

The staking guide documents sharesOf(), delegatorExit(), and delegatorClaim() functions, but the contract implementation is not available in this documentation repository. Confirm these match the actual contract interface:

  • genStaking.sharesOf(delegator, validator) parameter order and return type
  • genStaking.delegatorExit(validator, shares) signature
  • genStaking.delegatorClaim() parameters and return value
  • Ensure delegator address parameter convention is consistent across operations

1-325: This review comment's verification scope is inappropriate for a documentation repository.

The staking guide is well-written and internally consistent with GenLayer's conceptual documentation. However, the original comment requests verification against "the GenLayer smart contract implementation," which does not exist in this documentation repository. Smart contract code verification requires access to the actual contract repository (likely genlayerlabs/genlayer), not this documentation repo.

A proper documentation review should instead focus on:

  1. Internal Consistency - The guide accurately reflects the staking concepts documented in /understand-genlayer-protocol/core-concepts/optimistic-democracy/staking, including the 7-epoch unbonding period, epoch +2 activation rule, and 42,000/42 GEN minimum stakes.

  2. Link Validity - All internal links are correctly formatted and reference existing pages:

    • Staking concepts link: valid
    • CLI reference link: valid (anchors to section 304 in genlayer-cli.mdx)
    • Related resources links: valid
  3. Documentation Completeness - Unlike setup-guide.mdx (which requires version updates per governance changes), this guide appropriately avoids hardcoded contract addresses and versions that would require maintenance.

  4. Clarity and Accuracy - Code examples follow correct Solidity syntax, timelines are clear, and scenarios are practical.

If contract-level verification is needed (function signatures, error messages, exact parameters), that should be conducted against the actual GenLayer smart contract repository through code review or automated testing, not through documentation review.

Likely an incorrect or invalid review comment.


306-318: Verify troubleshooting error messages against contract implementation.

The troubleshooting table lists specific error messages that should be confirmed against the actual staking contract code to ensure accuracy:

  • ValidatorBelowMinimumStake
  • OperatorAlreadyAssigned
  • ValidatorMayNotDepositZeroValue
  • ValidatorExitExceedsShares

Confirm that error names match the contract implementation exactly, verify that all solutions are correct and complete, and check whether any related staking errors are missing from the table. Access to the genlayer-node contract source code is required to complete this verification.

@kirilaa kirilaa self-assigned this Dec 4, 2025

## Epoch System

The network operates in epochs (minimum 1 day):
Copy link
Member

Choose a reason for hiding this comment

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

When is it not minimum?

- **Epoch +2 Activation Rule**: All deposits become active 2 epochs after they are made
- Epoch finalization requires all transactions to be finalized
- Cannot advance to epoch N+1 until epoch N-1 is finalized
- Validators are automatically "primed" via `validatorPrime()` each epoch
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't sound automatic to me

Validator must be primed. The genlayer node does this automatically

Copy link
Member

Choose a reason for hiding this comment

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

But anyone can call it

- **10%** → Validator owners (operational fee)
- **75%** → Total validator stake (validators + delegators)
- **10%** → Developers
- **5%** → DAO
Copy link
Member

Choose a reason for hiding this comment

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

Locked future allocation for the DeepThought AI-DAO

- Sorts the validator into the selection tree

**Key Properties:**
- **Automatic**: Called each epoch by the validator node
Copy link
Member

Choose a reason for hiding this comment

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

Not automatic from the consensus PoV

## Unstaking and Withdrawing

To stop validating or to retrieve staked tokens, validators must initiate an [unstaking](/core-concepts/optimistic-democracy/unstaking) process, which includes a cooldown period to finalize all pending transactions. This ensures the network remains secure and all obligations are fulfilled before the withdrawal.
To stop validating or to retrieve staked tokens, validators must initiate an [unstaking](/understand-genlayer-protocol/core-concepts/optimistic-democracy/unstaking) process, which includes a cooldown period to finalize all pending transactions. This ensures the network remains secure and all obligations are fulfilled before the withdrawal.
Copy link
Member

Choose a reason for hiding this comment

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

What happens to the delegators

## Governance and Safeguards

- **24-Hour Delay**: All slashing actions have a governance delay period
- Governance can intervene before slashing is executed
Copy link
Member

Choose a reason for hiding this comment

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

Remove this, we don't want to say this


# Staking Guide

This guide covers staking operations for both validators and delegators on the GenLayer network.
Copy link
Member

Choose a reason for hiding this comment

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

Be more precise, this describes the Consensus level staking operations. This document is for developers that want to interact with the smart contracts directly

This guide covers staking operations for both validators and delegators on the GenLayer network.

<Callout type="info">
For CLI-based staking operations, see the [GenLayer CLI Staking Commands](/api-references/genlayer-cli#staking-operations-testnet).
Copy link
Member

Choose a reason for hiding this comment

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

To perform staking operations as a user, we recomment using the GenLayer CLI

Copy link
Contributor

@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: 0

🧹 Nitpick comments (2)
pages/developers/staking-guide.mdx (1)

237-378: Large duplicate of Genesis Epoch 0 section exists in parallel concept document.

The Genesis Epoch 0 section (lines 237-378) is substantially duplicated in the concept document pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx (lines 49-160). Both cover the same mechanics: epoch 0 rules, validator/delegator behaviors, activation timelines, and FAQs.

If intentional (how-to guide vs. reference), this is acceptable. However, consider consolidating content to reduce maintenance burden and potential drift between versions.

pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx (1)

49-160: Large overlapping content between concept and guide documents.

The Genesis Epoch 0 section (lines 49-160) significantly overlaps with pages/developers/staking-guide.mdx (lines 237-378). Both files cover nearly identical mechanics, timelines, and FAQs with similar structure and wording.

Consider establishing a single source of truth:

  • Option 1: Keep Genesis Epoch 0 detailed explanation only in the concept doc (staking.mdx), with a brief summary and link in the guide
  • Option 2: Keep the how-to version in the guide, with a brief reference in the concept doc

This reduces maintenance burden and prevents future divergence.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa02687 and a215836.

📒 Files selected for processing (2)
  • pages/developers/staking-guide.mdx (1 hunks)
  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/**/*.mdx

📄 CodeRabbit inference engine (CLAUDE.md)

pages/**/*.mdx: All content is in MDX format supporting React components
Import and use custom components within MDX files
Create .mdx file in appropriate pages/ subdirectory when adding new pages
All content should support React components in MDX files

Files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur

Applied to files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur

Applied to files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur

Applied to files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases

Applied to files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable

Applied to files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Consensus contract addresses change with network upgrades and must be updated in configuration examples

Applied to files:

  • pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx
  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Genesis block numbers are specified for faster node startup (optional but recommended) and should be updated in documentation when network upgrades occur

Applied to files:

  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : GenVM diagnostics integration affects the doctor command behavior and should be documented in the validator setup guide

Applied to files:

  • pages/developers/staking-guide.mdx
📚 Learning: 2025-07-24T07:56:58.272Z
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Enhance command documentation in setup-guide.mdx when new features are added to existing commands

Applied to files:

  • pages/developers/staking-guide.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright E2E
🔇 Additional comments (3)
pages/developers/staking-guide.mdx (1)

1-11: Verify internal cross-references and file location consistency.

The file is correctly structured with proper MDX formatting (Callout component imports and usage, code blocks). However, there is a reference conflict: this file is located at /developers/staking-guide.mdx, but the corresponding concept document (staking.mdx, line 268) references /validators/staking-guide.

Verify that:

  1. The file location in /developers/ is the intended final location
  2. The cross-reference in staking.mdx (line 268) is updated to /developers/staking-guide
  3. The pages/developers/_meta.json includes the "staking-guide" entry for proper navigation
pages/understand-genlayer-protocol/core-concepts/optimistic-democracy/staking.mdx (2)

36-36: Prior grammar feedback has been addressed.

The sentence fragment flagged in the previous review of the Operator Address definition has been corrected. Line 36 now properly reads: "It can be changed by the owner..." making it grammatically complete.


268-268: Fix broken cross-reference to staking guide.

Lines 268 and 278 reference /validators/staking-guide, but the new staking contract guide is located at /developers/staking-guide.mdx.

Update both references to point to the correct path:

-For detailed step-by-step instructions and code examples, see the [Staking Guide](/validators/staking-guide).
+For detailed step-by-step instructions and code examples, see the [Staking Guide](/developers/staking-guide).
-- [Staking Guide](/validators/staking-guide) - Practical guide for staking operations
+- [Staking Guide](/developers/staking-guide) - Practical guide for staking operations

Also applies to: 278-278

⛔ Skipped due to learnings
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Setup Guide Updates (pages/validators/setup-guide.mdx): Update version references in download examples and version lists, update configuration examples with new contract addresses when applicable, enhance command documentation when new features are added to existing commands, update genesis block configuration in consensus section when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update configuration examples with new contract addresses in setup-guide.mdx when applicable
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update consensus contract addresses and genesis block number in setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update genesis block configuration in consensus section of setup-guide.mdx when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version list in curl command output example (line ~88), download command version variable (line ~113), consensus contract addresses and genesis block number (lines ~143-146), and command documentation (line ~347) in setup-guide.mdx for new validator releases
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Consensus contract addresses change with network upgrades and must be updated in configuration examples
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Genesis block numbers are specified for faster node startup (optional but recommended) and should be updated in documentation when network upgrades occur
Learnt from: CR
Repo: genlayerlabs/genlayer-docs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-24T07:56:58.272Z
Learning: Applies to pages/validators/setup-guide.mdx : Update version references in download examples and version lists in setup-guide.mdx when new validator releases occur

@MuncleUscles MuncleUscles merged commit 5a87a11 into main Dec 5, 2025
6 checks passed
@MuncleUscles MuncleUscles deleted the adding_staking_docs branch December 5, 2025 11:53
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