-
Notifications
You must be signed in to change notification settings - Fork 0
Build and embed default pid0 "kernel" #23
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
Open
lthibault
wants to merge
23
commits into
master
Choose a base branch
from
feat/default-kernel-build
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Export is_ipfs_path() from loaders module for reuse - Add path sanitization to prevent directory traversal attacks - Refactor BootConfig to support both IPFS UnixFS and local filesystem paths - Separate file I/O (read_file_content) from parsing (parse_multiaddrs_from_content) - Update executor to pass boot_path and ipfs_url to BootConfig - Add comprehensive tests for path sanitization and IPFS path detection - All async operations properly handled for IPFS HTTP API calls
- Add router.capnp schema defining Router interface with addPeer and bootstrap methods - Update build.rs to compile Cap'n Proto schemas - Add capnp and capnp-rpc dependencies to Cargo.toml - Add router_capnp module to src/lib.rs for generated code
- Add RouterCapability struct implementing router_capnp::router::Server - Use MPSC channel to send KAD operations to executor - Implement addPeer method to add peers to routing table - Implement bootstrap method to trigger Kademlia bootstrap - Export router module in src/cell/mod.rs
- Create Router capability in executor and expose as bootstrap capability - Add create_host_rpc_system to Proc for host-side RPC setup - Use tokio_util::compat for stream compatibility - Process KAD operations (AddPeer, Bootstrap) in executor event loop - Run RPC system concurrently with swarm event loop
- Add build.rs to default-kernel example to compile router schema - Add capnpc build dependency to default-kernel Cargo.toml - Update default-kernel to bootstrap Router client and add hardcoded IPFS bootstrap peers - Extract peer IDs from multiaddrs and group addresses by peer - Call Router.addPeer for each bootstrap peer, then call Router.bootstrap
- Downgrade libp2p from 0.56.0 to 0.55.0 to avoid buggy libp2p-kad 0.48.0 - Remove [patch.crates-io] section from root Cargo.toml - Remove root .patches directory (no longer needed) - Example patches in examples/default-kernel/.patches remain for WASM support
Contributor
Author
|
@mikelsr I've pared the scope way back and arrived at something I'm quite pleased with. I will re-introduce capnp in a later PR. For now, we've got a default kernel that builds and embeds, and a PID0 that prints to stdout. Hopefully this is a bit easier to review, too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Parts of this may be a bit crude, but expect refinement over subsequent PRs. Recommending approaching this from the top-level
Makefileand working down. In essence, we buildexamples/default-kernelinto an empty dir,ipfs addit, and then embed the resulting CID in thewwbinary as a default PID0 for the cell.