Skip to content

Commit

Permalink
build: publish workspace to crates.io
Browse files Browse the repository at this point in the history
We want all the crates Penumbra protocol workspace to be published to
crates.io, so that external developers can depend on them in downstream
projects. For now, we'll skip doing so for the binaries, but we can
circle back on them.

The major obstacle is that the `penumbra-sdk-proof-params` create
contains binary keyfiles, which are managed in git-lfs. We cannot upload
the raw keyfiles to crates.io, because that'd result in a 100MB crate.
Instead, we use a custom script to revert the binary keyfiles to
plaintext lfs pointers immediately prior to publishing to crates.io,
which stays under the limit, and allows third-party tools to opt into
downloading the key material via the `download-proving-keys` feature.

The ratelimit of "20s" between crates publishing has been working
reliably when publishing alpha versions (i.e. an HTTP 429 is avoided).
Publishing all crates takes ~12m.

This commit also condenses several "alpha" series releases, culminating
in `0.82.0-alpha.15`. Most of these versions have been published to
crates.io, to evaluate CI behavior on publishing crates.

build: warn-only if download-proving-keys not set

The goal is to warn if keys are not set, but still permit the build.
  • Loading branch information
conorsch committed Jan 21, 2025
1 parent fcde6e2 commit d033582
Show file tree
Hide file tree
Showing 21 changed files with 313 additions and 163 deletions.
106 changes: 50 additions & 56 deletions Cargo.lock

Large diffs are not rendered by default.

76 changes: 41 additions & 35 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,22 @@ tag-name = "v{{version}}"
# The message is required for an annotated tag to be created.
tag-message = "Penumbra version {{version}}"
pre-release-commit-message = "chore: release version {{version}}"
# Don't push to crates.io; we're still using git branches for velocity.
# Permit publishing to crates.io; local developers should run `cargo release --no-publish`
# to prepare the git info, then pushing to remote with tag will trigger crates.io publication.
publish = true
# Do commit, tag, and push the version bump, triggering a new release.
tag = true
# Don't push, since we're still evaluating the new release workflow.
push = false
# Edit each crate's Cargo.toml, bumping versions for other workspace crates.
dependent-version = "upgrade"
# Increase default ratelimit on publishing packages
rate-limit = { existing-packages = 50 }

[workspace.package]
authors = ["Penumbra Labs <[email protected]"]
edition = "2021"
version = "0.82.0-alpha.3"
version = "0.82.0-alpha.15"
repository = "https://github.com/penumbra-zone/penumbra"
homepage = "https://penumbra.zone"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -137,12 +142,12 @@ chacha20poly1305 = { version = "0.9.0" }
chrono = { default-features = false, version = "0.4" }
clap = { version = "3.2" }
cnidarium = { version = "0.82.1", default-features = false}
cnidarium-component = { default-features = false, version = "0.82.0-alpha.0", path = "crates/cnidarium-component" }
cometindex = { version = "0.82.0-alpha.0", path = "crates/util/cometindex" }
cnidarium-component = { default-features = false, version = "0.82.0-alpha.15", path = "crates/cnidarium-component" }
cometindex = { version = "0.82.0-alpha.15", path = "crates/util/cometindex" }
criterion = { version = "0.4" }
decaf377 = { default-features = false, version = "0.10.1" }
decaf377-fmd = { version = "0.82.0-alpha.0", path = "crates/crypto/decaf377-fmd" }
decaf377-ka = { version = "0.82.0-alpha.0", path = "crates/crypto/decaf377-ka" }
decaf377-fmd = { version = "0.82.0-alpha.15", path = "crates/crypto/decaf377-fmd" }
decaf377-ka = { version = "0.82.0-alpha.15", path = "crates/crypto/decaf377-ka" }
decaf377-rdsa = { version = "0.11.0" }
derivative = { version = "2.2" }
directories = { version = "4.0.1" }
Expand Down Expand Up @@ -170,35 +175,36 @@ once_cell = { version = "1.8" }
parking_lot = { version = "0.12.1" }
pbjson = { version = "0.7.0" }
pbjson-types = { version = "0.7.0" }
penumbra-sdk-app = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/app" }
penumbra-sdk-asset = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/asset" }
penumbra-sdk-community-pool = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/community-pool" }
penumbra-sdk-compact-block = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/compact-block" }
penumbra-sdk-custody = { version = "0.82.0-alpha.0", path = "crates/custody" }
penumbra-sdk-auction = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/auction" }
penumbra-sdk-dex = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/dex" }
penumbra-sdk-distributions = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/distributions" }
penumbra-sdk-fee = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/fee" }
penumbra-sdk-funding = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/funding" }
penumbra-sdk-governance = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/governance" }
penumbra-sdk-ibc = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/ibc" }
penumbra-sdk-keys = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/keys" }
penumbra-sdk-mock-client = { version = "0.82.0-alpha.0", path = "crates/test/mock-client" }
penumbra-sdk-mock-consensus = { version = "0.82.0-alpha.0", path = "crates/test/mock-consensus" }
penumbra-sdk-mock-tendermint-proxy = { version = "0.82.0-alpha.0", path = "crates/test/mock-tendermint-proxy" }
penumbra-sdk-num = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/num" }
penumbra-sdk-proof-params = { default-features = false, version = "0.82.0-alpha.0", path = "crates/crypto/proof-params" }
penumbra-sdk-proof-setup = { version = "0.82.0-alpha.0", path = "crates/crypto/proof-setup" }
penumbra-sdk-proto = { default-features = false, version = "0.82.0-alpha.0", path = "crates/proto" }
penumbra-sdk-sct = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/sct" }
penumbra-sdk-shielded-pool = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/shielded-pool" }
penumbra-sdk-stake = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/component/stake" }
penumbra-sdk-tct = { default-features = false, version = "0.82.0-alpha.0", path = "crates/crypto/tct" }
penumbra-sdk-test-subscriber = { version = "0.82.0-alpha.0", path = "crates/test/tracing-subscriber" }
penumbra-sdk-transaction = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/transaction" }
penumbra-sdk-txhash = { default-features = false, version = "0.82.0-alpha.0", path = "crates/core/txhash" }
penumbra-sdk-view = { version = "0.82.0-alpha.0", path = "crates/view" }
penumbra-sdk-wallet = { version = "0.82.0-alpha.0", path = "crates/wallet" }
penumbra-sdk-app = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/app" }
penumbra-sdk-asset = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/asset" }
penumbra-sdk-community-pool = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/community-pool" }
penumbra-sdk-compact-block = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/compact-block" }
penumbra-sdk-custody = { version = "0.82.0-alpha.15", path = "crates/custody" }
penumbra-sdk-auction = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/auction" }
penumbra-sdk-dex = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/dex" }
penumbra-sdk-distributions = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/distributions" }
penumbra-sdk-fee = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/fee" }
penumbra-sdk-funding = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/funding" }
penumbra-sdk-governance = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/governance" }
penumbra-sdk-ibc = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/ibc" }
penumbra-sdk-keys = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/keys" }
penumbra-sdk-mock-client = { version = "0.82.0-alpha.15", path = "crates/test/mock-client" }
penumbra-sdk-mock-consensus = { version = "0.82.0-alpha.15", path = "crates/test/mock-consensus" }
penumbra-sdk-mock-tendermint-proxy = { version = "0.82.0-alpha.15", path = "crates/test/mock-tendermint-proxy" }
penumbra-sdk-num = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/num" }
penumbra-sdk-proof-params = { default-features = false, version = "0.82.0-alpha.15", path = "crates/crypto/proof-params" }
penumbra-sdk-proof-setup = { version = "0.82.0-alpha.15", path = "crates/crypto/proof-setup" }
penumbra-sdk-proto = { default-features = false, version = "0.82.0-alpha.15", path = "crates/proto" }
penumbra-sdk-sct = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/sct" }
penumbra-sdk-shielded-pool = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/shielded-pool" }
penumbra-sdk-stake = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/component/stake" }
penumbra-sdk-tct = { default-features = false, version = "0.82.0-alpha.15", path = "crates/crypto/tct" }
penumbra-sdk-test-subscriber = { version = "0.82.0-alpha.15", path = "crates/test/tracing-subscriber" }
penumbra-sdk-tower-trace = { version = "0.82.0-alpha.15", path = "crates/util/tower-trace" }
penumbra-sdk-transaction = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/transaction" }
penumbra-sdk-txhash = { default-features = false, version = "0.82.0-alpha.15", path = "crates/core/txhash" }
penumbra-sdk-view = { version = "0.82.0-alpha.15", path = "crates/view" }
penumbra-sdk-wallet = { version = "0.82.0-alpha.15", path = "crates/wallet" }
pin-project = { version = "1.0.12" }
pin-project-lite = { version = "0.2.9" }
poseidon377 = { version = "1.2.0" }
Expand Down
1 change: 1 addition & 0 deletions crates/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description = "Benchmarks for Penumbra crates"
version = {workspace = true}
license = {workspace = true}
edition = {workspace = true}
publish = false

[build-dependencies]
regex = { version = "1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/pcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "The command-line interface for the Penumbra Zone"
repository = {workspace = true}
homepage = {workspace = true}
license = {workspace = true}
publish = true
publish = false

[package.metadata.dist]
dist = true
Expand Down
4 changes: 4 additions & 0 deletions crates/bin/pclientd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description = "Penumbra view server daemon"
version = {workspace = true}
license = {workspace = true}
edition = {workspace = true}
publish = false

[package.metadata.dist]
dist = true

[features]
default = ["std", "download-proving-keys"]
Expand Down
8 changes: 4 additions & 4 deletions crates/bin/pd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "The node software for the Penumbra Zone"
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
publish = true
publish = false
rust-version = "1.75"

[package.metadata.dist]
Expand Down Expand Up @@ -61,7 +61,7 @@ once_cell = { workspace = true }
pbjson-types = { workspace = true }
penumbra-sdk-app = { workspace = true, default-features = true }
penumbra-sdk-asset = { workspace = true, default-features = true }
penumbra-sdk-auto-https = { version = "0.82.0-alpha.0", path = "../../util/auto-https" }
penumbra-sdk-auto-https = { version = "0.82.0-alpha.15", path = "../../util/auto-https" }
penumbra-sdk-compact-block = { workspace = true, default-features = true }
penumbra-sdk-custody = { workspace = true }
penumbra-sdk-auction = { workspace = true, features = ["parallel"], default-features = true }
Expand All @@ -76,8 +76,8 @@ penumbra-sdk-sct = { workspace = true, default-features = tr
penumbra-sdk-shielded-pool = { workspace = true, features = ["parallel"], default-features = true }
penumbra-sdk-stake = { workspace = true, features = ["parallel"], default-features = true }
penumbra-sdk-tct = { workspace = true, default-features = true }
penumbra-sdk-tendermint-proxy = { version = "0.82.0-alpha.0", path = "../../util/tendermint-proxy" }
penumbra-sdk-tower-trace = { version = "0.82.0-alpha.0", path = "../../util/tower-trace" }
penumbra-sdk-tendermint-proxy = { version = "0.82.0-alpha.15", path = "../../util/tendermint-proxy" }
penumbra-sdk-tower-trace = { workspace = true }
penumbra-sdk-transaction = { workspace = true, default-features = true }
pin-project = { workspace = true }
pin-project-lite = { workspace = true }
Expand Down
5 changes: 4 additions & 1 deletion crates/bin/pindexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ edition = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
publish = true
publish = false

[package.metadata.dist]
dist = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
7 changes: 5 additions & 2 deletions crates/bin/pmonitor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ edition = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
publish = true
publish = false

[package.metadata.dist]
dist = true

[features]
integration-testnet = []
Expand All @@ -20,7 +23,7 @@ colored = "2.1.0"
directories = {workspace = true}
futures = {workspace = true}
indicatif = {workspace = true}
pcli = {version = "0.82.0-alpha.0", path = "../pcli", default-features = true}
pcli = {version = "0.82.0-alpha.15", path = "../pcli", default-features = true}
penumbra-sdk-app = {workspace = true}
penumbra-sdk-asset = {workspace = true, default-features = false}
penumbra-sdk-compact-block = {workspace = true, default-features = false}
Expand Down
2 changes: 1 addition & 1 deletion crates/core/app-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ penumbra-sdk-shielded-pool = { workspace = true, default-features = fa
penumbra-sdk-stake = { workspace = true, default-features = false }
penumbra-sdk-tct = { workspace = true, default-features = true }
penumbra-sdk-test-subscriber = { workspace = true }
penumbra-sdk-tower-trace = { path = "../../util/tower-trace" }
penumbra-sdk-tower-trace = { workspace = true }
penumbra-sdk-transaction = { workspace = true, features = ["parallel"], default-features = true }
penumbra-sdk-txhash = { workspace = true, default-features = true }
prost = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions crates/core/app-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//! The `penumbra-sdk-app-tests` crate stores workspace-wide test logic
//! for the Penumbra app components.
11 changes: 2 additions & 9 deletions crates/core/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ penumbra-sdk-sct = { workspace = true, default-features = fa
penumbra-sdk-shielded-pool = { workspace = true, default-features = false }
penumbra-sdk-stake = { workspace = true, default-features = false }
penumbra-sdk-tct = { workspace = true, default-features = true }
penumbra-sdk-test-subscriber = { workspace = true }
penumbra-sdk-tower-trace = { version = "0.82.0-alpha.0", path = "../../util/tower-trace" }
penumbra-sdk-tower-trace = { workspace = true }
penumbra-sdk-transaction = { workspace = true, features = ["parallel"], default-features = true }
penumbra-sdk-txhash = { workspace = true, default-features = true }
prost = { workspace = true }
Expand Down Expand Up @@ -105,15 +104,9 @@ tracing = { workspace = true }
url = { workspace = true }

[dev-dependencies]
axum-server = { workspace = true }
camino = { workspace = true }
decaf377-fmd = { workspace = true, default-features = true }
ed25519-consensus = { workspace = true }
penumbra-sdk-mock-client = { workspace = true }
penumbra-sdk-mock-consensus = { workspace = true }
penumbra-sdk-proto = { workspace = true, features = ["box-grpc"] }
penumbra-sdk-test-subscriber = { workspace = true }
penumbra-sdk-mock-tendermint-proxy = { workspace = true }
penumbra-sdk-proto = { workspace = true, features = ["box-grpc"] }
rand = { workspace = true }
rand_chacha = { workspace = true }
rand_core = { workspace = true }
Expand Down
9 changes: 6 additions & 3 deletions crates/crypto/proof-params/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
name = "penumbra-sdk-proof-params"
authors = {workspace = true}
repository = {workspace = true}
description = "Penumbra Proof parameters"
description = "Penumbra proof parameters"
version = {workspace = true}
license = {workspace = true}
edition = {workspace = true}
exclude = ["src/gen/*.bin"]
# We permit inclusion of the `*.bin` files, but including the full binary
# data would be too large for crates.io, so a custom script converts them
# to git-lfs pointers, which can be resolved by enabling the `download-proving-keys` feature.
# exclude = ["src/gen/*.bin"]

[build-dependencies]
regex = { version = "1", optional = true }
Expand Down Expand Up @@ -59,4 +62,4 @@ sha2 = {workspace = true}
tracing = {workspace = true}

[package.metadata.docs.rs]
features = ["bundled-proving-keys"] # docs.rs
features = [] # docs.rs
Loading

0 comments on commit d033582

Please sign in to comment.