Skip to content

Commit

Permalink
Prepare for crates.io release (#365)
Browse files Browse the repository at this point in the history
* Prepare for crates.io release

* Don't use workspace keys in demo-prover
  • Loading branch information
preston-evans98 authored May 31, 2023
1 parent 9e3585f commit 5c1c5c0
Show file tree
Hide file tree
Showing 53 changed files with 245 additions and 109 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ members = [
"examples/demo-nft-module",
"full-node/db/sov-db",

"module-system/sov-default-stf",
"module-system/sov-modules-stf-template",
"module-system/sov-modules-macros",
"module-system/sov-state",
"module-system/sov-modules-api",
"module-system/utils/first-read-last-write-cache",
"module-system/utils/sov-first-read-last-write-cache",
"module-system/module-implementations/sov-accounts",
"module-system/module-implementations/sov-bank",
"module-system/module-implementations/sov-prover-incentives",
Expand All @@ -32,16 +32,16 @@ exclude = [
[workspace.package]
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
license = "MIT OR Apache-2.0"
authors = ["Sovereign Labs <[email protected]>"]
homepage = "sovereign.xyz"
publish = false
repository = "https://github.com/sovereign-labs/sovereign"
repository = "https://github.com/sovereign-labs/sovereign-sdk"
rust-version = "1.66"

[workspace.dependencies]
# Dependencies maintained by sovereign
jmt = { git = "https://github.com/penumbra-zone/jmt.git", rev = "3ca60665bee78549b37bab5ec461d108dada874d", default-features = false }
jmt = "0.6.0"

# External dependencies
anyhow = "1.0.68"
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ coverage: ## Coverage in lcov format
coverage-html: ## Coverage in HTML format
cargo llvm-cov --locked --all-features --html

dry-run-publish:
cat packages_to_publish.txt | xargs -I _ cargo publish --allow-dirty --dry-run -p _

docs: ## Generates documentation locally
cargo doc --open
4 changes: 2 additions & 2 deletions adapters/celestia/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "jupiter"
version = "0.1.0"
edition = "2021"
version = { workspace = true }
edition = { workspace = true }

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

Expand Down
10 changes: 8 additions & 2 deletions adapters/risc0/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[package]
name = "risc0-adapter"
version = "0.1.0"
edition = "2021"
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }
readme = "README.md"

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

Expand Down
6 changes: 3 additions & 3 deletions examples/const-rollup-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "const-rollup-config"
version = "0.1.0"
edition = "2021"
authors = ["Sovereign Labs <[email protected]>"]
version = { workspace = true }
edition = { workspace = true }
authors = { workspace = true }
homepage = "sovereign.xyz"
publish = false
9 changes: 5 additions & 4 deletions examples/demo-nft-module/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
name = "demo-nft-module"
version = "0.1.0"
edition = "2021"
authors = ["Sovereign Labs <[email protected]>"]
version = { workspace = true }
edition = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
homepage = "sovereign.xyz"
publish = false

Expand All @@ -26,4 +27,4 @@ sov-rollup-interface = { path = "../../rollup-interface" }
[features]
default = ["native"]
serde = ["dep:serde", "dep:serde_json"]
native = ["serde", "sov-state/native", "sov-modules-api/native"]
native = ["serde", "sov-state/native", "sov-modules-api/native"]
4 changes: 2 additions & 2 deletions examples/demo-prover/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/demo-prover/methods/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"
risc0-build = { workspace = true }

[package.metadata.risc0]
methods = ["guest"]
methods = ["guest"]
4 changes: 2 additions & 2 deletions examples/demo-prover/methods/guest/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/demo-rollup/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/demo-rollup/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "sov-demo-rollup"
version = "0.1.0"
edition = "2021"
version = { workspace = true }
edition = { workspace = true }
resolver = "2"
authors = ["Sovereign Labs <[email protected]>"]
authors = { workspace = true }
homepage = "sovereign.xyz"
publish = false

Expand Down Expand Up @@ -31,7 +31,7 @@ demo-stf = { path = "../demo-stf", features = ["native"] }
sov-rollup-interface = { path = "../../rollup-interface" }
sov-db = { path = "../../full-node/db/sov-db" }
risc0-adapter = { path = "../../adapters/risc0" }
sov-default-stf = { path = "../../module-system/sov-default-stf" }
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template" }

sov-bank = { path = "../../module-system/module-implementations/sov-bank", default-features = false }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions examples/demo-simple-stf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "demo-simple-stf"
version = "0.1.0"
edition = "2021"
version = { workspace = true }
edition = { workspace = true }
resolver = "2"
authors = ["Sovereign Labs <[email protected]>"]
authors = { workspace = true }
homepage = "sovereign.xyz"
publish = false

Expand Down
1 change: 1 addition & 0 deletions examples/demo-stf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/bank_cmd/test_data
8 changes: 4 additions & 4 deletions examples/demo-stf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "demo-stf"
version = "0.1.0"
edition = "2021"
version = { workspace = true }
edition = { workspace = true }
resolver = "2"
authors = ["Sovereign Labs <[email protected]>"]
authors = { workspace = true }
homepage = "sovereign.xyz"
publish = false

Expand All @@ -30,7 +30,7 @@ sov-rollup-interface = { path = "../../rollup-interface" }
sov-election = { path = "../../module-system/module-implementations/examples/sov-election", default-features = false }
sov-sequencer-registry = { path = "../../module-system/module-implementations/sov-sequencer-registry", default-features = false }
sov-bank = { path = "../../module-system/module-implementations/sov-bank", default-features = false }
sov-default-stf = { path = "../../module-system/sov-default-stf" } # no features available
sov-modules-stf-template = { path = "../../module-system/sov-modules-stf-template" } # no features available
sov-value-setter = { path = "../../module-system/module-implementations/examples/sov-value-setter", default-features = false }
sov-accounts = { path = "../../module-system/module-implementations/sov-accounts", default-features = false }
sov-state = { path = "../../module-system/sov-state", default-features = false }
Expand Down
8 changes: 4 additions & 4 deletions examples/demo-stf/src/app.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#[cfg(feature = "native")]
use crate::runner_config::Config;
use crate::runtime::Runtime;
use sov_default_stf::AppTemplate;
pub use sov_default_stf::Batch;
use sov_default_stf::SequencerOutcome;
use sov_default_stf::TxEffect;
#[cfg(feature = "native")]
pub use sov_modules_api::default_context::DefaultContext;
pub use sov_modules_api::default_context::ZkDefaultContext;
Expand All @@ -15,6 +11,10 @@ use sov_modules_api::Context;
use sov_modules_api::RpcRunner;
#[cfg(feature = "native")]
use sov_modules_api::Spec;
use sov_modules_stf_template::AppTemplate;
pub use sov_modules_stf_template::Batch;
use sov_modules_stf_template::SequencerOutcome;
use sov_modules_stf_template::TxEffect;
#[cfg(feature = "native")]
use sov_rollup_interface::stf::ProverConfig;
use sov_rollup_interface::stf::StateTransitionRunner;
Expand Down
4 changes: 2 additions & 2 deletions examples/demo-stf/src/bank_cmd/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use anyhow::Context;
use borsh::BorshSerialize;
use clap::Parser;
use demo_stf::runtime::Runtime;
use sov_default_stf::RawTx;
use sov_modules_api::transaction::Transaction;
use sov_modules_api::{
default_context::DefaultContext, default_signature::private_key::DefaultPrivateKey, PublicKey,
Spec,
};
use sov_modules_stf_template::RawTx;
use std::fs;
use std::fs::File;
use std::io::Write;
Expand Down Expand Up @@ -172,8 +172,8 @@ mod test {
};
use demo_stf::runner_config::Config;
use demo_stf::runtime::GenesisConfig;
use sov_default_stf::{Batch, RawTx, SequencerOutcome};
use sov_modules_api::Address;
use sov_modules_stf_template::{Batch, RawTx, SequencerOutcome};
use sov_rollup_interface::stf::StateTransitionRunner;

use sov_rollup_interface::{mocks::MockZkvm, stf::StateTransitionFunction};
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-stf/src/hooks_impl.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::runtime::Runtime;
use sov_default_stf::SequencerOutcome;
use sov_modules_api::{
hooks::{ApplyBlobHooks, TxHooks},
transaction::Transaction,
Context, Spec,
};
use sov_modules_stf_template::SequencerOutcome;
use sov_state::WorkingSet;

impl<C: Context> TxHooks for Runtime<C> {
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-stf/src/tests/data_generation/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::runtime::Runtime;
use borsh::BorshSerialize;
use sov_default_stf::RawTx;
use sov_modules_api::default_context::DefaultContext;
use sov_modules_api::default_signature::private_key::DefaultPrivateKey;
use sov_modules_api::transaction::Transaction;
use sov_modules_api::PublicKey;
use sov_modules_stf_template::RawTx;
use std::rc::Rc;

mod election_data;
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-stf/src/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use borsh::BorshSerialize;
use sov_default_stf::{AppTemplate, Batch, SequencerOutcome, TxEffect};
use sov_modules_api::{
default_context::DefaultContext, default_signature::private_key::DefaultPrivateKey, Address,
};
use sov_modules_stf_template::{AppTemplate, Batch, SequencerOutcome, TxEffect};
use sov_rollup_interface::stf::BatchReceipt;
use sov_state::ProverStorage;
use std::path::Path;
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-stf/src/tests/stf_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ pub mod test {
new_test_blob, C,
},
};
use sov_default_stf::{Batch, SequencerOutcome};
use sov_modules_api::{
default_context::DefaultContext, default_signature::private_key::DefaultPrivateKey,
};
use sov_modules_stf_template::{Batch, SequencerOutcome};
use sov_rollup_interface::{mocks::MockZkvm, stf::StateTransitionFunction};
use sov_state::{ProverStorage, WorkingSet};

Expand Down
4 changes: 2 additions & 2 deletions examples/demo-stf/src/tests/tx_revert_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::{
runtime::Runtime,
tests::{data_generation::simulate_da_with_bad_serialization, has_tx_events},
};
use sov_default_stf::{Batch, SequencerOutcome, SlashingReason};
use sov_modules_api::{
default_context::DefaultContext, default_signature::private_key::DefaultPrivateKey,
};
use sov_modules_stf_template::{Batch, SequencerOutcome, SlashingReason};
use sov_rollup_interface::{mocks::MockZkvm, stf::StateTransitionFunction};
use sov_state::{ProverStorage, WorkingSet};

Expand Down Expand Up @@ -171,7 +171,7 @@ fn test_tx_bad_serialization() {
);

assert!(
matches!(apply_blob_outcome.inner, sov_default_stf::SequencerOutcome::Slashed(SlashingReason::InvalidTransactionEncoding)),
matches!(apply_blob_outcome.inner, sov_modules_stf_template::SequencerOutcome::Slashed(SlashingReason::InvalidTransactionEncoding)),
"Unexpected outcome: Stateless verification should have failed due to invalid signature"
);

Expand Down
11 changes: 9 additions & 2 deletions full-node/db/sov-db/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[package]
name = "sov-db"
version = "0.1.0"
edition = "2021"
description = "A high-level DB interface for the Sovereign SDK"
license = "Apache-2.0" # This license is inherited from Aptos
edition = { workspace = true }
authors = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }
readme = "README.md"
resolver = "2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
7 changes: 4 additions & 3 deletions full-node/db/sov-schema-db/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[package]
name = "sov-schema-db"
version = "0.1.0"
description = "A low level interface transforming RocksDB into a type-oriented data store"
version = { workspace = true }
license = "Apache-2.0" # This license is inherited from Aptos

# Workspace inherited keys
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
readme = "README.md"

[dependencies]
# Dependencies maintained by sovereign labs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
[package]
name = "sov-election"
version = "0.1.0"
edition = "2021"
description = "A Sovereign SDK module for incentivizing provers"
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }
readme = "README.md"
resolver = "2"
publish = false

[dev-dependencies]
sov-modules-api = { path = "../../../sov-modules-api" }
Expand Down
Loading

0 comments on commit 5c1c5c0

Please sign in to comment.