Closed huitseeker closed 5 months ago
@samuelburnham and myself have tackled the Aptos PFN part for this issue. A release/aptos-light-client
branch and a dev
branch have been created, along with a workflow file that will pull relevant tag from the Aptos repository and open a PR on a successful rebase, or open an issue on failure.
After some discussions, I will change the workflow file to only create an issue on the Aptos PFN repository, have a manual rebase on dev
and then a release workflow that removes the out-of-date release branch to create a newer one.
I finalized the updates on lurk-lab/aptos-core. Here is the current workflow for release and bugfix:
Release
aptos-light-client-tag-comparison.yml
: Cron job running everyday at midnight to warn us when there is a relevant Mainnet tag to rebase on.dev
branch on the new tagaptos-light-client-patch-release-tag.yml
: Manual workflow to officialize a release. It takes one input, the name of the tag that was patched. It will create a release branch in the shape `release/This allows us to keep older release around and still know which release branch is the latest based on the Aptos release tag embedded in the branch name.
Bugfix There is no real automation to be done for a Bugfix, as the process will most likely necessitate some manual intervention for conflict resolution
release/aptos-nodev1.14.0-patched
branchPatch release/*
release/aptos-nodev1.14.0-patched
branch a new hotfix/aptos-nodev1.14.0-patched
, commit and push necessary fixeshotfix/aptos-nodev1.14.0-patched
-> release/aptos-nodev1.14.0-patched
Propagate patch to dev
dev
branch a hotfix/dev
branchrelease/aptos-nodev1.14.0-patched
branch to the hotfix/dev
, solve conflict if anyhotfix-dev
-> dev
, iterate and squash merge.I could not think of a better way of handling those without leveraging git merge
. Please let me know if there is any improvement you deem necessary.
All of this sounds great, with a few details:
IOW: we must absolutely ensure correct building of prior released versions, and as a dependency thereof our patched Aptos PFN must have historical branches live forever.
One way to do this is to make sure that while for development, dev
branches depend on other dev
branches, any release does not contain any sort of a dev branch anywhere (transitively): those release branches should be named after the release itself.
Another thing, we might want to disable the automatic program rebuilding in build.rs for the release builds (or do something equivalent).
Thought being, if those are enabled, then because we're not storing the Cargo.lock
files for the LC programs in the programs/
folder, every time the build runs it will fetch the latest version of all dependencies including sphinx
and bls12_381
, which won't have branches pinned to the LC releases. This would happen when building any part of the LC, replacing the programs in the artifacts directory and technically invalidating the release.
We might want to solve this in some other way (I'm very open to suggestions), but what I'm thinking is that the issues are:
Cargo.lock
files or do some other kind of version pinning in the Cargo.toml
files to ensure the right version of everything is used when building in a release branch, for both the RISC-V programs and the LC componentsI'm not really sure of the best solution, but my initial thought is:
Cargo.lock
files to all the crates in the repo (and ensure that any build instructions/scripts pass --locked
where necessary)I think the best approach is to check in the Cargo.lock files.
There is an upcoming PR (https://github.com/lurk-lab/zk-light-clients/pull/28) that adds demonstration of LC programs Solidity verification using Plonk contracts from sphinx. SP1 has separate repository for contracts distribution and releasing, but in our case I think we can for simplicity keep sphinx contracts as part of zk-light-client repository. The fixture-generator and contracts-generator programs use sphinx dependencies from the workspace, so they will be updated in context of releasing the zk-light-client.
Once https://github.com/lurk-lab/zk-light-clients/pull/28 is merged, the release process will require some extension. More specifically:
s3://sphinx-plonk-params
) using specific tag from sphinx (link);Release process works as we now have our first release, created through #54
We want to nail down a first MVP of our release tooling for delivery
Rationale
Because our releases come with a claim to performance, we need to nail a complete suite of software tied to the particular light client we are releasing.
.toml
files that link our software (Aptos PFN, Sphinx, Aptos LC),This points to a release process. We do not have to automate it this round, but considering that we will probably do ~20 releases for this customer, any automation cuts down on future pain.
In detail (worked out example)
Before the Release
LC Repo
Prover (Sphinx) Repo
Aptos PFN Repo
Release Process
Identify commits of LC and corresponding prover:
Tag the commits for our reference:
Create rust version bumps and update dependencies in
.toml
files:Update Prover's Cargo.toml to:
Create release branches/tags:
Reset dev branch to new version:
Update version numbers in dev branch to next version (e.g., 1.3.0-pre)
After the Release
LC Repo
Prover (Sphinx) Repo
Aptos PFN Repo