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 sov-modules-wallet-blueprint #1179

Closed
wants to merge 3 commits into from

Conversation

vlopes11
Copy link
Contributor

This commit introduces sov-modules-wallet-blueprint, a blueprint unlocks wallet implementations for signed runtime calls.

The WalletBlueprint trait exposes the required types to declare RuntimeCall so these can be embeded into wallet modules.

This commit introduces `sov-modules-wallet-blueprint`, a blueprint
unlocks wallet implementations for signed runtime calls.

The `WalletBlueprint` trait exposes the required types to declare
`RuntimeCall` so these can be embeded into wallet modules.
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Merging #1179 (d42d6dd) into nightly (1307350) will increase coverage by 1.3%.
Report is 1 commits behind head on nightly.
The diff coverage is 97.2%.

❗ Current head d42d6dd differs from pull request most recent head 35d43d5. Consider uploading reports for the commit 35d43d5 to get more accurate results

Additional details and impacted files
Files Coverage Δ
adapters/mock-da/src/types/mod.rs 80.2% <100.0%> (+7.0%) ⬆️
full-node/db/sov-db/src/schema/tables.rs 86.4% <ø> (ø)
full-node/db/sov-schema-db/src/lib.rs 92.2% <100.0%> (-0.5%) ⬇️
...sov-prover-storage-manager/src/snapshot_manager.rs 100.0% <100.0%> (ø)
...ule-system/sov-modules-rollup-blueprint/src/lib.rs 91.9% <ø> (ø)
rollup-interface/src/state_machine/da.rs 84.7% <ø> (ø)
adapters/avail/src/spec/hash.rs 0.0% <0.0%> (ø)
...de/sov-prover-storage-manager/src/dummy_storage.rs 93.1% <93.1%> (ø)
...ule-system/sov-modules-wallet-blueprint/src/cli.rs 0.0% <0.0%> (ø)
full-node/db/sov-schema-db/src/snapshot.rs 91.8% <46.1%> (-0.3%) ⬇️
... and 1 more

@vlopes11 vlopes11 requested a review from bkolad November 24, 2023 00:09
@@ -0,0 +1,43 @@
[package]
name = "sov-modules-wallet-blueprint"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a new crate? Can we just put the snap-wallet in sov-modules-rollup-blueprint so everything is in one place?

Copy link
Contributor Author

@vlopes11 vlopes11 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would bring more feature complexity to sov-modules-rollup-blueprint as I need to differentiate when we generate for the CLI (so we use things like clap as dependency), and for the WASM (that is as minimal as possible to keep the binary size small)

If we put it under sov-modules-rollup-blueprint, we will have to shield anything non-wallet behind feature flags

}

#[cfg(feature = "default-impl")]
pub struct DefaultWalletBlueprint;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this. If we move the code to sov-modules-rollup-blueprint like suggested in another comment we will just implemnt the WalletBlueprint for CelestiaDemoRollup & MockDemoRollup the same way as it was done for CliWallet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal of this struct is to make a (Context, DaSpec) available for crates outside our demos. Meaning: if we create a new runtime that is not the one of celestia or mock, we can use DefaultWalletBlueprint to generate the WASM module with ed25519 keys.

If we implement WalletBlueprint for celestia/mock, we will be able to generate WASM only for these runtimes

@vlopes11
Copy link
Contributor Author

wontfix; the blueprint will remain as simple as possible, while the process to generate a snap will be done entirely by the sov-snap-generator

@vlopes11 vlopes11 closed this Dec 13, 2023
@vlopes11 vlopes11 deleted the vlopes11/feature/wallet-blueprint branch December 13, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants