-
Notifications
You must be signed in to change notification settings - Fork 150
Description
Summary
Now that forc-crypto has been migrated from the sway repository to the forc monorepo (v0.71.0+), it's no longer bundled inside the forc-binaries tarball. The channel TOML files need to include forc-crypto as a separate package entry, similar to how forc-wallet is specified.
Background
Previously, forc-crypto was distributed as part of the forc-binaries tarball from the sway repo. Starting with v0.71.0, it's now a standalone release from FuelLabs/forc with its own tarball:
forc-crypto-0.71.0-linux_amd64.tar.gz
forc-crypto-0.71.0-linux_arm64.tar.gz
forc-crypto-0.71.0-darwin_amd64.tar.gz
forc-crypto-0.71.0-darwin_arm64.tar.gz
Related PRs/Issues
- feat: migrate
forc-cryptofrom sway to forc monorepo #808 (forc-crypto migration in fuelup) - Migrate
forc-tracing&forc-cryptoover from theswayrepo. forc#119 (forc-crypto migration to forc monorepo) - Tooling Monorepo sway-rfcs#49 (RFC for forc monorepo migration)
Files to Update
The build-channel tool and then regenerate:
channel-fuel-mainnet.toml
channel-fuel-testnet.toml
channel-fuel-devnet.toml
channel-fuel-nightly.toml
Implementation
Step 1: Update build-channel tool
Modify /ci/build-channel/src/main.rs to:
- Accept
forc-cryptoas a version-specifiable component (likeforcandfuel-core) - Generate the appropriate package entry for
forc-crypto
Currently the tool accepts versions like:
build-channel my-channel.toml 2023-02-13 forc=0.70.1 fuel-core=0.46.0After this change, it should also accept:
build-channel my-channel.toml 2023-02-13 forc=0.70.1 fuel-core=0.46.0 forc-crypto=0.71.0Step 2: Expected Output Format
The generated TOML should include a new [pkg.forc-crypto] section:
[pkg.forc-crypto]
version = "0.71.0"
[pkg.forc-crypto.target.linux_amd64]
url = "https://github.com/FuelLabs/forc/releases/download/forc-crypto-0.71.0/forc-crypto-0.71.0-linux_amd64.tar.gz"
hash = "<sha256>"
[pkg.forc-crypto.target.linux_arm64]
url = "https://github.com/FuelLabs/forc/releases/download/forc-crypto-0.71.0/forc-crypto-0.71.0-linux_arm64.tar.gz"
hash = "<sha256>"
[pkg.forc-crypto.target.darwin_amd64]
url = "https://github.com/FuelLabs/forc/releases/download/forc-crypto-0.71.0/forc-crypto-0.71.0-darwin_amd64.tar.gz"
hash = "<sha256>"
[pkg.forc-crypto.target.darwin_arm64]
url = "https://github.com/FuelLabs/forc/releases/download/forc-crypto-0.71.0/forc-crypto-0.71.0-darwin_arm64.tar.gz"
hash = "<sha256>"Key Implementation Details
- Repository:
FuelLabs/forc - Tag format:
forc-crypto-{version}(notv{version}) - Tarball naming:
forc-crypto-{version}-{target}.tar.gz - Targets:
linux_amd64,linux_arm64,darwin_amd64,darwin_arm64
The write_document function in main.rs already handles similar logic for other components. The key difference for forc-crypto is:
- Uses the forc monorepo (
FuelLabs/forc) - Uses component-prefixed tags (
forc-crypto-0.71.0instead ofv0.71.0) - Has its own tarball prefix (
forc-cryptoinstead offorc-binaries)
These patterns are already handled by Component::repository_for_version(), Component::tag_for_version(), and Component::tarball_prefix_for_version() from #808.
Step 3: Regenerate Channel Files
After updating the build-channel tool, regenerate the channel files with the appropriate forc-crypto version:
cd ci/build-channel
cargo build --release
# Example for mainnet (adjust versions as needed)
./target/release/build-channel channel-fuel-mainnet.toml 2025-01-15 forc=0.70.1 fuel-core=0.46.0 forc-crypto=0.71.0Acceptance Criteria
-
build-channeltool acceptsforc-crypto=X.Y.Zversion specification - Generated TOML includes proper
[pkg.forc-crypto]section with all 4 targets - URLs use correct tag format (
forc-crypto-{version}) - URLs use correct tarball naming (
forc-crypto-{version}-{target}.tar.gz) - Hashes are correctly computed
- Channel files regenerated and pushed to gh-pages
-
fuelup component add forc-cryptoworks with updated channels