-
Notifications
You must be signed in to change notification settings - Fork 44
Split mithril-common
crate by extracting some modules
#2304
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
25e2926
Create a `mithril-resource-pool` module
sfauvel 7421aa5
Create a `mithril-signed-entity-lock`and a m̀ithril-transaction-prelo…
sfauvel 3598d44
Move `Reset`trait from `mithril-common` to `mithril-resource-pool`
sfauvel 38ea641
refacto: improve commetn and reorganize imports
sfauvel 0266540
Fix README title in new crates
sfauvel 67d3a7d
Rename crate from `mothril-transaction-preloader` to `mithril-signed-…
sfauvel b211e38
chore: upgrade crate versions
sfauvel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[package] | ||
name = "mithril-resource-pool" | ||
version = "0.0.1" | ||
description = "Provide a resource pool for Mithril." | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
[lib] | ||
crate-type = ["lib", "cdylib", "staticlib"] | ||
|
||
[dependencies] | ||
anyhow = "1.0.95" | ||
mithril-common = { path = "../../mithril-common", features = ["fs"] } | ||
thiserror = "2.0.11" | ||
tokio = { version = "1.43.0", features = ["sync"] } | ||
|
||
[dev-dependencies] | ||
mithril-common = { path = "../../mithril-common", features = ["test_tools"] } | ||
mockall = "0.13.1" | ||
tokio = { version = "1.43.0", features = ["macros", "time"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY: all build test check doc | ||
|
||
CARGO = cargo | ||
|
||
all: test build | ||
|
||
build: | ||
${CARGO} build --release | ||
|
||
test: | ||
${CARGO} test | ||
|
||
check: | ||
${CARGO} check --release --all-features --all-targets | ||
${CARGO} clippy --release --all-features --all-targets | ||
${CARGO} fmt --check | ||
|
||
doc: | ||
${CARGO} doc --no-deps --open --features full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Mithril-resource-pool | ||
|
||
This crate provide a resource pool for Mithril. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#![warn(missing_docs)] | ||
|
||
//! Provide a resource pool for Mithril. | ||
|
||
mod resource_pool; | ||
|
||
pub use resource_pool::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
internal/signed-entity/mithril-signed-entity-lock/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "mithril-signed-entity-lock" | ||
version = "0.0.1" | ||
description = "A non-blocking lock mechanism for signed entity type." | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
[lib] | ||
crate-type = ["lib", "cdylib", "staticlib"] | ||
|
||
[dependencies] | ||
mithril-common = { path = "../../../mithril-common" } | ||
tokio = { version = "1.43.0" } | ||
|
||
[dev-dependencies] | ||
tokio = { version = "1.43.0", features = ["macros"] } |
19 changes: 19 additions & 0 deletions
19
internal/signed-entity/mithril-signed-entity-lock/Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY: all build test check doc | ||
|
||
CARGO = cargo | ||
|
||
all: test build | ||
|
||
build: | ||
${CARGO} build --release | ||
|
||
test: | ||
${CARGO} test | ||
|
||
check: | ||
${CARGO} check --release --all-features --all-targets | ||
${CARGO} clippy --release --all-features --all-targets | ||
${CARGO} fmt --check | ||
|
||
doc: | ||
${CARGO} doc --no-deps --open --features full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Mithril-signed-entity-lock | ||
|
||
This crate provides a non-blocking lock mechanism for signed entity type. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#![warn(missing_docs)] | ||
|
||
//! This module provides a non-blocking lock mechanism for signed entity types to prevent multiple | ||
//! modification on a same entity type at the same time. | ||
|
||
mod signed_entity_type_lock; | ||
|
||
pub use signed_entity_type_lock::*; |
6 changes: 3 additions & 3 deletions
6
...ril-common/src/signed_entity_type_lock.rs → ...ntity-lock/src/signed_entity_type_lock.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
internal/signed-entity/mithril-signed-entity-preloader/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[package] | ||
name = "mithril-signed-entity-preloader" | ||
version = "0.0.1" | ||
description = "A preload mechanism for Cardano Transaction signed entity." | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
[lib] | ||
crate-type = ["lib", "cdylib", "staticlib"] | ||
|
||
[dependencies] | ||
anyhow = "1.0.95" | ||
async-trait = "0.1.86" | ||
mithril-common = { path = "../../../mithril-common", features = ["fs"] } | ||
mithril-signed-entity-lock = { path = "../mithril-signed-entity-lock" } | ||
slog = "2.7.0" | ||
tokio = { version = "1.43.0", features = ["sync"] } | ||
|
||
[dev-dependencies] | ||
mithril-common = { path = "../../../mithril-common", features = ["test_tools"] } | ||
mockall = "0.13.1" | ||
slog-async = "2.8.0" | ||
slog-term = "2.9.1" | ||
tokio = { version = "1.43.0", features = ["macros"] } |
19 changes: 19 additions & 0 deletions
19
internal/signed-entity/mithril-signed-entity-preloader/Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY: all build test check doc | ||
|
||
CARGO = cargo | ||
|
||
all: test build | ||
|
||
build: | ||
${CARGO} build --release | ||
|
||
test: | ||
${CARGO} test | ||
|
||
check: | ||
${CARGO} check --release --all-features --all-targets | ||
${CARGO} clippy --release --all-features --all-targets | ||
${CARGO} fmt --check | ||
|
||
doc: | ||
${CARGO} doc --no-deps --open --features full |
3 changes: 3 additions & 0 deletions
3
internal/signed-entity/mithril-signed-entity-preloader/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Mithril-signed-entity-preloader | ||
|
||
This crate provide a preload mechanism for Cardano Transaction signed entity. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.