-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add challenge integration infrastructure with checkpoint persistence #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1c24a12
feat: add challenges directory structure and workspace configuration
echobt d8f6e57
feat: add challenge-registry crate for challenge lifecycle management
echobt 56ea011
feat(core): add checkpoint system for state persistence
echobt 467e7d4
feat: add restoration system for checkpoint recovery
echobt b48d692
feat(rpc-server): add health check endpoints for rolling updates
echobt 42a35be
docs: add challenge integration guide
echobt ef71472
test: add integration tests for checkpoint and restoration system
echobt 54b9661
feat: add graceful shutdown with checkpoint persistence
echobt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Platform Challenge Crates | ||
|
|
||
| This directory contains challenge crates that can be integrated with the Platform validator network. | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| ``` | ||
| challenges/ | ||
| ├── README.md # This file | ||
| ├── example-challenge/ # Example challenge template (future) | ||
| └── [your-challenge]/ # Your custom challenge crate | ||
| ``` | ||
|
|
||
| ## Adding a New Challenge Crate | ||
|
|
||
| 1. Create your challenge crate in this directory or reference it as a git dependency | ||
| 2. Implement the `Challenge` trait from `platform-challenge-sdk` | ||
| 3. Register your challenge in the challenge registry | ||
| 4. Update the workspace `Cargo.toml` if adding locally | ||
|
|
||
| ## External Challenge Crates | ||
|
|
||
| Challenge crates can also be external (like term-challenge). They should: | ||
| - Import `platform-challenge-sdk` as a dependency | ||
| - Implement the `ServerChallenge` trait | ||
| - Provide Docker configuration for evaluation | ||
|
|
||
| ## Challenge Crate Requirements | ||
|
|
||
| - Must implement `platform-challenge-sdk::ServerChallenge` | ||
| - Must provide `/evaluate` HTTP endpoint | ||
| - Must handle graceful shutdown signals | ||
| - Must support state persistence for hot-reload | ||
|
|
||
| ## Example | ||
|
|
||
| See [term-challenge](https://github.com/PlatformNetwork/term-challenge) for a complete example. | ||
|
|
||
| ## Documentation | ||
|
|
||
| For detailed integration instructions, see the [Challenge Integration Guide](../docs/challenge-integration.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| [package] | ||
| name = "platform-challenge-registry" | ||
| version.workspace = true | ||
| edition.workspace = true | ||
| description = "Challenge registry and lifecycle management for Platform Network" | ||
|
|
||
| [dependencies] | ||
| platform-core = { path = "../core" } | ||
| platform-challenge-sdk = { path = "../challenge-sdk" } | ||
| platform-storage = { path = "../storage" } | ||
|
|
||
| # Async | ||
| tokio = { workspace = true } | ||
| async-trait = { workspace = true } | ||
| futures = { workspace = true } | ||
|
|
||
| # Serialization | ||
| serde = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| bincode = { workspace = true } | ||
|
|
||
| # Utils | ||
| tracing = { workspace = true } | ||
| thiserror = { workspace = true } | ||
| anyhow = { workspace = true } | ||
| chrono = { workspace = true } | ||
| parking_lot = { workspace = true } | ||
| uuid = { workspace = true } | ||
|
|
||
| # Crypto for checksums | ||
| sha2 = { workspace = true } | ||
| hex = { workspace = true } | ||
|
|
||
| # Versioning | ||
| semver = "1.0" | ||
|
|
||
| # Health checks | ||
| reqwest = { workspace = true } | ||
|
|
||
| [dev-dependencies] | ||
| tempfile = { workspace = true } | ||
| tokio-test = { workspace = true } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a language tag to the fenced block.
Markdownlint MD040 flags fenced blocks without a language; use
texthere.Proposed fix
In
@challenges/README.mdaround lines 7 - 12, The fenced code block in README.mdthat displays the directory tree (the block starting with the triple backticks
followed by the tree: "challenges/ ├── README.md ...") is missing a language
tag; update that fenced block to include the language tag "text" (i.e., change
the opening
totext) so Markdownlint MD040 is satisfied and the tree istreated as plain text.