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: implement and calculate the current key period using pallas #1541

Merged
merged 24 commits into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a1e7679
feat: add kes period
falcucci Feb 22, 2024
72ec63d
refactor: remove fallback field usage
falcucci Feb 22, 2024
a166a10
refactor: streamline code formatting in various modules
falcucci Feb 22, 2024
96dcd34
chore: update dependency sources to `txpipe` repository
falcucci Feb 28, 2024
583a7f1
merge 'main'
falcucci Feb 28, 2024
2390899
refactor: improved error handling and configuration handling
falcucci Feb 28, 2024
8343f83
chore: improve error messages for config extraction process
falcucci Feb 28, 2024
c1a1537
fix: improve slots_per_kes_period validation and error messaging
falcucci Feb 29, 2024
5afcb59
feat: refactor kes period calculation in chain module
falcucci Feb 29, 2024
4783f80
chore: update specific points in `getchainpoint` request
falcucci Feb 29, 2024
b2ee2bd
chore: refactor method signature for `calculate_kes_period`
falcucci Feb 29, 2024
cc4109c
feat: refactor return types and error handling in functions
falcucci Mar 1, 2024
17f06ee
refactor: implementation logic for `slots_per_kes_period` being `0`
falcucci Mar 1, 2024
9079e07
docs: enhance documentation for kes period calculation formula
falcucci Mar 1, 2024
691b337
docs: correct variable descriptions
falcucci Mar 1, 2024
af349bf
refactor: standardize variable naming conventions across files
falcucci Mar 1, 2024
9218952
Merge branch 'main' into feat/kes_period
falcucci Mar 1, 2024
f20259d
refactor: chainobserver imports in infrastructure codebase
falcucci Mar 1, 2024
5284e56
merge 'main'
falcucci Mar 11, 2024
1d6648c
chore: update version number and dependencies
falcucci Mar 11, 2024
f9ee712
docs: standardize code comments and examples clarity
falcucci Mar 11, 2024
3d368d6
docs: revise comments for kes period calculations across files
falcucci Mar 11, 2024
7e51687
docs: update documentation and refactor code in observer module
falcucci Mar 11, 2024
4e87a39
feat: refactor `calculate_kes_period` function in pallas observer
falcucci Mar 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 6 additions & 12 deletions Cargo.lock

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

18 changes: 12 additions & 6 deletions mithril-common/Cargo.toml
Expand Up @@ -39,11 +39,16 @@ minicbor = { version = "0.20", features = [
"derive",
], optional = true }
nom = "7.1.3"
pallas-addresses = { version = "0.23.0", optional = true }
pallas-codec = { version = "0.23.0", optional = true }
pallas-network = { version = "0.23.0", optional = true }
pallas-primitives = { version = "0.23.0", optional = true }
pallas-traverse = { version = "0.23.0", optional = true }
# pallas-addresses = { version = "0.23.0", optional = true }
pallas-addresses = { git = "https://github.com/txpipe/pallas.git", branch = "main", optional = true }
# pallas-codec = { version = "0.23.0", optional = true }
pallas-codec = { git = "https://github.com/txpipe/pallas.git", branch = "main", optional = true }
# pallas-network = { version = "0.23.0", optional = true }
pallas-network = { git = "https://github.com/txpipe/pallas.git", branch = "main", optional = true }
# pallas-primitives = { version = "0.23.0", optional = true }
pallas-primitives = { git = "https://github.com/txpipe/pallas.git", branch = "main", optional = true }
# pallas-traverse = { version = "0.23.0", optional = true }
pallas-traverse = { git = "https://github.com/txpipe/pallas.git", branch = "main", optional = true }
rand_chacha = "0.3.1"
rand_core = "0.6.4"
rayon = "1.8.1"
Expand Down Expand Up @@ -83,7 +88,8 @@ wasm-bindgen = "0.2.90"
[dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports", "async_tokio"] }
mockall = "0.12.1"
pallas-crypto = "0.23.0"
# pallas-crypto = "0.23.0"
pallas-crypto = { git = "https://github.com/txpipe/pallas.git", branch = "main" }
rand_core = { version = "0.6.4", features = ["getrandom"] }
reqwest = { version = "0.11.23", features = ["json"] }
slog-async = "2.8.0"
Expand Down
13 changes: 2 additions & 11 deletions mithril-common/src/chain_observer/builder.rs
Expand Up @@ -75,17 +75,8 @@ impl ChainObserverBuilder {
.to_owned(),
))),
ChainObserverType::Pallas => {
let fallback = CardanoCliChainObserver::new(
self.cardano_cli_runner
.as_ref()
.ok_or(ChainObserverBuilderError::MissingCardanoCliRunner)?
.to_owned(),
);
let observer = PallasChainObserver::new(
&self.cardano_node_socket_path,
self.cardano_network,
fallback,
);
let observer =
PallasChainObserver::new(&self.cardano_node_socket_path, self.cardano_network);
Ok(Arc::new(observer))
}
#[cfg(any(test, feature = "test_tools"))]
Expand Down