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
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-crypto as a version-specifiable component (like forc and fuel-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.0
After 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.0
Step 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} (not v{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.0 instead of v0.71.0)
- Has its own tarball prefix (
forc-crypto instead of forc-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.0
Acceptance Criteria
Summary
Now that
forc-cryptohas been migrated from the sway repository to the forc monorepo (v0.71.0+), it's no longer bundled inside theforc-binariestarball. The channel TOML files need to includeforc-cryptoas a separate package entry, similar to howforc-walletis specified.Background
Previously,
forc-cryptowas distributed as part of theforc-binariestarball from the sway repo. Starting with v0.71.0, it's now a standalone release fromFuelLabs/forcwith its own tarball:Related PRs/Issues
forc-cryptofrom sway to forc monorepo #808 (forc-crypto migration in fuelup)forc-tracing&forc-cryptoover from theswayrepo. forc#119 (forc-crypto migration to forc monorepo)Files to Update
The build-channel tool and then regenerate:
Implementation
Step 1: Update build-channel tool
Modify
/ci/build-channel/src/main.rsto:forc-cryptoas a version-specifiable component (likeforcandfuel-core)forc-cryptoCurrently the tool accepts versions like:
After this change, it should also accept:
Step 2: Expected Output Format
The generated TOML should include a new
[pkg.forc-crypto]section:Key Implementation Details
FuelLabs/forcforc-crypto-{version}(notv{version})forc-crypto-{version}-{target}.tar.gzlinux_amd64,linux_arm64,darwin_amd64,darwin_arm64The
write_documentfunction inmain.rsalready handles similar logic for other components. The key difference forforc-cryptois:FuelLabs/forc)forc-crypto-0.71.0instead ofv0.71.0)forc-cryptoinstead offorc-binaries)These patterns are already handled by
Component::repository_for_version(),Component::tag_for_version(), andComponent::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:
Acceptance Criteria
build-channeltool acceptsforc-crypto=X.Y.Zversion specification[pkg.forc-crypto]section with all 4 targetsforc-crypto-{version})forc-crypto-{version}-{target}.tar.gz)fuelup component add forc-cryptoworks with updated channels