Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add no-std to rollup-interface #1077

Merged
merged 37 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
99f2e16
feat: add `no-std` to `rollup-interface`
vlopes11 Oct 19, 2023
955a38a
update fmt
vlopes11 Oct 19, 2023
5bf9608
add to_string to mock da test
vlopes11 Oct 19, 2023
70283d8
fix sov-schema-db
vlopes11 Oct 19, 2023
dcaa01f
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 20, 2023
a9a3944
add `no-std` to `sov-schema-db`
vlopes11 Oct 20, 2023
5839568
restore test-data
vlopes11 Oct 20, 2023
dd65550
fix format on sov-schema-db
vlopes11 Oct 20, 2023
4018ec1
add no-std directive to sov-schema-db
vlopes11 Oct 20, 2023
90047cb
add `no-std` to `sov-db`
vlopes11 Oct 20, 2023
b8ca399
add tokio to sov-stf-runner/sov-db
vlopes11 Oct 20, 2023
7243c70
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 20, 2023
5dd592b
add default-features to byteorder
vlopes11 Oct 20, 2023
5542288
add `tokio` as default feature of `sov-db`
vlopes11 Oct 20, 2023
74f5760
restore nightly json files
vlopes11 Oct 20, 2023
2f1d537
restore more json files
vlopes11 Oct 20, 2023
fbaf396
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 20, 2023
0739250
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 20, 2023
cf3b9a9
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 20, 2023
a97a8d0
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 23, 2023
fd94d80
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 24, 2023
5c5e320
move std feature shield bloat code to dedicated sub-modules
vlopes11 Oct 24, 2023
ae46f73
move bloat feature shield to dedicated use_std modules
vlopes11 Oct 24, 2023
1296c19
Update rollup-interface/src/state_machine/mocks/zk_vm.rs
vlopes11 Oct 24, 2023
b687b0c
revert sov-db & sov-schema-db
vlopes11 Oct 24, 2023
0fe421d
restore split impl for std bincode
vlopes11 Oct 24, 2023
57eee14
reorg sov-schema-db manifest w/ default-features
vlopes11 Oct 24, 2023
cf50df4
move da-mock-service to its own module
vlopes11 Oct 24, 2023
e788931
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 24, 2023
ed95780
upd cargo lock
vlopes11 Oct 24, 2023
31e4245
remote stall file
vlopes11 Oct 25, 2023
5320fd8
add no-std CI check
vlopes11 Oct 25, 2023
ce08b86
Merge branch 'nightly' into vlopes11/feature/no-std-rollup-interface
vlopes11 Oct 25, 2023
3ea1235
fix cargo docs
vlopes11 Oct 25, 2023
31939ea
require borsh features for sov-db
vlopes11 Oct 25, 2023
c3dcf91
add check_no_std to required all-green ci jobs
vlopes11 Oct 25, 2023
fce8c53
clean check_no_std ci cache commands
vlopes11 Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
# which should be required to pass before merging a PR, don't forget to
# update this list!
- check
- check_no_std
- hack
- nextest
- test
Expand Down Expand Up @@ -122,6 +123,23 @@ jobs:
echo "Linting or formatting errors detected, please run 'make lint-fix' to fix it";
exit 1
fi

check_no_std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv6m-none-eabi
override: true
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/nightly' }}
- name: Run check
run: make check-no-std

# Check that every combination of features is working properly.
hack:
name: features
Expand Down
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,31 @@ jmt = "0.8.0"

# External dependencies
async-trait = "0.1.71"
anyhow = "1.0.68"
anyhow = { version = "1.0.68", default-features = false }
arbitrary = { version = "1.3.1", features = ["derive"] }
borsh = { version = "0.10.3", features = ["rc", "bytes"] }
borsh = { version = "0.10.3", default-features = false }
# TODO: Consider replacing this serialization format
# https://github.com/Sovereign-Labs/sovereign-sdk/issues/283
bincode = "1.3.3"
bcs = "0.1.5"
byteorder = "1.5.0"
bytes = "1.2.1"
byteorder = { version = "1.5.0", default-features = false }
bytes = { version = "1.2.1", default-features = false }
digest = { version = "0.10.6", default-features = false, features = ["alloc"] }
futures = "0.3"
hex = "0.4.3"
once_cell = "1.10.0"
hex = { version = "0.4.3", default-features = false, features = ["alloc", "serde"] }
once_cell = { version = "1.10.0", default-features = false, features = ["alloc"] }
prometheus = { version = "0.13.3", default-features = false }
proptest = "1.3.1"
proptest = { version = "1.3.1", default-features = false, features = ["alloc"] }
proptest-derive = "0.3.0"
rand = "0.8"
rayon = "1.8.0"
rocksdb = { version = "0.21.0", features = ["lz4"] }
serde = { version = "1.0.188", features = ["derive", "rc"] }
serde_json = { version = "1.0" }
sha2 = "0.10.6"
digest = "0.10.6"
serde = { version = "1.0.188", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
sha2 = { version = "0.10.6", default-features = false }
thiserror = "1.0.50"
tiny-keccak = "2.0.2"
tracing = "0.1.40"
tracing = { version = "0.1.40", default-features = false }
bech32 = "0.9.1"
derive_more = "0.99.11"
clap = { version = "4.4.5", features = ["derive"] }
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# no-std packages to be checked
NO_STD := "sov-rollup-interface"

.PHONY: help

help: ## Display this help message
Expand All @@ -23,6 +26,7 @@ install-dev-tools: ## Installs all necessary cargo helpers
cargo install cargo-nextest --locked
cargo install cargo-risczero
cargo risczero install
rustup target add thumbv6m-none-eabi

lint: ## cargo check and clippy. Skip clippy on guest code since it's not supported by risc0
## fmt first, because it's the cheapest
Expand All @@ -42,6 +46,18 @@ check-features: ## Checks that project compiles with all combinations of feature
check-fuzz: ## Checks that fuzz member compiles
$(MAKE) -C fuzz check

check-no-std: ## Checks that project compiles without std
@for package in $(NO_STD); do \
echo "Checking no-std $${package}..."; \
cargo check -p $$package \
--target thumbv6m-none-eabi \
--no-default-features ; \
cargo check -p $$package \
--target thumbv6m-none-eabi \
--no-default-features \
--features native ; \
done

find-unused-deps: ## Prints unused dependencies for project. Note: requires nightly
cargo udeps --all-targets --all-features

Expand Down
54 changes: 54 additions & 0 deletions examples/demo-rollup/provers/risc0/guest-celestia/Cargo.lock

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

Loading
Loading