Skip to content

Commit

Permalink
refactor: move crates into penumbra-sdk namespace (#4975)
Browse files Browse the repository at this point in the history
This moves our workspace into a `penumbra-sdk` namespace ahead of
publishing `v0.82.0-alpha.0` on crates.io. We're using the `penumbra-sdk`
prefix for all crate names because it's unique. (The `penumbra`) crate
name is already taken on crates.io and belongs to an unrelated project.

In addition to a renaming, several other changes are made for crates.io
compatibility:

  * fills out crate metadata fields to meet spec
  * breaks out app-tests to separate crate
  • Loading branch information
erwanor authored and conorsch committed Jan 19, 2025
1 parent 5e50e08 commit 91927f2
Show file tree
Hide file tree
Showing 525 changed files with 3,780 additions and 3,264 deletions.
1,178 changes: 682 additions & 496 deletions Cargo.lock

Large diffs are not rendered by default.

73 changes: 37 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"crates/bin/pmonitor",
"crates/cnidarium-component",
"crates/core/app",
"crates/core/app-tests",
"crates/core/asset",
"crates/core/component/community-pool",
"crates/core/component/compact-block",
Expand Down Expand Up @@ -95,7 +96,7 @@ tag-name = "v{{version}}"
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.
publish = false
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.
Expand All @@ -104,7 +105,7 @@ push = false
[workspace.package]
authors = ["Penumbra Labs <team@penumbralabs.xyz"]
edition = "2021"
version = "0.81.1"
version = "0.82.0-alpha.3"
repository = "https://github.com/penumbra-zone/penumbra"
homepage = "https://penumbra.zone"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -135,13 +136,13 @@ camino = { version = "1" }
chacha20poly1305 = { version = "0.9.0" }
chrono = { default-features = false, version = "0.4" }
clap = { version = "3.2" }
cnidarium = { version = "0.82", default-features = false}
cnidarium-component = { default-features = false, path = "crates/cnidarium-component" }
cometindex = { path = "crates/util/cometindex" }
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" }
criterion = { version = "0.4" }
decaf377 = { default-features = false, version = "0.10.1" }
decaf377-fmd = { path = "crates/crypto/decaf377-fmd" }
decaf377-ka = { path = "crates/crypto/decaf377-ka" }
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-rdsa = { version = "0.11.0" }
derivative = { version = "2.2" }
directories = { version = "4.0.1" }
Expand Down Expand Up @@ -169,35 +170,35 @@ once_cell = { version = "1.8" }
parking_lot = { version = "0.12.1" }
pbjson = { version = "0.7.0" }
pbjson-types = { version = "0.7.0" }
penumbra-app = { default-features = false, path = "crates/core/app" }
penumbra-asset = { default-features = false, path = "crates/core/asset" }
penumbra-community-pool = { default-features = false, path = "crates/core/component/community-pool" }
penumbra-compact-block = { default-features = false, path = "crates/core/component/compact-block" }
penumbra-custody = { path = "crates/custody" }
penumbra-auction = { default-features = false, path = "crates/core/component/auction" }
penumbra-dex = { default-features = false, path = "crates/core/component/dex" }
penumbra-distributions = { default-features = false, path = "crates/core/component/distributions" }
penumbra-fee = { default-features = false, path = "crates/core/component/fee" }
penumbra-funding = { default-features = false, path = "crates/core/component/funding" }
penumbra-governance = { default-features = false, path = "crates/core/component/governance" }
penumbra-ibc = { default-features = false, path = "crates/core/component/ibc" }
penumbra-keys = { default-features = false, path = "crates/core/keys" }
penumbra-mock-client = { path = "crates/test/mock-client" }
penumbra-mock-consensus = { path = "crates/test/mock-consensus" }
penumbra-mock-tendermint-proxy = { path = "crates/test/mock-tendermint-proxy" }
penumbra-num = { default-features = false, path = "crates/core/num" }
penumbra-proof-params = { default-features = false, path = "crates/crypto/proof-params" }
penumbra-proof-setup = { path = "crates/crypto/proof-setup" }
penumbra-proto = { default-features = false, path = "crates/proto" }
penumbra-sct = { default-features = false, path = "crates/core/component/sct" }
penumbra-shielded-pool = { default-features = false, path = "crates/core/component/shielded-pool" }
penumbra-stake = { default-features = false, path = "crates/core/component/stake" }
penumbra-tct = { default-features = false, path = "crates/crypto/tct" }
penumbra-test-subscriber = { path = "crates/test/tracing-subscriber" }
penumbra-transaction = { default-features = false, path = "crates/core/transaction" }
penumbra-txhash = { default-features = false, path = "crates/core/txhash" }
penumbra-view = { path = "crates/view" }
penumbra-wallet = { path = "crates/wallet" }
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" }
pin-project = { version = "1.0.12" }
pin-project-lite = { version = "0.2.9" }
poseidon377 = { version = "1.2.0" }
Expand Down
28 changes: 16 additions & 12 deletions crates/bench/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[package]
name = "penumbra-bench"
name = "penumbra-sdk-bench"
authors = {workspace = true}
repository = {workspace = true}
description = "Benchmarks for Penumbra crates"
version = {workspace = true}
license = {workspace = true}
edition = {workspace = true}

[build-dependencies]
Expand Down Expand Up @@ -74,9 +78,9 @@ bech32 = {workspace = true}
decaf377 = {workspace = true, features = ["r1cs"], default-features = true}
num-bigint = {workspace = true}
once_cell = {workspace = true}
penumbra-asset = {workspace = true, default-features = true}
penumbra-keys = {workspace = true, default-features = true}
penumbra-num = {workspace = true, default-features = true}
penumbra-sdk-asset = {workspace = true, default-features = true}
penumbra-sdk-keys = {workspace = true, default-features = true}
penumbra-sdk-num = {workspace = true, default-features = true}
rand = {workspace = true}
rand_core = {workspace = true, features = ["getrandom"]}
serde = {workspace = true, features = ["derive"]}
Expand All @@ -88,15 +92,15 @@ criterion = {workspace = true, features = ["html_reports"]}
decaf377-fmd = {workspace = true}
decaf377-ka = {workspace = true}
decaf377-rdsa = {workspace = true}
penumbra-dex = {workspace = true, default-features = true}
penumbra-fee = {workspace = true, default-features = true}
penumbra-governance = {workspace = true, default-features = true}
penumbra-sct = {workspace = true, default-features = true}
penumbra-shielded-pool = {workspace = true, default-features = true}
penumbra-stake = {workspace = true, default-features = true}
penumbra-tct = {workspace = true, features = ["r1cs"], default-features = true}
penumbra-sdk-dex = {workspace = true, default-features = true}
penumbra-sdk-fee = {workspace = true, default-features = true}
penumbra-sdk-governance = {workspace = true, default-features = true}
penumbra-sdk-sct = {workspace = true, default-features = true}
penumbra-sdk-shielded-pool = {workspace = true, default-features = true}
penumbra-sdk-stake = {workspace = true, default-features = true}
penumbra-sdk-tct = {workspace = true, features = ["r1cs"], default-features = true}

[dev-dependencies.penumbra-proof-params]
[dev-dependencies.penumbra-sdk-proof-params]
workspace = true
default-features = true
features = [
Expand Down
8 changes: 4 additions & 4 deletions crates/bench/benches/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, SynthesisMode,
};
use decaf377::{Fq, Fr};
use penumbra_asset::{Balance, Value, STAKING_TOKEN_ASSET_ID};
use penumbra_num::{fixpoint::U128x128, Amount};
use penumbra_proof_params::{DummyWitness, CONVERT_PROOF_PROVING_KEY};
use penumbra_shielded_pool::{
use penumbra_sdk_asset::{Balance, Value, STAKING_TOKEN_ASSET_ID};
use penumbra_sdk_num::{fixpoint::U128x128, Amount};
use penumbra_sdk_proof_params::{DummyWitness, CONVERT_PROOF_PROVING_KEY};
use penumbra_sdk_shielded_pool::{
ConvertCircuit, ConvertProof, ConvertProofPrivate, ConvertProofPublic,
};

Expand Down
14 changes: 7 additions & 7 deletions crates/bench/benches/delegator_vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ use ark_relations::r1cs::{
};
use decaf377::{Fq, Fr};
use decaf377_rdsa::{SpendAuth, VerificationKey};
use penumbra_asset::Value;
use penumbra_governance::{
use penumbra_sdk_asset::Value;
use penumbra_sdk_governance::{
DelegatorVoteCircuit, DelegatorVoteProof, DelegatorVoteProofPrivate, DelegatorVoteProofPublic,
};
use penumbra_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_proof_params::{DummyWitness, DELEGATOR_VOTE_PROOF_PROVING_KEY};
use penumbra_sct::Nullifier;
use penumbra_shielded_pool::Note;
use penumbra_tct as tct;
use penumbra_sdk_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_sdk_proof_params::{DummyWitness, DELEGATOR_VOTE_PROOF_PROVING_KEY};
use penumbra_sdk_sct::Nullifier;
use penumbra_sdk_shielded_pool::Note;
use penumbra_sdk_tct as tct;

use criterion::{criterion_group, criterion_main, Criterion};
use rand_core::OsRng;
Expand Down
14 changes: 7 additions & 7 deletions crates/bench/benches/nullifier_derivation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, SynthesisMode,
};
use decaf377::Fq;
use penumbra_asset::Value;
use penumbra_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_proof_params::{DummyWitness, NULLIFIER_DERIVATION_PROOF_PROVING_KEY};
use penumbra_sct::Nullifier;
use penumbra_shielded_pool::{
use penumbra_sdk_asset::Value;
use penumbra_sdk_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_sdk_proof_params::{DummyWitness, NULLIFIER_DERIVATION_PROOF_PROVING_KEY};
use penumbra_sdk_sct::Nullifier;
use penumbra_sdk_shielded_pool::{
Note, NullifierDerivationProofPrivate, NullifierDerivationProofPublic, Rseed,
};
use penumbra_shielded_pool::{NullifierDerivationCircuit, NullifierDerivationProof};
use penumbra_tct as tct;
use penumbra_sdk_shielded_pool::{NullifierDerivationCircuit, NullifierDerivationProof};
use penumbra_sdk_tct as tct;

use criterion::{criterion_group, criterion_main, Criterion};
use rand_core::OsRng;
Expand Down
8 changes: 4 additions & 4 deletions crates/bench/benches/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use ark_relations::r1cs::{
use decaf377::{Fq, Fr};
use decaf377_fmd as fmd;
use decaf377_ka as ka;
use penumbra_asset::{Balance, Value};
use penumbra_keys::{keys::Diversifier, Address};
use penumbra_proof_params::{DummyWitness, OUTPUT_PROOF_PROVING_KEY};
use penumbra_shielded_pool::{
use penumbra_sdk_asset::{Balance, Value};
use penumbra_sdk_keys::{keys::Diversifier, Address};
use penumbra_sdk_proof_params::{DummyWitness, OUTPUT_PROOF_PROVING_KEY};
use penumbra_sdk_shielded_pool::{
output::{OutputProofPrivate, OutputProofPublic},
Note, OutputCircuit, OutputProof, Rseed,
};
Expand Down
14 changes: 8 additions & 6 deletions crates/bench/benches/spend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ use ark_relations::r1cs::{
};
use decaf377::{Fq, Fr};
use decaf377_rdsa::{SpendAuth, VerificationKey};
use penumbra_asset::Value;
use penumbra_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_proof_params::{DummyWitness, SPEND_PROOF_PROVING_KEY};
use penumbra_sct::Nullifier;
use penumbra_shielded_pool::{Note, SpendCircuit, SpendProof, SpendProofPrivate, SpendProofPublic};
use penumbra_tct as tct;
use penumbra_sdk_asset::Value;
use penumbra_sdk_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_sdk_proof_params::{DummyWitness, SPEND_PROOF_PROVING_KEY};
use penumbra_sdk_sct::Nullifier;
use penumbra_sdk_shielded_pool::{
Note, SpendCircuit, SpendProof, SpendProofPrivate, SpendProofPublic,
};
use penumbra_sdk_tct as tct;

use criterion::{criterion_group, criterion_main, Criterion};
use rand_core::OsRng;
Expand Down
12 changes: 6 additions & 6 deletions crates/bench/benches/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, SynthesisMode,
};
use decaf377::{Fq, Fr};
use penumbra_asset::{asset, Balance, Value};
use penumbra_dex::{
use penumbra_sdk_asset::{asset, Balance, Value};
use penumbra_sdk_dex::{
swap::proof::{SwapCircuit, SwapProof, SwapProofPublic},
swap::{proof::SwapProofPrivate, SwapPlaintext},
TradingPair,
};
use penumbra_fee::Fee;
use penumbra_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_num::Amount;
use penumbra_proof_params::{DummyWitness, SWAP_PROOF_PROVING_KEY};
use penumbra_sdk_fee::Fee;
use penumbra_sdk_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_sdk_num::Amount;
use penumbra_sdk_proof_params::{DummyWitness, SWAP_PROOF_PROVING_KEY};

use criterion::{criterion_group, criterion_main, Criterion};
use rand_core::OsRng;
Expand Down
16 changes: 8 additions & 8 deletions crates/bench/benches/swap_claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ use ark_relations::r1cs::{
ConstraintSynthesizer, ConstraintSystem, OptimizationGoal, SynthesisMode,
};
use decaf377::Fq;
use penumbra_asset::asset;
use penumbra_dex::{
use penumbra_sdk_asset::asset;
use penumbra_sdk_dex::{
swap::SwapPlaintext,
swap_claim::{SwapClaimCircuit, SwapClaimProof, SwapClaimProofPrivate, SwapClaimProofPublic},
BatchSwapOutputData, TradingPair,
};
use penumbra_fee::Fee;
use penumbra_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_num::Amount;
use penumbra_proof_params::{DummyWitness, SWAPCLAIM_PROOF_PROVING_KEY};
use penumbra_sct::Nullifier;
use penumbra_tct as tct;
use penumbra_sdk_fee::Fee;
use penumbra_sdk_keys::keys::{Bip44Path, SeedPhrase, SpendKey};
use penumbra_sdk_num::Amount;
use penumbra_sdk_proof_params::{DummyWitness, SWAPCLAIM_PROOF_PROVING_KEY};
use penumbra_sdk_sct::Nullifier;
use penumbra_sdk_tct as tct;

use criterion::{criterion_group, criterion_main, Criterion};
use rand_core::OsRng;
Expand Down
Loading

0 comments on commit 91927f2

Please sign in to comment.