From 72827739dcaeb52ece518d5d60ecd8b6d19d3f2e Mon Sep 17 00:00:00 2001 From: abe-njama Date: Tue, 21 Jun 2022 09:12:04 +0300 Subject: [PATCH 001/111] Every type that is in these crates is changed to fully public as they are serialized (and therefore public anyway). --- .../src/countersigning.rs | 32 +++++++++---------- .../src/x_salsa20_poly1305.rs | 10 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/crates/holochain_integrity_types/src/countersigning.rs b/crates/holochain_integrity_types/src/countersigning.rs index 0f67392d4c..52ba0b42a7 100644 --- a/crates/holochain_integrity_types/src/countersigning.rs +++ b/crates/holochain_integrity_types/src/countersigning.rs @@ -30,8 +30,8 @@ mod error; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct CounterSigningSessionTimes { - start: Timestamp, - end: Timestamp, + pub start: Timestamp, + pub end: Timestamp, } impl CounterSigningSessionTimes { @@ -110,20 +110,20 @@ pub type CounterSigningAgents = Vec<(AgentPubKey, Vec)>; pub struct PreflightRequest { /// The hash of the app entry, as if it were not countersigned. /// The final entry hash will include the countersigning session. - app_entry_hash: EntryHash, + pub app_entry_hash: EntryHash, /// The agents that are participating in this countersignature session. - signing_agents: CounterSigningAgents, + pub signing_agents: CounterSigningAgents, /// The agent that must receive and include all other actions in their own action. /// @todo implement enzymes - enzyme_index: Option, + pub enzyme_index: Option, /// The session times. /// Session actions must all have the same timestamp, which is the session offset. - session_times: CounterSigningSessionTimes, + pub session_times: CounterSigningSessionTimes, /// The action information that is shared by all agents. /// Contents depend on the action type, create, update, etc. - action_base: ActionBase, + pub action_base: ActionBase, /// The preflight bytes for session. - preflight_bytes: PreflightBytes, + pub preflight_bytes: PreflightBytes, } impl PreflightRequest { @@ -270,10 +270,10 @@ impl PreflightRequest { #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct PreflightResponse { /// The request this is a response to. - request: PreflightRequest, + pub request: PreflightRequest, /// The agent must provide their current chain state, state their position in the preflight and sign everything. - agent_state: CounterSigningAgentState, - signature: Signature, + pub agent_state: CounterSigningAgentState, + pub signature: Signature, } impl PreflightResponse { @@ -448,9 +448,9 @@ impl CreateBase { #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct UpdateBase { - original_action_address: ActionHash, - original_entry_address: EntryHash, - entry_type: EntryType, + pub original_action_address: ActionHash, + pub original_entry_address: EntryHash, + pub entry_type: EntryType, } impl Action { @@ -488,8 +488,8 @@ impl Action { #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct CounterSigningSessionData { - preflight_request: PreflightRequest, - responses: Vec<(CounterSigningAgentState, Signature)>, + pub preflight_request: PreflightRequest, + pub responses: Vec<(CounterSigningAgentState, Signature)>, } impl CounterSigningSessionData { diff --git a/crates/holochain_integrity_types/src/x_salsa20_poly1305.rs b/crates/holochain_integrity_types/src/x_salsa20_poly1305.rs index cfa7960f49..ba1f86deb2 100644 --- a/crates/holochain_integrity_types/src/x_salsa20_poly1305.rs +++ b/crates/holochain_integrity_types/src/x_salsa20_poly1305.rs @@ -8,8 +8,8 @@ use holochain_serialized_bytes::prelude::*; #[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize, SerializedBytes)] pub struct XSalsa20Poly1305Decrypt { - key_ref: crate::x_salsa20_poly1305::key_ref::XSalsa20Poly1305KeyRef, - encrypted_data: crate::x_salsa20_poly1305::encrypted_data::XSalsa20Poly1305EncryptedData, + pub key_ref: crate::x_salsa20_poly1305::key_ref::XSalsa20Poly1305KeyRef, + pub encrypted_data: crate::x_salsa20_poly1305::encrypted_data::XSalsa20Poly1305EncryptedData, } impl XSalsa20Poly1305Decrypt { @@ -36,9 +36,9 @@ impl XSalsa20Poly1305Decrypt { #[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize, SerializedBytes)] pub struct X25519XSalsa20Poly1305Decrypt { - recipient: X25519PubKey, - sender: X25519PubKey, - encrypted_data: XSalsa20Poly1305EncryptedData, + pub recipient: X25519PubKey, + pub sender: X25519PubKey, + pub encrypted_data: XSalsa20Poly1305EncryptedData, } impl X25519XSalsa20Poly1305Decrypt { From 29e59864927662bb1597bef0e5078f11345a247b Mon Sep 17 00:00:00 2001 From: abe-njama Date: Tue, 21 Jun 2022 15:18:40 +0300 Subject: [PATCH 002/111] Expose all validation types as public in holochain_deterministic_integrity --- crates/holochain_deterministic_integrity/src/trace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/holochain_deterministic_integrity/src/trace.rs b/crates/holochain_deterministic_integrity/src/trace.rs index 878d4d20f0..e0f68b4f5c 100644 --- a/crates/holochain_deterministic_integrity/src/trace.rs +++ b/crates/holochain_deterministic_integrity/src/trace.rs @@ -5,7 +5,7 @@ use std::sync::atomic::Ordering; #[derive(Default)] pub struct WasmSubscriber { - ids: AtomicUsize, + pub ids: AtomicUsize, } /// Very basic struct to hold strings that can be written to by the tracing crate and sent to the host when complete. From 9db6bc635ee0cf11e7e0458a29571e66a6526eb0 Mon Sep 17 00:00:00 2001 From: abe-njama Date: Wed, 22 Jun 2022 20:19:07 +0300 Subject: [PATCH 003/111] Very basic struct to hold strings that can be written to by the tracing crate and sent to the host when complete. --- crates/holochain_zome_types/src/judged.rs | 2 +- .../src/x_salsa20_poly1305.rs | 24 +++++++++---------- crates/holochain_zome_types/src/zome.rs | 2 +- .../src/zome/inline_zome.rs | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/holochain_zome_types/src/judged.rs b/crates/holochain_zome_types/src/judged.rs index 1b30ed5141..b6093ff64a 100644 --- a/crates/holochain_zome_types/src/judged.rs +++ b/crates/holochain_zome_types/src/judged.rs @@ -19,7 +19,7 @@ pub struct Judged { /// The data that the status applies to. pub data: T, /// The validation status of the data. - status: Option, + pub status: Option, } impl Judged { diff --git a/crates/holochain_zome_types/src/x_salsa20_poly1305.rs b/crates/holochain_zome_types/src/x_salsa20_poly1305.rs index 56fe51ba9e..3eebb1f105 100644 --- a/crates/holochain_zome_types/src/x_salsa20_poly1305.rs +++ b/crates/holochain_zome_types/src/x_salsa20_poly1305.rs @@ -4,9 +4,9 @@ pub use holochain_integrity_types::x_salsa20_poly1305::*; #[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize, SerializedBytes)] pub struct XSalsa20Poly1305SharedSecretExport { - sender: X25519PubKey, - recipient: X25519PubKey, - key_ref: crate::x_salsa20_poly1305::key_ref::XSalsa20Poly1305KeyRef, + pub sender: X25519PubKey, + pub recipient: X25519PubKey, + pub key_ref: crate::x_salsa20_poly1305::key_ref::XSalsa20Poly1305KeyRef, } impl XSalsa20Poly1305SharedSecretExport { @@ -37,10 +37,10 @@ impl XSalsa20Poly1305SharedSecretExport { #[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize, SerializedBytes)] pub struct XSalsa20Poly1305SharedSecretIngest { - recipient: X25519PubKey, - sender: X25519PubKey, - encrypted_data: crate::x_salsa20_poly1305::encrypted_data::XSalsa20Poly1305EncryptedData, - key_ref: Option, + pub recipient: X25519PubKey, + pub sender: X25519PubKey, + pub encrypted_data: crate::x_salsa20_poly1305::encrypted_data::XSalsa20Poly1305EncryptedData, + pub key_ref: Option, } impl XSalsa20Poly1305SharedSecretIngest { @@ -81,8 +81,8 @@ impl XSalsa20Poly1305SharedSecretIngest { #[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize, SerializedBytes)] pub struct XSalsa20Poly1305Encrypt { - key_ref: crate::x_salsa20_poly1305::key_ref::XSalsa20Poly1305KeyRef, - data: crate::x_salsa20_poly1305::data::XSalsa20Poly1305Data, + pub key_ref: crate::x_salsa20_poly1305::key_ref::XSalsa20Poly1305KeyRef, + pub data: crate::x_salsa20_poly1305::data::XSalsa20Poly1305Data, } impl XSalsa20Poly1305Encrypt { @@ -104,9 +104,9 @@ impl XSalsa20Poly1305Encrypt { #[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize, SerializedBytes)] pub struct X25519XSalsa20Poly1305Encrypt { - sender: X25519PubKey, - recipient: X25519PubKey, - data: crate::x_salsa20_poly1305::data::XSalsa20Poly1305Data, + pub sender: X25519PubKey, + pub recipient: X25519PubKey, + pub data: crate::x_salsa20_poly1305::data::XSalsa20Poly1305Data, } impl X25519XSalsa20Poly1305Encrypt { diff --git a/crates/holochain_zome_types/src/zome.rs b/crates/holochain_zome_types/src/zome.rs index e1b2ae6ca6..a761d10bd5 100644 --- a/crates/holochain_zome_types/src/zome.rs +++ b/crates/holochain_zome_types/src/zome.rs @@ -28,7 +28,7 @@ use std::sync::Arc; #[cfg_attr(feature = "full-dna-def", derive(shrinkwraprs::Shrinkwrap))] #[cfg_attr(feature = "test_utils", derive(arbitrary::Arbitrary))] pub struct Zome { - name: ZomeName, + pub name: ZomeName, #[cfg_attr(feature = "full-dna-def", shrinkwrap(main_field))] def: T, } diff --git a/crates/holochain_zome_types/src/zome/inline_zome.rs b/crates/holochain_zome_types/src/zome/inline_zome.rs index 0b8fc99b3c..00a6e933ac 100644 --- a/crates/holochain_zome_types/src/zome/inline_zome.rs +++ b/crates/holochain_zome_types/src/zome/inline_zome.rs @@ -28,7 +28,7 @@ pub type InlineCoordinatorZome = InlineZome; /// An InlineZome, which consists pub struct InlineZome { /// Inline zome type marker. - _t: PhantomData, + pub _t: PhantomData, /// Since closures cannot be serialized, we include a UID which /// is the only part of an InlineZome that gets serialized. /// This uuid becomes part of the determination of the DnaHash From 4d52b4250302e596882a320d88a93de231718c81 Mon Sep 17 00:00:00 2001 From: abe-njama Date: Wed, 22 Jun 2022 20:30:02 +0300 Subject: [PATCH 004/111] =?UTF-8?q?Very=20basic=20struct=20to=20hold=20str?= =?UTF-8?q?ings=20that=20can=20be=20written=20to=20by=20the=20traci?= =?UTF-8?q?=E2=80=A6=20=209db6bc6=20=E2=80=A6ng=20crate=20and=20sent=20to?= =?UTF-8?q?=20the=20host=20when=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/hdk/src/trace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/hdk/src/trace.rs b/crates/hdk/src/trace.rs index c0f441425a..07444c83eb 100644 --- a/crates/hdk/src/trace.rs +++ b/crates/hdk/src/trace.rs @@ -5,7 +5,7 @@ use std::sync::atomic::Ordering; #[derive(Default)] pub struct WasmSubscriber { - ids: AtomicUsize, + pub ids: AtomicUsize, } /// Very basic struct to hold strings that can be written to by the tracing crate and sent to the host when complete. From d91813bf2508dab13985af70dd08bc31d03e7034 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 16:32:35 -0700 Subject: [PATCH 005/111] Move an inline zome to a more accessible place --- .../holochain/src/test_utils/inline_zomes.rs | 68 +++++++++++++++++++ .../holochain/tests/inline_zome_spec/mod.rs | 67 +----------------- 2 files changed, 69 insertions(+), 66 deletions(-) diff --git a/crates/holochain/src/test_utils/inline_zomes.rs b/crates/holochain/src/test_utils/inline_zomes.rs index d73233d126..6f9dfca230 100644 --- a/crates/holochain/src/test_utils/inline_zomes.rs +++ b/crates/holochain/src/test_utils/inline_zomes.rs @@ -68,3 +68,71 @@ pub fn batch_create_zome() -> InlineZomeSet { }) .0 } + +#[derive( + Debug, + PartialEq, + Eq, + PartialOrd, + Ord, + serde::Serialize, + serde::Deserialize, + SerializedBytes, + derive_more::From, +)] +#[serde(transparent)] +#[repr(transparent)] +/// Newtype for simple_crud_zome entry type +pub struct AppString(pub String); + +impl AppString { + /// Constructor + pub fn new>(s: S) -> Self { + AppString(s.into()) + } +} + +/// An InlineZome with simple Create and Read operations +pub fn simple_crud_zome() -> InlineZomeSet { + let string_entry_def = EntryDef::default_with_id("string"); + let unit_entry_def = EntryDef::default_with_id("unit"); + + SweetEasyInline::new(vec![string_entry_def.clone(), unit_entry_def.clone()], 0) + .callback("create_string", move |api, s: AppString| { + let entry = Entry::app(AppString::from(s).try_into().unwrap()).unwrap(); + let hash = api.create(CreateInput::new( + InlineZomeSet::get_entry_location(&api, EntryDefIndex(0)), + EntryVisibility::Public, + entry, + ChainTopOrdering::default(), + ))?; + Ok(hash) + }) + .callback("create_unit", move |api, ()| { + let entry = Entry::app(().try_into().unwrap()).unwrap(); + let hash = api.create(CreateInput::new( + InlineZomeSet::get_entry_location(&api, EntryDefIndex(1)), + EntryVisibility::Public, + entry, + ChainTopOrdering::default(), + ))?; + Ok(hash) + }) + .callback("delete", move |api, action_hash: ActionHash| { + let hash = api.delete(DeleteInput::new(action_hash, ChainTopOrdering::default()))?; + Ok(hash) + }) + .callback("read", |api, hash: ActionHash| { + api.get(vec![GetInput::new(hash.into(), GetOptions::default())]) + .map_err(Into::into) + }) + .callback("read_entry", |api, hash: EntryHash| { + api.get(vec![GetInput::new(hash.into(), GetOptions::default())]) + .map_err(Into::into) + }) + .callback("emit_signal", |api, ()| { + api.emit_signal(AppSignal::new(ExternIO::encode(()).unwrap())) + .map_err(Into::into) + }) + .0 +} diff --git a/crates/holochain/tests/inline_zome_spec/mod.rs b/crates/holochain/tests/inline_zome_spec/mod.rs index e95adec50f..fbdb9ad8fd 100644 --- a/crates/holochain/tests/inline_zome_spec/mod.rs +++ b/crates/holochain/tests/inline_zome_spec/mod.rs @@ -2,6 +2,7 @@ use ::fixt::prelude::*; use hdk::prelude::*; +use holochain::test_utils::inline_zomes::{simple_crud_zome, AppString}; use holochain::{ conductor::api::error::ConductorApiResult, sweettest::{SweetAgents, SweetConductor, SweetDnaFile, SweetEasyInline}, @@ -23,72 +24,6 @@ use holochain_zome_types::{op::Op, record::RecordEntry}; use matches::assert_matches; use tokio_stream::StreamExt; -#[derive( - Debug, - PartialEq, - Eq, - PartialOrd, - Ord, - serde::Serialize, - serde::Deserialize, - SerializedBytes, - derive_more::From, -)] -#[serde(transparent)] -#[repr(transparent)] -struct AppString(String); - -impl AppString { - fn new>(s: S) -> Self { - AppString(s.into()) - } -} - -/// An InlineZome with simple Create and Read operations -fn simple_crud_zome() -> InlineZomeSet { - let string_entry_def = EntryDef::default_with_id("string"); - let unit_entry_def = EntryDef::default_with_id("unit"); - - SweetEasyInline::new(vec![string_entry_def.clone(), unit_entry_def.clone()], 0) - .callback("create_string", move |api, s: AppString| { - let entry = Entry::app(AppString::from(s).try_into().unwrap()).unwrap(); - let hash = api.create(CreateInput::new( - InlineZomeSet::get_entry_location(&api, EntryDefIndex(0)), - EntryVisibility::Public, - entry, - ChainTopOrdering::default(), - ))?; - Ok(hash) - }) - .callback("create_unit", move |api, ()| { - let entry = Entry::app(().try_into().unwrap()).unwrap(); - let hash = api.create(CreateInput::new( - InlineZomeSet::get_entry_location(&api, EntryDefIndex(1)), - EntryVisibility::Public, - entry, - ChainTopOrdering::default(), - ))?; - Ok(hash) - }) - .callback("delete", move |api, action_hash: ActionHash| { - let hash = api.delete(DeleteInput::new(action_hash, ChainTopOrdering::default()))?; - Ok(hash) - }) - .callback("read", |api, hash: ActionHash| { - api.get(vec![GetInput::new(hash.into(), GetOptions::default())]) - .map_err(Into::into) - }) - .callback("read_entry", |api, hash: EntryHash| { - api.get(vec![GetInput::new(hash.into(), GetOptions::default())]) - .map_err(Into::into) - }) - .callback("emit_signal", |api, ()| { - api.emit_signal(AppSignal::new(ExternIO::encode(()).unwrap())) - .map_err(Into::into) - }) - .0 -} - /// Simple scenario involving two agents using the same DNA #[tokio::test(flavor = "multi_thread")] #[cfg(feature = "test_utils")] From 102baff49eb2a38a76ab3e0dcc92e2e45cf1d98d Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 16:32:55 -0700 Subject: [PATCH 006/111] Add ChainItem abstraction and use it for chain validation --- crates/holochain/src/conductor/handle.rs | 2 +- crates/holochain/src/core/sys_validate.rs | 53 +++++++------------ .../holochain/src/core/sys_validate/error.rs | 4 +- .../holochain/src/core/sys_validate/tests.rs | 4 +- crates/holochain_integrity_types/src/chain.rs | 53 ++++++++++++++++++- 5 files changed, 76 insertions(+), 40 deletions(-) diff --git a/crates/holochain/src/conductor/handle.rs b/crates/holochain/src/conductor/handle.rs index f336a0ff13..d24e776c3b 100755 --- a/crates/holochain/src/conductor/handle.rs +++ b/crates/holochain/src/conductor/handle.rs @@ -1353,7 +1353,7 @@ impl ConductorHandleT for ConductorHandleImpl { // Validate the chain. crate::core::validate_chain( - records.iter().map(|e| e.action_hashed()), + records.iter().map(|e| e.signed_action()), &persisted_chain_head.clone().filter(|_| !truncate), ) .map_err(|e| SourceChainError::InvalidCommit(e.to_string()))?; diff --git a/crates/holochain/src/core/sys_validate.rs b/crates/holochain/src/core/sys_validate.rs index 48d5c274a8..b1dceac805 100644 --- a/crates/holochain/src/core/sys_validate.rs +++ b/crates/holochain/src/core/sys_validate.rs @@ -15,7 +15,7 @@ use holochain_zome_types::countersigning::CounterSigningSessionData; use std::convert::TryInto; use std::sync::Arc; -pub(super) use error::*; +pub use error::*; pub use holo_hash::*; pub use holochain_state::source_chain::SourceChainError; pub use holochain_state::source_chain::SourceChainResult; @@ -366,70 +366,55 @@ pub fn check_update_reference( } /// Validate a chain of actions with an optional starting point. -pub fn validate_chain<'iter>( - mut actions: impl Iterator, - persisted_chain_head: &Option<(ActionHash, u32)>, +pub fn validate_chain<'iter, A: 'iter + ChainItem>( + mut actions: impl Iterator, + persisted_chain_head: &Option<(A::Hash, u32)>, ) -> SysValidationResult<()> { // Check the chain starts in a valid way. let mut last_item = match actions.next() { - Some(ActionHashed { - hash, - content: action, - }) => { + Some(item) => { match persisted_chain_head { Some((prev_hash, prev_seq)) => { - check_prev_action_chain(prev_hash, *prev_seq, action) + check_prev_action_chain(prev_hash, *prev_seq, item) .map_err(ValidationOutcome::from)?; } None => { // If there's no persisted chain head, then the first action - // must be a DNA. - if !matches!(action, Action::Dna(_)) { + // must have no parent. + if item.prev_hash().is_some() { return Err(ValidationOutcome::from(PrevActionError::InvalidRoot).into()); } } } - let seq = action.action_seq(); - (hash, seq) + (item.get_hash(), item.seq()) } None => return Ok(()), }; - for ActionHashed { - hash, - content: action, - } in actions - { + for item in actions { // Check each item of the chain is valid. - check_prev_action_chain(last_item.0, last_item.1, action) - .map_err(ValidationOutcome::from)?; - last_item = (hash, action.action_seq()); + check_prev_action_chain(last_item.0, last_item.1, item).map_err(ValidationOutcome::from)?; + last_item = (item.get_hash(), item.seq()); } Ok(()) } // Check the action is valid for the previous action. -fn check_prev_action_chain( - prev_action_hash: &ActionHash, +fn check_prev_action_chain( + prev_action_hash: &A::Hash, prev_action_seq: u32, - action: &Action, + action: &A, ) -> Result<(), PrevActionError> { - // DNA cannot appear later in the chain. - if matches!(action, Action::Dna(_)) { - Err(PrevActionError::InvalidRoot) - } else if action.prev_action().map_or(true, |p| p != prev_action_hash) { + if action.prev_hash().map_or(true, |p| p != prev_action_hash) { // Check the prev hash matches. - Err(PrevActionError::HashMismatch) + Err(PrevActionError::HashMismatch(action.seq())) } else if action - .action_seq() + .seq() .checked_sub(1) .map_or(true, |s| prev_action_seq != s) { // Check the prev seq is one less. - Err(PrevActionError::InvalidSeq( - action.action_seq(), - prev_action_seq, - )) + Err(PrevActionError::InvalidSeq(action.seq(), prev_action_seq)) } else { Ok(()) } diff --git a/crates/holochain/src/core/sys_validate/error.rs b/crates/holochain/src/core/sys_validate/error.rs index 757ce092fd..9df1dc5912 100644 --- a/crates/holochain/src/core/sys_validate/error.rs +++ b/crates/holochain/src/core/sys_validate/error.rs @@ -154,8 +154,8 @@ impl ValidationOutcome { #[derive(Error, Debug)] pub enum PrevActionError { - #[error("The previous action in the source chain doesn't match the next action")] - HashMismatch, + #[error("The previous action hash specified in an action doesn't match the actual previous action. Seq: {0}")] + HashMismatch(u32), #[error("Root of source chain must be Dna")] InvalidRoot, #[error("Root of source chain must have a timestamp greater than the Dna's origin_time")] diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index 1fb93563c5..caebc4e3f7 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -520,7 +520,7 @@ fn valid_chain_test() { assert!(matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::HashMismatch + PrevActionError::HashMismatch(_) )) )); @@ -604,7 +604,7 @@ fn valid_chain_test() { assert!(matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::HashMismatch + PrevActionError::HashMismatch(_) )) )); } diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index 703a2db52f..ba75adc81c 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -3,9 +3,11 @@ use std::collections::HashSet; -use holo_hash::ActionHash; +use holo_hash::{ActionHash, HasHash}; use holochain_serialized_bytes::prelude::*; +use crate::{SignedActionHashed, ActionHashed}; + #[cfg(test)] mod test; @@ -106,3 +108,52 @@ impl Default for ChainFilters { Self::ToGenesis } } + +/// Abstraction over an item in a chain. +// Alternate implementations are only used for testing, so this should not +// add a large monomorphization overhead +pub trait ChainItem: Clone + PartialEq + Eq + std::fmt::Debug { + /// The type used to represent a hash of this item + type Hash: Clone + PartialEq + Eq + std::fmt::Debug; + + /// The sequence in the chain + fn seq(&self) -> u32; + + /// The hash of this item + fn get_hash(&self) -> &Self::Hash; + + /// The hash of the previous item + fn prev_hash(&self) -> Option<&Self::Hash>; +} + +impl ChainItem for ActionHashed { + type Hash = ActionHash; + + fn seq(&self) -> u32 { + self.action_seq() + } + + fn get_hash(&self) -> &Self::Hash { + self.as_hash() + } + + fn prev_hash(&self) -> Option<&Self::Hash> { + self.prev_action() + } +} + +impl ChainItem for SignedActionHashed { + type Hash = ActionHash; + + fn seq(&self) -> u32 { + self.hashed.seq() + } + + fn get_hash(&self) -> &Self::Hash { + self.hashed.get_hash() + } + + fn prev_hash(&self) -> Option<&Self::Hash> { + self.hashed.prev_hash() + } +} From fcff42c94298f88ec1f953a6d03f9ef5b89881b6 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 16:58:06 -0700 Subject: [PATCH 007/111] Add TestChainItem --- crates/holochain_types/src/test_utils.rs | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index dd17fcef43..62013273cc 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -144,3 +144,34 @@ pub fn test_keystore() -> holochain_keystore::MetaLairClient { ) .expect("timeout elapsed") } + +/// A test implementation of a minimal ChainItem which uses simple numbers for hashes +/// and always points back to the previous number +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TestChainItem { + seq: u32, + prev: Option, +} + +impl TestChainItem { + /// Constructor + pub fn new(seq: u32) -> Self { + Self { seq, prev: seq.checked_sub(1) } + } +} + +impl ChainItem for TestChainItem { + type Hash = u32; + + fn seq(&self) -> u32 { + self.seq + } + + fn get_hash(&self) -> &Self::Hash { + &self.seq + } + + fn prev_hash(&self) -> Option<&Self::Hash> { + self.prev.as_ref() + } +} \ No newline at end of file From 33ea12d17471011e28e999e839fe186ab194a4a0 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 18:01:41 -0700 Subject: [PATCH 008/111] Modify validate_chain logic --- crates/holochain/src/core/sys_validate.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/holochain/src/core/sys_validate.rs b/crates/holochain/src/core/sys_validate.rs index b1dceac805..ad7a8886d4 100644 --- a/crates/holochain/src/core/sys_validate.rs +++ b/crates/holochain/src/core/sys_validate.rs @@ -405,9 +405,12 @@ fn check_prev_action_chain( prev_action_seq: u32, action: &A, ) -> Result<(), PrevActionError> { - if action.prev_hash().map_or(true, |p| p != prev_action_hash) { - // Check the prev hash matches. - Err(PrevActionError::HashMismatch(action.seq())) + // The root cannot appear later in the chain + if action.prev_hash().is_none() { + Err(PrevActionError::MissingPrev) + } else if action.prev_hash().map_or(true, |p| p != prev_action_hash) { + // Check the prev hash matches. + Err(PrevActionError::HashMismatch(action.seq())) } else if action .seq() .checked_sub(1) From 57833594de7d312200769a379bf2469fffbde5db Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 18:09:09 -0700 Subject: [PATCH 009/111] Rewrite validate_chain test in terms of TestChainItem --- .../holochain/src/core/sys_validate/tests.rs | 100 ++++++------------ crates/holochain_types/src/test_utils.rs | 14 ++- 2 files changed, 43 insertions(+), 71 deletions(-) diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index caebc4e3f7..5d5af39301 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -476,135 +476,103 @@ async fn incoming_ops_filters_private_entry() { #[test] /// Test the chain validation works. fn valid_chain_test() { - let author = fixt!(AgentPubKey); // Create a valid chain. - let mut actions = vec![]; - actions.push(ActionHashed::from_content_sync(Action::Dna(Dna { - author: author.clone(), - timestamp: Timestamp::from_micros(0), - hash: fixt!(DnaHash), - }))); - actions.push(ActionHashed::from_content_sync(Action::Create(Create { - author: author.clone(), - timestamp: Timestamp::from_micros(1), - action_seq: 1, - prev_action: actions[0].to_hash(), - entry_type: fixt!(EntryType), - entry_hash: fixt!(EntryHash), - weight: Default::default(), - }))); - actions.push(ActionHashed::from_content_sync(Action::Create(Create { - author: author.clone(), - timestamp: Timestamp::from_micros(2), - action_seq: 2, - prev_action: actions[1].to_hash(), - entry_type: fixt!(EntryType), - entry_hash: fixt!(EntryHash), - weight: Default::default(), - }))); + let actions = vec![ + TestChainItem::new(0), + TestChainItem::new(1), + TestChainItem::new(2), + ]; // Valid chain passes. validate_chain(actions.iter(), &None).expect("Valid chain"); // Create a forked chain. let mut fork = actions.clone(); - fork.push(ActionHashed::from_content_sync(Action::Create(Create { - author: author.clone(), - timestamp: Timestamp::from_micros(10), - action_seq: 1, - prev_action: actions[0].to_hash(), - entry_type: fixt!(EntryType), - entry_hash: fixt!(EntryHash), - weight: Default::default(), - }))); + fork.push(TestChainItem { + seq: 1, + hash: 111, + prev: Some(0), + }); let err = validate_chain(fork.iter(), &None).expect_err("Forked chain"); - assert!(matches!( + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( PrevActionError::HashMismatch(_) )) - )); + ); // Test a chain with the wrong seq. let mut wrong_seq = actions.clone(); - *wrong_seq[2].as_content_mut().action_seq_mut().unwrap() = 3; + wrong_seq[2].seq = 3; let err = validate_chain(wrong_seq.iter(), &None).expect_err("Wrong seq"); - assert!(matches!( + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( PrevActionError::InvalidSeq(_, _) )) - )); + ); // Test a wrong root gets rejected. let mut wrong_root = actions.clone(); - wrong_root[0] = ActionHashed::from_content_sync(Action::Create(Create { - author: author.clone(), - timestamp: Timestamp::from_micros(0), - action_seq: 0, - prev_action: actions[0].to_hash(), - entry_type: fixt!(EntryType), - entry_hash: fixt!(EntryHash), - weight: Default::default(), - })); + wrong_root[0].prev = Some(0); let err = validate_chain(wrong_root.iter(), &None).expect_err("Wrong root"); - assert!(matches!( + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( PrevActionError::InvalidRoot )) - )); + ); // Test without dna at root gets rejected. let mut dna_not_at_root = actions.clone(); dna_not_at_root.push(actions[0].clone()); let err = validate_chain(dna_not_at_root.iter(), &None).expect_err("Dna not at root"); - assert!(matches!( + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::InvalidRoot + PrevActionError::MissingPrev )) - )); + ); // Test if there is a existing head that a dna in the new chain is rejected. let err = - validate_chain(actions.iter(), &Some((fixt!(ActionHash), 0))).expect_err("Dna not at root"); - assert!(matches!( + validate_chain(actions.iter(), &Some((123, 0))).expect_err("Dna not at root"); + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::InvalidRoot + PrevActionError::MissingPrev )) - )); + ); // Check a sequence that is broken gets rejected. let mut wrong_seq = actions[1..].to_vec(); - *wrong_seq[0].as_content_mut().action_seq_mut().unwrap() = 3; - *wrong_seq[1].as_content_mut().action_seq_mut().unwrap() = 4; + wrong_seq[0].seq = 3; + wrong_seq[1].seq = 4; let err = validate_chain( wrong_seq.iter(), - &Some((wrong_seq[0].prev_action().unwrap().clone(), 0)), + &Some((wrong_seq[0].prev.unwrap(), 0)), ) .expect_err("Wrong seq"); - assert!(matches!( + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( PrevActionError::InvalidSeq(_, _) )) - )); + ); // Check the correct sequence gets accepted with a root. let correct_seq = actions[1..].to_vec(); validate_chain( correct_seq.iter(), - &Some((correct_seq[0].prev_action().unwrap().clone(), 0)), + &Some((correct_seq[0].prev.unwrap(), 0)), ) .expect("Correct seq"); - let err = validate_chain(correct_seq.iter(), &Some((fixt!(ActionHash), 0))) + let err = validate_chain(correct_seq.iter(), &Some((456, 0))) .expect_err("Hash is wrong"); - assert!(matches!( + assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( PrevActionError::HashMismatch(_) )) - )); + ); } diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 62013273cc..61ea3ec292 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -149,15 +149,19 @@ pub fn test_keystore() -> holochain_keystore::MetaLairClient { /// and always points back to the previous number #[derive(Clone, Debug, PartialEq, Eq)] pub struct TestChainItem { - seq: u32, - prev: Option, + /// The sequence number + pub seq: u32, + /// The hash + pub hash: u32, + /// The previous hash, unless this is the first item + pub prev: Option, } impl TestChainItem { - /// Constructor + /// Constructor for happy-path chains with no forking pub fn new(seq: u32) -> Self { - Self { seq, prev: seq.checked_sub(1) } - } + Self { seq, hash: seq, prev: seq.checked_sub(1) } + } } impl ChainItem for TestChainItem { From e5219c18f4e63a5cca56a7845ccc9be70329332c Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 19:29:46 -0700 Subject: [PATCH 010/111] Rewrite chain filter tests in terms of TestChainItem --- .../holochain/src/core/sys_validate/tests.rs | 14 +-- crates/holochain_integrity_types/src/chain.rs | 24 ++-- crates/holochain_integrity_types/src/op.rs | 10 ++ crates/holochain_types/src/chain.rs | 37 +++--- crates/holochain_types/src/chain/test.rs | 56 ++++----- crates/holochain_types/src/test_utils.rs | 21 +++- .../holochain_types/src/test_utils/chain.rs | 114 ++++-------------- 7 files changed, 114 insertions(+), 162 deletions(-) diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index 5d5af39301..63b3fd10cb 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -489,8 +489,8 @@ fn valid_chain_test() { let mut fork = actions.clone(); fork.push(TestChainItem { seq: 1, - hash: 111, - prev: Some(0), + hash: vec![111], + prev: Some(vec![0]), }); let err = validate_chain(fork.iter(), &None).expect_err("Forked chain"); assert_matches!( @@ -513,7 +513,7 @@ fn valid_chain_test() { // Test a wrong root gets rejected. let mut wrong_root = actions.clone(); - wrong_root[0].prev = Some(0); + wrong_root[0].prev = Some(vec![0]); let err = validate_chain(wrong_root.iter(), &None).expect_err("Wrong root"); assert_matches!( err, @@ -535,7 +535,7 @@ fn valid_chain_test() { // Test if there is a existing head that a dna in the new chain is rejected. let err = - validate_chain(actions.iter(), &Some((123, 0))).expect_err("Dna not at root"); + validate_chain(actions.iter(), &Some((vec![123], 0))).expect_err("Dna not at root"); assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( @@ -549,7 +549,7 @@ fn valid_chain_test() { wrong_seq[1].seq = 4; let err = validate_chain( wrong_seq.iter(), - &Some((wrong_seq[0].prev.unwrap(), 0)), + &Some((wrong_seq[0].prev.clone().unwrap(), 0)), ) .expect_err("Wrong seq"); assert_matches!( @@ -563,11 +563,11 @@ fn valid_chain_test() { let correct_seq = actions[1..].to_vec(); validate_chain( correct_seq.iter(), - &Some((correct_seq[0].prev.unwrap(), 0)), + &Some((correct_seq[0].prev.clone().unwrap(), 0)), ) .expect("Correct seq"); - let err = validate_chain(correct_seq.iter(), &Some((456, 0))) + let err = validate_chain(correct_seq.iter(), &Some((vec![234], 0))) .expect_err("Hash is wrong"); assert_matches!( err, diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index ba75adc81c..01fd808fd7 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -17,34 +17,34 @@ mod test; /// the chain is walked backwards to genesis. /// The filter can stop early by specifying the number of /// chain items to take and / or an [`ActionHash`] to consume until. -pub struct ChainFilter { +pub struct ChainFilter { /// The starting position of the filter. - pub position: ActionHash, + pub position: H, /// The filters that have been applied. /// Defaults to [`ChainFilters::ToGenesis`]. - pub filters: ChainFilters, + pub filters: ChainFilters, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] /// Specify which [`Action`](crate::action::Action)s to allow through /// this filter. -pub enum ChainFilters { +pub enum ChainFilters { /// Allow all up to genesis. ToGenesis, /// Take this many (inclusive of the starting position). Take(u32), /// Continue until one of these hashes is found. - Until(HashSet), + Until(HashSet), /// Combination of both take and until. /// Whichever is the smaller set. - Both(u32, HashSet), + Both(u32, HashSet), } -impl ChainFilter { +impl ChainFilter { /// Create a new filter using this [`ActionHash`] as /// the starting position and walking the chain /// towards the genesis [`Action`](crate::action::Action). - pub fn new(position: ActionHash) -> Self { + pub fn new(position: H) -> Self { Self { position, filters: Default::default(), @@ -68,7 +68,7 @@ impl ChainFilter { /// found so this filter can produce deterministic results. /// It is invalid to specify an until hash that is on a different /// fork then the starting position. - pub fn until(mut self, action_hash: ActionHash) -> Self { + pub fn until(mut self, action_hash: H) -> Self { self.filters = match self.filters { ChainFilters::ToGenesis => ChainFilters::Until(Some(action_hash).into_iter().collect()), ChainFilters::Take(n) => ChainFilters::Both(n, Some(action_hash).into_iter().collect()), @@ -85,7 +85,7 @@ impl ChainFilter { } /// Get the until hashes if there are any. - pub fn get_until(&self) -> Option<&HashSet> { + pub fn get_until(&self) -> Option<&HashSet> { match &self.filters { ChainFilters::Until(u) => Some(u), ChainFilters::Both(_, u) => Some(u), @@ -103,7 +103,7 @@ impl ChainFilter { } } -impl Default for ChainFilters { +impl Default for ChainFilters { fn default() -> Self { Self::ToGenesis } @@ -114,7 +114,7 @@ impl Default for ChainFilters { // add a large monomorphization overhead pub trait ChainItem: Clone + PartialEq + Eq + std::fmt::Debug { /// The type used to represent a hash of this item - type Hash: Clone + PartialEq + Eq + std::fmt::Debug; + type Hash: Clone + PartialEq + Eq + std::hash::Hash + std::fmt::Debug; /// The sequence in the chain fn seq(&self) -> u32; diff --git a/crates/holochain_integrity_types/src/op.rs b/crates/holochain_integrity_types/src/op.rs index 3d898257a9..d0a847d6ca 100644 --- a/crates/holochain_integrity_types/src/op.rs +++ b/crates/holochain_integrity_types/src/op.rs @@ -1,5 +1,7 @@ //! # Dht Operational Transforms +use std::ops::Deref; + use crate::{ Action, ActionRef, ActionType, AppEntryType, Create, CreateLink, Delete, DeleteLink, Entry, EntryType, LinkTag, MembraneProof, Record, SignedActionHashed, SignedHashed, UnitEnum, Update, @@ -192,6 +194,14 @@ pub struct RegisterAgentActivity { pub action: SignedActionHashed, } +impl Deref for RegisterAgentActivity { + type Target = SignedActionHashed; + + fn deref(&self) -> &Self::Target { + &self.action + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerializedBytes)] #[cfg_attr(feature = "test_utils", derive(arbitrary::Arbitrary))] /// Registers a link between two [`Entry`]s. diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index 89d69e0d5b..172891d976 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -4,10 +4,11 @@ use std::iter::Peekable; use crate::activity::AgentActivityResponse; use crate::activity::ChainItems; use holo_hash::AgentPubKey; +use holochain_zome_types::ChainItem; +use holochain_zome_types::SignedActionHashed; use holochain_zome_types::prelude::ChainStatus; use holochain_zome_types::ChainFilter; use holochain_zome_types::ChainFilters; -use holochain_zome_types::RegisterAgentActivity; #[cfg(all(test, feature = "test_utils"))] mod test; @@ -40,26 +41,24 @@ impl AgentActivityExt for AgentActivityResponse {} /// /// [`take`]: ChainFilter::take /// [`until`]: ChainFilter::until -pub struct ChainFilterIter { - filter: ChainFilter, - iter: Peekable>, +pub struct ChainFilterIter, A: ChainItem = SignedActionHashed> { + filter: ChainFilter, + iter: Peekable>, end: bool, } -impl ChainFilterIter { +impl, A: ChainItem> ChainFilterIter { /// Create an iterator that filters an iterator of [`RegisterAgentActivity`] /// with a [`ChainFilter`]. /// /// # Constraints /// - If the iterator does not contain the filters starting position /// then this will be an empty iterator. - pub fn new(filter: ChainFilter, mut chain: Vec) -> Self { + pub fn new(filter: ChainFilter, mut chain: Vec) -> Self { // Sort by descending. chain.sort_unstable_by(|a, b| { - b.action - .action() - .action_seq() - .cmp(&a.action.action().action_seq()) + b.as_ref().seq() + .cmp(&a.as_ref().seq()) }); // Create a peekable iterator. let mut iter = chain.into_iter().peekable(); @@ -67,7 +66,7 @@ impl ChainFilterIter { // Discard any ops that are not the starting position. let i = iter.by_ref(); while let Some(op) = i.peek() { - if *op.action.action_address() == filter.position { + if *op.as_ref().get_hash() == filter.position { break; } i.next(); @@ -81,8 +80,8 @@ impl ChainFilterIter { } } -impl Iterator for ChainFilterIter { - type Item = RegisterAgentActivity; +impl, A: ChainItem> Iterator for ChainFilterIter { + type Item = I; fn next(&mut self) -> Option { if self.end { @@ -96,9 +95,9 @@ impl Iterator for ChainFilterIter { // Check the next sequence number match parent { Some(parent) => { - let child_seq = op.action.hashed.action_seq(); - let parent_seq = parent.action.hashed.action_seq(); - match (child_seq.cmp(&parent_seq), op.action.hashed.prev_action()) { + let child_seq = op.as_ref().seq(); + let parent_seq = parent.as_ref().seq(); + match (child_seq.cmp(&parent_seq), op.as_ref().prev_hash()) { (std::cmp::Ordering::Less, _) => { // The chain is out of order so we must end here. self.end = true; @@ -129,7 +128,7 @@ impl Iterator for ChainFilterIter { break op; } (std::cmp::Ordering::Greater, Some(prev_hash)) - if prev_hash != parent.action.action_address() => + if prev_hash != parent.as_ref().get_hash() => { // Not the parent of this child. // Discard this parent. @@ -152,7 +151,7 @@ impl Iterator for ChainFilterIter { ChainFilters::Take(n) => *n = n.checked_sub(1)?, // Check if the `until` hash has been found. ChainFilters::Until(until_hashes) => { - if until_hashes.contains(op.action.action_address()) { + if until_hashes.contains(op.as_ref().get_hash()) { // If it has, include it and return on the next call to `next`. self.end = true; } @@ -163,7 +162,7 @@ impl Iterator for ChainFilterIter { ChainFilters::Both(n, until_hashes) => { *n = n.checked_sub(1)?; - if until_hashes.contains(op.action.action_address()) { + if until_hashes.contains(op.as_ref().get_hash()) { self.end = true; } } diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index a011422b17..8952d68fba 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,26 +1,22 @@ -use holo_hash::ActionHash; use std::ops::Range; use test_case::test_case; -use crate::test_utils::chain::*; +use crate::{test_utils::chain::*, prelude::TestChainItem}; use super::*; /// Create a hash from a u8. -fn hash(i: u8) -> ActionHash { - action_hash(&[i]) +fn hash(i: u8) -> TestHash { + vec![i] } +pub type TestHash = ::Hash; +pub type TestFilter = ChainFilter; + /// Build a chain of RegisterAgentActivity and then run them through the /// chain filter. -fn build_chain(c: Vec, filter: ChainFilter) -> Vec { - let data = chain_to_ops(c); - ChainFilterIter::new(filter, data) - .map(|op| ChainItem { - action_seq: op.action.hashed.action_seq(), - hash: op.action.action_address().clone(), - prev_action: op.action.hashed.prev_action().cloned(), - }) +fn build_chain(c: Vec, filter: TestFilter) -> Vec { + ChainFilterIter::new(filter, c).into_iter() .collect() } @@ -31,8 +27,8 @@ fn build_chain(c: Vec, filter: ChainFilter) -> Vec { #[test_case(2, 1, 10 => chain(0..2))] #[test_case(10, 9, 10 => chain(0..10))] /// Check taking n items works. -fn can_take_n(len: u8, position: u8, take: u32) -> Vec { - let filter = ChainFilter::new(hash(position)).take(take); +fn can_take_n(len: u8, position: u8, take: u32) -> Vec { + let filter = TestFilter::new(hash(position)).take(take); build_chain(chain(0..len), filter) } @@ -42,34 +38,34 @@ fn can_take_n(len: u8, position: u8, take: u32) -> Vec { #[test_case(10, 5, hash(1) => chain(1..6))] #[test_case(10, 9, hash(0) => chain(0..10))] /// Check taking until some hash works. -fn can_until_hash(len: u8, position: u8, until: ActionHash) -> Vec { - let filter = ChainFilter::new(hash(position)).until(until); +fn can_until_hash(len: u8, position: u8, until: TestHash) -> Vec { + let filter = TestFilter::new(hash(position)).until(until); build_chain(chain(0..len), filter) } -#[test_case(10, ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] -#[test_case(10, ChainFilter::new(hash(9)).take(2).until(hash(4)) => chain(8..10))] -#[test_case(10, ChainFilter::new(hash(9)).take(20).take(2).until(hash(4)) => chain(8..10))] -#[test_case(10, ChainFilter::new(hash(9)).take(20).take(2).until(hash(4)).until(hash(9)) => chain(9..10))] +#[test_case(10, TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] +#[test_case(10, TestFilter::new(hash(9)).take(2).until(hash(4)) => chain(8..10))] +#[test_case(10, TestFilter::new(hash(9)).take(20).take(2).until(hash(4)) => chain(8..10))] +#[test_case(10, TestFilter::new(hash(9)).take(20).take(2).until(hash(4)).until(hash(9)) => chain(9..10))] /// Check take and until can be combined and the first to be /// reached ends the iterator. -fn can_combine(len: u8, filter: ChainFilter) -> Vec { +fn can_combine(len: u8, filter: TestFilter) -> Vec { build_chain(chain(0..len), filter) } -#[test_case(&[0..10], ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] -#[test_case(&[0..10, 7..10], ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] -#[test_case(&[0..10, 7..10, 5..8, 3..7], ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] +#[test_case(&[0..10], TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] +#[test_case(&[0..10, 7..10], TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] +#[test_case(&[0..10, 7..10, 5..8, 3..7], TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] /// Check that forked chains are ignored. -fn can_ignore_forks(ranges: &[Range], filter: ChainFilter) -> Vec { +fn can_ignore_forks(ranges: &[Range], filter: TestFilter) -> Vec { build_chain(forked_chain(ranges), filter) } -#[test_case(&[0..10], ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] -#[test_case(&[0..5, 6..10], ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(6..10))] -#[test_case(&[0..5, 6..7, 8..10], ChainFilter::new(hash(9)).take(10).until(hash(4)) => chain(8..10))] -#[test_case(&[0..5, 6..7, 8..10], ChainFilter::new(hash(9)).take(3).until(hash(4)) => chain(8..10))] +#[test_case(&[0..10], TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(4..10))] +#[test_case(&[0..5, 6..10], TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(6..10))] +#[test_case(&[0..5, 6..7, 8..10], TestFilter::new(hash(9)).take(10).until(hash(4)) => chain(8..10))] +#[test_case(&[0..5, 6..7, 8..10], TestFilter::new(hash(9)).take(3).until(hash(4)) => chain(8..10))] /// Check the iterator will stop at a gap in the chain. -fn stop_at_gap(ranges: &[Range], filter: ChainFilter) -> Vec { +fn stop_at_gap(ranges: &[Range], filter: TestFilter) -> Vec { build_chain(gap_chain(ranges), filter) } diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 61ea3ec292..6211256f6b 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -145,6 +145,9 @@ pub fn test_keystore() -> holochain_keystore::MetaLairClient { .expect("timeout elapsed") } +/// The hash type for a [`TestChainItem`] +pub type TestChainHash = Vec; + /// A test implementation of a minimal ChainItem which uses simple numbers for hashes /// and always points back to the previous number #[derive(Clone, Debug, PartialEq, Eq)] @@ -152,30 +155,36 @@ pub struct TestChainItem { /// The sequence number pub seq: u32, /// The hash - pub hash: u32, + pub hash: TestChainHash, /// The previous hash, unless this is the first item - pub prev: Option, + pub prev: Option, } impl TestChainItem { /// Constructor for happy-path chains with no forking - pub fn new(seq: u32) -> Self { - Self { seq, hash: seq, prev: seq.checked_sub(1) } + pub fn new(seq: u8) -> Self { + Self { seq: seq as u32, hash: vec![seq], prev: seq.checked_sub(1).map(|p| vec![p]) } } } impl ChainItem for TestChainItem { - type Hash = u32; + type Hash = TestChainHash; fn seq(&self) -> u32 { self.seq } fn get_hash(&self) -> &Self::Hash { - &self.seq + &self.hash } fn prev_hash(&self) -> Option<&Self::Hash> { self.prev.as_ref() } +} + +impl AsRef for TestChainItem { + fn as_ref(&self) -> &Self { + self + } } \ No newline at end of file diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 90ee4cd02f..4a29869d2b 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -1,61 +1,31 @@ -use arbitrary::Arbitrary; -use holo_hash::AgentPubKey; -use holo_hash::EntryHash; -use holochain_zome_types::Create; -use holochain_zome_types::Dna; use std::ops::Range; -use arbitrary::Unstructured; -use holo_hash::ActionHash; -use holochain_zome_types::Action; -use holochain_zome_types::RegisterAgentActivity; +use super::TestChainItem; +use super::TestChainHash; -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct ChainItem { - pub action_seq: u32, - pub hash: ActionHash, - pub prev_action: Option, -} - -/// Create a hash from a u8. -fn hash(i: &[u8]) -> Vec { - let mut i = i.iter().copied().take(36).collect::>(); - let num_needed = 36 - i.len(); - i.extend(std::iter::repeat(0).take(num_needed)); - i -} - -pub fn action_hash(i: &[u8]) -> ActionHash { - ActionHash::from_raw_36(hash(i)) -} - -pub fn agent_hash(i: &[u8]) -> AgentPubKey { - AgentPubKey::from_raw_36(hash(i)) -} -pub fn entry_hash(i: &[u8]) -> EntryHash { - EntryHash::from_raw_36(hash(i)) +fn forked_hash(n: u8, i: u8) -> TestChainHash { + if i == 0 { + vec![n] + } else { + vec![n, i] + } } /// Create a chain per agent -pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { +pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(TestChainHash, Vec)> { ranges .iter() - .map(|(a, range)| (agent_hash(&[*a]), chain(range.clone()))) + .map(|(a, range)| (vec![*a], chain(range.clone()))) .collect() } /// Create a chain from a range where the first chain items /// previous hash == that items hash. -pub fn chain(range: Range) -> Vec { +pub fn chain(range: Range) -> Vec { range .map(|i| { - let prev = i.checked_sub(1).map(|i_sub_1| action_hash(&[i_sub_1])); - ChainItem { - action_seq: i as u32, - hash: action_hash(&[i]), - prev_action: prev, - } + TestChainItem::new(i) }) .rev() .collect() @@ -63,7 +33,7 @@ pub fn chain(range: Range) -> Vec { /// Create a set of chains with forks where the first range /// is the chain that all following ranges fork from. -pub fn forked_chain(ranges: &[Range]) -> Vec { +pub fn forked_chain(ranges: &[Range]) -> Vec { let mut out = Vec::new(); for (i, range) in ranges.iter().enumerate() { let r = range @@ -71,70 +41,38 @@ pub fn forked_chain(ranges: &[Range]) -> Vec { .enumerate() .map(|(j, n)| { if j == 0 || i == 0 { - let prev = n.checked_sub(1).map(|n_sub_1| action_hash(&[n_sub_1])); - ChainItem { - action_seq: n as u32, - hash: action_hash(&[n as u8, i as u8]), - prev_action: prev, + let prev = n.checked_sub(1).map(|n_sub_1| vec![n_sub_1]); + TestChainItem { + seq: n as u32, + hash: forked_hash(n as u8, i as u8), + prev, } } else { let prev = n .checked_sub(1) - .map(|n_sub_1| action_hash(&[n_sub_1, i as u8])); - ChainItem { - action_seq: n as u32, - hash: action_hash(&[n, i as u8]), - prev_action: prev, + .map(|n_sub_1| forked_hash(n_sub_1, i as u8)); + TestChainItem { + seq: n as u32, + hash: forked_hash(n, i as u8), + prev, } } }) .rev(); out.extend(r); } - out.sort_unstable_by_key(|s| s.action_seq); + out.sort_unstable_by_key(|s| s.seq); out.reverse(); out } /// Build a chain with gaps in it. Each range will make a chain even if there /// are gaps. -pub fn gap_chain(ranges: &[Range]) -> Vec { +pub fn gap_chain(ranges: &[Range]) -> Vec { let min = ranges.iter().map(|r| r.start).min().unwrap(); let max = ranges.iter().map(|r| r.end).max().unwrap(); chain(min..max) .into_iter() - .filter(|i| ranges.iter().any(|r| r.contains(&(i.action_seq as u8)))) - .collect() -} - -pub fn chain_to_ops(chain: Vec) -> Vec { - let mut u = Unstructured::new(&holochain_zome_types::NOISE); - chain - .into_iter() - .map( - |ChainItem { - action_seq, - hash, - prev_action, - }| { - let mut op = RegisterAgentActivity::arbitrary(&mut u).unwrap(); - match (action_seq, prev_action) { - (0, _) => { - let dna = Dna::arbitrary(&mut u).unwrap(); - op.action.hashed.content = Action::Dna(dna); - op.action.hashed.hash = hash; - } - (action_seq, Some(prev_action)) => { - let mut create = Create::arbitrary(&mut u).unwrap(); - create.action_seq = action_seq; - create.prev_action = prev_action; - op.action.hashed.content = Action::Create(create); - op.action.hashed.hash = hash; - } - _ => unreachable!(), - } - op - }, - ) + .filter(|i| ranges.iter().any(|r| r.contains(&(i.seq as u8)))) .collect() } From 090987a54d3c29b9fa3560df5980768011e4d224 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 19:30:13 -0700 Subject: [PATCH 011/111] fmt --- crates/holochain/src/core/sys_validate.rs | 4 ++-- crates/holochain/src/core/sys_validate/tests.rs | 6 ++---- crates/holochain_integrity_types/src/chain.rs | 2 +- crates/holochain_types/src/chain.rs | 9 +++------ crates/holochain_types/src/chain/test.rs | 5 ++--- crates/holochain_types/src/test_utils.rs | 10 +++++++--- crates/holochain_types/src/test_utils/chain.rs | 10 ++-------- 7 files changed, 19 insertions(+), 27 deletions(-) diff --git a/crates/holochain/src/core/sys_validate.rs b/crates/holochain/src/core/sys_validate.rs index ad7a8886d4..133b3a03e5 100644 --- a/crates/holochain/src/core/sys_validate.rs +++ b/crates/holochain/src/core/sys_validate.rs @@ -409,8 +409,8 @@ fn check_prev_action_chain( if action.prev_hash().is_none() { Err(PrevActionError::MissingPrev) } else if action.prev_hash().map_or(true, |p| p != prev_action_hash) { - // Check the prev hash matches. - Err(PrevActionError::HashMismatch(action.seq())) + // Check the prev hash matches. + Err(PrevActionError::HashMismatch(action.seq())) } else if action .seq() .checked_sub(1) diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index 63b3fd10cb..27484d456c 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -534,8 +534,7 @@ fn valid_chain_test() { ); // Test if there is a existing head that a dna in the new chain is rejected. - let err = - validate_chain(actions.iter(), &Some((vec![123], 0))).expect_err("Dna not at root"); + let err = validate_chain(actions.iter(), &Some((vec![123], 0))).expect_err("Dna not at root"); assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( @@ -567,8 +566,7 @@ fn valid_chain_test() { ) .expect("Correct seq"); - let err = validate_chain(correct_seq.iter(), &Some((vec![234], 0))) - .expect_err("Hash is wrong"); + let err = validate_chain(correct_seq.iter(), &Some((vec![234], 0))).expect_err("Hash is wrong"); assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index 01fd808fd7..5afa2ec9b4 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -6,7 +6,7 @@ use std::collections::HashSet; use holo_hash::{ActionHash, HasHash}; use holochain_serialized_bytes::prelude::*; -use crate::{SignedActionHashed, ActionHashed}; +use crate::{ActionHashed, SignedActionHashed}; #[cfg(test)] mod test; diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index 172891d976..9e2e521bf8 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -4,11 +4,11 @@ use std::iter::Peekable; use crate::activity::AgentActivityResponse; use crate::activity::ChainItems; use holo_hash::AgentPubKey; -use holochain_zome_types::ChainItem; -use holochain_zome_types::SignedActionHashed; use holochain_zome_types::prelude::ChainStatus; use holochain_zome_types::ChainFilter; use holochain_zome_types::ChainFilters; +use holochain_zome_types::ChainItem; +use holochain_zome_types::SignedActionHashed; #[cfg(all(test, feature = "test_utils"))] mod test; @@ -56,10 +56,7 @@ impl, A: ChainItem> ChainFilterIter { /// then this will be an empty iterator. pub fn new(filter: ChainFilter, mut chain: Vec) -> Self { // Sort by descending. - chain.sort_unstable_by(|a, b| { - b.as_ref().seq() - .cmp(&a.as_ref().seq()) - }); + chain.sort_unstable_by(|a, b| b.as_ref().seq().cmp(&a.as_ref().seq())); // Create a peekable iterator. let mut iter = chain.into_iter().peekable(); diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index 8952d68fba..1afc5424e1 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,7 +1,7 @@ use std::ops::Range; use test_case::test_case; -use crate::{test_utils::chain::*, prelude::TestChainItem}; +use crate::{prelude::TestChainItem, test_utils::chain::*}; use super::*; @@ -16,8 +16,7 @@ pub type TestFilter = ChainFilter; /// Build a chain of RegisterAgentActivity and then run them through the /// chain filter. fn build_chain(c: Vec, filter: TestFilter) -> Vec { - ChainFilterIter::new(filter, c).into_iter() - .collect() + ChainFilterIter::new(filter, c).into_iter().collect() } #[test_case(1, 0, 0 => chain(0..0))] diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 6211256f6b..68d5561030 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -163,8 +163,12 @@ pub struct TestChainItem { impl TestChainItem { /// Constructor for happy-path chains with no forking pub fn new(seq: u8) -> Self { - Self { seq: seq as u32, hash: vec![seq], prev: seq.checked_sub(1).map(|p| vec![p]) } - } + Self { + seq: seq as u32, + hash: vec![seq], + prev: seq.checked_sub(1).map(|p| vec![p]), + } + } } impl ChainItem for TestChainItem { @@ -187,4 +191,4 @@ impl AsRef for TestChainItem { fn as_ref(&self) -> &Self { self } -} \ No newline at end of file +} diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 4a29869d2b..ff17086853 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -1,8 +1,7 @@ use std::ops::Range; -use super::TestChainItem; use super::TestChainHash; - +use super::TestChainItem; fn forked_hash(n: u8, i: u8) -> TestChainHash { if i == 0 { @@ -23,12 +22,7 @@ pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(TestChainHash, Vec) -> Vec { - range - .map(|i| { - TestChainItem::new(i) - }) - .rev() - .collect() + range.map(|i| TestChainItem::new(i)).rev().collect() } /// Create a set of chains with forks where the first range From 4ae5cd896dcb171ca18cec37b07e8a87e9ae0054 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 27 Jul 2022 20:49:33 -0700 Subject: [PATCH 012/111] Clippy --- crates/holochain/src/test_utils/inline_zomes.rs | 4 ++-- crates/holochain_types/src/chain.rs | 2 +- crates/holochain_types/src/test_utils/chain.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/holochain/src/test_utils/inline_zomes.rs b/crates/holochain/src/test_utils/inline_zomes.rs index 6f9dfca230..45b980816f 100644 --- a/crates/holochain/src/test_utils/inline_zomes.rs +++ b/crates/holochain/src/test_utils/inline_zomes.rs @@ -97,9 +97,9 @@ pub fn simple_crud_zome() -> InlineZomeSet { let string_entry_def = EntryDef::default_with_id("string"); let unit_entry_def = EntryDef::default_with_id("unit"); - SweetEasyInline::new(vec![string_entry_def.clone(), unit_entry_def.clone()], 0) + SweetEasyInline::new(vec![string_entry_def, unit_entry_def], 0) .callback("create_string", move |api, s: AppString| { - let entry = Entry::app(AppString::from(s).try_into().unwrap()).unwrap(); + let entry = Entry::app(s.try_into().unwrap()).unwrap(); let hash = api.create(CreateInput::new( InlineZomeSet::get_entry_location(&api, EntryDefIndex(0)), EntryVisibility::Public, diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index 9e2e521bf8..dfb9744117 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -56,7 +56,7 @@ impl, A: ChainItem> ChainFilterIter { /// then this will be an empty iterator. pub fn new(filter: ChainFilter, mut chain: Vec) -> Self { // Sort by descending. - chain.sort_unstable_by(|a, b| b.as_ref().seq().cmp(&a.as_ref().seq())); + chain.sort_unstable_by_key(|a| a.as_ref().seq()); // Create a peekable iterator. let mut iter = chain.into_iter().peekable(); diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index ff17086853..efc41d0d3b 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -22,7 +22,7 @@ pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(TestChainHash, Vec) -> Vec { - range.map(|i| TestChainItem::new(i)).rev().collect() + range.map(TestChainItem::new).rev().collect() } /// Create a set of chains with forks where the first range From 01ae8f8d8c7e5758bcf13883ca6b20941306c0fb Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 28 Jul 2022 10:45:12 -0700 Subject: [PATCH 013/111] Fix chain order bug --- Cargo.lock | 1 + crates/holochain_types/Cargo.toml | 1 + crates/holochain_types/src/chain.rs | 4 ++-- crates/holochain_types/src/chain/test.rs | 10 ++++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b93bfd5051..eb20c13b0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2485,6 +2485,7 @@ dependencies = [ "nanoid 0.3.0", "observability", "parking_lot 0.10.2", + "pretty_assertions 0.6.1", "rand 0.8.5", "regex", "rusqlite", diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index cf37f962a5..c657b9782d 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -65,6 +65,7 @@ contrafact = { version = "0.1.0-dev.1", optional = true } arbitrary = "1.0" maplit = "1" matches = "0.1" +pretty_assertions = "0" serde_json = "1" test-case = "2.1.0" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index dfb9744117..29f3611a9a 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -48,7 +48,7 @@ pub struct ChainFilterIter, A: ChainItem = SignedActionHashed> { } impl, A: ChainItem> ChainFilterIter { - /// Create an iterator that filters an iterator of [`RegisterAgentActivity`] + /// Create an iterator that filters an iterator of actions /// with a [`ChainFilter`]. /// /// # Constraints @@ -56,7 +56,7 @@ impl, A: ChainItem> ChainFilterIter { /// then this will be an empty iterator. pub fn new(filter: ChainFilter, mut chain: Vec) -> Self { // Sort by descending. - chain.sort_unstable_by_key(|a| a.as_ref().seq()); + chain.sort_unstable_by_key(|a| u32::MAX - a.as_ref().seq()); // Create a peekable iterator. let mut iter = chain.into_iter().peekable(); diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index 1afc5424e1..9c675627e6 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -19,6 +19,12 @@ fn build_chain(c: Vec, filter: TestFilter) -> Vec ChainFilterIter::new(filter, c).into_iter().collect() } +/// Useful for displaying diff of test_case failure. +/// See +fn pretty(expected: Vec) -> impl Fn(Vec) { + move |actual: Vec| pretty_assertions::assert_eq!(actual, expected) +} + #[test_case(1, 0, 0 => chain(0..0))] #[test_case(1, 0, 1 => chain(0..1))] #[test_case(1, 0, 10 => chain(0..1))] @@ -34,8 +40,8 @@ fn can_take_n(len: u8, position: u8, take: u32) -> Vec { #[test_case(1, 0, hash(0) => chain(0..1))] #[test_case(1, 0, hash(1) => chain(0..1))] #[test_case(2, 1, hash(1) => chain(1..2))] -#[test_case(10, 5, hash(1) => chain(1..6))] -#[test_case(10, 9, hash(0) => chain(0..10))] +#[test_case(10, 5, hash(1) => using pretty(chain(1..6)))] +#[test_case(10, 9, hash(0) => using pretty(chain(0..10)))] /// Check taking until some hash works. fn can_until_hash(len: u8, position: u8, until: TestHash) -> Vec { let filter = TestFilter::new(hash(position)).until(until); From da674e8bc16e69734ebd6ff4234449c096c69bb8 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 28 Jul 2022 12:36:21 -0700 Subject: [PATCH 014/111] Make TestChainHash u32 instead of Vec --- crates/holochain_types/src/chain/test.rs | 14 +++++----- crates/holochain_types/src/test_utils.rs | 27 +++++++++++++++---- .../holochain_types/src/test_utils/chain.rs | 24 +++++------------ 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index 9c675627e6..85bb21deb2 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -5,9 +5,9 @@ use crate::{prelude::TestChainItem, test_utils::chain::*}; use super::*; -/// Create a hash from a u8. -fn hash(i: u8) -> TestHash { - vec![i] +/// Create a hash from a u32. +fn hash(i: u32) -> TestHash { + i.into() } pub type TestHash = ::Hash; @@ -32,7 +32,7 @@ fn pretty(expected: Vec) -> impl Fn(Vec) { #[test_case(2, 1, 10 => chain(0..2))] #[test_case(10, 9, 10 => chain(0..10))] /// Check taking n items works. -fn can_take_n(len: u8, position: u8, take: u32) -> Vec { +fn can_take_n(len: u32, position: u32, take: u32) -> Vec { let filter = TestFilter::new(hash(position)).take(take); build_chain(chain(0..len), filter) } @@ -43,7 +43,7 @@ fn can_take_n(len: u8, position: u8, take: u32) -> Vec { #[test_case(10, 5, hash(1) => using pretty(chain(1..6)))] #[test_case(10, 9, hash(0) => using pretty(chain(0..10)))] /// Check taking until some hash works. -fn can_until_hash(len: u8, position: u8, until: TestHash) -> Vec { +fn can_until_hash(len: u32, position: u32, until: TestHash) -> Vec { let filter = TestFilter::new(hash(position)).until(until); build_chain(chain(0..len), filter) } @@ -54,7 +54,7 @@ fn can_until_hash(len: u8, position: u8, until: TestHash) -> Vec #[test_case(10, TestFilter::new(hash(9)).take(20).take(2).until(hash(4)).until(hash(9)) => chain(9..10))] /// Check take and until can be combined and the first to be /// reached ends the iterator. -fn can_combine(len: u8, filter: TestFilter) -> Vec { +fn can_combine(len: u32, filter: TestFilter) -> Vec { build_chain(chain(0..len), filter) } @@ -71,6 +71,6 @@ fn can_ignore_forks(ranges: &[Range], filter: TestFilter) -> Vec chain(8..10))] #[test_case(&[0..5, 6..7, 8..10], TestFilter::new(hash(9)).take(3).until(hash(4)) => chain(8..10))] /// Check the iterator will stop at a gap in the chain. -fn stop_at_gap(ranges: &[Range], filter: TestFilter) -> Vec { +fn stop_at_gap(ranges: &[Range], filter: TestFilter) -> Vec { build_chain(gap_chain(ranges), filter) } diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 68d5561030..173096b56e 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -146,7 +146,24 @@ pub fn test_keystore() -> holochain_keystore::MetaLairClient { } /// The hash type for a [`TestChainItem`] -pub type TestChainHash = Vec; +#[derive( + Copy, + Clone, + Debug, + PartialEq, + Eq, + Hash, + derive_more::From, + derive_more::Deref, + derive_more::Into, +)] +pub struct TestChainHash(u32); + +impl From for TestChainHash { + fn from(u: u8) -> Self { + Self(u as u32) + } +} /// A test implementation of a minimal ChainItem which uses simple numbers for hashes /// and always points back to the previous number @@ -162,11 +179,11 @@ pub struct TestChainItem { impl TestChainItem { /// Constructor for happy-path chains with no forking - pub fn new(seq: u8) -> Self { + pub fn new(seq: u32) -> Self { Self { - seq: seq as u32, - hash: vec![seq], - prev: seq.checked_sub(1).map(|p| vec![p]), + seq: seq, + hash: TestChainHash(seq), + prev: seq.checked_sub(1).map(TestChainHash), } } } diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index efc41d0d3b..28bcabf17d 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -4,29 +4,19 @@ use super::TestChainHash; use super::TestChainItem; fn forked_hash(n: u8, i: u8) -> TestChainHash { - if i == 0 { - vec![n] - } else { - vec![n, i] - } -} - -/// Create a chain per agent -pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(TestChainHash, Vec)> { - ranges - .iter() - .map(|(a, range)| (vec![*a], chain(range.clone()))) - .collect() + TestChainHash(n as u32 + (i as u32) * 256) } /// Create a chain from a range where the first chain items /// previous hash == that items hash. -pub fn chain(range: Range) -> Vec { +pub fn chain(range: Range) -> Vec { range.map(TestChainItem::new).rev().collect() } /// Create a set of chains with forks where the first range /// is the chain that all following ranges fork from. +// This is limited to u8s, because we need to ensure that there is enough room +// to make hashes that don't collide within the forks. pub fn forked_chain(ranges: &[Range]) -> Vec { let mut out = Vec::new(); for (i, range) in ranges.iter().enumerate() { @@ -35,7 +25,7 @@ pub fn forked_chain(ranges: &[Range]) -> Vec { .enumerate() .map(|(j, n)| { if j == 0 || i == 0 { - let prev = n.checked_sub(1).map(|n_sub_1| vec![n_sub_1]); + let prev = n.checked_sub(1).map(Into::into); TestChainItem { seq: n as u32, hash: forked_hash(n as u8, i as u8), @@ -62,11 +52,11 @@ pub fn forked_chain(ranges: &[Range]) -> Vec { /// Build a chain with gaps in it. Each range will make a chain even if there /// are gaps. -pub fn gap_chain(ranges: &[Range]) -> Vec { +pub fn gap_chain(ranges: &[Range]) -> Vec { let min = ranges.iter().map(|r| r.start).min().unwrap(); let max = ranges.iter().map(|r| r.end).max().unwrap(); chain(min..max) .into_iter() - .filter(|i| ranges.iter().any(|r| r.contains(&(i.seq as u8)))) + .filter(|i| ranges.iter().any(|r| r.contains(&i.seq))) .collect() } From 9e363496b7a3d31a79a472fba08a2c22636af023 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 28 Jul 2022 12:37:01 -0700 Subject: [PATCH 015/111] Clippy --- crates/holochain/src/core/sys_validate/error.rs | 2 +- crates/holochain_types/src/test_utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/holochain/src/core/sys_validate/error.rs b/crates/holochain/src/core/sys_validate/error.rs index 9df1dc5912..d0d9f13940 100644 --- a/crates/holochain/src/core/sys_validate/error.rs +++ b/crates/holochain/src/core/sys_validate/error.rs @@ -23,7 +23,7 @@ use thiserror::Error; /// It is a lot cleaner to express this using /// ? try's unfortunately try for custom types is /// unstable but when it lands we should use: -/// https://docs.rs/try-guard/0.2.0/try_guard/ +/// #[derive(Error, Debug)] pub enum SysValidationError { #[error(transparent)] diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 173096b56e..d62aafe7ad 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -181,7 +181,7 @@ impl TestChainItem { /// Constructor for happy-path chains with no forking pub fn new(seq: u32) -> Self { Self { - seq: seq, + seq, hash: TestChainHash(seq), prev: seq.checked_sub(1).map(TestChainHash), } From 4fbb58d52cbefe02cb398248286d32db78a97bfc Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 28 Jul 2022 15:46:01 -0700 Subject: [PATCH 016/111] Some lingering fixes --- crates/holochain/src/core/sys_validate/tests.rs | 11 ++++++----- crates/holochain_types/src/test_utils.rs | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index 27484d456c..8c641461f3 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -489,8 +489,8 @@ fn valid_chain_test() { let mut fork = actions.clone(); fork.push(TestChainItem { seq: 1, - hash: vec![111], - prev: Some(vec![0]), + hash: 111.into(), + prev: Some(0.into()), }); let err = validate_chain(fork.iter(), &None).expect_err("Forked chain"); assert_matches!( @@ -513,7 +513,7 @@ fn valid_chain_test() { // Test a wrong root gets rejected. let mut wrong_root = actions.clone(); - wrong_root[0].prev = Some(vec![0]); + wrong_root[0].prev = Some(0.into()); let err = validate_chain(wrong_root.iter(), &None).expect_err("Wrong root"); assert_matches!( err, @@ -534,7 +534,7 @@ fn valid_chain_test() { ); // Test if there is a existing head that a dna in the new chain is rejected. - let err = validate_chain(actions.iter(), &Some((vec![123], 0))).expect_err("Dna not at root"); + let err = validate_chain(actions.iter(), &Some((123.into(), 0))).expect_err("Dna not at root"); assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( @@ -566,7 +566,8 @@ fn valid_chain_test() { ) .expect("Correct seq"); - let err = validate_chain(correct_seq.iter(), &Some((vec![234], 0))).expect_err("Hash is wrong"); + let err = + validate_chain(correct_seq.iter(), &Some((234.into(), 0))).expect_err("Hash is wrong"); assert_matches!( err, SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index d62aafe7ad..b4ae46bb59 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -165,6 +165,12 @@ impl From for TestChainHash { } } +impl From for TestChainHash { + fn from(u: i32) -> Self { + Self(u as u32) + } +} + /// A test implementation of a minimal ChainItem which uses simple numbers for hashes /// and always points back to the previous number #[derive(Clone, Debug, PartialEq, Eq)] From 3ba6273b1d0b21c8a57fe0dac449154f51245635 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 29 Jul 2022 11:47:11 -0700 Subject: [PATCH 017/111] Remove extraneous Deref --- crates/holochain_integrity_types/src/op.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/crates/holochain_integrity_types/src/op.rs b/crates/holochain_integrity_types/src/op.rs index d0a847d6ca..3d898257a9 100644 --- a/crates/holochain_integrity_types/src/op.rs +++ b/crates/holochain_integrity_types/src/op.rs @@ -1,7 +1,5 @@ //! # Dht Operational Transforms -use std::ops::Deref; - use crate::{ Action, ActionRef, ActionType, AppEntryType, Create, CreateLink, Delete, DeleteLink, Entry, EntryType, LinkTag, MembraneProof, Record, SignedActionHashed, SignedHashed, UnitEnum, Update, @@ -194,14 +192,6 @@ pub struct RegisterAgentActivity { pub action: SignedActionHashed, } -impl Deref for RegisterAgentActivity { - type Target = SignedActionHashed; - - fn deref(&self) -> &Self::Target { - &self.action - } -} - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerializedBytes)] #[cfg_attr(feature = "test_utils", derive(arbitrary::Arbitrary))] /// Registers a link between two [`Entry`]s. From 1966212556dc19680b7bc804aacf5649431362d2 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Mon, 1 Aug 2022 10:48:28 -0700 Subject: [PATCH 018/111] Add more thorough validation of prev_action --- crates/holochain/src/core/sys_validate.rs | 33 +++++++++++------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/crates/holochain/src/core/sys_validate.rs b/crates/holochain/src/core/sys_validate.rs index 133b3a03e5..daf90a1f7d 100644 --- a/crates/holochain/src/core/sys_validate.rs +++ b/crates/holochain/src/core/sys_validate.rs @@ -156,25 +156,22 @@ pub async fn check_countersigning_session_data( } } -/// Check that previous action makes sense -/// for this action. -/// If not Dna then cannot be root of chain -/// and must have previous action +/// Check that the correct actions have the correct setting for prev_action: +/// - Dna can never have a prev_action, and must have seq == 0. +/// - All other actions must have prev_action, and seq > 0. pub fn check_prev_action(action: &Action) -> SysValidationResult<()> { - match &action { - Action::Dna(_) => Ok(()), - _ => { - if action.action_seq() > 0 { - action - .prev_action() - .ok_or(PrevActionError::MissingPrev) - .map_err(ValidationOutcome::from)?; - Ok(()) - } else { - Err(PrevActionError::InvalidRoot).map_err(|e| ValidationOutcome::from(e).into()) - } - } - } + let is_dna = matches!(action, Action::Dna(_)); + match ( + is_dna, + action.action_seq() > 0, + action.prev_action().is_some(), + ) { + (true, false, false) => Ok(()), + (true, _, _) => Err(PrevActionError::InvalidRoot), + (false, true, true) => Ok(()), + (false, _, _) => Err(PrevActionError::MissingPrev), + } + .map_err(|e| ValidationOutcome::from(e).into()) } /// Check that Dna actions are only added to empty source chains From 30b3b0ad26787a233d6af1d04006bc68ae54b147 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Mon, 1 Aug 2022 14:15:14 -0700 Subject: [PATCH 019/111] Fix logic --- crates/holochain/src/core/sys_validate.rs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/crates/holochain/src/core/sys_validate.rs b/crates/holochain/src/core/sys_validate.rs index daf90a1f7d..5862fc02d0 100644 --- a/crates/holochain/src/core/sys_validate.rs +++ b/crates/holochain/src/core/sys_validate.rs @@ -161,15 +161,20 @@ pub async fn check_countersigning_session_data( /// - All other actions must have prev_action, and seq > 0. pub fn check_prev_action(action: &Action) -> SysValidationResult<()> { let is_dna = matches!(action, Action::Dna(_)); - match ( - is_dna, - action.action_seq() > 0, - action.prev_action().is_some(), - ) { - (true, false, false) => Ok(()), - (true, _, _) => Err(PrevActionError::InvalidRoot), - (false, true, true) => Ok(()), - (false, _, _) => Err(PrevActionError::MissingPrev), + let has_prev = action.prev_action().is_some(); + let is_first = action.action_seq() == 0; + if is_first { + if is_dna && !has_prev { + Ok(()) + } else { + Err(PrevActionError::InvalidRoot) + } + } else { + if !is_dna && has_prev { + Ok(()) + } else { + Err(PrevActionError::MissingPrev) + } } .map_err(|e| ValidationOutcome::from(e).into()) } From 83bad93663b5fa14c5470c6ddb3b0fe27a52bfcf Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 2 Aug 2022 17:22:37 -0700 Subject: [PATCH 020/111] Re-add chain_to_ops --- crates/holochain_integrity_types/src/chain.rs | 9 ++++- crates/holochain_types/src/test_utils.rs | 9 ++++- .../holochain_types/src/test_utils/chain.rs | 34 +++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index 5afa2ec9b4..d80c7c97cc 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -114,7 +114,14 @@ impl Default for ChainFilters { // add a large monomorphization overhead pub trait ChainItem: Clone + PartialEq + Eq + std::fmt::Debug { /// The type used to represent a hash of this item - type Hash: Clone + PartialEq + Eq + std::hash::Hash + std::fmt::Debug; + type Hash: Clone + + PartialEq + + Eq + + std::hash::Hash + + std::fmt::Debug + + Send + + Sync + + Into; /// The sequence in the chain fn seq(&self) -> u32; diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index b4ae46bb59..011c2f5316 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -157,7 +157,7 @@ pub fn test_keystore() -> holochain_keystore::MetaLairClient { derive_more::Deref, derive_more::Into, )] -pub struct TestChainHash(u32); +pub struct TestChainHash(pub u32); impl From for TestChainHash { fn from(u: u8) -> Self { @@ -171,6 +171,13 @@ impl From for TestChainHash { } } +impl From for ActionHash { + fn from(h: TestChainHash) -> Self { + let bytes: Vec = h.0.to_le_bytes().iter().cycle().take(32).copied().collect(); + ActionHash::from_raw_32(bytes) + } +} + /// A test implementation of a minimal ChainItem which uses simple numbers for hashes /// and always points back to the previous number #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 28bcabf17d..400fb5fe43 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -1,5 +1,10 @@ use std::ops::Range; +use arbitrary::Arbitrary; +use arbitrary::Unstructured; +use holo_hash::ActionHash; +use holochain_zome_types::*; + use super::TestChainHash; use super::TestChainItem; @@ -60,3 +65,32 @@ pub fn gap_chain(ranges: &[Range]) -> Vec { .filter(|i| ranges.iter().any(|r| r.contains(&i.seq))) .collect() } + +pub fn chain_to_ops(chain: Vec) -> Vec { + let mut u = Unstructured::new(&holochain_zome_types::NOISE); + chain + .into_iter() + .map(|i| { + let action_seq = i.seq(); + let prev_action = i.prev_hash().cloned().map(Into::into); + let hash: ActionHash = i.get_hash().clone().into(); + let mut op = RegisterAgentActivity::arbitrary(&mut u).unwrap(); + match (action_seq, prev_action) { + (0, _) => { + let dna = Dna::arbitrary(&mut u).unwrap(); + op.action.hashed.content = Action::Dna(dna); + op.action.hashed.hash = hash; + } + (action_seq, Some(prev_action)) => { + let mut create = Create::arbitrary(&mut u).unwrap(); + create.action_seq = action_seq; + create.prev_action = prev_action; + op.action.hashed.content = Action::Create(create); + op.action.hashed.hash = hash; + } + _ => unreachable!(), + } + op + }) + .collect() +} From 170b9636f9dce7c631aa1f2ef24445d24ef4eaa0 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 2 Aug 2022 17:30:42 -0700 Subject: [PATCH 021/111] Clippy --- crates/holochain/src/core/sys_validate.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/holochain/src/core/sys_validate.rs b/crates/holochain/src/core/sys_validate.rs index 5862fc02d0..91e9f246fe 100644 --- a/crates/holochain/src/core/sys_validate.rs +++ b/crates/holochain/src/core/sys_validate.rs @@ -163,6 +163,7 @@ pub fn check_prev_action(action: &Action) -> SysValidationResult<()> { let is_dna = matches!(action, Action::Dna(_)); let has_prev = action.prev_action().is_some(); let is_first = action.action_seq() == 0; + #[allow(clippy::collapsible_else_if)] if is_first { if is_dna && !has_prev { Ok(()) From 155e7b935a8143874938e84847e6e6b2324cbe0e Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 9 Aug 2022 15:51:52 -0700 Subject: [PATCH 022/111] Re-add chain_item_to_action --- crates/holochain_types/src/test_utils.rs | 5 ++- .../holochain_types/src/test_utils/chain.rs | 42 +++++++++++-------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 011c2f5316..aa7630c4e0 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -9,6 +9,9 @@ use std::path::PathBuf; pub use holochain_zome_types::test_utils::*; +use self::chain::chain_item_to_action; +use self::chain::chain_to_ops; + #[allow(missing_docs)] pub mod chain; @@ -180,7 +183,7 @@ impl From for ActionHash { /// A test implementation of a minimal ChainItem which uses simple numbers for hashes /// and always points back to the previous number -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct TestChainItem { /// The sequence number pub seq: u32, diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 400fb5fe43..733510890c 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -66,30 +66,36 @@ pub fn gap_chain(ranges: &[Range]) -> Vec { .collect() } +pub fn chain_item_to_action(u: &mut Unstructured, i: &impl ChainItem) -> SignedActionHashed { + let action_seq = i.seq(); + let prev_action = i.prev_hash().cloned().map(Into::into); + let hash: ActionHash = i.get_hash().clone().into(); + let mut action = SignedActionHashed::arbitrary(u).unwrap(); + match (action_seq, prev_action) { + (0, _) => { + let dna = Dna::arbitrary(u).unwrap(); + action.hashed.content = Action::Dna(dna); + action.hashed.hash = hash; + } + (action_seq, Some(prev_action)) => { + let mut create = Create::arbitrary(u).unwrap(); + create.action_seq = action_seq; + create.prev_action = prev_action; + action.hashed.content = Action::Create(create); + action.hashed.hash = hash; + } + _ => unreachable!(), + } + action +} + pub fn chain_to_ops(chain: Vec) -> Vec { let mut u = Unstructured::new(&holochain_zome_types::NOISE); chain .into_iter() .map(|i| { - let action_seq = i.seq(); - let prev_action = i.prev_hash().cloned().map(Into::into); - let hash: ActionHash = i.get_hash().clone().into(); let mut op = RegisterAgentActivity::arbitrary(&mut u).unwrap(); - match (action_seq, prev_action) { - (0, _) => { - let dna = Dna::arbitrary(&mut u).unwrap(); - op.action.hashed.content = Action::Dna(dna); - op.action.hashed.hash = hash; - } - (action_seq, Some(prev_action)) => { - let mut create = Create::arbitrary(&mut u).unwrap(); - create.action_seq = action_seq; - create.prev_action = prev_action; - op.action.hashed.content = Action::Create(create); - op.action.hashed.hash = hash; - } - _ => unreachable!(), - } + op.action = chain_item_to_action(&mut u, &i); op }) .collect() From 6b2b942c4889112497eed17c74b4bafb0a50116a Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 11 Aug 2022 10:39:15 -0700 Subject: [PATCH 023/111] Move all ChainItem stuff into holochain_types --- Cargo.lock | 6 ++ .../holochain/src/core/sys_validate/tests.rs | 1 + crates/holochain_integrity_types/src/chain.rs | 56 ------------- crates/holochain_types/Cargo.toml | 1 + crates/holochain_types/src/chain.rs | 60 +++++++++++++- crates/holochain_types/src/chain/test.rs | 2 +- crates/holochain_types/src/test_utils.rs | 83 +------------------ .../holochain_types/src/test_utils/chain.rs | 81 +++++++++++++++++- 8 files changed, 148 insertions(+), 142 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb20c13b0b..9d083ac746 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2474,6 +2474,7 @@ dependencies = [ "holochain_sqlite", "holochain_util", "holochain_zome_types", + "isotest", "itertools 0.10.3", "kitsune_p2p_dht", "lazy_static", @@ -2871,6 +2872,11 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +[[package]] +name = "isotest" +version = "0.1.0" +source = "git+https://github.com/maackle/isotest-rust#56993c757fd9944a86bf38b3a87483854dbfa823" + [[package]] name = "itertools" version = "0.8.2" diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index 8c641461f3..ddd78543f8 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -13,6 +13,7 @@ use holochain_state::prelude::test_authored_db; use holochain_state::prelude::test_cache_db; use holochain_state::prelude::test_dht_db; use holochain_types::db_cache::DhtDbQueryCache; +use holochain_types::test_utils::chain::TestChainItem; use holochain_wasm_test_utils::*; use holochain_zome_types::Action; use matches::assert_matches; diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index d80c7c97cc..f94d2db82c 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -108,59 +108,3 @@ impl Default for ChainFilters { Self::ToGenesis } } - -/// Abstraction over an item in a chain. -// Alternate implementations are only used for testing, so this should not -// add a large monomorphization overhead -pub trait ChainItem: Clone + PartialEq + Eq + std::fmt::Debug { - /// The type used to represent a hash of this item - type Hash: Clone - + PartialEq - + Eq - + std::hash::Hash - + std::fmt::Debug - + Send - + Sync - + Into; - - /// The sequence in the chain - fn seq(&self) -> u32; - - /// The hash of this item - fn get_hash(&self) -> &Self::Hash; - - /// The hash of the previous item - fn prev_hash(&self) -> Option<&Self::Hash>; -} - -impl ChainItem for ActionHashed { - type Hash = ActionHash; - - fn seq(&self) -> u32 { - self.action_seq() - } - - fn get_hash(&self) -> &Self::Hash { - self.as_hash() - } - - fn prev_hash(&self) -> Option<&Self::Hash> { - self.prev_action() - } -} - -impl ChainItem for SignedActionHashed { - type Hash = ActionHash; - - fn seq(&self) -> u32 { - self.hashed.seq() - } - - fn get_hash(&self) -> &Self::Hash { - self.hashed.get_hash() - } - - fn prev_hash(&self) -> Option<&Self::Hash> { - self.hashed.prev_hash() - } -} diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index c657b9782d..aea6c77b05 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -63,6 +63,7 @@ contrafact = { version = "0.1.0-dev.1", optional = true } [dev-dependencies] arbitrary = "1.0" +isotest = { git = "https://github.com/maackle/isotest-rust" } maplit = "1" matches = "0.1" pretty_assertions = "0" diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index 29f3611a9a..c0ab22207c 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -3,11 +3,13 @@ use std::iter::Peekable; use crate::activity::AgentActivityResponse; use crate::activity::ChainItems; +use holo_hash::ActionHash; use holo_hash::AgentPubKey; +use holo_hash::HasHash; use holochain_zome_types::prelude::ChainStatus; +use holochain_zome_types::ActionHashed; use holochain_zome_types::ChainFilter; use holochain_zome_types::ChainFilters; -use holochain_zome_types::ChainItem; use holochain_zome_types::SignedActionHashed; #[cfg(all(test, feature = "test_utils"))] @@ -30,6 +32,62 @@ pub trait AgentActivityExt { impl AgentActivityExt for AgentActivityResponse {} +/// Abstraction over an item in a chain. +// Alternate implementations are only used for testing, so this should not +// add a large monomorphization overhead +pub trait ChainItem: Clone + PartialEq + Eq + std::fmt::Debug { + /// The type used to represent a hash of this item + type Hash: Clone + + PartialEq + + Eq + + std::hash::Hash + + std::fmt::Debug + + Send + + Sync + + Into; + + /// The sequence in the chain + fn seq(&self) -> u32; + + /// The hash of this item + fn get_hash(&self) -> &Self::Hash; + + /// The hash of the previous item + fn prev_hash(&self) -> Option<&Self::Hash>; +} + +impl ChainItem for ActionHashed { + type Hash = ActionHash; + + fn seq(&self) -> u32 { + self.action_seq() + } + + fn get_hash(&self) -> &Self::Hash { + self.as_hash() + } + + fn prev_hash(&self) -> Option<&Self::Hash> { + self.prev_action() + } +} + +impl ChainItem for SignedActionHashed { + type Hash = ActionHash; + + fn seq(&self) -> u32 { + self.hashed.seq() + } + + fn get_hash(&self) -> &Self::Hash { + self.hashed.get_hash() + } + + fn prev_hash(&self) -> Option<&Self::Hash> { + self.hashed.prev_hash() + } +} + #[must_use = "Iterator doesn't do anything unless consumed."] #[derive(Debug)] /// Iterate over a source chain and apply the [`ChainFilter`] to each element. diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index 85bb21deb2..5901fb546a 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,7 +1,7 @@ use std::ops::Range; use test_case::test_case; -use crate::{prelude::TestChainItem, test_utils::chain::*}; +use crate::test_utils::chain::*; use super::*; diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index aa7630c4e0..d8fa6150f3 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -9,10 +9,7 @@ use std::path::PathBuf; pub use holochain_zome_types::test_utils::*; -use self::chain::chain_item_to_action; -use self::chain::chain_to_ops; - -#[allow(missing_docs)] +#[warn(missing_docs)] pub mod chain; #[derive(Serialize, Deserialize, SerializedBytes, Debug)] @@ -147,81 +144,3 @@ pub fn test_keystore() -> holochain_keystore::MetaLairClient { ) .expect("timeout elapsed") } - -/// The hash type for a [`TestChainItem`] -#[derive( - Copy, - Clone, - Debug, - PartialEq, - Eq, - Hash, - derive_more::From, - derive_more::Deref, - derive_more::Into, -)] -pub struct TestChainHash(pub u32); - -impl From for TestChainHash { - fn from(u: u8) -> Self { - Self(u as u32) - } -} - -impl From for TestChainHash { - fn from(u: i32) -> Self { - Self(u as u32) - } -} - -impl From for ActionHash { - fn from(h: TestChainHash) -> Self { - let bytes: Vec = h.0.to_le_bytes().iter().cycle().take(32).copied().collect(); - ActionHash::from_raw_32(bytes) - } -} - -/// A test implementation of a minimal ChainItem which uses simple numbers for hashes -/// and always points back to the previous number -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -pub struct TestChainItem { - /// The sequence number - pub seq: u32, - /// The hash - pub hash: TestChainHash, - /// The previous hash, unless this is the first item - pub prev: Option, -} - -impl TestChainItem { - /// Constructor for happy-path chains with no forking - pub fn new(seq: u32) -> Self { - Self { - seq, - hash: TestChainHash(seq), - prev: seq.checked_sub(1).map(TestChainHash), - } - } -} - -impl ChainItem for TestChainItem { - type Hash = TestChainHash; - - fn seq(&self) -> u32 { - self.seq - } - - fn get_hash(&self) -> &Self::Hash { - &self.hash - } - - fn prev_hash(&self) -> Option<&Self::Hash> { - self.prev.as_ref() - } -} - -impl AsRef for TestChainItem { - fn as_ref(&self) -> &Self { - self - } -} diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 733510890c..59d09b0480 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -5,8 +5,85 @@ use arbitrary::Unstructured; use holo_hash::ActionHash; use holochain_zome_types::*; -use super::TestChainHash; -use super::TestChainItem; +use crate::prelude::ChainItem; + +/// The hash type for a [`TestChainItem`] +#[derive( + Copy, + Clone, + Debug, + PartialEq, + Eq, + Hash, + derive_more::From, + derive_more::Deref, + derive_more::Into, +)] +pub struct TestChainHash(pub u32); + +impl From for TestChainHash { + fn from(u: u8) -> Self { + Self(u as u32) + } +} + +impl From for TestChainHash { + fn from(u: i32) -> Self { + Self(u as u32) + } +} + +impl From for ActionHash { + fn from(h: TestChainHash) -> Self { + let bytes: Vec = h.0.to_le_bytes().iter().cycle().take(32).copied().collect(); + ActionHash::from_raw_32(bytes) + } +} + +/// A test implementation of a minimal ChainItem which uses simple numbers for hashes +/// and always points back to the previous number +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub struct TestChainItem { + /// The sequence number + pub seq: u32, + /// The hash + pub hash: TestChainHash, + /// The previous hash, unless this is the first item + pub prev: Option, +} + +impl TestChainItem { + /// Constructor for happy-path chains with no forking + pub fn new(seq: u32) -> Self { + Self { + seq, + hash: TestChainHash(seq), + prev: seq.checked_sub(1).map(TestChainHash), + } + } +} + +impl ChainItem for TestChainItem { + type Hash = TestChainHash; + + fn seq(&self) -> u32 { + self.seq + } + + fn get_hash(&self) -> &Self::Hash { + &self.hash + } + + fn prev_hash(&self) -> Option<&Self::Hash> { + self.prev.as_ref() + } +} + +impl AsRef for TestChainItem { + fn as_ref(&self) -> &Self { + self + } +} fn forked_hash(n: u8, i: u8) -> TestChainHash { TestChainHash(n as u32 + (i as u32) * 256) From b3cdfcfffc44a8f70129759aa62523b66120d565 Mon Sep 17 00:00:00 2001 From: neonphog Date: Fri, 12 Aug 2022 11:10:45 -0600 Subject: [PATCH 024/111] add tag to conductor state --- crates/holochain/src/conductor/conductor.rs | 22 ++++++++++----- .../src/conductor/conductor/tests.rs | 4 ++- crates/holochain/src/conductor/state.rs | 28 ++++++++++++++++++- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/crates/holochain/src/conductor/conductor.rs b/crates/holochain/src/conductor/conductor.rs index 0ec15fcf7c..e044a3214b 100755 --- a/crates/holochain/src/conductor/conductor.rs +++ b/crates/holochain/src/conductor/conductor.rs @@ -1321,7 +1321,8 @@ impl Conductor { } pub(super) async fn get_state(&self) -> ConductorResult { - self.spaces + let state = self + .spaces .conductor_db .async_reader(|txn| { let state = txn @@ -1329,13 +1330,20 @@ impl Conductor { row.get("blob") }) .optional()?; - let state = match state { - Some(state) => from_blob(state)?, - None => ConductorState::default(), - }; - Ok(state) + match state { + Some(state) => ConductorResult::Ok(Some(from_blob(state)?)), + None => ConductorResult::Ok(None), + } }) - .await + .await?; + + match state { + Some(state) => Ok(state), + // update_state will again try to read the state. It's a little + // inefficient in the infrequent case where we haven't saved the + // state yet, but more atomic, so worth it. + None => self.update_state(Ok).await, + } } /// Update the internal state with a pure function mapping old state to new diff --git a/crates/holochain/src/conductor/conductor/tests.rs b/crates/holochain/src/conductor/conductor/tests.rs index 3e1dfebf8e..972171ef69 100644 --- a/crates/holochain/src/conductor/conductor/tests.rs +++ b/crates/holochain/src/conductor/conductor/tests.rs @@ -48,7 +48,9 @@ async fn can_update_state() { .await .unwrap(); let state = conductor.get_state().await.unwrap(); - assert_eq!(state, ConductorState::default()); + let mut expect_state = ConductorState::default(); + expect_state.set_tag(state.tag().clone()); + assert_eq!(state, expect_state); let cell_id = fake_cell_id(1); let installed_cell = InstalledCell::new(cell_id.clone(), "role_id".to_string()); diff --git a/crates/holochain/src/conductor/state.rs b/crates/holochain/src/conductor/state.rs index 3895ec3758..20dadf7ea8 100644 --- a/crates/holochain/src/conductor/state.rs +++ b/crates/holochain/src/conductor/state.rs @@ -7,9 +7,22 @@ use holochain_types::prelude::*; use serde::Deserialize; use serde::Serialize; use std::collections::HashMap; +use std::sync::Arc; use super::error::{ConductorError, ConductorResult}; +/// Unique conductor tag / identifier. +#[derive(Clone, Deserialize, Serialize, Debug, SerializedBytes)] +#[cfg_attr(test, derive(PartialEq))] +#[serde(transparent)] +pub struct Tag(pub Arc); + +impl Default for Tag { + fn default() -> Self { + Self(nanoid::nanoid!().into()) + } +} + /// Mutable conductor state, stored in a DB and writable only via Admin interface. /// /// References between structs (cell configs pointing to @@ -18,7 +31,10 @@ use super::error::{ConductorError, ConductorResult}; #[derive(Clone, Deserialize, Serialize, Default, Debug, SerializedBytes)] #[cfg_attr(test, derive(PartialEq))] pub struct ConductorState { - /// Apps that have been installed, regardless of status + /// Unique conductor tag / identifier. + #[serde(default)] + tag: Tag, + /// Apps that have been installed, regardless of status. #[serde(default)] installed_apps: InstalledAppMap, /// List of interfaces any UI can use to access zome functions. @@ -59,6 +75,16 @@ impl AppInterfaceId { } impl ConductorState { + /// A unique identifier for this conductor + pub fn tag(&self) -> &Tag { + &self.tag + } + + #[cfg(test)] + pub fn set_tag(&mut self, tag: Tag) { + self.tag = tag; + } + /// Immutable access to the inner collection of all apps pub fn installed_apps(&self) -> &InstalledAppMap { &self.installed_apps From 57f40c749f3c85754007f13733d6fa2ede8c5e98 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 11 Aug 2022 16:00:33 -0700 Subject: [PATCH 025/111] Use isotest --- Cargo.lock | 631 +++++++++--------- crates/holochain/Cargo.toml | 1 + .../holochain/src/core/sys_validate/tests.rs | 191 +++--- crates/holochain_integrity_types/src/chain.rs | 4 +- crates/holochain_types/Cargo.toml | 4 + crates/holochain_types/src/lib.rs | 1 + .../holochain_types/src/test_utils/chain.rs | 52 +- 7 files changed, 487 insertions(+), 397 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d083ac746..4003b16c2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", + "gimli 0.26.2", ] [[package]] @@ -58,6 +58,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ed72e1635e121ca3e79420540282af22da58be50de153d36f81ddc6b83aa9e" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" version = "0.11.0" @@ -78,9 +87,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8" [[package]] name = "approx" @@ -93,9 +102,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e0a02cf12f1b1f48b14cb7f8217b876d09992b39c816ffb3b1ba64dd979a87" +checksum = "5a7924531f38b1970ff630f03eb20a2fde69db5c590c93b0f3482e95dcc5fd60" dependencies = [ "derive_arbitrary", ] @@ -153,9 +162,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.6.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +checksum = "e14485364214912d3b19cc3435dde4df66065127f05fa0d75c712f36f12c2f28" dependencies = [ "concurrent-queue", "event-listener", @@ -178,9 +187,9 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd8b508d585e01084059b60f06ade4cb7415cd2e4084b71dd1cb44e7d3fb9880" +checksum = "5262ed948da60dd8956c6c5aca4d4163593dddb7b32d73267c93dab7b2e98940" dependencies = [ "async-channel", "async-executor", @@ -188,6 +197,7 @@ dependencies = [ "async-lock", "blocking", "futures-lite", + "num_cpus", "once_cell", ] @@ -249,9 +259,9 @@ dependencies = [ [[package]] name = "async-std" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-attributes", "async-channel", @@ -268,7 +278,6 @@ dependencies = [ "kv-log-macro", "log", "memchr", - "num_cpus", "once_cell", "pin-project-lite", "pin-utils", @@ -299,15 +308,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.2.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" +checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ "proc-macro2", "quote", @@ -360,16 +369,16 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" +checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.29.0", "rustc-demangle", ] @@ -396,9 +405,9 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ "bit-vec", ] @@ -519,9 +528,9 @@ checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "bytecheck" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a31f923c2db9513e4298b72df143e6e655a759b3d6a0966df18f81223fff54f" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -529,9 +538,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb17c862a905d912174daa27ae002326fff56dc8b8ada50a0a5f0976cb174f0" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -540,9 +549,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.9.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdead85bdec19c194affaeeb670c0e41fe23de31459efd1c174d049269cf02cc" +checksum = "44f8cb64b4147a528e1e9e77583739e683541973295b35f3bd7e78d42c5971fd" [[package]] name = "byteorder" @@ -552,9 +561,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] name = "cache-padded" @@ -564,12 +573,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "cast" -version = "0.2.7" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" -dependencies = [ - "rustc_version", -] +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" @@ -624,15 +630,17 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", "num-integer", "num-traits", "serde", "time 0.1.44", + "wasm-bindgen", "winapi", ] @@ -698,9 +706,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] @@ -727,9 +735,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "1.2.2" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c" dependencies = [ "cache-padded", ] @@ -813,7 +821,7 @@ dependencies = [ "gimli 0.25.0", "log", "regalloc", - "smallvec 1.8.0", + "smallvec 1.9.0", "target-lexicon", ] @@ -847,7 +855,7 @@ checksum = "279afcc0d3e651b773f94837c3d581177b348c8d69e928104b2e9fccb226f921" dependencies = [ "cranelift-codegen", "log", - "smallvec 1.8.0", + "smallvec 1.9.0", "target-lexicon", ] @@ -862,9 +870,9 @@ dependencies = [ [[package]] name = "criterion" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" dependencies = [ "atty", "cast", @@ -890,9 +898,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" dependencies = [ "cast", "itertools 0.10.3", @@ -911,9 +919,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -921,9 +929,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -932,9 +940,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" +checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" dependencies = [ "autocfg 1.1.0", "cfg-if 1.0.0", @@ -946,9 +954,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -987,9 +995,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -1033,9 +1041,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" +checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb" dependencies = [ "quote", "syn", @@ -1176,7 +1184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3495912c9c1ccf2e18976439f4443f3fee0fd61f424ff99fde6a66b15ecb448f" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.12.1", + "hashbrown 0.12.3", "lock_api 0.4.7", "parking_lot_core 0.9.3", ] @@ -1194,9 +1202,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8728db27dd9033a7456655aaeb35fde74425d0f130b4cb18a19171ef38a1b454" +checksum = "c9a577516173adb681466d517d39bd468293bc2c2a16439375ef0f35bba45f3d" dependencies = [ "proc-macro2", "quote", @@ -1243,9 +1251,9 @@ dependencies = [ [[package]] name = "diff" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "difference" @@ -1365,9 +1373,9 @@ checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" [[package]] name = "either" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" [[package]] name = "encoding_rs" @@ -1444,9 +1452,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "failure" @@ -1484,23 +1492,23 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] [[package]] name = "filetime" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.13", - "winapi", + "redox_syscall 0.2.16", + "windows-sys", ] [[package]] @@ -1599,9 +1607,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" dependencies = [ "futures-channel", "futures-core", @@ -1614,9 +1622,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" dependencies = [ "futures-core", "futures-sink", @@ -1624,15 +1632,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" dependencies = [ "futures-core", "futures-task", @@ -1641,9 +1649,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" [[package]] name = "futures-lite" @@ -1662,9 +1670,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" dependencies = [ "proc-macro2", "quote", @@ -1673,15 +1681,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" [[package]] name = "futures-timer" @@ -1691,9 +1699,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" dependencies = [ "futures-channel", "futures-core", @@ -1730,9 +1738,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -1799,9 +1807,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" [[package]] name = "glob" @@ -1835,7 +1843,7 @@ dependencies = [ "parking_lot 0.11.2", "quanta", "rand 0.8.5", - "smallvec 1.8.0", + "smallvec 1.9.0", ] [[package]] @@ -1884,9 +1892,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash 0.7.6", ] @@ -1929,7 +1937,7 @@ dependencies = [ "paste", "serde", "serde_bytes", - "test-case 2.1.0", + "test-case 2.2.1", "tracing", "tracing-core", ] @@ -1945,7 +1953,7 @@ dependencies = [ "holo_hash", "holochain_wasmer_guest", "holochain_zome_types", - "mockall 0.11.1", + "mockall 0.11.2", "paste", "serde", "serde_bytes", @@ -2081,6 +2089,7 @@ dependencies = [ "holochain_zome_types", "hostname", "human-panic", + "isotest", "itertools 0.10.3", "kitsune_p2p", "kitsune_p2p_bootstrap", @@ -2290,7 +2299,7 @@ name = "holochain_mock_hdi" version = "0.0.1" dependencies = [ "hdi", - "mockall 0.11.1", + "mockall 0.11.2", ] [[package]] @@ -2472,6 +2481,7 @@ dependencies = [ "holochain_keystore", "holochain_serialized_bytes", "holochain_sqlite", + "holochain_types", "holochain_util", "holochain_zome_types", "isotest", @@ -2486,7 +2496,7 @@ dependencies = [ "nanoid 0.3.0", "observability", "parking_lot 0.10.2", - "pretty_assertions 0.6.1", + "pretty_assertions 0.7.2", "rand 0.8.5", "regex", "rusqlite", @@ -2500,7 +2510,7 @@ dependencies = [ "strum", "strum_macros", "tempfile", - "test-case 2.1.0", + "test-case 2.2.1", "thiserror", "tokio", "tracing", @@ -2663,7 +2673,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.2", + "itoa 1.0.3", ] [[package]] @@ -2706,9 +2716,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.19" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -2719,7 +2729,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.2", + "itoa 1.0.3", "pin-project-lite", "socket2 0.4.4", "tokio", @@ -2741,6 +2751,19 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf7d67cf4a22adc5be66e75ebdf769b3f2ea032041437a7061f97a63dad4b" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "js-sys", + "wasm-bindgen", + "winapi", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2802,12 +2825,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6392766afd7964e2531940894cffe4bd8d7d17dbc3c1c4857040fd4b33bdb3" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg 1.1.0", - "hashbrown 0.12.1", + "hashbrown 0.12.3", "serde", ] @@ -2825,7 +2848,7 @@ dependencies = [ "dashmap 5.3.4", "env_logger", "indexmap", - "itoa 1.0.2", + "itoa 1.0.3", "lazy_static", "log", "num-format", @@ -2875,7 +2898,7 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "isotest" version = "0.1.0" -source = "git+https://github.com/maackle/isotest-rust#56993c757fd9944a86bf38b3a87483854dbfa823" +source = "git+https://github.com/maackle/isotest-rust#314b3fa3755ed6710e3558fab07c56f28e14bd51" [[package]] name = "itertools" @@ -2903,15 +2926,15 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "js-sys" -version = "0.3.58" +version = "0.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" +checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" dependencies = [ "wasm-bindgen", ] @@ -3146,7 +3169,7 @@ dependencies = [ "nanoid 0.4.0", "once_cell", "quinn", - "rcgen 0.9.2", + "rcgen 0.9.3", "rustls", "serde", "tokio", @@ -3284,9 +3307,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "04c3b4822ccebfa39c02fc03d1534441b22ead323fa0f48bb7ddd8e6ba076a40" [[package]] name = "libflate" @@ -3320,9 +3343,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" +checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" [[package]] name = "libmdns" @@ -3384,9 +3407,9 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "lock_api" @@ -3522,9 +3545,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5172b50c23043ff43dd53e51392f36519d9b35a8f3a410d30ece5d1aedd58ae" +checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" dependencies = [ "libc", ] @@ -3590,9 +3613,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", "log", @@ -3626,15 +3649,15 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5641e476bbaf592a3939a7485fa079f427b4db21407d5ebfd5bba4e07a1f6f4c" +checksum = "e2be9a9090bc1cac2930688fa9478092a64c6a92ddc6ae0692d46b37d9cab709" dependencies = [ "cfg-if 1.0.0", "downcast 0.11.0", "fragile", "lazy_static", - "mockall_derive 0.11.1", + "mockall_derive 0.11.2", "predicates 2.1.1", "predicates-tree", ] @@ -3653,9 +3676,9 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262d56735932ee0240d515656e5a7667af3af2a5b0af4da558c4cff2b2aeb0c7" +checksum = "86d702a0530a0141cf4ed147cf5ec7be6f2c187d4e37fcbefc39cf34116bfe8f" dependencies = [ "cfg-if 1.0.0", "proc-macro2", @@ -3968,9 +3991,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg 1.1.0", "num-bigint", @@ -4040,6 +4063,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "object" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "memchr", +] + [[package]] name = "observability" version = "0.1.3" @@ -4065,9 +4097,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "one_err" @@ -4095,9 +4127,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.40" +version = "0.10.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" +checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -4127,18 +4159,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.20.0+1.1.1o" +version = "111.22.0+1.1.1q" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92892c4f87d56e376e469ace79f1128fdaded07646ddf73aa0be4706ff712dec" +checksum = "8f31f0d509d1c1ae9cada2f9539ff8f37933831fd5098879e482aa687d659853" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.74" +version = "0.9.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" +checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" dependencies = [ "autocfg 1.1.0", "cc", @@ -4158,16 +4190,16 @@ dependencies = [ "futures", "lazy_static", "percent-encoding 2.1.0", - "pin-project 0.4.29", + "pin-project 0.4.30", "rand 0.7.3", "serde", ] [[package]] name = "os_str_bytes" -version = "6.1.0" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" [[package]] name = "os_type" @@ -4273,7 +4305,7 @@ dependencies = [ "cloudabi", "libc", "redox_syscall 0.1.57", - "smallvec 1.8.0", + "smallvec 1.9.0", "winapi", ] @@ -4286,8 +4318,8 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.13", - "smallvec 1.8.0", + "redox_syscall 0.2.16", + "smallvec 1.9.0", "winapi", ] @@ -4299,8 +4331,8 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.13", - "smallvec 1.8.0", + "redox_syscall 0.2.16", + "smallvec 1.9.0", "windows-sys", ] @@ -4323,9 +4355,9 @@ dependencies = [ [[package]] name = "pem" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a3b09a20e374558580a4914d3b7d89bd61b954a5a5e1dcbea98753addb1947" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" dependencies = [ "base64", ] @@ -4382,27 +4414,27 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" +checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" dependencies = [ - "pin-project-internal 0.4.29", + "pin-project-internal 0.4.30", ] [[package]] name = "pin-project" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ - "pin-project-internal 1.0.10", + "pin-project-internal 1.0.12", ] [[package]] name = "pin-project-internal" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" +checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" dependencies = [ "proc-macro2", "quote", @@ -4411,9 +4443,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", @@ -4440,9 +4472,9 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plotters" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +checksum = "9428003b84df1496fb9d6eeee9c5f8145cb41ca375eb0dad204328888832811f" dependencies = [ "num-traits", "plotters-backend", @@ -4453,15 +4485,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" +checksum = "e0918736323d1baff32ee0eade54984f6f201ad7e97d5cfb5d6ab4a358529615" dependencies = [ "plotters-backend", ] @@ -4573,10 +4605,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" dependencies = [ + "once_cell", "thiserror", "toml", ] @@ -4607,9 +4640,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ "unicode-ident", ] @@ -4687,9 +4720,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7542006acd6e057ff632307d219954c44048f818898da03113d6c0086bfddd9" +checksum = "21afdc492bf2a8688cb386be6605d1163b6ace89afa5e3b529037d2b4334b860" dependencies = [ "bytes", "futures-channel", @@ -4706,9 +4739,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a13a5c0a674c1ce7150c9df7bc4a1e46c2fbbe7c710f56c0dc78b1a810e779e" +checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55" dependencies = [ "bytes", "fxhash", @@ -4726,9 +4759,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3149f7237331015f1a6adf065c397d1be71e032fcf110ba41da52e7926b882f" +checksum = "9f832d8958db3e84d2ec93b5eb2272b45aa23cf7f8fe6e79f578896f4e6c231b" dependencies = [ "futures-util", "libc", @@ -4740,21 +4773,21 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.18" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] [[package]] name = "r2d2" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" +checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "scheduled-thread-pool", ] @@ -5040,13 +5073,13 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fa2d386df8533b02184941c76ae2e0d0c1d053f5d43339169d80f21275fc5e" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ - "pem 1.0.2", + "pem 1.1.0", "ring", - "time 0.3.9", + "time 0.3.13", "yasna 0.5.0", ] @@ -5067,9 +5100,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] @@ -5092,7 +5125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.7", - "redox_syscall 0.2.13", + "redox_syscall 0.2.16", "thiserror", ] @@ -5104,14 +5137,14 @@ checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" dependencies = [ "log", "rustc-hash", - "smallvec 1.8.0", + "smallvec 1.9.0", ] [[package]] name = "regex" -version = "1.5.6" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -5129,9 +5162,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.26" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "region" @@ -5202,9 +5235,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74fdc210d8f24a7dbfedc13b04ba5764f5232754ccebfdf5fff1bad791ccbc6" +checksum = "c3b221de559e4a29df3b957eec92bc0de6bc8eaf6ca9cfed43e5e1d67ff65a34" dependencies = [ "bytemuck", ] @@ -5226,12 +5259,12 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.38" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "517a3034eb2b1499714e9d1e49b2367ad567e07639b69776d35e259d9c27cca6" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.12.1", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", @@ -5240,9 +5273,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.38" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505c209ee04111a006431abf39696e640838364d67a107c559ababaf6fd8c9dd" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -5311,7 +5344,7 @@ dependencies = [ "hashlink", "libsqlite3-sys", "memchr", - "smallvec 1.8.0", + "smallvec 1.9.0", ] [[package]] @@ -5366,7 +5399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.0", + "rustls-pemfile 1.0.1", "schannel", "security-framework", ] @@ -5382,18 +5415,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" dependencies = [ "base64", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" [[package]] name = "rusty-fork" @@ -5409,9 +5442,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "safemem" @@ -5516,15 +5549,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.10" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" +checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" dependencies = [ "serde_derive", ] @@ -5540,9 +5573,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ "serde", ] @@ -5559,9 +5592,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" dependencies = [ "proc-macro2", "quote", @@ -5570,12 +5603,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" dependencies = [ "indexmap", - "itoa 1.0.2", + "itoa 1.0.3", "ryu", "serde", ] @@ -5587,7 +5620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.2", + "itoa 1.0.3", "ryu", "serde", ] @@ -5616,9 +5649,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.24" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707d15895415db6628332b737c838b88c598522e4dc70647e59b72312924aebc" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ "indexmap", "ryu", @@ -5747,9 +5780,12 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg 1.1.0", +] [[package]] name = "smallstr" @@ -5757,7 +5793,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e922794d168678729ffc7e07182721a14219c65814e66e91b839a272fe5ae4f" dependencies = [ - "smallvec 1.8.0", + "smallvec 1.9.0", ] [[package]] @@ -5771,9 +5807,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "socket2" @@ -5860,7 +5896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b0a9eb2715209fb8cc0d942fcdff45674bfc9f0090a0d897e85a22955ad159b" dependencies = [ "futures-core", - "pin-project 1.0.10", + "pin-project 1.0.12", "tokio", ] @@ -5941,9 +5977,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.96" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" +checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" dependencies = [ "proc-macro2", "quote", @@ -6005,7 +6041,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall 0.2.16", "remove_dir_all", "winapi", ] @@ -6053,18 +6089,18 @@ dependencies = [ [[package]] name = "test-case" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196e8a70562e252cc51eaaaee3ecddc39803d9b7fd4a772b7c7dae7cdf42a859" +checksum = "07aea929e9488998b64adc414c29fe5620398f01c2e3f58164122b17e567a6d5" dependencies = [ "test-case-macros", ] [[package]] name = "test-case-macros" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd461f47ade621665c9f4e44b20449341769911c253275dc5cb03726cbb852c" +checksum = "c95968eedc6fc4f5c21920e0f4264f78ec5e4c56bb394f319becc1a5830b3e54" dependencies = [ "cfg-if 1.0.0", "proc-macro-error", @@ -6090,18 +6126,18 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" dependencies = [ "proc-macro2", "quote", @@ -6141,9 +6177,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "db76ff9fa4b1458b3c7f077f3ff9887394058460d21e634355b273aaf11eea45" dependencies = [ "libc", "num_threads", @@ -6185,14 +6221,15 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.19.2" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" +checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" dependencies = [ + "autocfg 1.1.0", "bytes", "libc", "memchr", - "mio 0.8.3", + "mio 0.8.4", "num_cpus", "once_cell", "parking_lot 0.12.1", @@ -6245,7 +6282,7 @@ dependencies = [ "futures-util", "log", "native-tls", - "pin-project 1.0.10", + "pin-project 1.0.12", "tokio", "tokio-native-tls", "tungstenite 0.12.0", @@ -6259,7 +6296,7 @@ checksum = "1e96bb520beab540ab664bd5a9cfeaa1fcd846fa68c830b42e2c8963071251d2" dependencies = [ "futures-util", "log", - "pin-project 1.0.10", + "pin-project 1.0.12", "tokio", "tungstenite 0.13.0", ] @@ -6272,7 +6309,7 @@ checksum = "511de3f85caf1c98983545490c3d09685fa8eb634e57eec22bb4db271f46cbd8" dependencies = [ "futures-util", "log", - "pin-project 1.0.10", + "pin-project 1.0.12", "tokio", "tungstenite 0.14.0", ] @@ -6316,15 +6353,15 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if 1.0.0", "log", @@ -6335,9 +6372,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", @@ -6346,9 +6383,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.27" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ "once_cell", "valuable", @@ -6360,7 +6397,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "pin-project 1.0.10", + "pin-project 1.0.12", "tracing", ] @@ -6413,7 +6450,7 @@ dependencies = [ "serde", "serde_json", "sharded-slab", - "smallvec 1.8.0", + "smallvec 1.9.0", "thread_local", "tracing", "tracing-core", @@ -6435,9 +6472,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "trybuild" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "764b9e244b482a9b81bde596aa37aa6f1347bf8007adab25e59f901b32b4e0a0" +checksum = "e7f408301c7480f9e6294eb779cfc907f54bd901a9660ef24d7f233ed5376485" dependencies = [ "glob", "once_cell", @@ -6540,15 +6577,15 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" +checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" dependencies = [ "tinyvec", ] @@ -6601,9 +6638,9 @@ checksum = "cad414b2eed757c1b6f810f8abc814e298a9c89176b21fae092c7a87756fb839" [[package]] name = "ureq" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9399fa2f927a3d327187cbd201480cee55bee6ac5d3c77dd27f0c6814cff16d5" +checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" dependencies = [ "base64", "chunked_transfer", @@ -6771,7 +6808,7 @@ dependencies = [ "mime_guess", "multipart", "percent-encoding 2.1.0", - "pin-project 1.0.10", + "pin-project 1.0.12", "scoped-tls", "serde", "serde_json", @@ -6804,9 +6841,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" +checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -6814,13 +6851,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" +checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -6829,9 +6866,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.31" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f" +checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -6841,9 +6878,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" +checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6851,9 +6888,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" +checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" dependencies = [ "proc-macro2", "quote", @@ -6864,15 +6901,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" +checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" [[package]] name = "wasm-encoder" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f0c17267a5ffd6ae3d897589460e21db1673c84fb7016b909c9691369a75ea" +checksum = "8905fd25fdadeb0e7e8bf43a9f46f9f972d6291ad0c7a32573b88dd13a6cfa6b" dependencies = [ "leb128", ] @@ -6914,7 +6951,7 @@ dependencies = [ "rkyv", "serde", "serde_bytes", - "smallvec 1.8.0", + "smallvec 1.9.0", "target-lexicon", "thiserror", "wasmer-types", @@ -6935,7 +6972,7 @@ dependencies = [ "loupe", "more-asserts", "rayon", - "smallvec 1.8.0", + "smallvec 1.9.0", "target-lexicon", "tracing", "wasmer-compiler", @@ -6989,7 +7026,7 @@ dependencies = [ "leb128", "libloading", "loupe", - "object", + "object 0.28.4", "rkyv", "serde", "tempfile", @@ -7040,7 +7077,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d0c4005592998bd840f2289102ef9c67b6138338ed78e1fc0809586aa229040" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -7090,9 +7127,9 @@ checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" [[package]] name = "wast" -version = "42.0.0" +version = "45.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "badcb03f976f983ff0daf294da9697be659442f61e6b0942bb37a2b6cbfe9dd4" +checksum = "186c474c4f9bb92756b566d592a16591b4526b1a4841171caa3f31d7fe330d96" dependencies = [ "leb128", "memchr", @@ -7102,18 +7139,18 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92f20b742ac527066c8414bc0637352661b68cab07ef42586cefaba71c965cf" +checksum = "c2d4bc4724b4f02a482c8cab053dac5ef26410f264c06ce914958f9a42813556" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.58" +version = "0.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" +checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -7141,9 +7178,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.3" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" +checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" dependencies = [ "webpki 0.22.0", ] @@ -7309,7 +7346,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346d34a236c9d3e5f3b9b74563f238f955bbd05fa0b8b4efa53c130c43982f4c" dependencies = [ - "time 0.3.9", + "time 0.3.13", ] [[package]] diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 462cb7da70..cccbc51d66 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -95,6 +95,7 @@ anyhow = "1.0.26" assert_cmd = "1.0.1" contrafact = "0.1.0-dev.1" criterion = { version = "0.3", features = [ "async_tokio" ] } +isotest = { git = "https://github.com/maackle/isotest-rust" } kitsune_p2p_bootstrap = { path = "../kitsune_p2p/bootstrap" } maplit = "1" pretty_assertions = "0.6.1" diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index ddd78543f8..4798d6a710 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -13,7 +13,7 @@ use holochain_state::prelude::test_authored_db; use holochain_state::prelude::test_cache_db; use holochain_state::prelude::test_dht_db; use holochain_types::db_cache::DhtDbQueryCache; -use holochain_types::test_utils::chain::TestChainItem; +use holochain_types::test_utils::chain::{TestChainHash, TestChainItem}; use holochain_wasm_test_utils::*; use holochain_zome_types::Action; use matches::assert_matches; @@ -477,102 +477,109 @@ async fn incoming_ops_filters_private_entry() { #[test] /// Test the chain validation works. fn valid_chain_test() { - // Create a valid chain. - let actions = vec![ - TestChainItem::new(0), - TestChainItem::new(1), - TestChainItem::new(2), - ]; - // Valid chain passes. - validate_chain(actions.iter(), &None).expect("Valid chain"); - - // Create a forked chain. - let mut fork = actions.clone(); - fork.push(TestChainItem { - seq: 1, - hash: 111.into(), - prev: Some(0.into()), - }); - let err = validate_chain(fork.iter(), &None).expect_err("Forked chain"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::HashMismatch(_) - )) - ); + isotest::isotest!(|iso| { + // Create a valid chain. + let actions = vec![ + iso.create(TestChainItem::new(0)), + iso.create(TestChainItem::new(1)), + iso.create(TestChainItem::new(2)), + ]; + // Valid chain passes. + validate_chain(actions.iter(), &None).expect("Valid chain"); + + // Create a forked chain. + let mut fork = actions.clone(); + fork.push(iso.create(TestChainItem { + seq: 1, + hash: 111.into(), + prev: Some(0.into()), + })); + let err = validate_chain(fork.iter(), &None).expect_err("Forked chain"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::HashMismatch(_) + )) + ); - // Test a chain with the wrong seq. - let mut wrong_seq = actions.clone(); - wrong_seq[2].seq = 3; - let err = validate_chain(wrong_seq.iter(), &None).expect_err("Wrong seq"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::InvalidSeq(_, _) - )) - ); + // Test a chain with the wrong seq. + let mut wrong_seq = actions.clone(); + iso.mutate::(&mut wrong_seq[2], |s| s.seq = 3); + let err = validate_chain(wrong_seq.iter(), &None).expect_err("Wrong seq"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::InvalidSeq(_, _) + )) + ); - // Test a wrong root gets rejected. - let mut wrong_root = actions.clone(); - wrong_root[0].prev = Some(0.into()); - let err = validate_chain(wrong_root.iter(), &None).expect_err("Wrong root"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::InvalidRoot - )) - ); + // Test a wrong root gets rejected. + let mut wrong_root = actions.clone(); + iso.mutate::(&mut wrong_root[0], |a| { + a.prev = Some(0.into()); + }); - // Test without dna at root gets rejected. - let mut dna_not_at_root = actions.clone(); - dna_not_at_root.push(actions[0].clone()); - let err = validate_chain(dna_not_at_root.iter(), &None).expect_err("Dna not at root"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::MissingPrev - )) - ); + let err = validate_chain(wrong_root.iter(), &None).expect_err("Wrong root"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::InvalidRoot + )) + ); - // Test if there is a existing head that a dna in the new chain is rejected. - let err = validate_chain(actions.iter(), &Some((123.into(), 0))).expect_err("Dna not at root"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::MissingPrev - )) - ); + // Test without dna at root gets rejected. + let mut dna_not_at_root = actions.clone(); + dna_not_at_root.push(actions[0].clone()); + let err = validate_chain(dna_not_at_root.iter(), &None).expect_err("Dna not at root"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::MissingPrev + )) + ); - // Check a sequence that is broken gets rejected. - let mut wrong_seq = actions[1..].to_vec(); - wrong_seq[0].seq = 3; - wrong_seq[1].seq = 4; - let err = validate_chain( - wrong_seq.iter(), - &Some((wrong_seq[0].prev.clone().unwrap(), 0)), - ) - .expect_err("Wrong seq"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::InvalidSeq(_, _) - )) - ); + // Test if there is a existing head that a dna in the new chain is rejected. + let hash = iso.create(TestChainHash(123)); + let err = validate_chain(actions.iter(), &Some((hash, 0))).expect_err("Dna not at root"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::MissingPrev + )) + ); - // Check the correct sequence gets accepted with a root. - let correct_seq = actions[1..].to_vec(); - validate_chain( - correct_seq.iter(), - &Some((correct_seq[0].prev.clone().unwrap(), 0)), - ) - .expect("Correct seq"); + // Check a sequence that is broken gets rejected. + let mut wrong_seq = actions[1..].to_vec(); + iso.mutate::(&mut wrong_seq[0], |s| s.seq = 3); + iso.mutate::(&mut wrong_seq[1], |s| s.seq = 4); - let err = - validate_chain(correct_seq.iter(), &Some((234.into(), 0))).expect_err("Hash is wrong"); - assert_matches!( - err, - SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( - PrevActionError::HashMismatch(_) - )) - ); + let err = validate_chain( + wrong_seq.iter(), + &Some((wrong_seq[0].prev_hash().cloned().unwrap(), 0)), + ) + .expect_err("Wrong seq"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::InvalidSeq(_, _) + )) + ); + + // Check the correct sequence gets accepted with a root. + let correct_seq = actions[1..].to_vec(); + validate_chain( + correct_seq.iter(), + &Some((correct_seq[0].prev_hash().cloned().unwrap(), 0)), + ) + .expect("Correct seq"); + + let hash = iso.create(TestChainHash(234)); + let err = validate_chain(correct_seq.iter(), &Some((hash, 0))).expect_err("Hash is wrong"); + assert_matches!( + err, + SysValidationError::ValidationOutcome(ValidationOutcome::PrevActionError( + PrevActionError::HashMismatch(_) + )) + ); + }); } diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index f94d2db82c..65eec6ae17 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -3,11 +3,9 @@ use std::collections::HashSet; -use holo_hash::{ActionHash, HasHash}; +use holo_hash::{ActionHash}; use holochain_serialized_bytes::prelude::*; -use crate::{ActionHashed, SignedActionHashed}; - #[cfg(test)] mod test; diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index aea6c77b05..1a1278a061 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -57,11 +57,14 @@ tracing = "0.1.26" derive_builder = "0.9.0" arbitrary = { version = "1.0", features = ["derive"], optional = true} +isotest = { git = "https://github.com/maackle/isotest-rust", optional = true } # contrafact contrafact = { version = "0.1.0-dev.1", optional = true } [dev-dependencies] +holochain_types = { path = ".", features = ["test_utils"]} + arbitrary = "1.0" isotest = { git = "https://github.com/maackle/isotest-rust" } maplit = "1" @@ -79,6 +82,7 @@ test_utils = [ "contrafact", "holochain_zome_types/arbitrary", "holo_hash/arbitrary", + "isotest", "mr_bundle/arbitrary", "holochain_zome_types/test_utils", ] diff --git a/crates/holochain_types/src/lib.rs b/crates/holochain_types/src/lib.rs index d2130ba9fa..633fad7487 100644 --- a/crates/holochain_types/src/lib.rs +++ b/crates/holochain_types/src/lib.rs @@ -40,6 +40,7 @@ pub mod validate; pub mod web_app; pub mod zome_types; +#[cfg(feature = "test_utils")] pub mod test_utils; pub use holochain_zome_types::entry::EntryHashed; diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 59d09b0480..83a2d46795 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -1,3 +1,6 @@ +//! Implements TestChainItem, a type used with isotest + +use isotest::Iso; use std::ops::Range; use arbitrary::Arbitrary; @@ -33,11 +36,12 @@ impl From for TestChainHash { } } -impl From for ActionHash { - fn from(h: TestChainHash) -> Self { +isotest::iso! { + TestChainHash => |h| { let bytes: Vec = h.0.to_le_bytes().iter().cycle().take(32).copied().collect(); ActionHash::from_raw_32(bytes) - } + }, + ActionHash => |h| Self(u32::from_le_bytes(h.get_raw_32()[0..4].try_into().unwrap())) } /// A test implementation of a minimal ChainItem which uses simple numbers for hashes @@ -149,7 +153,7 @@ pub fn chain_item_to_action(u: &mut Unstructured, i: &impl ChainItem) -> SignedA let hash: ActionHash = i.get_hash().clone().into(); let mut action = SignedActionHashed::arbitrary(u).unwrap(); match (action_seq, prev_action) { - (0, _) => { + (_, None) => { let dna = Dna::arbitrary(u).unwrap(); action.hashed.content = Action::Dna(dna); action.hashed.hash = hash; @@ -161,7 +165,6 @@ pub fn chain_item_to_action(u: &mut Unstructured, i: &impl ChainItem) -> SignedA action.hashed.content = Action::Create(create); action.hashed.hash = hash; } - _ => unreachable!(), } action } @@ -177,3 +180,42 @@ pub fn chain_to_ops(chain: Vec) -> Vec { }) .collect() } + +isotest::iso! { + TestChainItem => |i| { + let mut u = Unstructured::new(&holochain_zome_types::NOISE); + chain_item_to_action(&mut u, &i) + }, + SignedActionHashed => |a| { + TestChainItem { + seq: a.seq(), + hash: TestChainHash::test(a.get_hash()), + prev: a.prev_hash().map(TestChainHash::test), + } + } +} + +#[cfg(test)] +#[test_case::test_case(0)] +#[test_case::test_case(65536)] +fn test_hash_roundtrips(u: u32) { + let h1 = TestChainHash(u); + let h2 = ActionHash::from_raw_32(u.to_le_bytes().iter().cycle().take(32).copied().collect()); + isotest::test_iso_invariants(h1, h2); +} + +#[cfg(test)] +#[test_case::test_case(0, 0, None)] +#[test_case::test_case(0, 0, Some(0))] +#[test_case::test_case(1, 1, None)] +#[test_case::test_case(1, 1, Some(0) => panics)] +fn test_chain_item_roundtrips(seq: u32, hash: u32, prev: Option) { + use ::fixt::prelude::*; + let item = TestChainItem { + seq, + hash: hash.into(), + prev: prev.map(Into::into), + }; + let action = fixt!(SignedActionHashed); + isotest::test_iso_invariants(item, action); +} From 96d77ee794991b57e3b87778c234a3ad451e80f0 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Mon, 15 Aug 2022 14:39:47 -0700 Subject: [PATCH 026/111] Add missing docs --- crates/holochain_types/src/test_utils/chain.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 83a2d46795..0526acc443 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -1,6 +1,5 @@ //! Implements TestChainItem, a type used with isotest -use isotest::Iso; use std::ops::Range; use arbitrary::Arbitrary; @@ -147,6 +146,10 @@ pub fn gap_chain(ranges: &[Range]) -> Vec { .collect() } +/// Produce an arbitrary SignedActionHashed from any ChainItem. +/// +/// The SignedActionHashed will not be valid in any sense other than the +/// fields relevant to ChainItem. pub fn chain_item_to_action(u: &mut Unstructured, i: &impl ChainItem) -> SignedActionHashed { let action_seq = i.seq(); let prev_action = i.prev_hash().cloned().map(Into::into); @@ -169,6 +172,7 @@ pub fn chain_item_to_action(u: &mut Unstructured, i: &impl ChainItem) -> SignedA action } +/// Produce a sequence of AgentActivity ops from a Vec of ChainItems pub fn chain_to_ops(chain: Vec) -> Vec { let mut u = Unstructured::new(&holochain_zome_types::NOISE); chain From 440b0b4d6625d6a528a652744cf7e6a62514746d Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Mon, 15 Aug 2022 14:44:18 -0700 Subject: [PATCH 027/111] fmt --- crates/holochain_integrity_types/src/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index 65eec6ae17..e759ff115e 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use holo_hash::{ActionHash}; +use holo_hash::ActionHash; use holochain_serialized_bytes::prelude::*; #[cfg(test)] From cf9b7f71cfc55f36af0d2a5ec2b6405d46402b88 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 16 Aug 2022 09:47:24 -0700 Subject: [PATCH 028/111] Fix roundtrip test --- crates/holochain_types/src/test_utils/chain.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 0526acc443..6df40df4a5 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -211,8 +211,8 @@ fn test_hash_roundtrips(u: u32) { #[cfg(test)] #[test_case::test_case(0, 0, None)] #[test_case::test_case(0, 0, Some(0))] -#[test_case::test_case(1, 1, None)] -#[test_case::test_case(1, 1, Some(0) => panics)] +#[test_case::test_case(1, 1, Some(0))] +#[test_case::test_case(1, 1, None => ignore)] // this case is unrepresentable with these types fn test_chain_item_roundtrips(seq: u32, hash: u32, prev: Option) { use ::fixt::prelude::*; let item = TestChainItem { From dd58e3562baafa3abbbbcca59b2f296ecdeeab83 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 16 Aug 2022 10:22:21 -0700 Subject: [PATCH 029/111] Use isotest 0.1.0-dev.3 --- Cargo.lock | 8 +++++-- crates/holochain/Cargo.toml | 2 +- .../holochain/src/core/sys_validate/tests.rs | 22 +++++++++---------- crates/holochain_types/Cargo.toml | 4 ++-- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4003b16c2b..2cd152fa7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2897,8 +2897,12 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "isotest" -version = "0.1.0" -source = "git+https://github.com/maackle/isotest-rust#314b3fa3755ed6710e3558fab07c56f28e14bd51" +version = "0.1.0-dev.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6250b593b9410fe34cf5f2392f0c3e64db49a342b797e2bcd4306df278222c" +dependencies = [ + "futures", +] [[package]] name = "itertools" diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index cccbc51d66..867a44f235 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -95,7 +95,7 @@ anyhow = "1.0.26" assert_cmd = "1.0.1" contrafact = "0.1.0-dev.1" criterion = { version = "0.3", features = [ "async_tokio" ] } -isotest = { git = "https://github.com/maackle/isotest-rust" } +isotest = "0.1.0-dev.3" kitsune_p2p_bootstrap = { path = "../kitsune_p2p/bootstrap" } maplit = "1" pretty_assertions = "0.6.1" diff --git a/crates/holochain/src/core/sys_validate/tests.rs b/crates/holochain/src/core/sys_validate/tests.rs index 4798d6a710..028ea2a6a2 100644 --- a/crates/holochain/src/core/sys_validate/tests.rs +++ b/crates/holochain/src/core/sys_validate/tests.rs @@ -477,19 +477,19 @@ async fn incoming_ops_filters_private_entry() { #[test] /// Test the chain validation works. fn valid_chain_test() { - isotest::isotest!(|iso| { + isotest::isotest!(TestChainItem, TestChainHash => |iso_a, iso_h| { // Create a valid chain. let actions = vec![ - iso.create(TestChainItem::new(0)), - iso.create(TestChainItem::new(1)), - iso.create(TestChainItem::new(2)), + iso_a.create(TestChainItem::new(0)), + iso_a.create(TestChainItem::new(1)), + iso_a.create(TestChainItem::new(2)), ]; // Valid chain passes. validate_chain(actions.iter(), &None).expect("Valid chain"); // Create a forked chain. let mut fork = actions.clone(); - fork.push(iso.create(TestChainItem { + fork.push(iso_a.create(TestChainItem { seq: 1, hash: 111.into(), prev: Some(0.into()), @@ -504,7 +504,7 @@ fn valid_chain_test() { // Test a chain with the wrong seq. let mut wrong_seq = actions.clone(); - iso.mutate::(&mut wrong_seq[2], |s| s.seq = 3); + iso_a.mutate(&mut wrong_seq[2], |s| s.seq = 3); let err = validate_chain(wrong_seq.iter(), &None).expect_err("Wrong seq"); assert_matches!( err, @@ -515,7 +515,7 @@ fn valid_chain_test() { // Test a wrong root gets rejected. let mut wrong_root = actions.clone(); - iso.mutate::(&mut wrong_root[0], |a| { + iso_a.mutate(&mut wrong_root[0], |a| { a.prev = Some(0.into()); }); @@ -539,7 +539,7 @@ fn valid_chain_test() { ); // Test if there is a existing head that a dna in the new chain is rejected. - let hash = iso.create(TestChainHash(123)); + let hash = iso_h.create(TestChainHash(123)); let err = validate_chain(actions.iter(), &Some((hash, 0))).expect_err("Dna not at root"); assert_matches!( err, @@ -550,8 +550,8 @@ fn valid_chain_test() { // Check a sequence that is broken gets rejected. let mut wrong_seq = actions[1..].to_vec(); - iso.mutate::(&mut wrong_seq[0], |s| s.seq = 3); - iso.mutate::(&mut wrong_seq[1], |s| s.seq = 4); + iso_a.mutate(&mut wrong_seq[0], |s| s.seq = 3); + iso_a.mutate(&mut wrong_seq[1], |s| s.seq = 4); let err = validate_chain( wrong_seq.iter(), @@ -573,7 +573,7 @@ fn valid_chain_test() { ) .expect("Correct seq"); - let hash = iso.create(TestChainHash(234)); + let hash = iso_h.create(TestChainHash(234)); let err = validate_chain(correct_seq.iter(), &Some((hash, 0))).expect_err("Hash is wrong"); assert_matches!( err, diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index 1a1278a061..2877e8c1db 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -57,7 +57,7 @@ tracing = "0.1.26" derive_builder = "0.9.0" arbitrary = { version = "1.0", features = ["derive"], optional = true} -isotest = { git = "https://github.com/maackle/isotest-rust", optional = true } +isotest = { version = "0.1.0-dev.3", optional = true } # contrafact contrafact = { version = "0.1.0-dev.1", optional = true } @@ -66,7 +66,7 @@ contrafact = { version = "0.1.0-dev.1", optional = true } holochain_types = { path = ".", features = ["test_utils"]} arbitrary = "1.0" -isotest = { git = "https://github.com/maackle/isotest-rust" } +isotest = { version = "0.1.0-dev.3" } maplit = "1" matches = "0.1" pretty_assertions = "0" From fdec3c9826ed297d894aeddf67ef7107b72026d2 Mon Sep 17 00:00:00 2001 From: neonphog Date: Wed, 17 Aug 2022 10:28:05 -0600 Subject: [PATCH 030/111] tagged tls certs --- crates/holochain/src/conductor/conductor.rs | 56 +++------------- crates/holochain/src/conductor/space.rs | 67 ++++++++++++++++++- .../src/meta_lair_client.rs | 15 ++--- 3 files changed, 80 insertions(+), 58 deletions(-) diff --git a/crates/holochain/src/conductor/conductor.rs b/crates/holochain/src/conductor/conductor.rs index e044a3214b..e54f5471c5 100755 --- a/crates/holochain/src/conductor/conductor.rs +++ b/crates/holochain/src/conductor/conductor.rs @@ -64,13 +64,12 @@ use holochain_keystore::test_keystore::spawn_test_keystore; use holochain_keystore::MetaLairClient; use holochain_sqlite::prelude::*; use holochain_sqlite::sql::sql_cell::state_dump; -use holochain_state::mutations; use holochain_state::prelude::from_blob; use holochain_state::prelude::StateMutationResult; use holochain_state::prelude::StateQueryResult; use holochain_types::prelude::*; pub use holochain_types::share; -use rusqlite::{OptionalExtension, Transaction}; +use rusqlite::Transaction; use std::collections::{HashMap, HashSet}; use std::sync::atomic::AtomicBool; use std::sync::Arc; @@ -1321,29 +1320,7 @@ impl Conductor { } pub(super) async fn get_state(&self) -> ConductorResult { - let state = self - .spaces - .conductor_db - .async_reader(|txn| { - let state = txn - .query_row("SELECT blob FROM ConductorState WHERE id = 1", [], |row| { - row.get("blob") - }) - .optional()?; - match state { - Some(state) => ConductorResult::Ok(Some(from_blob(state)?)), - None => ConductorResult::Ok(None), - } - }) - .await?; - - match state { - Some(state) => Ok(state), - // update_state will again try to read the state. It's a little - // inefficient in the infrequent case where we haven't saved the - // state yet, but more atomic, so worth it. - None => self.update_state(Ok).await, - } + self.spaces.get_state().await } /// Update the internal state with a pure function mapping old state to new @@ -1351,8 +1328,7 @@ impl Conductor { where F: FnOnce(ConductorState) -> ConductorResult + 'static, { - let (state, _) = self.update_state_prime(|s| Ok((f(s)?, ()))).await?; - Ok(state) + self.spaces.update_state(f).await } /// Update the internal state with a pure function mapping old state to new, @@ -1364,25 +1340,7 @@ impl Conductor { O: Send + 'static, { self.check_running()?; - let output = self - .spaces - .conductor_db - .async_commit(move |txn| { - let state = txn - .query_row("SELECT blob FROM ConductorState WHERE id = 1", [], |row| { - row.get("blob") - }) - .optional()?; - let state = match state { - Some(state) => from_blob(state)?, - None => ConductorState::default(), - }; - let (new_state, output) = f(state)?; - mutations::insert_conductor_state(txn, (&new_state).try_into()?)?; - Result::<_, ConductorError>::Ok((new_state, output)) - }) - .await?; - Ok(output) + self.spaces.update_state_prime(f).await } fn add_admin_port(&self, port: u16) { @@ -1495,9 +1453,12 @@ mod builder { let ribosome_store = RwShare::new(ribosome_store); + let spaces = Spaces::new(&config)?; + let tag = spaces.get_state().await?.tag().clone(); + let network_config = config.network.clone().unwrap_or_default(); let (cert_digest, cert, cert_priv_key) = - keystore.get_or_create_first_tls_cert().await?; + keystore.get_or_create_tls_cert_by_tag(tag.0).await?; let tls_config = holochain_p2p::kitsune_p2p::dependencies::kitsune_p2p_types::tls::TlsConfig { cert, @@ -1507,7 +1468,6 @@ mod builder { let strat = ArqStrat::from_params(network_config.tuning_params.gossip_redundancy_target); - let spaces = Spaces::new(&config)?; let host = KitsuneHostImpl::new( spaces.clone(), ribosome_store.clone(), diff --git a/crates/holochain/src/conductor/space.rs b/crates/holochain/src/conductor/space.rs index 9d1358c783..97b0479844 100644 --- a/crates/holochain/src/conductor/space.rs +++ b/crates/holochain/src/conductor/space.rs @@ -27,6 +27,7 @@ use holochain_sqlite::{ prelude::{DatabaseError, DatabaseResult}, }; use holochain_state::{ + mutations, prelude::{from_blob, StateQueryResult}, query::{map_sql_dht_op_common, StateQueryError}, }; @@ -39,9 +40,10 @@ use kitsune_p2p::{ event::{TimeWindow, TimeWindowInclusive}, KitsuneP2pConfig, }; -use rusqlite::named_params; +use rusqlite::{named_params, OptionalExtension}; use tracing::instrument; +use crate::conductor::{error::ConductorError, state::ConductorState}; use crate::core::{ queue_consumer::QueueConsumerMap, workflow::{ @@ -156,6 +158,69 @@ impl Spaces { }) } + /// Get the holochain conductor state + pub async fn get_state(&self) -> ConductorResult { + let state = self + .conductor_db + .async_reader(|txn| { + let state = txn + .query_row("SELECT blob FROM ConductorState WHERE id = 1", [], |row| { + row.get("blob") + }) + .optional()?; + match state { + Some(state) => ConductorResult::Ok(Some(from_blob(state)?)), + None => ConductorResult::Ok(None), + } + }) + .await?; + + match state { + Some(state) => Ok(state), + // update_state will again try to read the state. It's a little + // inefficient in the infrequent case where we haven't saved the + // state yet, but more atomic, so worth it. + None => self.update_state(Ok).await, + } + } + + /// Update the internal state with a pure function mapping old state to new + pub async fn update_state(&self, f: F) -> ConductorResult + where + F: FnOnce(ConductorState) -> ConductorResult + 'static, + { + let (state, _) = self.update_state_prime(|s| Ok((f(s)?, ()))).await?; + Ok(state) + } + + /// Update the internal state with a pure function mapping old state to new, + /// which may also produce an output value which will be the output of + /// this function + pub async fn update_state_prime(&self, f: F) -> ConductorResult<(ConductorState, O)> + where + F: FnOnce(ConductorState) -> ConductorResult<(ConductorState, O)> + Send + 'static, + O: Send + 'static, + { + let output = self + .conductor_db + .async_commit(move |txn| { + let state = txn + .query_row("SELECT blob FROM ConductorState WHERE id = 1", [], |row| { + row.get("blob") + }) + .optional()?; + let state = match state { + Some(state) => from_blob(state)?, + None => ConductorState::default(), + }; + let (new_state, output) = f(state)?; + mutations::insert_conductor_state(txn, (&new_state).try_into()?)?; + Result::<_, ConductorError>::Ok((new_state, output)) + }) + .await?; + Ok(output) + } + /// Get something from every space pub fn get_from_spaces R>(&self, f: F) -> Vec { self.map diff --git a/crates/holochain_keystore/src/meta_lair_client.rs b/crates/holochain_keystore/src/meta_lair_client.rs index 941495218f..01a2872ec6 100644 --- a/crates/holochain_keystore/src/meta_lair_client.rs +++ b/crates/holochain_keystore/src/meta_lair_client.rs @@ -229,20 +229,17 @@ impl MetaLairClient { } } - /// Get a single tls cert from lair for use in conductor - /// NOTE: once we delete the deprecated legacy lair api - /// we can support multiple conductors using the same lair - /// by tagging the tls certs / remembering the tag. - pub fn get_or_create_first_tls_cert( + /// Get a tls cert from lair for use in conductor + pub fn get_or_create_tls_cert_by_tag( &self, + tag: Arc, ) -> impl Future, sodoken::BufRead)>> + 'static + Send { let this = self.clone(); async move { match this { Self::Lair(client) => { - const ONE_CERT: &str = "SingleHcTlsWkaCert"; - let info = match client.get_entry(ONE_CERT.into()).await { + let info = match client.get_entry(tag.clone()).await { Ok(info) => match info { LairEntryInfo::WkaTlsCert { cert_info, .. } => cert_info, oth => { @@ -253,9 +250,9 @@ impl MetaLairClient { .into()) } }, - Err(_) => client.new_wka_tls_cert(ONE_CERT.into()).await?, + Err(_) => client.new_wka_tls_cert(tag.clone()).await?, }; - let pk = client.get_wka_tls_cert_priv_key(ONE_CERT.into()).await?; + let pk = client.get_wka_tls_cert_priv_key(tag).await?; Ok((info.digest, info.cert.to_vec().into(), pk)) } From ac770799541cfe7986c02407d72078ee7a4e869c Mon Sep 17 00:00:00 2001 From: neonphog Date: Wed, 17 Aug 2022 10:33:05 -0600 Subject: [PATCH 031/111] changelog --- crates/holochain/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/holochain/CHANGELOG.md b/crates/holochain/CHANGELOG.md index 8d0db120a2..29613a826b 100644 --- a/crates/holochain/CHANGELOG.md +++ b/crates/holochain/CHANGELOG.md @@ -4,6 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +- Updates TLS certificate handling so that multiple conductors can share the same lair, but use different TLS certificates by storing a "tag" in the conductor state database. This should not be a breaking change, but *will* result in a new TLS certificate being used per conductor. [\#1519](https://github.com/holochain/holochain/pull/1519) - **BREAKING CHANGE** - Removes legacy lair. You must now use lair-keystore >= 0.2.0 with holochain. It is recommended to abandon your previous holochain agents, as there is not a straight forward migration path. To migrate: [dump the old keys](https://github.com/holochain/lair/blob/v0.0.11/crates/lair_keystore/src/bin/lair-keystore/main.rs#L38) -> [write a utility to re-encode them](https://github.com/holochain/lair/tree/hc_seed_bundle-v0.1.2/crates/hc_seed_bundle) -> [then import them to the new lair](https://github.com/holochain/lair/tree/lair_keystore-v0.2.0/crates/lair_keystore#lair-keystore-import-seed---help) -- [\#1518](https://github.com/holochain/holochain/pull/1518) ## 0.0.154 From e7572782e6320e5bf897515215fb16baa869ae6d Mon Sep 17 00:00:00 2001 From: neonphog Date: Wed, 17 Aug 2022 14:14:06 -0600 Subject: [PATCH 032/111] meta-lair cleanup --- Cargo.lock | 1 + crates/holochain_keystore/Cargo.toml | 1 + .../src/crude_mock_keystore.rs | 27 +- .../holochain_keystore/src/lair_keystore.rs | 9 +- .../src/meta_lair_client.rs | 231 ++++++++---------- .../holochain_keystore/src/test_keystore.rs | 2 +- 6 files changed, 117 insertions(+), 154 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 963730c8a9..f0c85e27be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2202,6 +2202,7 @@ dependencies = [ "kitsune_p2p_types", "nanoid 0.4.0", "one_err", + "parking_lot 0.11.2", "serde", "serde_bytes", "sodoken", diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index be8799a88a..446b69cd61 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -19,6 +19,7 @@ holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.44"} kitsune_p2p_types = { version = "0.0.29", path = "../kitsune_p2p/types" } nanoid = "0.4.0" one_err = "0.0.5" +parking_lot = "0.11" serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" sodoken = "=0.0.4" diff --git a/crates/holochain_keystore/src/crude_mock_keystore.rs b/crates/holochain_keystore/src/crude_mock_keystore.rs index 06fa96bd85..d5a3a2f770 100644 --- a/crates/holochain_keystore/src/crude_mock_keystore.rs +++ b/crates/holochain_keystore/src/crude_mock_keystore.rs @@ -18,7 +18,9 @@ pub async fn spawn_crude_mock_keystore(err_fn: F) -> MetaLairClient where F: Fn() -> one_err::OneErr + Send + Sync + 'static, { - MetaLairClient::Lair(LairClient(Arc::new(CrudeMockKeystore(Arc::new(err_fn))))) + MetaLairClient(Arc::new(parking_lot::Mutex::new(LairClient(Arc::new( + CrudeMockKeystore(Arc::new(err_fn)), + ))))) } /// Spawn a test keystore that can switch between mocked and real. @@ -40,7 +42,12 @@ where let control = MockLairControl(use_mock); - Ok((MetaLairClient::Lair(LairClient(Arc::new(mock))), control)) + Ok(( + MetaLairClient(Arc::new(parking_lot::Mutex::new(LairClient(Arc::new( + mock, + ))))), + control, + )) } /// A keystore which always returns the same LairError for every call. struct RealOrMockKeystore { @@ -94,23 +101,17 @@ impl AsLairClient for CrudeMockKeystore { impl AsLairClient for RealOrMockKeystore { fn get_enc_ctx_key(&self) -> sodoken::BufReadSized<32> { - match &self.real { - MetaLairClient::Lair(client) => client.get_enc_ctx_key(), - } + self.real.cli().get_enc_ctx_key() } fn get_dec_ctx_key(&self) -> sodoken::BufReadSized<32> { - match &self.real { - MetaLairClient::Lair(client) => client.get_dec_ctx_key(), - } + self.real.cli().get_dec_ctx_key() } fn shutdown( &self, ) -> ghost_actor::dependencies::futures::future::BoxFuture<'static, LairResult<()>> { - match &self.real { - MetaLairClient::Lair(client) => client.shutdown().boxed(), - } + self.real.cli().shutdown().boxed() } fn request( @@ -122,9 +123,7 @@ impl AsLairClient for RealOrMockKeystore { let r = (self.mock)(request); async move { r }.boxed() } else { - match &self.real { - MetaLairClient::Lair(client) => client.0.request(request), - } + AsLairClient::request(&*self.real.cli().0, request) } } } diff --git a/crates/holochain_keystore/src/lair_keystore.rs b/crates/holochain_keystore/src/lair_keystore.rs index 10c063f7c0..6fd4290c4e 100644 --- a/crates/holochain_keystore/src/lair_keystore.rs +++ b/crates/holochain_keystore/src/lair_keystore.rs @@ -9,12 +9,5 @@ pub async fn spawn_lair_keystore( connection_url: url2::Url2, passphrase: sodoken::BufRead, ) -> LairResult { - use lair_keystore_api::ipc_keystore::*; - let opts = IpcKeystoreClientOptions { - connection_url: connection_url.into(), - passphrase, - exact_client_server_version_match: true, - }; - let client = ipc_keystore_connect_options(opts).await?; - Ok(MetaLairClient::Lair(client)) + MetaLairClient::new(connection_url, passphrase).await } diff --git a/crates/holochain_keystore/src/meta_lair_client.rs b/crates/holochain_keystore/src/meta_lair_client.rs index 01a2872ec6..eddd6cd583 100644 --- a/crates/holochain_keystore/src/meta_lair_client.rs +++ b/crates/holochain_keystore/src/meta_lair_client.rs @@ -1,6 +1,7 @@ use holochain_zome_types::Signature; -use kitsune_p2p_types::dependencies::lair_keystore_api; +use kitsune_p2p_types::dependencies::{lair_keystore_api, url2}; use lair_keystore_api::prelude::*; +use parking_lot::Mutex; use std::future::Future; use std::sync::Arc; @@ -8,37 +9,43 @@ pub use kitsune_p2p_types::dependencies::lair_keystore_api::LairResult; /// Abstraction around runtime switching/upgrade of lair keystore / client. #[derive(Clone)] -pub enum MetaLairClient { - /// lair keystore api client - Lair(LairClient), -} +pub struct MetaLairClient(pub(crate) Arc>); impl MetaLairClient { + pub(crate) async fn new( + connection_url: url2::Url2, + passphrase: sodoken::BufRead, + ) -> LairResult { + use lair_keystore_api::ipc_keystore::*; + let opts = IpcKeystoreClientOptions { + connection_url: connection_url.into(), + passphrase, + exact_client_server_version_match: true, + }; + let client = ipc_keystore_connect_options(opts).await?; + Ok(MetaLairClient(Arc::new(Mutex::new(client)))) + } + + pub(crate) fn cli(&self) -> LairClient { + self.0.lock().clone() + } + /// Shutdown this keystore client pub fn shutdown(&self) -> impl Future> + 'static + Send { - let this = self.clone(); - async move { - match this { - Self::Lair(client) => client.shutdown().await, - } - } + let client = self.cli(); + async move { client.shutdown().await } } /// Construct a new randomized signature keypair pub fn new_sign_keypair_random( &self, ) -> impl Future> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - let tag = nanoid::nanoid!(); - let info = client.new_seed(tag.into(), None, false).await?; - let pub_key = - holo_hash::AgentPubKey::from_raw_32(info.ed25519_pub_key.0.to_vec()); - Ok(pub_key) - } - } + let tag = nanoid::nanoid!(); + let info = client.new_seed(tag.into(), None, false).await?; + let pub_key = holo_hash::AgentPubKey::from_raw_32(info.ed25519_pub_key.0.to_vec()); + Ok(pub_key) } } @@ -48,17 +55,13 @@ impl MetaLairClient { pub_key: holo_hash::AgentPubKey, data: Arc<[u8]>, ) -> impl Future> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { tokio::time::timeout(std::time::Duration::from_secs(30), async move { - match this { - Self::Lair(client) => { - let mut pub_key_2 = [0; 32]; - pub_key_2.copy_from_slice(pub_key.get_raw_32()); - let sig = client.sign_by_pub_key(pub_key_2.into(), None, data).await?; - Ok(Signature(*sig.0)) - } - } + let mut pub_key_2 = [0; 32]; + pub_key_2.copy_from_slice(pub_key.get_raw_32()); + let sig = client.sign_by_pub_key(pub_key_2.into(), None, data).await?; + Ok(Signature(*sig.0)) }) .await .map_err(one_err::OneErr::new)? @@ -70,17 +73,13 @@ impl MetaLairClient { &self, tag: Arc, ) -> impl Future> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - // shared secrets are exportable - // (it's hard to make them useful otherwise : ) - let exportable = true; - let _info = client.new_seed(tag, None, exportable).await?; - Ok(()) - } - } + // shared secrets are exportable + // (it's hard to make them useful otherwise : ) + let exportable = true; + let _info = client.new_seed(tag, None, exportable).await?; + Ok(()) } } @@ -91,13 +90,11 @@ impl MetaLairClient { sender_pub_key: X25519PubKey, recipient_pub_key: X25519PubKey, ) -> impl Future)>> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => Ok(client - .export_seed_by_tag(tag, sender_pub_key, recipient_pub_key, None) - .await?), - } + client + .export_seed_by_tag(tag, sender_pub_key, recipient_pub_key, None) + .await } } @@ -110,27 +107,23 @@ impl MetaLairClient { cipher: Arc<[u8]>, tag: Arc, ) -> impl Future> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - // shared secrets are exportable - // (it's hard to make them useful otherwise : ) - let exportable = true; - let _info = client - .import_seed( - sender_pub_key, - recipient_pub_key, - None, - nonce, - cipher, - tag, - exportable, - ) - .await?; - Ok(()) - } - } + // shared secrets are exportable + // (it's hard to make them useful otherwise : ) + let exportable = true; + let _info = client + .import_seed( + sender_pub_key, + recipient_pub_key, + None, + nonce, + cipher, + tag, + exportable, + ) + .await?; + Ok(()) } } @@ -140,12 +133,8 @@ impl MetaLairClient { tag: Arc, data: Arc<[u8]>, ) -> impl Future)>> + 'static + Send { - let this = self.clone(); - async move { - match this { - Self::Lair(client) => client.secretbox_xsalsa_by_tag(tag, None, data).await, - } - } + let client = self.cli(); + async move { client.secretbox_xsalsa_by_tag(tag, None, data).await } } /// Decrypt using a shared secret / xsalsa20poly1305 secretbox. @@ -155,15 +144,11 @@ impl MetaLairClient { nonce: [u8; 24], cipher: Arc<[u8]>, ) -> impl Future>> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - client - .secretbox_xsalsa_open_by_tag(tag, None, nonce, cipher) - .await - } - } + client + .secretbox_xsalsa_open_by_tag(tag, None, nonce, cipher) + .await } } @@ -171,16 +156,12 @@ impl MetaLairClient { pub fn new_x25519_keypair_random( &self, ) -> impl Future> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - let tag = nanoid::nanoid!(); - let info = client.new_seed(tag.into(), None, false).await?; - let pub_key = info.x25519_pub_key; - Ok(pub_key) - } - } + let tag = nanoid::nanoid!(); + let info = client.new_seed(tag.into(), None, false).await?; + let pub_key = info.x25519_pub_key; + Ok(pub_key) } } @@ -191,15 +172,11 @@ impl MetaLairClient { recipient_pub_key: X25519PubKey, data: Arc<[u8]>, ) -> impl Future)>> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - client - .crypto_box_xsalsa_by_pub_key(sender_pub_key, recipient_pub_key, None, data) - .await - } - } + client + .crypto_box_xsalsa_by_pub_key(sender_pub_key, recipient_pub_key, None, data) + .await } } @@ -211,21 +188,17 @@ impl MetaLairClient { nonce: [u8; 24], data: Arc<[u8]>, ) -> impl Future>> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - client - .crypto_box_xsalsa_open_by_pub_key( - sender_pub_key, - recipient_pub_key, - None, - nonce, - data, - ) - .await - } - } + client + .crypto_box_xsalsa_open_by_pub_key( + sender_pub_key, + recipient_pub_key, + None, + nonce, + data, + ) + .await } } @@ -235,28 +208,24 @@ impl MetaLairClient { tag: Arc, ) -> impl Future, sodoken::BufRead)>> + 'static + Send { - let this = self.clone(); + let client = self.cli(); async move { - match this { - Self::Lair(client) => { - let info = match client.get_entry(tag.clone()).await { - Ok(info) => match info { - LairEntryInfo::WkaTlsCert { cert_info, .. } => cert_info, - oth => { - return Err(format!( - "invalid entry type, expecting wka tls cert: {:?}", - oth - ) - .into()) - } - }, - Err(_) => client.new_wka_tls_cert(tag.clone()).await?, - }; - let pk = client.get_wka_tls_cert_priv_key(tag).await?; + let info = match client.get_entry(tag.clone()).await { + Ok(info) => match info { + LairEntryInfo::WkaTlsCert { cert_info, .. } => cert_info, + oth => { + return Err(format!( + "invalid entry type, expecting wka tls cert: {:?}", + oth + ) + .into()) + } + }, + Err(_) => client.new_wka_tls_cert(tag.clone()).await?, + }; + let pk = client.get_wka_tls_cert_priv_key(tag).await?; - Ok((info.digest, info.cert.to_vec().into(), pk)) - } - } + Ok((info.digest, info.cert.to_vec().into(), pk)) } } } diff --git a/crates/holochain_keystore/src/test_keystore.rs b/crates/holochain_keystore/src/test_keystore.rs index ca79e2b3fd..1219e1f7c8 100644 --- a/crates/holochain_keystore/src/test_keystore.rs +++ b/crates/holochain_keystore/src/test_keystore.rs @@ -72,5 +72,5 @@ pub async fn spawn_test_keystore() -> LairResult { // return the client let client = keystore.new_client().await?; - Ok(MetaLairClient::Lair(client)) + Ok(MetaLairClient(Arc::new(parking_lot::Mutex::new(client)))) } From 98c4e7182a7501c8859d584d8b7bfa1b8840244c Mon Sep 17 00:00:00 2001 From: freesig Date: Tue, 26 Jul 2022 16:39:36 +1000 Subject: [PATCH 033/111] add interface and coacade test --- crates/holochain/src/core/ribosome/host_fn.rs | 2 + .../host_fn/must_get_agent_activity.rs | 95 +++++++++++++++++++ .../must_get_agent_activity/test.rs | 69 ++------------ crates/holochain_cascade/src/lib.rs | 8 ++ crates/holochain_cascade/src/test_utils.rs | 62 ++++++++++++ .../holochain_cascade/tests/get_activity.rs | 34 ++++++- crates/holochain_integrity_types/src/chain.rs | 11 +++ crates/holochain_zome_types/src/zome_io.rs | 2 + 8 files changed, 223 insertions(+), 60 deletions(-) create mode 100644 crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs diff --git a/crates/holochain/src/core/ribosome/host_fn.rs b/crates/holochain/src/core/ribosome/host_fn.rs index cd22aac894..e4135817b2 100644 --- a/crates/holochain/src/core/ribosome/host_fn.rs +++ b/crates/holochain/src/core/ribosome/host_fn.rs @@ -158,6 +158,8 @@ host_fn_api_impls! { // Retrieve an action from the DHT or short circuit. fn must_get_action (zt::entry::MustGetActionInput) -> SignedActionHashed; + fn must_get_agent_activity (zt::chain::MustGetAgentActivityInput) -> Vec; + // Attempt to accept a preflight request. fn accept_countersigning_preflight_request(zt::countersigning::PreflightRequest) -> zt::countersigning::PreflightRequestAcceptance; diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs new file mode 100644 index 0000000000..84a86d1822 --- /dev/null +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs @@ -0,0 +1,95 @@ +use crate::core::ribosome::CallContext; +use crate::core::ribosome::HostContext; +use crate::core::ribosome::HostFnAccess; +use crate::core::ribosome::RibosomeError; +use crate::core::ribosome::RibosomeT; +use holochain_cascade::Cascade; +use holochain_p2p::actor::GetActivityOptions; +use holochain_types::prelude::*; +use holochain_wasmer_host::prelude::*; +use std::sync::Arc; + +pub fn must_get_agent_activity( + _ribosome: Arc, + call_context: Arc, + input: MustGetAgentActivityInput, +) -> Result, RuntimeError> { + match HostFnAccess::from(&call_context.host_context()) { + HostFnAccess { + read_workspace_deterministic: Permission::Allow, + .. + } => { + let MustGetAgentActivityInput { + author, + chain_filter, + } = input; + + // Get the network from the context + let network = call_context.host_context.network().clone(); + + // timeouts must be handled by the network + tokio_helper::block_forever_on(async move { + let workspace = call_context.host_context.workspace(); + let mut cascade = match call_context.host_context { + HostContext::Validate(_) => Cascade::from_workspace(workspace.stores(), None), + _ => Cascade::from_workspace_network( + &workspace, + call_context.host_context.network().clone(), + ), + }; + let result: Result<_, RuntimeError> = match cascade + .must_get_agent_activity(author, chain_filter) + .await + .map_err(|cascade_error| -> RuntimeError { + wasm_error!(WasmErrorInner::Host(cascade_error.to_string())).into() + })? { + MustGetAgentActivityResponse::Activity(activity) => Ok(activity), + MustGetAgentActivityResponse::IncompleteChain => todo!(), + MustGetAgentActivityResponse::ActionNotFound(_) => todo!(), + MustGetAgentActivityResponse::PositionNotHighest => todo!(), + MustGetAgentActivityResponse::EmptyRange => todo!(), + // Some(activity) => Ok(activity), + // None => match call_context.host_context { + // HostContext::EntryDefs(_) + // | HostContext::GenesisSelfCheck(_) + // | HostContext::MigrateAgent(_) + // | HostContext::PostCommit(_) + // | HostContext::ZomeCall(_) => Err(wasm_error!(WasmErrorInner::Host( + // format!("Failed to get EntryHashed {}", entry_hash) + // )) + // .into()), + // HostContext::ValidationPackage(_) + // | HostContext::Validate(_) + // | HostContext::Init(_) => { + // Err(wasm_error!(WasmErrorInner::HostShortCircuit( + // holochain_serialized_bytes::encode( + // &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( + // vec![entry_hash.into()], + // )) + // .map_err( + // |e| -> RuntimeError { wasm_error!(e.into()).into() } + // )?, + // ) + // .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? + // )) + // .into()) + // } + // }, + }; + result + }) + } + _ => Err(wasm_error!(WasmErrorInner::Host( + RibosomeError::HostFnPermissions( + call_context.zome.zome_name().clone(), + call_context.function_name().clone(), + "must_get_agent_activity".into(), + ) + .to_string(), + )) + .into()), + } +} + +// we are relying on the create tests to show the commit/get round trip +// See commit_entry.rs diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index 4d5c812b4f..c4ec8a1243 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -1,17 +1,13 @@ use std::sync::Arc; +use crate::test_utils::commit_chain; + use super::*; use holo_hash::AgentPubKey; use holo_hash::DnaHash; use holochain_sqlite::db::DbKindDht; -use holochain_state::prelude::*; -use holochain_types::dht_op::DhtOpLight; -use holochain_types::dht_op::OpOrder; -use holochain_types::dht_op::UniqueForm; use holochain_types::test_utils::chain::*; -use holochain_zome_types::ActionRefMut; use holochain_zome_types::ChainFilter; -use holochain_zome_types::Timestamp; use test_case::test_case; #[test_case( @@ -48,7 +44,10 @@ async fn returns_full_sequence_from_filter( agent: AgentPubKey, filter: ChainFilter, ) -> Vec<(AgentPubKey, Vec)> { - let db = commit_chain(chain); + let db = commit_chain( + DbKindDht(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), + chain, + ); let data = must_get_agent_activity(db.clone().into(), agent.clone(), filter) .await .unwrap(); @@ -98,59 +97,11 @@ async fn test_responses( agent: AgentPubKey, filter: ChainFilter, ) -> MustGetAgentActivityResponse { - let db = commit_chain(chain); + let db = commit_chain( + DbKindDht(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), + chain, + ); must_get_agent_activity(db.clone().into(), agent.clone(), filter) .await .unwrap() } - -fn commit_chain(chain: Vec<(AgentPubKey, Vec)>) -> DbWrite { - let data: Vec<_> = chain - .into_iter() - .map(|(a, c)| { - let d = chain_to_ops(c) - .into_iter() - .map(|mut op| { - *op.action.hashed.content.author_mut() = a.clone(); - op - }) - .collect::>(); - (a, d) - }) - .collect(); - let db = test_in_mem_db(DbKindDht(Arc::new(DnaHash::from_raw_36(vec![0; 36])))); - - db.test_commit(|txn| { - for (_, data) in &data { - for op in data { - let op_light = DhtOpLight::RegisterAgentActivity( - op.action.action_address().clone(), - op.action - .hashed - .entry_hash() - .cloned() - .unwrap_or_else(|| entry_hash(&[0])) - .into(), - ); - - let timestamp = Timestamp::now(); - let (_, hash) = - UniqueForm::op_hash(op_light.get_type(), op.action.hashed.content.clone()) - .unwrap(); - insert_action(txn, &op.action).unwrap(); - insert_op_lite( - txn, - &op_light, - &hash, - &OpOrder::new(op_light.get_type(), timestamp), - ×tamp, - ) - .unwrap(); - set_validation_status(txn, &hash, holochain_zome_types::ValidationStatus::Valid) - .unwrap(); - set_when_integrated(txn, &hash, Timestamp::now()).unwrap(); - } - } - }); - db -} diff --git a/crates/holochain_cascade/src/lib.rs b/crates/holochain_cascade/src/lib.rs index dbc4a13060..7a480e7ba2 100644 --- a/crates/holochain_cascade/src/lib.rs +++ b/crates/holochain_cascade/src/lib.rs @@ -738,6 +738,14 @@ where let results = self.cascading(query).await?; Ok(results) } + + pub async fn must_get_agent_activity( + &mut self, + author: AgentPubKey, + query: ChainFilter, + ) -> CascadeResult { + todo!() + } #[instrument(skip(self, agent, query, options))] /// Get agent activity from agent activity authorities. diff --git a/crates/holochain_cascade/src/test_utils.rs b/crates/holochain_cascade/src/test_utils.rs index b9c4081004..3587bc99b2 100644 --- a/crates/holochain_cascade/src/test_utils.rs +++ b/crates/holochain_cascade/src/test_utils.rs @@ -23,12 +23,18 @@ use holochain_sqlite::rusqlite::Transaction; use holochain_state::mutations::insert_op; use holochain_state::mutations::set_validation_status; use holochain_state::mutations::set_when_integrated; +use holochain_state::prelude::insert_action; +use holochain_state::prelude::insert_op_lite; +use holochain_state::prelude::test_in_mem_db; use holochain_state::prelude::Query; use holochain_state::prelude::Txn; use holochain_types::activity::AgentActivityResponse; use holochain_types::db::DbRead; use holochain_types::db::DbWrite; use holochain_types::dht_op::DhtOpHashed; +use holochain_types::dht_op::DhtOpLight; +use holochain_types::dht_op::OpOrder; +use holochain_types::dht_op::UniqueForm; use holochain_types::dht_op::WireOps; use holochain_types::link::WireLinkKey; use holochain_types::link::WireLinkOps; @@ -36,7 +42,9 @@ use holochain_types::metadata::MetadataSet; use holochain_types::prelude::ValidationPackageResponse; use holochain_types::prelude::WireEntryOps; use holochain_types::record::WireRecordOps; +use holochain_types::test_utils::chain::*; use holochain_zome_types::ActionHashed; +use holochain_zome_types::ActionRefMut; use holochain_zome_types::QueryFilter; use holochain_zome_types::SignedAction; use holochain_zome_types::SignedActionHashed; @@ -467,3 +475,57 @@ pub fn handle_get_txn( AnyDht::Action => WireOps::Record(handle_get_record_txn(txn, hash.into(), options)), } } + +pub fn commit_chain( + db_kind: Kind, + chain: Vec<(AgentPubKey, Vec)>, +) -> DbWrite { + let data: Vec<_> = chain + .into_iter() + .map(|(a, c)| { + let d = chain_to_ops(c) + .into_iter() + .map(|mut op| { + *op.action.hashed.content.author_mut() = a.clone(); + op + }) + .collect::>(); + (a, d) + }) + .collect(); + let db = test_in_mem_db(db_kind); + + db.test_commit(|txn| { + for (_, data) in &data { + for op in data { + let op_light = DhtOpLight::RegisterAgentActivity( + op.action.action_address().clone(), + op.action + .hashed + .entry_hash() + .cloned() + .unwrap_or_else(|| entry_hash(&[0])) + .into(), + ); + + let timestamp = Timestamp::now(); + let (_, hash) = + UniqueForm::op_hash(op_light.get_type(), op.action.hashed.content.clone()) + .unwrap(); + insert_action(txn, &op.action).unwrap(); + insert_op_lite( + txn, + &op_light, + &hash, + &OpOrder::new(op_light.get_type(), timestamp), + ×tamp, + ) + .unwrap(); + set_validation_status(txn, &hash, holochain_zome_types::ValidationStatus::Valid) + .unwrap(); + set_when_integrated(txn, &hash, Timestamp::now()).unwrap(); + } + } + }); + db +} diff --git a/crates/holochain_cascade/tests/get_activity.rs b/crates/holochain_cascade/tests/get_activity.rs index 156ae01bb3..cd236f7f8d 100644 --- a/crates/holochain_cascade/tests/get_activity.rs +++ b/crates/holochain_cascade/tests/get_activity.rs @@ -1,11 +1,21 @@ +use std::sync::Arc; + use ghost_actor::dependencies::observability; +use holo_hash::AgentPubKey; +use holo_hash::DnaHash; use holochain_cascade::test_utils::*; use holochain_cascade::Cascade; +use holochain_sqlite::db::DbKindCache; +use holochain_sqlite::db::DbKindDht; use holochain_state::prelude::test_cache_db; use holochain_state::prelude::test_dht_db; +use holochain_state::prelude::test_in_mem_db; use holochain_types::activity::*; +use holochain_types::chain::MustGetAgentActivityResponse; +use holochain_types::test_utils::chain::*; +use holochain_zome_types::ChainFilter; use holochain_zome_types::ChainStatus; -use pretty_assertions::assert_eq; +use test_case::test_case; #[tokio::test(flavor = "multi_thread")] async fn get_activity() { @@ -55,3 +65,25 @@ async fn get_activity() { }; assert_eq!(r, expected); } + +#[test_case( + agent_chain(&[(0, 0..3), (0, 5..10)]), agent_hash(&[0]), ChainFilter::new(action_hash(&[8])) + => MustGetAgentActivityResponse::IncompleteChain ; "8 to genesis with 0 till 2 and 5 till 9")] +#[tokio::test(flavor = "multi_thread")] +async fn test_must_get_agent_activity( + chain: Vec<(AgentPubKey, Vec)>, + author: AgentPubKey, + filter: ChainFilter, +) -> MustGetAgentActivityResponse { + let authority = commit_chain( + DbKindDht(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), + chain, + ); + let cache = test_in_mem_db(DbKindCache(Arc::new(DnaHash::from_raw_36(vec![0; 36])))); + let network = PassThroughNetwork::authority_for_nothing(vec![authority.into()]); + let mut cascade = Cascade::empty().with_network(network, cache); + cascade + .must_get_agent_activity(author, filter) + .await + .unwrap() +} diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index a88fe59f21..3a32ca7804 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -4,6 +4,7 @@ use std::collections::HashSet; use holo_hash::ActionHash; +use holo_hash::AgentPubKey; use holochain_serialized_bytes::prelude::*; #[cfg(test)] @@ -38,6 +39,16 @@ pub enum ChainFilters { Both(u32, HashSet), } +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +/// Input to the `must_get_agent_activity` call. +pub struct MustGetAgentActivityInput { + /// The author of the chain that you are requesting + /// activity from. + pub author: AgentPubKey, + /// The filter on the chains activity. + pub chain_filter: ChainFilter, +} + impl ChainFilter { /// Create a new filter using this [`ActionHash`] as /// the starting position and walking the chain diff --git a/crates/holochain_zome_types/src/zome_io.rs b/crates/holochain_zome_types/src/zome_io.rs index f192fc03c1..ef159a56ea 100644 --- a/crates/holochain_zome_types/src/zome_io.rs +++ b/crates/holochain_zome_types/src/zome_io.rs @@ -105,6 +105,8 @@ wasm_io_types! { // Retrieve an action from the DHT or short circuit. fn must_get_action (zt::entry::MustGetActionInput) -> zt::SignedActionHashed; + + fn must_get_agent_activity (zt::chain::MustGetAgentActivityInput) -> Vec; // Query the source chain for data. fn query (zt::query::ChainQueryFilter) -> Vec; From f0e2f5cf47e0ea51cc73ffeeaac4377dc516feb8 Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 28 Jul 2022 14:52:35 +1000 Subject: [PATCH 034/111] working must_get_agent_activity --- crates/hdi/src/chain.rs | 26 +++ crates/hdi/src/hdi.rs | 19 ++ crates/hdi/src/lib.rs | 2 + crates/hdi/src/prelude.rs | 2 + crates/hdi/src/test_utils.rs | 7 + crates/hdk/src/chain.rs | 1 + crates/hdk/src/hdk.rs | 17 ++ crates/hdk/src/prelude.rs | 1 + crates/holochain/src/conductor/cell.rs | 29 +++ crates/holochain/src/conductor/handle.rs | 1 + crates/holochain/src/core/ribosome.rs | 8 +- .../ribosome/guest_callback/entry_defs.rs | 2 +- .../guest_callback/genesis_self_check.rs | 2 +- .../src/core/ribosome/guest_callback/init.rs | 15 +- .../ribosome/guest_callback/migrate_agent.rs | 6 + .../ribosome/guest_callback/post_commit.rs | 6 + .../core/ribosome/guest_callback/validate.rs | 16 +- .../guest_callback/validation_package.rs | 6 + .../core/ribosome/host_fn/must_get_action.rs | 42 ++-- .../host_fn/must_get_agent_activity.rs | 192 ++++++++++++++---- .../core/ribosome/host_fn/must_get_entry.rs | 10 +- .../ribosome/host_fn/must_get_valid_record.rs | 10 +- .../src/core/ribosome/real_ribosome.rs | 6 + .../core/workflow/app_validation_workflow.rs | 32 ++- crates/holochain/tests/sharded_gossip/mod.rs | 6 + .../must_get_agent_activity.rs | 90 +++++--- crates/holochain_cascade/src/lib.rs | 160 ++++++++++++++- crates/holochain_cascade/src/test_utils.rs | 60 +++++- .../holochain_cascade/tests/get_activity.rs | 54 ++++- crates/holochain_integrity_types/src/chain.rs | 24 ++- .../holochain_integrity_types/src/prelude.rs | 1 + .../holochain_integrity_types/src/validate.rs | 13 +- crates/holochain_p2p/src/lib.rs | 17 ++ crates/holochain_p2p/src/spawn/actor.rs | 80 ++++++++ crates/holochain_p2p/src/test.rs | 8 + crates/holochain_p2p/src/types/actor.rs | 7 + crates/holochain_p2p/src/types/event.rs | 9 + .../holochain_p2p/src/types/mock_network.rs | 2 + crates/holochain_p2p/src/types/wire.rs | 12 ++ crates/holochain_types/src/chain.rs | 3 +- crates/holochain_zome_types/src/init.rs | 4 +- crates/holochain_zome_types/src/zome_io.rs | 2 +- crates/mock_hdi/src/lib.rs | 4 + .../must_get/src/coordinator.rs | 34 ++++ .../wasm_workspace/must_get/src/integrity.rs | 57 ++++++ 45 files changed, 979 insertions(+), 126 deletions(-) create mode 100644 crates/hdi/src/chain.rs diff --git a/crates/hdi/src/chain.rs b/crates/hdi/src/chain.rs new file mode 100644 index 0000000000..f93b5da28a --- /dev/null +++ b/crates/hdi/src/chain.rs @@ -0,0 +1,26 @@ +//! # Chain Activity +//! This module gives users the ability to use chain activity within validation +//! in a deterministic way. + +use crate::prelude::*; +use holo_hash::AgentPubKey; + +/// The chain this filter produces on the given agents chain +/// must be fetched before the validation can be completed. +/// This allows for deterministic validation of chain activity by +/// making a hash bounded range of an agents chain into a dependency +/// for something that is being validated. +/// +/// Check the [`ChainFilter`] docs for more info. +pub fn must_get_agent_activity( + author: AgentPubKey, + filter: ChainFilter, +) -> ExternResult> { + HDI.with(|h| { + h.borrow() + .must_get_agent_activity(MustGetAgentActivityInput { + author, + chain_filter: filter, + }) + }) +} diff --git a/crates/hdi/src/hdi.rs b/crates/hdi/src/hdi.rs index cb9346224c..a9e44c29f3 100644 --- a/crates/hdi/src/hdi.rs +++ b/crates/hdi/src/hdi.rs @@ -32,6 +32,10 @@ pub trait HdiT: Send + Sync { &self, must_get_valid_record_input: MustGetValidRecordInput, ) -> ExternResult; + fn must_get_agent_activity( + &self, + must_get_agent_activity_input: MustGetAgentActivityInput, + ) -> ExternResult>; // Info fn dna_info(&self, dna_info_input: ()) -> ExternResult; fn zome_info(&self, zome_info_input: ()) -> ExternResult; @@ -77,6 +81,12 @@ impl HdiT for ErrHdi { fn must_get_valid_record(&self, _: MustGetValidRecordInput) -> ExternResult { Self::err() } + fn must_get_agent_activity( + &self, + _: MustGetAgentActivityInput, + ) -> ExternResult> { + Self::err() + } fn dna_info(&self, _: ()) -> ExternResult { Self::err() } @@ -143,6 +153,15 @@ impl HdiT for HostHdi { must_get_valid_record_input, ) } + fn must_get_agent_activity( + &self, + must_get_agent_activity_input: MustGetAgentActivityInput, + ) -> ExternResult> { + host_call::>( + __must_get_agent_activity, + must_get_agent_activity_input, + ) + } fn dna_info(&self, _: ()) -> ExternResult { host_call::<(), DnaInfo>(__dna_info, ()) } diff --git a/crates/hdi/src/lib.rs b/crates/hdi/src/lib.rs index 8c131964ce..f71251a8cf 100644 --- a/crates/hdi/src/lib.rs +++ b/crates/hdi/src/lib.rs @@ -217,6 +217,8 @@ pub mod hdi; pub mod link; +pub mod chain; + #[deny(missing_docs)] pub mod op; diff --git a/crates/hdi/src/prelude.rs b/crates/hdi/src/prelude.rs index 61fcadba21..1679047931 100644 --- a/crates/hdi/src/prelude.rs +++ b/crates/hdi/src/prelude.rs @@ -4,6 +4,7 @@ pub use crate::ed25519::verify_signature_raw; pub use crate::entry::must_get_action; pub use crate::entry::must_get_entry; pub use crate::entry::must_get_valid_record; +pub use crate::chain::must_get_agent_activity; pub use crate::entry_defs; pub use crate::hash::*; pub use crate::hdi::*; @@ -79,6 +80,7 @@ macro_rules! holochain_externs { __must_get_entry, __must_get_valid_record, __must_get_action, + __must_get_agent_activity, __x_salsa20_poly1305_decrypt, __x_25519_x_salsa20_poly1305_decrypt ); diff --git a/crates/hdi/src/test_utils.rs b/crates/hdi/src/test_utils.rs index 2e047c7a58..e09dc164f6 100644 --- a/crates/hdi/src/test_utils.rs +++ b/crates/hdi/src/test_utils.rs @@ -68,6 +68,13 @@ pub fn set_zome_types(entries: &[(u8, u8)], links: &[(u8, u8)]) { fn trace(&self, trace_msg: TraceMsg) -> ExternResult<()> { todo!() } + + fn must_get_agent_activity( + &self, + must_get_agent_activity_input: MustGetAgentActivityInput, + ) -> ExternResult> { + todo!() + } } set_hdi(TestHdi(ScopedZomeTypesSet { entries: ScopedZomeTypes( diff --git a/crates/hdk/src/chain.rs b/crates/hdk/src/chain.rs index e1fce846af..8a1e949f47 100644 --- a/crates/hdk/src/chain.rs +++ b/crates/hdk/src/chain.rs @@ -1,4 +1,5 @@ use crate::prelude::*; +pub use hdi::chain::*; /// Query the _actions_ of a remote agent's chain. /// diff --git a/crates/hdk/src/hdk.rs b/crates/hdk/src/hdk.rs index f8727a58aa..c1dec4aebc 100644 --- a/crates/hdk/src/hdk.rs +++ b/crates/hdk/src/hdk.rs @@ -169,6 +169,10 @@ mockall::mock! { &self, must_get_valid_record_input: MustGetValidRecordInput, ) -> ExternResult; + fn must_get_agent_activity( + &self, + must_get_agent_activity_input: MustGetAgentActivityInput, + ) -> ExternResult>; // Info fn dna_info(&self, dna_info_input: ()) -> ExternResult; fn zome_info(&self, zome_info_input: ()) -> ExternResult; @@ -230,6 +234,13 @@ impl HdiT for ErrHdk { Self::err() } + fn must_get_agent_activity( + &self, + _: MustGetAgentActivityInput, + ) -> ExternResult> { + Self::err() + } + fn dna_info(&self, _dna_info_input: ()) -> ExternResult { Self::err() } @@ -409,6 +420,12 @@ impl HdiT for HostHdk { ) -> ExternResult { HostHdi::new().must_get_valid_record(must_get_valid_record_input) } + fn must_get_agent_activity( + &self, + must_get_agent_activity_input: MustGetAgentActivityInput, + ) -> ExternResult> { + HostHdi::new().must_get_agent_activity(must_get_agent_activity_input) + } fn dna_info(&self, _: ()) -> ExternResult { HostHdi::new().dna_info(()) } diff --git a/crates/hdk/src/prelude.rs b/crates/hdk/src/prelude.rs index a394c7697a..bc85c3be3a 100644 --- a/crates/hdk/src/prelude.rs +++ b/crates/hdk/src/prelude.rs @@ -4,6 +4,7 @@ pub use crate::capability::delete_cap_grant; pub use crate::capability::generate_cap_secret; pub use crate::capability::update_cap_grant; pub use crate::chain::get_agent_activity; +pub use crate::chain::must_get_agent_activity; pub use crate::chain::query; pub use crate::countersigning::accept_countersigning_preflight_request; pub use crate::countersigning::session_times_from_millis; diff --git a/crates/holochain/src/conductor/cell.rs b/crates/holochain/src/conductor/cell.rs index 2c6f23c0e4..55f1027655 100644 --- a/crates/holochain/src/conductor/cell.rs +++ b/crates/holochain/src/conductor/cell.rs @@ -465,6 +465,23 @@ impl Cell { .instrument(debug_span!("cell_handle_get_agent_activity")) .await; } + MustGetAgentActivity { + span_context: _, + respond, + author, + filter, + .. + } => { + async { + let res = self + .handle_must_get_agent_activity(author, filter) + .await + .map_err(holochain_p2p::HolochainP2pError::other); + respond.respond(Ok(async move { res }.boxed().into())); + } + .instrument(debug_span!("cell_handle_must_get_agent_activity")) + .await; + } ValidationReceiptReceived { span_context: _, respond, @@ -685,6 +702,18 @@ impl Cell { .map_err(Into::into) } + #[instrument(skip(self))] + async fn handle_must_get_agent_activity( + &self, + author: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> CellResult { + let db = self.space.dht_db.clone(); + authority::handle_must_get_agent_activity(db.into(), author, filter) + .await + .map_err(Into::into) + } + /// a remote agent is sending us a validation receipt. #[tracing::instrument(skip(self, receipt))] async fn handle_validation_receipt(&self, receipt: SerializedBytes) -> CellResult<()> { diff --git a/crates/holochain/src/conductor/handle.rs b/crates/holochain/src/conductor/handle.rs index f336a0ff13..c6269241a8 100755 --- a/crates/holochain/src/conductor/handle.rs +++ b/crates/holochain/src/conductor/handle.rs @@ -776,6 +776,7 @@ impl ConductorHandleT for ConductorHandleImpl { | GetMeta { .. } | GetLinks { .. } | GetAgentActivity { .. } + | MustGetAgentActivity { .. } | ValidationReceiptReceived { .. } => { let cell_id = CellId::new(event.dna_hash().clone(), event.target_agents().clone()); let cell = self.cell_by_id(&cell_id)?; diff --git a/crates/holochain/src/core/ribosome.rs b/crates/holochain/src/core/ribosome.rs index cb17cf2d37..58d17bf01e 100644 --- a/crates/holochain/src/core/ribosome.rs +++ b/crates/holochain/src/core/ribosome.rs @@ -96,7 +96,7 @@ impl CallContext { } } -#[derive(Clone)] +#[derive(Clone, Debug)] pub enum HostContext { EntryDefs(EntryDefsHostAccess), GenesisSelfCheck(GenesisSelfCheckHostAccess), @@ -445,6 +445,12 @@ pub struct ZomeCallHostAccess { pub call_zome_handle: CellConductorReadHandle, } +impl std::fmt::Debug for ZomeCallHostAccess { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ZomeCallHostAccess").finish() + } +} + impl From for HostContext { fn from(zome_call_host_access: ZomeCallHostAccess) -> Self { Self::ZomeCall(zome_call_host_access) diff --git a/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs b/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs index 7515c93a8b..181227d185 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs @@ -18,7 +18,7 @@ impl EntryDefsInvocation { } } -#[derive(Clone, Constructor)] +#[derive(Clone, Constructor, Debug)] pub struct EntryDefsHostAccess; impl From<&HostContext> for EntryDefsHostAccess { diff --git a/crates/holochain/src/core/ribosome/guest_callback/genesis_self_check.rs b/crates/holochain/src/core/ribosome/guest_callback/genesis_self_check.rs index baafeeba45..8aae0ad83a 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/genesis_self_check.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/genesis_self_check.rs @@ -14,7 +14,7 @@ pub struct GenesisSelfCheckInvocation { pub payload: Arc, } -#[derive(Clone, Constructor)] +#[derive(Clone, Constructor, Debug)] pub struct GenesisSelfCheckHostAccess; impl From for HostContext { diff --git a/crates/holochain/src/core/ribosome/guest_callback/init.rs b/crates/holochain/src/core/ribosome/guest_callback/init.rs index 60999d248b..122db163b1 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/init.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/init.rs @@ -6,7 +6,6 @@ use crate::core::ribosome::Invocation; use crate::core::ribosome::InvocationAuth; use crate::core::ribosome::ZomesToInvoke; use derive_more::Constructor; -use holo_hash::AnyDhtHash; use holochain_keystore::MetaLairClient; use holochain_p2p::HolochainP2pDna; use holochain_serialized_bytes::prelude::*; @@ -33,6 +32,12 @@ pub struct InitHostAccess { pub call_zome_handle: CellConductorReadHandle, } +impl std::fmt::Debug for InitHostAccess { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("InitHostAccess").finish() + } +} + impl From for HostContext { fn from(init_host_access: InitHostAccess) -> Self { Self::Init(init_host_access) @@ -79,7 +84,7 @@ pub enum InitResult { /// no init failed but some zome has unresolved dependencies /// ZomeName is the first zome that has unresolved dependencies /// Vec is the list of all missing dependency addresses - UnresolvedDependencies(ZomeName, Vec), + UnresolvedDependencies(ZomeName, UnresolvedDependencies), } impl From> for InitResult { @@ -92,7 +97,7 @@ impl From> for InitResult { // unresolved deps overrides pass but not fail InitCallbackResult::UnresolvedDependencies(ud) => match acc { Self::Fail(_, _) => acc, - _ => Self::UnresolvedDependencies(zome_name, ud.into_iter().collect()), + _ => Self::UnresolvedDependencies(zome_name, ud), }, // passing callback allows the acc to carry forward InitCallbackResult::Pass => acc, @@ -121,7 +126,7 @@ mod test { let result_ud = || { InitResult::UnresolvedDependencies( ZomeNameFixturator::new(::fixt::Predictable).next().unwrap(), - vec![], + UnresolvedDependencies::Hashes(vec![]), ) }; let result_fail = || { @@ -140,7 +145,7 @@ mod test { let cb_ud = || { ( ZomeNameFixturator::new(::fixt::Predictable).next().unwrap(), - InitCallbackResult::UnresolvedDependencies(vec![]), + InitCallbackResult::UnresolvedDependencies(UnresolvedDependencies::Hashes(vec![])), ) }; let cb_fail = || { diff --git a/crates/holochain/src/core/ribosome/guest_callback/migrate_agent.rs b/crates/holochain/src/core/ribosome/guest_callback/migrate_agent.rs index 3d9074c43c..6d972bb0f0 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/migrate_agent.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/migrate_agent.rs @@ -29,6 +29,12 @@ pub struct MigrateAgentHostAccess { pub workspace: HostFnWorkspace, } +impl std::fmt::Debug for MigrateAgentHostAccess { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("MigrateAgentHostAccess").finish() + } +} + impl From for HostContext { fn from(migrate_agent_host_access: MigrateAgentHostAccess) -> Self { Self::MigrateAgent(migrate_agent_host_access) diff --git a/crates/holochain/src/core/ribosome/guest_callback/post_commit.rs b/crates/holochain/src/core/ribosome/guest_callback/post_commit.rs index 70824228db..6de1871ffd 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/post_commit.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/post_commit.rs @@ -34,6 +34,12 @@ pub struct PostCommitHostAccess { pub network: HolochainP2pDna, } +impl std::fmt::Debug for PostCommitHostAccess { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("PostCommitHostAccess").finish() + } +} + impl From for HostContext { fn from(post_commit_host_access: PostCommitHostAccess) -> Self { Self::PostCommit(post_commit_host_access) diff --git a/crates/holochain/src/core/ribosome/guest_callback/validate.rs b/crates/holochain/src/core/ribosome/guest_callback/validate.rs index 6504c3f46d..a8a673772b 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/validate.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/validate.rs @@ -4,7 +4,6 @@ use crate::core::ribosome::Invocation; use crate::core::ribosome::InvocationAuth; use crate::core::ribosome::ZomesToInvoke; use derive_more::Constructor; -use holo_hash::AnyDhtHash; use holochain_p2p::HolochainP2pDna; use holochain_serialized_bytes::prelude::*; use holochain_state::host_fn_workspace::HostFnWorkspaceRead; @@ -37,6 +36,12 @@ pub struct ValidateHostAccess { pub network: HolochainP2pDna, } +impl std::fmt::Debug for ValidateHostAccess { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ValidateHostAccess").finish() + } +} + impl From for HostContext { fn from(validate_host_access: ValidateHostAccess) -> Self { Self::Validate(validate_host_access) @@ -76,7 +81,7 @@ pub enum ValidateResult { Invalid(String), /// subconscious needs to map this to either pending or abandoned based on context that the /// wasm can't possibly have - UnresolvedDependencies(Vec), + UnresolvedDependencies(UnresolvedDependencies), } impl From> for ValidateResult { @@ -137,11 +142,14 @@ mod test { let mut rng = ::fixt::rng(); let result_valid = || ValidateResult::Valid; - let result_ud = || ValidateResult::UnresolvedDependencies(vec![]); + let result_ud = + || ValidateResult::UnresolvedDependencies(UnresolvedDependencies::Hashes(vec![])); let result_invalid = || ValidateResult::Invalid("".into()); let cb_valid = || ValidateCallbackResult::Valid; - let cb_ud = || ValidateCallbackResult::UnresolvedDependencies(vec![]); + let cb_ud = || { + ValidateCallbackResult::UnresolvedDependencies(UnresolvedDependencies::Hashes(vec![])) + }; let cb_invalid = || ValidateCallbackResult::Invalid("".into()); for (mut results, expected) in vec![ diff --git a/crates/holochain/src/core/ribosome/guest_callback/validation_package.rs b/crates/holochain/src/core/ribosome/guest_callback/validation_package.rs index dd489f0730..3f134a623a 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/validation_package.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/validation_package.rs @@ -31,6 +31,12 @@ pub struct ValidationPackageHostAccess { pub network: HolochainP2pDna, } +impl std::fmt::Debug for ValidationPackageHostAccess { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ValidationPackageHostAccess").finish() + } +} + impl From for HostContext { fn from(validation_package_host_access: ValidationPackageHostAccess) -> Self { Self::ValidationPackage(validation_package_host_access) diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_action.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_action.rs index 9d57f3f0f1..bc70308153 100644 --- a/crates/holochain/src/core/ribosome/host_fn/must_get_action.rs +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_action.rs @@ -50,36 +50,47 @@ pub fn must_get_action<'a>( HostContext::Init(_) => Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( - vec![action_hash.into()], + UnresolvedDependencies::Hashes(vec![action_hash.into()],) )) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, ) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? )) .into()), - HostContext::Validate(_) => Err(wasm_error!(WasmErrorInner::HostShortCircuit( - holochain_serialized_bytes::encode( - &ExternIO::encode(ValidateCallbackResult::UnresolvedDependencies( - vec![action_hash.into()], - )) - .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, - ) - .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? - )) - .into()), - HostContext::ValidationPackage(_) => - Err(wasm_error!(WasmErrorInner::HostShortCircuit( + HostContext::Validate(_) => { + Err(wasm_error!(WasmErrorInner::HostShortCircuit( + holochain_serialized_bytes::encode( + &ExternIO::encode( + ValidateCallbackResult::UnresolvedDependencies( + UnresolvedDependencies::Hashes( + vec![action_hash.into()], + ) + ) + ) + .map_err( + |e| -> RuntimeError { wasm_error!(e.into()).into() } + )?, + ) + .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? + )) + .into()) + } + HostContext::ValidationPackage(_) => { + Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode( ValidationPackageCallbackResult::UnresolvedDependencies( vec![action_hash.into(),] ), ) - .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? + .map_err( + |e| -> RuntimeError { wasm_error!(e.into()).into() } + )? ) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, )) .into()) + } }, } }) @@ -91,6 +102,7 @@ pub fn must_get_action<'a>( "must_get_action".into(), ) .to_string(), - )).into()), + )) + .into()), } } diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs index 84a86d1822..30d7e1fedc 100644 --- a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs @@ -4,7 +4,6 @@ use crate::core::ribosome::HostFnAccess; use crate::core::ribosome::RibosomeError; use crate::core::ribosome::RibosomeT; use holochain_cascade::Cascade; -use holochain_p2p::actor::GetActivityOptions; use holochain_types::prelude::*; use holochain_wasmer_host::prelude::*; use std::sync::Arc; @@ -24,9 +23,6 @@ pub fn must_get_agent_activity( chain_filter, } = input; - // Get the network from the context - let network = call_context.host_context.network().clone(); - // timeouts must be handled by the network tokio_helper::block_forever_on(async move { let workspace = call_context.host_context.workspace(); @@ -37,45 +33,63 @@ pub fn must_get_agent_activity( call_context.host_context.network().clone(), ), }; - let result: Result<_, RuntimeError> = match cascade - .must_get_agent_activity(author, chain_filter) + let result = cascade + .must_get_agent_activity(author.clone(), chain_filter.clone()) .await .map_err(|cascade_error| -> RuntimeError { wasm_error!(WasmErrorInner::Host(cascade_error.to_string())).into() - })? { - MustGetAgentActivityResponse::Activity(activity) => Ok(activity), - MustGetAgentActivityResponse::IncompleteChain => todo!(), - MustGetAgentActivityResponse::ActionNotFound(_) => todo!(), - MustGetAgentActivityResponse::PositionNotHighest => todo!(), - MustGetAgentActivityResponse::EmptyRange => todo!(), - // Some(activity) => Ok(activity), - // None => match call_context.host_context { - // HostContext::EntryDefs(_) - // | HostContext::GenesisSelfCheck(_) - // | HostContext::MigrateAgent(_) - // | HostContext::PostCommit(_) - // | HostContext::ZomeCall(_) => Err(wasm_error!(WasmErrorInner::Host( - // format!("Failed to get EntryHashed {}", entry_hash) - // )) - // .into()), - // HostContext::ValidationPackage(_) - // | HostContext::Validate(_) - // | HostContext::Init(_) => { - // Err(wasm_error!(WasmErrorInner::HostShortCircuit( - // holochain_serialized_bytes::encode( - // &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( - // vec![entry_hash.into()], - // )) - // .map_err( - // |e| -> RuntimeError { wasm_error!(e.into()).into() } - // )?, - // ) - // .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? - // )) - // .into()) - // } - // }, + })?; + + use MustGetAgentActivityResponse::*; + + let result: Result<_, RuntimeError> = match (result, &call_context.host_context) { + (Activity(activity), _) => Ok(activity), + (IncompleteChain | ActionNotFound(_), HostContext::Init(_)) => { + Err(wasm_error!(WasmErrorInner::HostShortCircuit( + holochain_serialized_bytes::encode( + &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( + UnresolvedDependencies::Activity(author, chain_filter) + )) + .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, + ) + .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? + )) + .into()) + } + (IncompleteChain | ActionNotFound(_), HostContext::Validate(_)) => { + Err(wasm_error!(WasmErrorInner::HostShortCircuit( + holochain_serialized_bytes::encode( + &ExternIO::encode(ValidateCallbackResult::UnresolvedDependencies( + UnresolvedDependencies::Activity(author, chain_filter) + )) + .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, + ) + .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })? + )) + .into()) + } + (IncompleteChain, _) => Err(wasm_error!(WasmErrorInner::Host(format!( + "must_get_agent_activity chain is incomplete for author {} and filter {:?}", + author, chain_filter + ))) + .into()), + (ActionNotFound(missing_action), _) => Err(wasm_error!(WasmErrorInner::Host(format!( + "must_get_agent_activity is missing action {} for author {} and filter {:?}", + missing_action, author, chain_filter + ))) + .into()), + (PositionNotHighest, _) => Err(wasm_error!(WasmErrorInner::Host(format!( + "must_get_agent_activity chain has produced an invalid range because the top of the chain is not the highest action sequence for author {} and filter {:?}", + author, chain_filter + ))) + .into()), + (EmptyRange, _) => Err(wasm_error!(WasmErrorInner::Host(format!( + "must_get_agent_activity chain has produced an invalid range because the range is empty for author {} and filter {:?}", + author, chain_filter + ))) + .into()), }; + result }) } @@ -91,5 +105,101 @@ pub fn must_get_agent_activity( } } -// we are relying on the create tests to show the commit/get round trip -// See commit_entry.rs +#[cfg(test)] +pub mod test { + use crate::core::ribosome::wasm_test::RibosomeTestFixture; + use hdk::prelude::*; + use holochain_wasm_test_utils::TestWasm; + + /// Mimics inside the must_get wasm. + #[derive(serde::Serialize, serde::Deserialize, SerializedBytes, Debug, PartialEq)] + struct Something(#[serde(with = "serde_bytes")] Vec); + + #[tokio::test(flavor = "multi_thread")] + async fn ribosome_must_get_agent_activity() { + observability::test_run().ok(); + let RibosomeTestFixture { + conductor, + alice, + bob, + .. + } = RibosomeTestFixture::new(TestWasm::MustGet).await; + + let a: ActionHash = conductor + .call(&bob, "commit_something", Something(vec![1])) + .await; + + let b: ActionHash = conductor + .call(&bob, "commit_something", Something(vec![2])) + .await; + + let c: ActionHash = conductor + .call(&bob, "commit_something", Something(vec![3])) + .await; + + let filter = ChainFilter::new(a.clone()); + + let _: ActionHash = conductor + .call( + &alice, + "commit_require_agents_chain", + (bob.cell_id().agent_pubkey().clone(), filter.clone()), + ) + .await; + + // Try the same filter but on alice's chain. + // This will fail because alice does not have `a` hash in her chain. + let err: Result = conductor + .call_fallible( + &alice, + "commit_require_agents_chain", + (alice.cell_id().agent_pubkey().clone(), filter), + ) + .await; + + err.unwrap_err(); + + let _: ActionHash = conductor + .call( + &alice, + "commit_require_agents_chain_recursive", + (bob.cell_id().agent_pubkey().clone(), c.clone()), + ) + .await; + + for i in 3..30 { + let _: ActionHash = conductor + .call(&bob, "commit_something", Something(vec![i])) + .await; + } + + let d: ActionHash = conductor + .call(&bob, "commit_something", Something(vec![21])) + .await; + + let _: ActionHash = conductor + .call( + &alice, + "commit_require_agents_chain_recursive", + (bob.cell_id().agent_pubkey().clone(), d.clone()), + ) + .await; + + let filter = ChainFilter::new(c.clone()).until(a.clone()); + + let r: Vec = conductor + .call( + &alice, + "call_must_get_agent_activity", + (bob.cell_id().agent_pubkey().clone(), filter.clone()), + ) + .await; + + assert_eq!( + r.into_iter() + .map(|op| op.action.hashed.hash) + .collect::>(), + vec![c, b, a] + ) + } +} diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_entry.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_entry.rs index 1d601f4891..5268493811 100644 --- a/crates/holochain/src/core/ribosome/host_fn/must_get_entry.rs +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_entry.rs @@ -49,7 +49,7 @@ pub fn must_get_entry<'a>( HostContext::Init(_) => Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( - vec![entry_hash.into()], + UnresolvedDependencies::Hashes(vec![entry_hash.into()],) )) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, ) @@ -60,9 +60,11 @@ pub fn must_get_entry<'a>( Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode( - &ValidateCallbackResult::UnresolvedDependencies(vec![ - entry_hash.into(), - ]), + &ValidateCallbackResult::UnresolvedDependencies( + UnresolvedDependencies::Hashes( + vec![entry_hash.into(),] + ) + ), ) .map_err( |e| -> RuntimeError { wasm_error!(e.into()).into() } diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_valid_record.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_valid_record.rs index 31fe94ef87..575265b26c 100644 --- a/crates/holochain/src/core/ribosome/host_fn/must_get_valid_record.rs +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_valid_record.rs @@ -54,7 +54,7 @@ pub fn must_get_valid_record<'a>( HostContext::Init(_) => Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( - vec![action_hash.into()], + UnresolvedDependencies::Hashes(vec![action_hash.into()],) )) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, ) @@ -65,9 +65,11 @@ pub fn must_get_valid_record<'a>( Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode( - ValidateCallbackResult::UnresolvedDependencies(vec![ - action_hash.into() - ],) + ValidateCallbackResult::UnresolvedDependencies( + UnresolvedDependencies::Hashes( + vec![action_hash.into()], + ) + ) ) .map_err( |e| -> RuntimeError { wasm_error!(e.into()).into() } diff --git a/crates/holochain/src/core/ribosome/real_ribosome.rs b/crates/holochain/src/core/ribosome/real_ribosome.rs index d52efc7deb..d5158802a1 100644 --- a/crates/holochain/src/core/ribosome/real_ribosome.rs +++ b/crates/holochain/src/core/ribosome/real_ribosome.rs @@ -45,6 +45,7 @@ use crate::core::ribosome::host_fn::get_link_details::get_link_details; use crate::core::ribosome::host_fn::get_links::get_links; use crate::core::ribosome::host_fn::hash::hash; use crate::core::ribosome::host_fn::must_get_action::must_get_action; +use crate::core::ribosome::host_fn::must_get_agent_activity::must_get_agent_activity; use crate::core::ribosome::host_fn::must_get_entry::must_get_entry; use crate::core::ribosome::host_fn::must_get_valid_record::must_get_valid_record; use crate::core::ribosome::host_fn::query::query; @@ -563,6 +564,11 @@ impl RealRibosome { .with_host_function(&mut ns, "__must_get_entry", must_get_entry) .with_host_function(&mut ns, "__must_get_action", must_get_action) .with_host_function(&mut ns, "__must_get_valid_record", must_get_valid_record) + .with_host_function( + &mut ns, + "__must_get_agent_activity", + must_get_agent_activity, + ) .with_host_function( &mut ns, "__accept_countersigning_preflight_request", diff --git a/crates/holochain/src/core/workflow/app_validation_workflow.rs b/crates/holochain/src/core/workflow/app_validation_workflow.rs index b2b78cef9f..6e7bf09b22 100644 --- a/crates/holochain/src/core/workflow/app_validation_workflow.rs +++ b/crates/holochain/src/core/workflow/app_validation_workflow.rs @@ -500,6 +500,7 @@ where workspace, network.clone(), (HashSet::::new(), 0), + HashSet::new(), ) .await?; @@ -574,6 +575,7 @@ async fn run_validation_callback_inner( workspace_read: HostFnWorkspaceRead, network: HolochainP2pDna, (mut fetched_deps, recursion_depth): (HashSet, usize), + mut visited_activity: HashSet, ) -> AppValidationResult where R: RibosomeT, @@ -585,14 +587,14 @@ where match validate_result { ValidateResult::Valid => Ok(Outcome::Accepted), ValidateResult::Invalid(reason) => Ok(Outcome::Rejected(reason)), - ValidateResult::UnresolvedDependencies(hashes) => { + ValidateResult::UnresolvedDependencies(UnresolvedDependencies::Hashes(hashes)) => { // This is the base case where we've been recursing and start seeing // all the same hashes unresolved that we already tried to fetch. // At this point we should just give up on the inline recursing and // let some future background task attempt to fetch these hashes // again. Hopefully by then the hashes are fetchable. // 20 is a completely arbitrary max recursion depth. - if recursion_depth < 20 || hashes.iter().all(|hash| fetched_deps.contains(hash)) { + if recursion_depth > 20 || hashes.iter().all(|hash| fetched_deps.contains(hash)) { Ok(Outcome::AwaitingDeps(hashes)) } else { let in_flight = hashes.into_iter().map(|hash| async { @@ -619,6 +621,32 @@ where workspace_read, network, (fetched_deps, recursion_depth + 1), + visited_activity, + ) + .await + } + } + ValidateResult::UnresolvedDependencies(UnresolvedDependencies::Activity( + author, + filter, + )) => { + if recursion_depth > 20 || visited_activity.contains(&filter) { + Ok(Outcome::AwaitingDeps(vec![author.into()])) + } else { + let cascade_workspace = workspace_read.clone(); + let mut cascade = + Cascade::from_workspace_network(&cascade_workspace, network.clone()); + cascade + .must_get_agent_activity(author.clone(), filter.clone()) + .await?; + visited_activity.insert(filter); + run_validation_callback_inner( + invocation, + ribosome, + workspace_read, + network, + (fetched_deps, recursion_depth + 1), + visited_activity, ) .await } diff --git a/crates/holochain/tests/sharded_gossip/mod.rs b/crates/holochain/tests/sharded_gossip/mod.rs index e6a8a4d4e4..5b3253a7c8 100644 --- a/crates/holochain/tests/sharded_gossip/mod.rs +++ b/crates/holochain/tests/sharded_gossip/mod.rs @@ -398,6 +398,9 @@ async fn mock_network_sharded_gossip() { holochain_p2p::WireMessage::GetAgentActivity { .. } => { debug!("get_agent_activity") } + holochain_p2p::WireMessage::MustGetAgentActivity { .. } => { + debug!("must_get_agent_activity") + } holochain_p2p::WireMessage::GetValidationPackage { .. } => { debug!("get_validation_package") } @@ -913,6 +916,9 @@ async fn mock_network_sharding() { holochain_p2p::WireMessage::GetAgentActivity { .. } => { debug!("get_agent_activity") } + holochain_p2p::WireMessage::MustGetAgentActivity { .. } => { + debug!("must_get_agent_activity") + } holochain_p2p::WireMessage::GetValidationPackage { .. } => { debug!("get_validation_package") } diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs index 18a96ac8bc..27af87ea4f 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs @@ -11,6 +11,10 @@ use holochain_sqlite::rusqlite::Transaction; use holochain_sqlite::sql::sql_cell::must_get_agent_activity::*; use holochain_state::prelude::from_blob; use holochain_state::prelude::StateQueryResult; +use holochain_state::scratch::Scratch; +use holochain_types::chain::ChainFilterRange; +use holochain_state::scratch::Scratch; +use holochain_types::chain::ChainFilterRange; use holochain_types::chain::MustGetAgentActivityResponse; use holochain_types::chain::Sequences; use holochain_types::dht_op::DhtOpType; @@ -33,28 +37,39 @@ pub async fn must_get_agent_activity( filter: ChainFilter, ) -> StateQueryResult { let result = env - .async_reader( - // Find the bounds of the range specified in the filter. - move |mut txn| match find_bounds(&mut txn, &author, filter)? { - Sequences::Found(filter_range) => { - // Get the full range of actions from the database. - get_activity(&mut txn, &author, filter_range.range()).map(|a| { - ( - MustGetAgentActivityResponse::Activity(a), - Some(filter_range), - ) - }) - } - // One of the actions specified in the filter does not exist in the database. - Sequences::ChainTopNotFound(a) => { - Ok((MustGetAgentActivityResponse::ChainTopNotFound(a), None)) - } - // The filter specifies a range that is empty. - Sequences::EmptyRange => Ok((MustGetAgentActivityResponse::EmptyRange, None)), - }, - ) + .async_reader(move |mut txn| get_bounded_activity(&mut txn, None, &author, filter)) .await?; - match result { + filter_then_check(result) +} + +pub fn get_bounded_activity( + txn: &mut Transaction, + scratch: Option<&Scratch>, + author: &AgentPubKey, + filter: ChainFilter, +) -> StateQueryResult<(MustGetAgentActivityResponse, Option)> { + // Find the bounds of the range specified in the filter. + match find_bounds(txn, scratch, &author, filter)? { + Sequences::Found(filter_range) => { + // Get the full range of actions from the database. + get_activity(txn, scratch, &author, filter_range.range()).map(|a| { + ( + MustGetAgentActivityResponse::Activity(a), + Some(filter_range), + ) + }) + } + // One of the actions specified in the filter does not exist in the database. + Sequences::ChainTopNotFound(a) => Ok((MustGetAgentActivityResponse::ChainTopNotFound(a), None)), + // The filter specifies a range that is empty. + Sequences::EmptyRange => Ok((MustGetAgentActivityResponse::EmptyRange, None)), + } +} + +pub fn filter_then_check( + response: (MustGetAgentActivityResponse, Option), +) -> StateQueryResult { + match response { (MustGetAgentActivityResponse::Activity(activity), Some(filter_range)) => { // Filter the activity from the database and check the invariants of the // filter still hold. @@ -81,13 +96,21 @@ fn hash_to_seq( /// Find the filters sequence bounds. fn find_bounds( txn: &mut Transaction, + scratch: Option<&Scratch>, author: &AgentPubKey, filter: ChainFilter, ) -> StateQueryResult { let mut statement = txn.prepare(ACTION_HASH_TO_SEQ)?; // Map an action hash to its sequence. - let get_seq = move |hash: &ActionHash| hash_to_seq(&mut statement, hash, author); + let get_seq = move |hash: &ActionHash| { + if let Some(scratch) = scratch { + if let Some(action) = scratch.actions().find(|a| a.action_address() == hash) { + return Ok(Some(action.action().action_seq())); + } + } + hash_to_seq(&mut statement, hash, author) + }; // For all the hashes in the filter, get their sequences. Sequences::find_sequences(filter, get_seq) @@ -97,10 +120,12 @@ fn find_bounds( /// from the database. fn get_activity( txn: &mut Transaction, + scratch: Option<&Scratch>, author: &AgentPubKey, range: &RangeInclusive, ) -> StateQueryResult> { - txn.prepare(MUST_GET_AGENT_ACTIVITY)? + let mut out = txn + .prepare(MUST_GET_AGENT_ACTIVITY)? .query_and_then( named_params! { ":author": author, @@ -114,8 +139,23 @@ fn get_activity( let hash: ActionHash = row.get("hash")?; let hashed = ActionHashed::with_pre_hashed(action, hash); let action = SignedActionHashed::with_presigned(hashed, signature); - Ok(RegisterAgentActivity { action }) + StateQueryResult::Ok(RegisterAgentActivity { action }) }, )? - .collect::, _>>() + .collect::, _>>()?; + if let Some(scratch) = scratch { + let iter = scratch + .actions() + .filter(|a| { + let action = a.action(); + action.author() == author + && action.action_seq() >= *range.start() + && action.action_seq() <= *range.end() + }) + .map(|action| RegisterAgentActivity { + action: action.clone(), + }); + out.extend(iter); + } + Ok(out) } diff --git a/crates/holochain_cascade/src/lib.rs b/crates/holochain_cascade/src/lib.rs index 7a480e7ba2..6ee5c6411c 100644 --- a/crates/holochain_cascade/src/lib.rs +++ b/crates/holochain_cascade/src/lib.rs @@ -137,6 +137,7 @@ where } } } + impl Cascade { /// Constructs an empty [Cascade]. pub fn empty() -> Self { @@ -228,6 +229,29 @@ where Ok(()) } + /// Insert a set of agent activity into the Cache. + fn insert_activity( + txn: &mut Transaction, + ops: Vec, + ) -> CascadeResult<()> { + for op in ops { + let RegisterAgentActivity { + action: + SignedHashed { + hashed: HoloHashed { content, .. }, + signature, + }, + } = op; + let op = + DhtOpHashed::from_content_sync(DhtOp::RegisterAgentActivity(signature, content)); + insert_op(txn, &op)?; + // We set the integrated to for the cache so it can match the + // same query as the vault. This can also be used for garbage collection. + set_when_integrated(txn, op.as_hash(), Timestamp::now())?; + } + Ok(()) + } + async fn merge_ops_into_cache(&mut self, responses: Vec) -> CascadeResult<()> { let cache = ok_or_return!(self.cache.as_mut()); cache @@ -260,6 +284,56 @@ where Ok(()) } + /// Add new activity to the Cache. + async fn add_activity_into_cache( + &mut self, + responses: Vec, + ) -> CascadeResult { + // Choose a response from all the responses. + let response = if responses + .iter() + .zip(responses.iter().skip(1)) + .all(|(a, b)| a == b) + { + // All responses are the same so we can just use the first one. + responses.into_iter().next() + } else { + tracing::info!( + "Got different must_get_agent_activity responses from different authorities" + ); + // TODO: Handle conflict. + // For now try to find one that has got the activity. + responses + .into_iter() + .find(|a| matches!(a, MustGetAgentActivityResponse::Activity(_))) + }; + + let cache = ok_or_return!( + self.cache.as_mut(), + response.unwrap_or(MustGetAgentActivityResponse::IncompleteChain) + ); + + // Commit the activity to the chain. + match response { + Some(MustGetAgentActivityResponse::Activity(activity)) => { + // TODO: Avoid this clone by committing the ops as references to the db. + cache + .async_commit({ + let activity = activity.clone(); + move |txn| { + Self::insert_activity(txn, activity)?; + CascadeResult::Ok(()) + } + }) + .await?; + Ok(MustGetAgentActivityResponse::Activity(activity)) + } + Some(response) => Ok(response), + // Got no responses so the chain is incomplete. + None => Ok(MustGetAgentActivityResponse::IncompleteChain), + } + } + #[instrument(skip(self, options))] pub async fn fetch_record( &mut self, @@ -301,11 +375,24 @@ where Ok(network.get_agent_activity(agent, query, options).await?) } - async fn cascading(&mut self, query: Q) -> CascadeResult - where - Q: Query> + Send + 'static, - ::Output: Send + 'static, - { + #[instrument(skip(self))] + /// Fetch hash bounded agent activity from the network. + async fn fetch_must_get_agent_activity( + &mut self, + author: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> CascadeResult { + let network = ok_or_return!( + self.network.as_mut(), + MustGetAgentActivityResponse::IncompleteChain + ); + let results = network.must_get_agent_activity(author, filter).await?; + + self.add_activity_into_cache(results).await + } + + /// Get all available databases. + async fn get_databases(&self) -> Vec<(PConnPermit, Box)> { let mut conns: Vec<(_, Box)> = Vec::with_capacity(3); if let Some(cache) = self.cache.clone() { conns.push((cache.conn_permit().await, Box::new(cache))); @@ -316,6 +403,15 @@ where if let Some(authored) = self.authored.clone() { conns.push((authored.conn_permit().await, Box::new(authored))); } + conns + } + + async fn cascading(&mut self, query: Q) -> CascadeResult + where + Q: Query> + Send + 'static, + ::Output: Send + 'static, + { + let conns = self.get_databases().await; let scratch = self.scratch.clone(); let results = tokio::task::spawn_blocking(move || { let mut conns = conns @@ -738,13 +834,61 @@ where let results = self.cascading(query).await?; Ok(results) } - + + /// Request a hash bounded chain query. pub async fn must_get_agent_activity( &mut self, author: AgentPubKey, - query: ChainFilter, + filter: ChainFilter, ) -> CascadeResult { - todo!() + // Get tha available databases. + let conns = self.get_databases().await; + let scratch = self.scratch.clone(); + + // For each store try to get the bounded activity. + let results = tokio::task::spawn_blocking({ + let author = author.clone(); + let filter = filter.clone(); + move || { + let mut results = Vec::with_capacity(conns.len() + 1); + for (permit, conn) in conns { + let mut conn = conn.with_permit(permit)?; + let mut txn = conn.transaction().map_err(StateQueryError::from)?; + let r = match &scratch { + Some(scratch) => { + scratch.apply_and_then(|scratch| { + authority::get_agent_activity_query::must_get_agent_activity::get_bounded_activity(&mut txn, Some(scratch), &author, filter.clone()) + })? + }, + None => authority::get_agent_activity_query::must_get_agent_activity::get_bounded_activity(&mut txn, None, &author, filter.clone())? + }; + results.push(r); + } + CascadeResult::Ok(results) + }}) + .await??; + + // For each response run the chain filter and check the invariants hold. + for response in results { + let result = + authority::get_agent_activity_query::must_get_agent_activity::filter_then_check( + response, + )?; + + // Short circuit if we have a result. + if matches!(result, MustGetAgentActivityResponse::Activity(_)) { + return Ok(result); + } + } + + // If we are the authority then don't go to the network. + let i_am_authority = self.am_i_an_authority(author.clone().into()).await?; + if i_am_authority { + Ok(MustGetAgentActivityResponse::IncompleteChain) + } else { + self.fetch_must_get_agent_activity(author.clone(), filter) + .await + } } #[instrument(skip(self, agent, query, options))] diff --git a/crates/holochain_cascade/src/test_utils.rs b/crates/holochain_cascade/src/test_utils.rs index 3587bc99b2..b57681f2a7 100644 --- a/crates/holochain_cascade/src/test_utils.rs +++ b/crates/holochain_cascade/src/test_utils.rs @@ -28,7 +28,9 @@ use holochain_state::prelude::insert_op_lite; use holochain_state::prelude::test_in_mem_db; use holochain_state::prelude::Query; use holochain_state::prelude::Txn; +use holochain_state::scratch::SyncScratch; use holochain_types::activity::AgentActivityResponse; +use holochain_types::chain::MustGetAgentActivityResponse; use holochain_types::db::DbRead; use holochain_types::db::DbWrite; use holochain_types::dht_op::DhtOpHashed; @@ -177,6 +179,25 @@ impl HolochainP2pDnaT for PassThroughNetwork { Ok(out) } + async fn must_get_agent_activity( + &self, + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> actor::HolochainP2pResult> { + let mut out = Vec::new(); + for env in &self.envs { + let r = authority::handle_must_get_agent_activity( + env.clone(), + agent.clone(), + filter.clone(), + ) + .await + .map_err(|e| HolochainP2pError::Other(e.into()))?; + out.push(r); + } + Ok(out) + } + async fn authority_for_hash( &self, _dht_hash: holo_hash::AnyDhtHash, @@ -355,6 +376,18 @@ impl HolochainP2pDnaT for MockNetwork { .await } + async fn must_get_agent_activity( + &self, + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> actor::HolochainP2pResult> { + self.0 + .lock() + .await + .must_get_agent_activity(agent, filter) + .await + } + async fn authority_for_hash( &self, dht_hash: holo_hash::AnyDhtHash, @@ -490,13 +523,13 @@ pub fn commit_chain( op }) .collect::>(); - (a, d) + d }) .collect(); let db = test_in_mem_db(db_kind); db.test_commit(|txn| { - for (_, data) in &data { + for data in &data { for op in data { let op_light = DhtOpLight::RegisterAgentActivity( op.action.action_address().clone(), @@ -529,3 +562,26 @@ pub fn commit_chain( }); db } + +pub fn commit_scratch(scratch: SyncScratch, chain: Vec<(AgentPubKey, Vec)>) { + let data = chain.into_iter().map(|(a, c)| { + let d = chain_to_ops(c) + .into_iter() + .map(|mut op| { + *op.action.hashed.content.author_mut() = a.clone(); + op + }) + .collect::>(); + d + }); + + scratch + .apply(|scratch| { + for data in data { + for op in data { + scratch.add_action(op.action, Default::default()); + } + } + }) + .unwrap(); +} diff --git a/crates/holochain_cascade/tests/get_activity.rs b/crates/holochain_cascade/tests/get_activity.rs index cd236f7f8d..ec450b9928 100644 --- a/crates/holochain_cascade/tests/get_activity.rs +++ b/crates/holochain_cascade/tests/get_activity.rs @@ -5,11 +5,12 @@ use holo_hash::AgentPubKey; use holo_hash::DnaHash; use holochain_cascade::test_utils::*; use holochain_cascade::Cascade; +use holochain_sqlite::db::DbKindAuthored; use holochain_sqlite::db::DbKindCache; use holochain_sqlite::db::DbKindDht; use holochain_state::prelude::test_cache_db; use holochain_state::prelude::test_dht_db; -use holochain_state::prelude::test_in_mem_db; +use holochain_state::scratch::Scratch; use holochain_types::activity::*; use holochain_types::chain::MustGetAgentActivityResponse; use holochain_types::test_utils::chain::*; @@ -66,22 +67,61 @@ async fn get_activity() { assert_eq!(r, expected); } +#[derive(Default)] +struct Data { + scratch: Vec<(AgentPubKey, Vec)>, + authored: Vec<(AgentPubKey, Vec)>, + cache: Vec<(AgentPubKey, Vec)>, + authority: Vec<(AgentPubKey, Vec)>, +} + +#[test_case( + Data { authority: agent_chain(&[(0, 0..3)]), ..Default::default() }, + agent_hash(&[0]), ChainFilter::new(action_hash(&[1])) + => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 2; "1 to genesis with authority 0 till 2")] +#[test_case( + Data { cache: agent_chain(&[(0, 0..3)]), ..Default::default() }, + agent_hash(&[0]), ChainFilter::new(action_hash(&[1])) + => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 2; "1 to genesis with cache 0 till 2")] #[test_case( - agent_chain(&[(0, 0..3), (0, 5..10)]), agent_hash(&[0]), ChainFilter::new(action_hash(&[8])) - => MustGetAgentActivityResponse::IncompleteChain ; "8 to genesis with 0 till 2 and 5 till 9")] + Data { scratch: agent_chain(&[(0, 0..3)]), ..Default::default() }, + agent_hash(&[0]), ChainFilter::new(action_hash(&[1])) + => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 2; "1 to genesis with scratch 0 till 2")] +#[test_case( + Data { authored: agent_chain(&[(0, 0..3)]), scratch: agent_chain(&[(0, 3..6)]), ..Default::default() }, + agent_hash(&[0]), ChainFilter::new(action_hash(&[4])).take(4).until(action_hash(&[0])) + => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 4; "4 take 4 until 0 with authored 0 till 2 and scratch 3 till 5")] #[tokio::test(flavor = "multi_thread")] async fn test_must_get_agent_activity( - chain: Vec<(AgentPubKey, Vec)>, + data: Data, author: AgentPubKey, filter: ChainFilter, ) -> MustGetAgentActivityResponse { + let Data { + scratch, + authored, + cache, + authority, + } = data; let authority = commit_chain( DbKindDht(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), - chain, + authority, + ); + let cache = commit_chain( + DbKindCache(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), + cache, + ); + let authored = commit_chain( + DbKindAuthored(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), + authored, ); - let cache = test_in_mem_db(DbKindCache(Arc::new(DnaHash::from_raw_36(vec![0; 36])))); + let sync_scratch = Scratch::new().into_sync(); + commit_scratch(sync_scratch.clone(), scratch); let network = PassThroughNetwork::authority_for_nothing(vec![authority.into()]); - let mut cascade = Cascade::empty().with_network(network, cache); + let mut cascade = Cascade::empty() + .with_scratch(sync_scratch) + .with_authored(authored.into()) + .with_network(network, cache); cascade .must_get_agent_activity(author, filter) .await diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index 3a32ca7804..dc4bd5102d 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -10,7 +10,7 @@ use holochain_serialized_bytes::prelude::*; #[cfg(test)] mod test; -#[derive(Serialize, Deserialize, SerializedBytes, Debug, PartialEq, Eq, Clone)] +#[derive(Serialize, Deserialize, SerializedBytes, Debug, PartialEq, Eq, Hash, Clone)] /// Filter source chain items. /// Starting from some chain position given as an [`ActionHash`] /// the chain is walked backwards to genesis. @@ -39,6 +39,28 @@ pub enum ChainFilters { Both(u32, HashSet), } +/// Create a deterministic hash to compare filters. +impl core::hash::Hash for ChainFilters { + fn hash(&self, state: &mut H) { + core::mem::discriminant(self).hash(state); + match self { + ChainFilters::ToGenesis => (), + ChainFilters::Take(t) => t.hash(state), + ChainFilters::Until(u) => { + let mut u: Vec<_> = u.iter().collect(); + u.sort_unstable(); + u.hash(state); + } + ChainFilters::Both(t, u) => { + let mut u: Vec<_> = u.iter().collect(); + u.sort_unstable(); + u.hash(state); + t.hash(state); + } + } + } +} + #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] /// Input to the `must_get_agent_activity` call. pub struct MustGetAgentActivityInput { diff --git a/crates/holochain_integrity_types/src/prelude.rs b/crates/holochain_integrity_types/src/prelude.rs index f73630e0c5..d8506359dd 100644 --- a/crates/holochain_integrity_types/src/prelude.rs +++ b/crates/holochain_integrity_types/src/prelude.rs @@ -5,6 +5,7 @@ pub use crate::action::*; pub use crate::capability::*; pub use crate::countersigning::*; pub use crate::entry::*; +pub use crate::chain::*; pub use crate::entry_def::*; pub use crate::genesis::*; pub use crate::hash::*; diff --git a/crates/holochain_integrity_types/src/validate.rs b/crates/holochain_integrity_types/src/validate.rs index aa09649dd8..5a4432facf 100644 --- a/crates/holochain_integrity_types/src/validate.rs +++ b/crates/holochain_integrity_types/src/validate.rs @@ -1,13 +1,24 @@ +use holo_hash::AgentPubKey; use holo_hash::AnyDhtHash; use holochain_serialized_bytes::prelude::*; +use crate::chain::ChainFilter; + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerializedBytes)] pub enum ValidateCallbackResult { Valid, Invalid(String), /// Subconscious needs to map this to either pending or abandoned based on context that the /// wasm can't possibly have. - UnresolvedDependencies(Vec), + UnresolvedDependencies(UnresolvedDependencies), +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +/// Unresolved dependencies that are either a set of hashes +/// or an agent activity query. +pub enum UnresolvedDependencies { + Hashes(Vec), + Activity(AgentPubKey, ChainFilter), } /// The level of validation package required by diff --git a/crates/holochain_p2p/src/lib.rs b/crates/holochain_p2p/src/lib.rs index e14bbf4800..0afec4b683 100644 --- a/crates/holochain_p2p/src/lib.rs +++ b/crates/holochain_p2p/src/lib.rs @@ -111,6 +111,13 @@ pub trait HolochainP2pDnaT { options: actor::GetActivityOptions, ) -> actor::HolochainP2pResult>>; + /// Get agent deterministic activity from the DHT. + async fn must_get_agent_activity( + &self, + author: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> actor::HolochainP2pResult>; + /// Send a validation receipt to a remote node. async fn send_validation_receipt( &self, @@ -297,6 +304,16 @@ impl HolochainP2pDnaT for HolochainP2pDna { .await } + async fn must_get_agent_activity( + &self, + author: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> actor::HolochainP2pResult> { + self.sender + .must_get_agent_activity((*self.dna_hash).clone(), author, filter) + .await + } + /// Send a validation receipt to a remote node. async fn send_validation_receipt( &self, diff --git a/crates/holochain_p2p/src/spawn/actor.rs b/crates/holochain_p2p/src/spawn/actor.rs index c2e7e1a3e8..578529817c 100644 --- a/crates/holochain_p2p/src/spawn/actor.rs +++ b/crates/holochain_p2p/src/spawn/actor.rs @@ -225,6 +225,23 @@ impl WrapEvtSender { ) } + fn must_get_agent_activity( + &self, + dna_hash: DnaHash, + to_agent: AgentPubKey, + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> impl Future> + 'static + Send + { + timing_trace!( + { + self.0 + .must_get_agent_activity(dna_hash, to_agent, agent, filter) + }, + "(hp2p:handle) must_get_agent_activity", + ) + } + fn validation_receipt_received( &self, dna_hash: DnaHash, @@ -453,6 +470,27 @@ impl HolochainP2pActor { .into()) } + /// receiving an incoming must_get_agent_activity request from a remote node + fn handle_incoming_must_get_agent_activity( + &mut self, + dna_hash: DnaHash, + to_agent: AgentPubKey, + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> kitsune_p2p::actor::KitsuneP2pHandlerResult> { + let evt_sender = self.evt_sender.clone(); + Ok(async move { + let res = evt_sender + .must_get_agent_activity(dna_hash, to_agent, agent, filter) + .await; + res.and_then(|r| Ok(SerializedBytes::try_from(r)?)) + .map_err(kitsune_p2p::KitsuneP2pError::from) + .map(|res| UnsafeBytes::from(res).into()) + } + .boxed() + .into()) + } + /// receiving an incoming publish from a remote node fn handle_incoming_publish( &mut self, @@ -674,6 +712,9 @@ impl kitsune_p2p::event::KitsuneP2pEventHandler for HolochainP2pActor { query, options, } => self.handle_incoming_get_agent_activity(space, to_agent, agent, query, options), + crate::wire::WireMessage::MustGetAgentActivity { agent, filter } => { + self.handle_incoming_must_get_agent_activity(space, to_agent, agent, filter) + } // holochain_p2p never publishes via request // these only occur on broadcasts crate::wire::WireMessage::Publish { .. } => { @@ -718,6 +759,7 @@ impl kitsune_p2p::event::KitsuneP2pEventHandler for HolochainP2pActor { | crate::wire::WireMessage::GetMeta { .. } | crate::wire::WireMessage::GetLinks { .. } | crate::wire::WireMessage::GetAgentActivity { .. } + | crate::wire::WireMessage::MustGetAgentActivity { .. } | crate::wire::WireMessage::GetValidationPackage { .. } | crate::wire::WireMessage::ValidationReceipt { .. } => { Err(HolochainP2pError::invalid_p2p_message( @@ -1153,6 +1195,44 @@ impl HolochainP2pHandler for HolochainP2pActor { .into()) } + #[tracing::instrument(skip(self), level = "trace")] + fn handle_must_get_agent_activity( + &mut self, + dna_hash: DnaHash, + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> HolochainP2pHandlerResult> { + let space = dna_hash.into_kitsune(); + // Convert the agent key to an any dht hash so it can be used + // as the basis for sending this request + let agent_hash: AnyDhtHash = agent.clone().into(); + let basis = agent_hash.to_kitsune(); + + let payload = crate::wire::WireMessage::must_get_agent_activity(agent, filter).encode()?; + + let kitsune_p2p = self.kitsune_p2p.clone(); + let tuning_params = self.tuning_params.clone(); + Ok(async move { + let mut input = + kitsune_p2p::actor::RpcMulti::new(&tuning_params, space, basis, payload); + // TODO - We're just targeting a single remote node for now + // without doing any pagination / etc... + // Setting up RpcMulti to act like RpcSingle + input.max_remote_agent_count = 1; + let result = kitsune_p2p.rpc_multi(input).await?; + + let mut out = Vec::new(); + for item in result { + let kitsune_p2p::actor::RpcMultiResponse { response, .. } = item; + out.push(SerializedBytes::from(UnsafeBytes::from(response)).try_into()?); + } + + Ok(out) + } + .boxed() + .into()) + } + #[tracing::instrument(skip(self), level = "trace")] fn handle_send_validation_receipt( &mut self, diff --git a/crates/holochain_p2p/src/test.rs b/crates/holochain_p2p/src/test.rs index 8572d2456d..b8af3cb09b 100644 --- a/crates/holochain_p2p/src/test.rs +++ b/crates/holochain_p2p/src/test.rs @@ -102,6 +102,14 @@ impl HolochainP2pHandler for StubNetwork { ) -> HolochainP2pHandlerResult>> { Err("stub".into()) } + fn handle_must_get_agent_activity( + &mut self, + dna_hash: DnaHash, + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> HolochainP2pHandlerResult> { + Err("stub".into()) + } fn handle_send_validation_receipt( &mut self, dna_hash: DnaHash, diff --git a/crates/holochain_p2p/src/types/actor.rs b/crates/holochain_p2p/src/types/actor.rs index 526528a87c..f9afd57f14 100644 --- a/crates/holochain_p2p/src/types/actor.rs +++ b/crates/holochain_p2p/src/types/actor.rs @@ -280,6 +280,13 @@ ghost_actor::ghost_chan! { options: GetActivityOptions, ) -> Vec>; + /// A remote node is requesting agent activity from us. + fn must_get_agent_activity( + dna_hash: DnaHash, + author: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> Vec; + /// Send a validation receipt to a remote node. fn send_validation_receipt(dna_hash: DnaHash, to_agent: AgentPubKey, receipt: SerializedBytes) -> (); diff --git a/crates/holochain_p2p/src/types/event.rs b/crates/holochain_p2p/src/types/event.rs index ecf9b24bf0..abb6f97224 100644 --- a/crates/holochain_p2p/src/types/event.rs +++ b/crates/holochain_p2p/src/types/event.rs @@ -223,6 +223,14 @@ ghost_actor::ghost_chan! { options: GetActivityOptions, ) -> AgentActivityResponse; + /// A remote node is requesting agent activity from us. + fn must_get_agent_activity( + dna_hash: DnaHash, + to_agent: AgentPubKey, + author: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> MustGetAgentActivityResponse; + /// A remote node has sent us a validation receipt. fn validation_receipt_received( dna_hash: DnaHash, @@ -277,6 +285,7 @@ macro_rules! match_p2p_evt { HolochainP2pEvent::GetMeta { $i, .. } => { $($t)* } HolochainP2pEvent::GetLinks { $i, .. } => { $($t)* } HolochainP2pEvent::GetAgentActivity { $i, .. } => { $($t)* } + HolochainP2pEvent::MustGetAgentActivity { $i, .. } => { $($t)* } HolochainP2pEvent::ValidationReceiptReceived { $i, .. } => { $($t)* } HolochainP2pEvent::SignNetworkData { $i, .. } => { $($t)* } HolochainP2pEvent::CountersigningSessionNegotiation { $i, .. } => { $($t)* } diff --git a/crates/holochain_p2p/src/types/mock_network.rs b/crates/holochain_p2p/src/types/mock_network.rs index 47b9c06234..4f611071a0 100644 --- a/crates/holochain_p2p/src/types/mock_network.rs +++ b/crates/holochain_p2p/src/types/mock_network.rs @@ -347,6 +347,7 @@ impl HolochainP2pMockMsg { | crate::wire::WireMessage::GetMeta { .. } | crate::wire::WireMessage::GetLinks { .. } | crate::wire::WireMessage::GetAgentActivity { .. } + | crate::wire::WireMessage::MustGetAgentActivity { .. } | crate::wire::WireMessage::GetValidationPackage { .. } => next_msg_id().as_req(), crate::wire::WireMessage::Publish { .. } | crate::wire::WireMessage::CountersigningSessionNegotiation { .. } => { @@ -374,6 +375,7 @@ impl HolochainP2pMockMsg { | crate::wire::WireMessage::GetMeta { .. } | crate::wire::WireMessage::GetLinks { .. } | crate::wire::WireMessage::GetAgentActivity { .. } + | crate::wire::WireMessage::MustGetAgentActivity { .. } | crate::wire::WireMessage::GetValidationPackage { .. } => true, crate::wire::WireMessage::Publish { .. } | crate::wire::WireMessage::CountersigningSessionNegotiation { .. } => false, diff --git a/crates/holochain_p2p/src/types/wire.rs b/crates/holochain_p2p/src/types/wire.rs index 872bffd2b2..086c81624d 100644 --- a/crates/holochain_p2p/src/types/wire.rs +++ b/crates/holochain_p2p/src/types/wire.rs @@ -60,6 +60,10 @@ pub enum WireMessage { query: ChainQueryFilter, options: event::GetActivityOptions, }, + MustGetAgentActivity { + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + }, GetValidationPackage { action_hash: ActionHash, }, @@ -140,6 +144,14 @@ impl WireMessage { options, } } + + pub fn must_get_agent_activity( + agent: AgentPubKey, + filter: holochain_zome_types::chain::ChainFilter, + ) -> WireMessage { + Self::MustGetAgentActivity { agent, filter } + } + pub fn get_validation_package(action_hash: ActionHash) -> WireMessage { Self::GetValidationPackage { action_hash } } diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index 46cc581e22..fd5d8513ed 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -6,6 +6,7 @@ use crate::activity::AgentActivityResponse; use crate::activity::ChainItems; use holo_hash::ActionHash; use holo_hash::AgentPubKey; +use holochain_serialized_bytes::prelude::*; use holochain_zome_types::prelude::ChainStatus; use holochain_zome_types::ChainFilter; use holochain_zome_types::ChainFilters; @@ -87,7 +88,7 @@ pub enum Sequences { EmptyRange, } -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq, SerializedBytes, Serialize, Deserialize)] /// Response to a `must_get_agent_activity` call. pub enum MustGetAgentActivityResponse { /// The activity was found. diff --git a/crates/holochain_zome_types/src/init.rs b/crates/holochain_zome_types/src/init.rs index b376275246..0323ef5188 100644 --- a/crates/holochain_zome_types/src/init.rs +++ b/crates/holochain_zome_types/src/init.rs @@ -1,7 +1,7 @@ //! Items related to the DNA initialization callback. use crate::CallbackResult; -use holo_hash::AnyDhtHash; +use holochain_integrity_types::UnresolvedDependencies; use holochain_serialized_bytes::prelude::*; use holochain_wasmer_common::*; @@ -20,7 +20,7 @@ use holochain_wasmer_common::*; pub enum InitCallbackResult { Pass, Fail(String), - UnresolvedDependencies(Vec), + UnresolvedDependencies(UnresolvedDependencies), } impl CallbackResult for InitCallbackResult { diff --git a/crates/holochain_zome_types/src/zome_io.rs b/crates/holochain_zome_types/src/zome_io.rs index ef159a56ea..35e2cc52f3 100644 --- a/crates/holochain_zome_types/src/zome_io.rs +++ b/crates/holochain_zome_types/src/zome_io.rs @@ -105,7 +105,7 @@ wasm_io_types! { // Retrieve an action from the DHT or short circuit. fn must_get_action (zt::entry::MustGetActionInput) -> zt::SignedActionHashed; - + fn must_get_agent_activity (zt::chain::MustGetAgentActivityInput) -> Vec; // Query the source chain for data. diff --git a/crates/mock_hdi/src/lib.rs b/crates/mock_hdi/src/lib.rs index c8eb05d3a3..dad4fbb4bb 100644 --- a/crates/mock_hdi/src/lib.rs +++ b/crates/mock_hdi/src/lib.rs @@ -50,6 +50,10 @@ use hdi::prelude::*; &self, must_get_valid_record_input: MustGetValidRecordInput, ) -> ExternResult; + fn must_get_agent_activity( + &self, + input: MustGetAgentActivityInput, + ) -> ExternResult>; // Info fn dna_info(&self, dna_info_input: ()) -> ExternResult; fn zome_info(&self, zome_info_input: ()) -> ExternResult; diff --git a/crates/test_utils/wasm/wasm_workspace/must_get/src/coordinator.rs b/crates/test_utils/wasm/wasm_workspace/must_get/src/coordinator.rs index d610929e63..6570ed9ae9 100644 --- a/crates/test_utils/wasm/wasm_workspace/must_get/src/coordinator.rs +++ b/crates/test_utils/wasm/wasm_workspace/must_get/src/coordinator.rs @@ -1,5 +1,10 @@ use hdk::prelude::*; +use crate::integrity::AgentsChain; +use crate::integrity::AgentsChainRec; +use crate::integrity::EntryTypes; +use crate::integrity::Something; + #[hdk_extern] fn must_get_valid_record(action_hash: ActionHash) -> ExternResult { hdk::prelude::must_get_valid_record(action_hash) @@ -14,3 +19,32 @@ fn must_get_action(action_hash: ActionHash) -> ExternResult fn must_get_entry(entry_hash: EntryHash) -> ExternResult { hdk::prelude::must_get_entry(entry_hash) } + +#[hdk_extern] +fn call_must_get_agent_activity( + input: (AgentPubKey, ChainFilter), +) -> ExternResult> { + let (author, filter) = input; + must_get_agent_activity(author, filter) +} + +#[hdk_extern] +fn commit_something(something: Something) -> ExternResult { + create_entry(EntryTypes::Something(something)) +} + +#[hdk_extern] +fn commit_require_agents_chain(input: (AgentPubKey, ChainFilter)) -> ExternResult { + let (author, filter) = input; + create_entry(EntryTypes::AgentsChain(AgentsChain(author, filter))) +} + +#[hdk_extern] +fn commit_require_agents_chain_recursive( + input: (AgentPubKey, ActionHash), +) -> ExternResult { + let (author, chain_top) = input; + create_entry(EntryTypes::AgentsChainRec(AgentsChainRec( + author, chain_top, + ))) +} diff --git a/crates/test_utils/wasm/wasm_workspace/must_get/src/integrity.rs b/crates/test_utils/wasm/wasm_workspace/must_get/src/integrity.rs index b53af5f38d..9472cd57c6 100644 --- a/crates/test_utils/wasm/wasm_workspace/must_get/src/integrity.rs +++ b/crates/test_utils/wasm/wasm_workspace/must_get/src/integrity.rs @@ -1,11 +1,68 @@ use hdi::prelude::*; +use hdk::prelude::ChainFilter; #[hdk_entry_helper] #[derive(Clone)] pub struct Something(#[serde(with = "serde_bytes")] pub Vec); +#[hdk_entry_helper] +pub struct AgentsChain(pub AgentPubKey, pub ChainFilter); + +#[hdk_entry_helper] +pub struct AgentsChainRec(pub AgentPubKey, pub ActionHash); + #[hdk_entry_defs] #[unit_enum(EntryTypesUnit)] pub enum EntryTypes { Something(Something), + AgentsChain(AgentsChain), + AgentsChainRec(AgentsChainRec), +} + +#[hdk_extern] +fn validate(op: Op) -> ExternResult { + match op.to_type::<_, ()>()? { + OpType::StoreEntry(e) => match e { + OpEntry::CreateEntry { + entry_type: EntryTypes::AgentsChain(AgentsChain(author, filter)), + .. + } => { + must_get_agent_activity(author, filter)?; + return Ok(ValidateCallbackResult::Valid); + } + OpEntry::CreateEntry { + entry_type: EntryTypes::AgentsChainRec(AgentsChainRec(author, chain_top)), + .. + } => { + let mut filter = ChainFilter::new(chain_top).take(2); + loop { + let chain = must_get_agent_activity(author.clone(), filter.clone())?; + if chain.len() > 2 { + return Ok(ValidateCallbackResult::Invalid( + "Filter returned greater than 2".to_string(), + )); + } + match chain.last() { + Some(op) => { + if op.action.action().action_seq() == 0 { + return Ok(ValidateCallbackResult::Valid); + } else { + filter = + ChainFilter::new(op.action.action_address().clone()).take(2); + } + } + None => { + return Ok(ValidateCallbackResult::Invalid( + "Could not recurse to bottom of agents chain".to_string(), + )) + } + } + } + } + _ => (), + }, + _ => (), + } + + Ok(ValidateCallbackResult::Valid) } From 6a0a7afbe0462c88089065821c3fbb4ac8bdd575 Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 28 Jul 2022 15:14:16 +1000 Subject: [PATCH 035/111] clippy --- crates/hdi/src/chain.rs | 4 +-- crates/hdi/src/prelude.rs | 2 +- .../must_get_agent_activity.rs | 4 +-- crates/holochain_cascade/src/test_utils.rs | 10 +++---- .../holochain_cascade/tests/get_activity.rs | 24 ++++++++++++----- crates/holochain_integrity_types/src/chain.rs | 26 ++++++++++++++++++- .../holochain_integrity_types/src/prelude.rs | 2 +- 7 files changed, 53 insertions(+), 19 deletions(-) diff --git a/crates/hdi/src/chain.rs b/crates/hdi/src/chain.rs index f93b5da28a..cca89fb96c 100644 --- a/crates/hdi/src/chain.rs +++ b/crates/hdi/src/chain.rs @@ -5,12 +5,12 @@ use crate::prelude::*; use holo_hash::AgentPubKey; -/// The chain this filter produces on the given agents chain +/// The chain this filter produces on the given agents chain /// must be fetched before the validation can be completed. /// This allows for deterministic validation of chain activity by /// making a hash bounded range of an agents chain into a dependency /// for something that is being validated. -/// +/// /// Check the [`ChainFilter`] docs for more info. pub fn must_get_agent_activity( author: AgentPubKey, diff --git a/crates/hdi/src/prelude.rs b/crates/hdi/src/prelude.rs index 1679047931..7b47fd0986 100644 --- a/crates/hdi/src/prelude.rs +++ b/crates/hdi/src/prelude.rs @@ -1,10 +1,10 @@ pub use crate::app_entry; +pub use crate::chain::must_get_agent_activity; pub use crate::ed25519::verify_signature; pub use crate::ed25519::verify_signature_raw; pub use crate::entry::must_get_action; pub use crate::entry::must_get_entry; pub use crate::entry::must_get_valid_record; -pub use crate::chain::must_get_agent_activity; pub use crate::entry_defs; pub use crate::hash::*; pub use crate::hdi::*; diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs index 27af87ea4f..f73d724f73 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs @@ -49,10 +49,10 @@ pub fn get_bounded_activity( filter: ChainFilter, ) -> StateQueryResult<(MustGetAgentActivityResponse, Option)> { // Find the bounds of the range specified in the filter. - match find_bounds(txn, scratch, &author, filter)? { + match find_bounds(txn, scratch, author, filter)? { Sequences::Found(filter_range) => { // Get the full range of actions from the database. - get_activity(txn, scratch, &author, filter_range.range()).map(|a| { + get_activity(txn, scratch, author, filter_range.range()).map(|a| { ( MustGetAgentActivityResponse::Activity(a), Some(filter_range), diff --git a/crates/holochain_cascade/src/test_utils.rs b/crates/holochain_cascade/src/test_utils.rs index b57681f2a7..076b371ee8 100644 --- a/crates/holochain_cascade/src/test_utils.rs +++ b/crates/holochain_cascade/src/test_utils.rs @@ -516,14 +516,13 @@ pub fn commit_chain( let data: Vec<_> = chain .into_iter() .map(|(a, c)| { - let d = chain_to_ops(c) + chain_to_ops(c) .into_iter() .map(|mut op| { *op.action.hashed.content.author_mut() = a.clone(); op }) - .collect::>(); - d + .collect::>() }) .collect(); let db = test_in_mem_db(db_kind); @@ -565,14 +564,13 @@ pub fn commit_chain( pub fn commit_scratch(scratch: SyncScratch, chain: Vec<(AgentPubKey, Vec)>) { let data = chain.into_iter().map(|(a, c)| { - let d = chain_to_ops(c) + chain_to_ops(c) .into_iter() .map(|mut op| { *op.action.hashed.content.author_mut() = a.clone(); op }) - .collect::>(); - d + .collect::>() }); scratch diff --git a/crates/holochain_cascade/tests/get_activity.rs b/crates/holochain_cascade/tests/get_activity.rs index ec450b9928..188b2ef9ac 100644 --- a/crates/holochain_cascade/tests/get_activity.rs +++ b/crates/holochain_cascade/tests/get_activity.rs @@ -69,7 +69,7 @@ async fn get_activity() { #[derive(Default)] struct Data { - scratch: Vec<(AgentPubKey, Vec)>, + scratch: Option)>>, authored: Vec<(AgentPubKey, Vec)>, cache: Vec<(AgentPubKey, Vec)>, authority: Vec<(AgentPubKey, Vec)>, @@ -84,13 +84,17 @@ struct Data { agent_hash(&[0]), ChainFilter::new(action_hash(&[1])) => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 2; "1 to genesis with cache 0 till 2")] #[test_case( - Data { scratch: agent_chain(&[(0, 0..3)]), ..Default::default() }, + Data { scratch: Some(agent_chain(&[(0, 0..3)])), ..Default::default() }, agent_hash(&[0]), ChainFilter::new(action_hash(&[1])) => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 2; "1 to genesis with scratch 0 till 2")] #[test_case( - Data { authored: agent_chain(&[(0, 0..3)]), scratch: agent_chain(&[(0, 3..6)]), ..Default::default() }, + Data { authored: agent_chain(&[(0, 0..3)]), scratch: Some(agent_chain(&[(0, 3..6)])), ..Default::default() }, agent_hash(&[0]), ChainFilter::new(action_hash(&[4])).take(4).until(action_hash(&[0])) => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 4; "4 take 4 until 0 with authored 0 till 2 and scratch 3 till 5")] +#[test_case( + Data { authored: agent_chain(&[(0, 0..6)]), ..Default::default() }, + agent_hash(&[0]), ChainFilter::new(action_hash(&[4])).take(4).until(action_hash(&[0])) + => matches MustGetAgentActivityResponse::Activity(a) if a.len() == 4; "4 take 4 until 0 with authored 0 till 5")] #[tokio::test(flavor = "multi_thread")] async fn test_must_get_agent_activity( data: Data, @@ -115,13 +119,21 @@ async fn test_must_get_agent_activity( DbKindAuthored(Arc::new(DnaHash::from_raw_36(vec![0; 36]))), authored, ); - let sync_scratch = Scratch::new().into_sync(); - commit_scratch(sync_scratch.clone(), scratch); + let sync_scratch = match scratch { + Some(scratch) => { + let sync_scratch = Scratch::new().into_sync(); + commit_scratch(sync_scratch.clone(), scratch); + Some(sync_scratch) + } + None => None, + }; let network = PassThroughNetwork::authority_for_nothing(vec![authority.into()]); let mut cascade = Cascade::empty() - .with_scratch(sync_scratch) .with_authored(authored.into()) .with_network(network, cache); + if let Some(sync_scratch) = sync_scratch { + cascade = cascade.with_scratch(sync_scratch); + } cascade .must_get_agent_activity(author, filter) .await diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index dc4bd5102d..464fbf141a 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -24,7 +24,7 @@ pub struct ChainFilter { pub filters: ChainFilters, } -#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] +#[derive(Serialize, Deserialize, Debug, Eq, Clone)] /// Specify which [`Action`](crate::action::Action)s to allow through /// this filter. pub enum ChainFilters { @@ -61,6 +61,30 @@ impl core::hash::Hash for ChainFilters { } } +/// Implement a deterministic partial eq to compare ChainFilters. +impl core::cmp::PartialEq for ChainFilters { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + (Self::Take(l0), Self::Take(r0)) => l0 == r0, + (Self::Until(a), Self::Until(b)) => { + let mut a: Vec<_> = a.iter().collect(); + let mut b: Vec<_> = b.iter().collect(); + a.sort_unstable(); + b.sort_unstable(); + a == b + } + (Self::Both(l0, a), Self::Both(r0, b)) => { + let mut a: Vec<_> = a.iter().collect(); + let mut b: Vec<_> = b.iter().collect(); + a.sort_unstable(); + b.sort_unstable(); + l0 == r0 && a == b + } + _ => core::mem::discriminant(self) == core::mem::discriminant(other), + } + } +} + #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] /// Input to the `must_get_agent_activity` call. pub struct MustGetAgentActivityInput { diff --git a/crates/holochain_integrity_types/src/prelude.rs b/crates/holochain_integrity_types/src/prelude.rs index d8506359dd..01ae2207aa 100644 --- a/crates/holochain_integrity_types/src/prelude.rs +++ b/crates/holochain_integrity_types/src/prelude.rs @@ -3,9 +3,9 @@ pub use crate::action::conversions::*; pub use crate::action::*; pub use crate::capability::*; +pub use crate::chain::*; pub use crate::countersigning::*; pub use crate::entry::*; -pub use crate::chain::*; pub use crate::entry_def::*; pub use crate::genesis::*; pub use crate::hash::*; From 0a828a1028e0022d86a16f4f812dc40adbd55f52 Mon Sep 17 00:00:00 2001 From: freesig Date: Fri, 29 Jul 2022 15:33:02 +1000 Subject: [PATCH 036/111] changelogs --- crates/hdi/CHANGELOG.md | 12 ++++++++++++ crates/holochain_integrity_types/CHANGELOG.md | 2 ++ 2 files changed, 14 insertions(+) diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index f73642c464..e6393e4964 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -4,6 +4,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +- Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [#1503](https://github.com/holochain/holochain/pull/1502) + +## 0.0.18 + +## 0.0.17 + +## 0.0.16 + +- Docs: Add `OpType` helper example to HDI validation section [\#1505](https://github.com/holochain/holochain/pull/1505) + ## 0.0.18 ## 0.0.17 @@ -12,6 +22,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Docs: Add `OpType` helper example to HDI validation section [\#1505](https://github.com/holochain/holochain/pull/1505) +- Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [#1503](https://github.com/holochain/holochain/pull/1502) + ## 0.0.15 - Adds the `OpHelper` trait to create the `OpType` convenience type to help with writing validation code. [\#1488](https://github.com/holochain/holochain/pull/1488) diff --git a/crates/holochain_integrity_types/CHANGELOG.md b/crates/holochain_integrity_types/CHANGELOG.md index 130fd535fe..438bfb35a9 100644 --- a/crates/holochain_integrity_types/CHANGELOG.md +++ b/crates/holochain_integrity_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +- Adds `ChainFilter` type for use in `must_get_agent_activity`. This allows specifying a chain top hash to start from and then creates a range either to genesis or `unit` a given hash or after `take`ing a number of actions. The range iterates backwards from the given chain top till it reaches on of the above possible chain bottoms. For this reason it will never contain forks. [#1502](https://github.com/holochain/holochain/pull/1502) + ## 0.0.15 ## 0.0.14 From 263f14901a8319fe82acec1080d0b4153d96b9d1 Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 18 Aug 2022 12:53:01 +1000 Subject: [PATCH 037/111] pr fixes --- .../host_fn/must_get_agent_activity.rs | 4 ++-- .../core/workflow/app_validation_workflow.rs | 2 +- .../must_get_agent_activity.rs | 21 ++++++------------- crates/holochain_cascade/src/lib.rs | 4 +++- .../holochain_integrity_types/src/validate.rs | 2 +- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs index 30d7e1fedc..08c1ca1256 100644 --- a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs @@ -48,7 +48,7 @@ pub fn must_get_agent_activity( Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( - UnresolvedDependencies::Activity(author, chain_filter) + UnresolvedDependencies::AgentActivity(author, chain_filter) )) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, ) @@ -60,7 +60,7 @@ pub fn must_get_agent_activity( Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(ValidateCallbackResult::UnresolvedDependencies( - UnresolvedDependencies::Activity(author, chain_filter) + UnresolvedDependencies::AgentActivity(author, chain_filter) )) .map_err(|e| -> RuntimeError { wasm_error!(e.into()).into() })?, ) diff --git a/crates/holochain/src/core/workflow/app_validation_workflow.rs b/crates/holochain/src/core/workflow/app_validation_workflow.rs index 6e7bf09b22..e4daf22238 100644 --- a/crates/holochain/src/core/workflow/app_validation_workflow.rs +++ b/crates/holochain/src/core/workflow/app_validation_workflow.rs @@ -626,7 +626,7 @@ where .await } } - ValidateResult::UnresolvedDependencies(UnresolvedDependencies::Activity( + ValidateResult::UnresolvedDependencies(UnresolvedDependencies::AgentActivity( author, filter, )) => { diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs index f73d724f73..081a81bc2a 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs @@ -6,7 +6,6 @@ use holochain_sqlite::db::DbKindDht; use holochain_sqlite::db::DbRead; use holochain_sqlite::rusqlite::named_params; use holochain_sqlite::rusqlite::OptionalExtension; -use holochain_sqlite::rusqlite::Statement; use holochain_sqlite::rusqlite::Transaction; use holochain_sqlite::sql::sql_cell::must_get_agent_activity::*; use holochain_state::prelude::from_blob; @@ -80,19 +79,6 @@ pub fn filter_then_check( } } -/// Get the action sequence for a given action hash. -fn hash_to_seq( - statement: &mut Statement, - hash: &ActionHash, - author: &AgentPubKey, -) -> StateQueryResult> { - Ok(statement - .query_row(named_params! {":hash": hash, ":author": author, ":activity": DhtOpType::RegisterAgentActivity}, |row| { - row.get(0) - }) - .optional()?) -} - /// Find the filters sequence bounds. fn find_bounds( txn: &mut Transaction, @@ -109,7 +95,12 @@ fn find_bounds( return Ok(Some(action.action().action_seq())); } } - hash_to_seq(&mut statement, hash, author) + let result = statement + .query_row(named_params! {":hash": hash, ":author": author, ":activity": DhtOpType::RegisterAgentActivity}, |row| { + row.get(0) + }) + .optional()?; + Ok(result) }; // For all the hashes in the filter, get their sequences. diff --git a/crates/holochain_cascade/src/lib.rs b/crates/holochain_cascade/src/lib.rs index 6ee5c6411c..cdf2add1f4 100644 --- a/crates/holochain_cascade/src/lib.rs +++ b/crates/holochain_cascade/src/lib.rs @@ -841,7 +841,7 @@ where author: AgentPubKey, filter: ChainFilter, ) -> CascadeResult { - // Get tha available databases. + // Get the available databases. let conns = self.get_databases().await; let scratch = self.scratch.clone(); @@ -884,6 +884,8 @@ where // If we are the authority then don't go to the network. let i_am_authority = self.am_i_an_authority(author.clone().into()).await?; if i_am_authority { + // If I am an authority and I didn't get a result before + // this point then the chain is incomplete for this request. Ok(MustGetAgentActivityResponse::IncompleteChain) } else { self.fetch_must_get_agent_activity(author.clone(), filter) diff --git a/crates/holochain_integrity_types/src/validate.rs b/crates/holochain_integrity_types/src/validate.rs index 5a4432facf..2ef03d0f8e 100644 --- a/crates/holochain_integrity_types/src/validate.rs +++ b/crates/holochain_integrity_types/src/validate.rs @@ -18,7 +18,7 @@ pub enum ValidateCallbackResult { /// or an agent activity query. pub enum UnresolvedDependencies { Hashes(Vec), - Activity(AgentPubKey, ChainFilter), + AgentActivity(AgentPubKey, ChainFilter), } /// The level of validation package required by From 342afda7c7e85cfaad997e8d4280319c20ad5b56 Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 18 Aug 2022 13:11:07 +1000 Subject: [PATCH 038/111] rebase develop --- .../core/ribosome/host_fn/must_get_agent_activity.rs | 11 +++-------- .../must_get_agent_activity.rs | 6 +++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs index 08c1ca1256..7f062d3738 100644 --- a/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs +++ b/crates/holochain/src/core/ribosome/host_fn/must_get_agent_activity.rs @@ -44,7 +44,7 @@ pub fn must_get_agent_activity( let result: Result<_, RuntimeError> = match (result, &call_context.host_context) { (Activity(activity), _) => Ok(activity), - (IncompleteChain | ActionNotFound(_), HostContext::Init(_)) => { + (IncompleteChain | ChainTopNotFound(_), HostContext::Init(_)) => { Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(InitCallbackResult::UnresolvedDependencies( @@ -56,7 +56,7 @@ pub fn must_get_agent_activity( )) .into()) } - (IncompleteChain | ActionNotFound(_), HostContext::Validate(_)) => { + (IncompleteChain | ChainTopNotFound(_), HostContext::Validate(_)) => { Err(wasm_error!(WasmErrorInner::HostShortCircuit( holochain_serialized_bytes::encode( &ExternIO::encode(ValidateCallbackResult::UnresolvedDependencies( @@ -73,16 +73,11 @@ pub fn must_get_agent_activity( author, chain_filter ))) .into()), - (ActionNotFound(missing_action), _) => Err(wasm_error!(WasmErrorInner::Host(format!( + (ChainTopNotFound(missing_action), _) => Err(wasm_error!(WasmErrorInner::Host(format!( "must_get_agent_activity is missing action {} for author {} and filter {:?}", missing_action, author, chain_filter ))) .into()), - (PositionNotHighest, _) => Err(wasm_error!(WasmErrorInner::Host(format!( - "must_get_agent_activity chain has produced an invalid range because the top of the chain is not the highest action sequence for author {} and filter {:?}", - author, chain_filter - ))) - .into()), (EmptyRange, _) => Err(wasm_error!(WasmErrorInner::Host(format!( "must_get_agent_activity chain has produced an invalid range because the range is empty for author {} and filter {:?}", author, chain_filter diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs index 081a81bc2a..56c551ab2c 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs @@ -12,8 +12,6 @@ use holochain_state::prelude::from_blob; use holochain_state::prelude::StateQueryResult; use holochain_state::scratch::Scratch; use holochain_types::chain::ChainFilterRange; -use holochain_state::scratch::Scratch; -use holochain_types::chain::ChainFilterRange; use holochain_types::chain::MustGetAgentActivityResponse; use holochain_types::chain::Sequences; use holochain_types::dht_op::DhtOpType; @@ -59,7 +57,9 @@ pub fn get_bounded_activity( }) } // One of the actions specified in the filter does not exist in the database. - Sequences::ChainTopNotFound(a) => Ok((MustGetAgentActivityResponse::ChainTopNotFound(a), None)), + Sequences::ChainTopNotFound(a) => { + Ok((MustGetAgentActivityResponse::ChainTopNotFound(a), None)) + } // The filter specifies a range that is empty. Sequences::EmptyRange => Ok((MustGetAgentActivityResponse::EmptyRange, None)), } From 200b985b806197b13c4e919538990a4c403d1f04 Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 18 Aug 2022 13:44:19 +1000 Subject: [PATCH 039/111] add optional entry to register agent activity op --- crates/hdi/src/op.rs | 2 +- crates/hdi/src/test_utils/short_hand.rs | 1 + .../core/workflow/app_validation_workflow.rs | 3 ++- .../app_validation_workflow/validation_tests.rs | 2 +- .../must_get_agent_activity.rs | 8 +++++++- .../must_get_agent_activity/test.rs | 2 +- crates/holochain_cascade/src/lib.rs | 1 + crates/holochain_integrity_types/src/op.rs | 17 ++++++++++++----- 8 files changed, 26 insertions(+), 10 deletions(-) diff --git a/crates/hdi/src/op.rs b/crates/hdi/src/op.rs index 8c1b1736fe..a8dd47dbde 100644 --- a/crates/hdi/src/op.rs +++ b/crates/hdi/src/op.rs @@ -274,7 +274,7 @@ impl OpHelper for Op { None => unreachable!("As entry types are already checked to match"), } } - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => { + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => { let r = match &action.hashed.content { Action::Dna(Dna { hash, .. }) => OpActivity::Dna(hash.clone()), Action::AgentValidationPkg(AgentValidationPkg { membrane_proof, .. }) => { diff --git a/crates/hdi/src/test_utils/short_hand.rs b/crates/hdi/src/test_utils/short_hand.rs index bc47b9f194..5787ae952a 100644 --- a/crates/hdi/src/test_utils/short_hand.rs +++ b/crates/hdi/src/test_utils/short_hand.rs @@ -35,6 +35,7 @@ pub fn r_activity(action: Action) -> Op { }, signature: Signature([0u8; 64]), }, + cached_entry: None, }) } diff --git a/crates/holochain/src/core/workflow/app_validation_workflow.rs b/crates/holochain/src/core/workflow/app_validation_workflow.rs index e4daf22238..3ab5471b44 100644 --- a/crates/holochain/src/core/workflow/app_validation_workflow.rs +++ b/crates/holochain/src/core/workflow/app_validation_workflow.rs @@ -296,7 +296,7 @@ pub fn op_to_record(op: Op, activity_entry: Option) -> Record { Op::RegisterDelete(RegisterDelete { delete, .. }) => { Record::new(SignedActionHashed::raw_from_same_hash(delete), None) } - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => Record::new( + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => Record::new( SignedActionHashed::raw_from_same_hash(action), activity_entry, ), @@ -330,6 +330,7 @@ async fn dhtop_to_op(op: DhtOp, cascade: &mut Cascade) -> AppValidationOutcome Event { + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => Event { action: ActionLocation::new(action.action().clone(), &agents), op_type: DhtOpType::RegisterAgentActivity, called_zome: zome, diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs index 56c551ab2c..0af3fd6ba5 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity.rs @@ -130,7 +130,11 @@ fn get_activity( let hash: ActionHash = row.get("hash")?; let hashed = ActionHashed::with_pre_hashed(action, hash); let action = SignedActionHashed::with_presigned(hashed, signature); - StateQueryResult::Ok(RegisterAgentActivity { action }) + StateQueryResult::Ok(RegisterAgentActivity { + action, + // TODO: Implement getting the cached entries. + cached_entry: None, + }) }, )? .collect::, _>>()?; @@ -145,6 +149,8 @@ fn get_activity( }) .map(|action| RegisterAgentActivity { action: action.clone(), + // TODO: Implement getting the cached entries. + cached_entry: None, }); out.extend(iter); } diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index c4ec8a1243..e1a92235f9 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -54,7 +54,7 @@ async fn returns_full_sequence_from_filter( let data = match data { MustGetAgentActivityResponse::Activity(activity) => activity .into_iter() - .map(|RegisterAgentActivity { action: a }| ChainItem { + .map(|RegisterAgentActivity { action: a, .. }| ChainItem { action_seq: a.hashed.action_seq(), hash: a.as_hash().clone(), prev_action: a.hashed.prev_action().cloned(), diff --git a/crates/holochain_cascade/src/lib.rs b/crates/holochain_cascade/src/lib.rs index cdf2add1f4..71879a67dc 100644 --- a/crates/holochain_cascade/src/lib.rs +++ b/crates/holochain_cascade/src/lib.rs @@ -241,6 +241,7 @@ where hashed: HoloHashed { content, .. }, signature, }, + .. } = op; let op = DhtOpHashed::from_content_sync(DhtOp::RegisterAgentActivity(signature, content)); diff --git a/crates/holochain_integrity_types/src/op.rs b/crates/holochain_integrity_types/src/op.rs index 3d898257a9..0fa269b27c 100644 --- a/crates/holochain_integrity_types/src/op.rs +++ b/crates/holochain_integrity_types/src/op.rs @@ -190,6 +190,11 @@ pub struct RegisterDelete { pub struct RegisterAgentActivity { /// The signed and hashed [`Action`] that is being registered. pub action: SignedActionHashed, + /// Entries can be cached with agent authorities if + /// `cached_at_agent_activity` is set to true for an entries + /// definitions. + /// If it is cached for this action then this will be some. + pub cached_entry: Option, } #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerializedBytes)] @@ -235,7 +240,9 @@ impl Op { Op::StoreEntry(StoreEntry { action, .. }) => action.hashed.author(), Op::RegisterUpdate(RegisterUpdate { update, .. }) => &update.hashed.author, Op::RegisterDelete(RegisterDelete { delete, .. }) => &delete.hashed.author, - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => action.hashed.author(), + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => { + action.hashed.author() + } Op::RegisterCreateLink(RegisterCreateLink { create_link }) => { &create_link.hashed.author } @@ -251,7 +258,7 @@ impl Op { Op::StoreEntry(StoreEntry { action, .. }) => *action.hashed.timestamp(), Op::RegisterUpdate(RegisterUpdate { update, .. }) => update.hashed.timestamp, Op::RegisterDelete(RegisterDelete { delete, .. }) => delete.hashed.timestamp, - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => { + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => { action.hashed.timestamp() } Op::RegisterCreateLink(RegisterCreateLink { create_link }) => { @@ -269,7 +276,7 @@ impl Op { Op::StoreEntry(StoreEntry { action, .. }) => *action.hashed.action_seq(), Op::RegisterUpdate(RegisterUpdate { update, .. }) => update.hashed.action_seq, Op::RegisterDelete(RegisterDelete { delete, .. }) => delete.hashed.action_seq, - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => { + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => { action.hashed.action_seq() } Op::RegisterCreateLink(RegisterCreateLink { create_link }) => { @@ -287,7 +294,7 @@ impl Op { Op::StoreEntry(StoreEntry { action, .. }) => Some(action.hashed.prev_action()), Op::RegisterUpdate(RegisterUpdate { update, .. }) => Some(&update.hashed.prev_action), Op::RegisterDelete(RegisterDelete { delete, .. }) => Some(&delete.hashed.prev_action), - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => { + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => { action.hashed.prev_action() } Op::RegisterCreateLink(RegisterCreateLink { create_link }) => { @@ -305,7 +312,7 @@ impl Op { Op::StoreEntry(StoreEntry { action, .. }) => action.hashed.action_type(), Op::RegisterUpdate(RegisterUpdate { .. }) => ActionType::Update, Op::RegisterDelete(RegisterDelete { .. }) => ActionType::Delete, - Op::RegisterAgentActivity(RegisterAgentActivity { action }) => { + Op::RegisterAgentActivity(RegisterAgentActivity { action, .. }) => { action.hashed.action_type() } Op::RegisterCreateLink(RegisterCreateLink { .. }) => ActionType::CreateLink, From 4d769279650718628f2435870d26b42959140840 Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 18 Aug 2022 13:53:35 +1000 Subject: [PATCH 040/111] add cached entry to chain filter --- crates/holochain_integrity_types/src/chain.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/holochain_integrity_types/src/chain.rs b/crates/holochain_integrity_types/src/chain.rs index 464fbf141a..28098169da 100644 --- a/crates/holochain_integrity_types/src/chain.rs +++ b/crates/holochain_integrity_types/src/chain.rs @@ -22,6 +22,9 @@ pub struct ChainFilter { /// The filters that have been applied. /// Defaults to [`ChainFilters::ToGenesis`]. pub filters: ChainFilters, + /// Should the query return any entries that are + /// cached at the agent activity to save network hops. + pub include_cached_entries: bool, } #[derive(Serialize, Deserialize, Debug, Eq, Clone)] @@ -103,6 +106,7 @@ impl ChainFilter { Self { chain_top, filters: Default::default(), + include_cached_entries: false, } } @@ -118,6 +122,13 @@ impl ChainFilter { self } + /// Set this filter to include any cached entries + /// at the agent activity authority. + pub fn include_cached_entries(mut self) -> Self { + self.include_cached_entries = true; + self + } + /// Take all actions until this action hash is found. /// Note that all actions specified as `until` hashes must be /// found so this filter can produce deterministic results. From 2a1ab3a1799bbb39e49205f0df6dfb7561a8be8a Mon Sep 17 00:00:00 2001 From: freesig Date: Thu, 18 Aug 2022 14:02:12 +1000 Subject: [PATCH 041/111] add entry def to cache entry --- crates/hdi/tests/integration.rs | 10 ++++++++-- crates/hdk_derive/src/entry_def_registration.rs | 5 +++++ crates/hdk_derive/src/lib.rs | 1 + crates/holochain/src/conductor/entry_def_store.rs | 2 ++ .../src/core/ribosome/guest_callback/entry_defs.rs | 2 ++ .../src/core/ribosome/host_fn/zome_info.rs | 2 ++ crates/holochain_integrity_types/src/entry_def.rs | 13 ++++++++++++- crates/holochain_zome_types/src/fixt.rs | 2 +- 8 files changed, 33 insertions(+), 4 deletions(-) diff --git a/crates/hdi/tests/integration.rs b/crates/hdi/tests/integration.rs index f7dc35369e..dc8417fe47 100644 --- a/crates/hdi/tests/integration.rs +++ b/crates/hdi/tests/integration.rs @@ -207,7 +207,7 @@ mod entry_defs_overrides_mod { A(A), #[entry_def(visibility = "private")] B(A), - #[entry_def(required_validations = 10)] + #[entry_def(required_validations = 10, cache_at_agent_activity = true)] C(A), } } @@ -221,16 +221,19 @@ fn entry_defs_overrides() { id: "hey".into(), visibility: Default::default(), required_validations: Default::default(), + ..Default::default() }, EntryDef { id: "b".into(), visibility: EntryVisibility::Private, required_validations: Default::default(), + ..Default::default() }, EntryDef { id: "c".into(), visibility: Default::default(), required_validations: RequiredValidations(10), + cache_at_agent_activity: true, }, ])) ); @@ -258,16 +261,19 @@ fn entry_defs_default() { id: "a".into(), visibility: Default::default(), required_validations: Default::default(), + ..Default::default() }, EntryDef { id: "b".into(), visibility: Default::default(), required_validations: Default::default(), + ..Default::default() }, EntryDef { id: "c".into(), visibility: Default::default(), required_validations: Default::default(), + ..Default::default() }, ])) ); @@ -312,7 +318,7 @@ fn entry_defs_to_entry_type_index() { assert!(matches!( integrity_a::EntryTypes::deserialize_from_type(1, 20, &Entry::try_from(A {}).unwrap()), - Ok(None) + Err(_) )); assert!(matches!( integrity_a::EntryTypes::deserialize_from_type(0, 0, &Entry::try_from(A {}).unwrap()), diff --git a/crates/hdk_derive/src/entry_def_registration.rs b/crates/hdk_derive/src/entry_def_registration.rs index 49ced4cddd..055d026610 100644 --- a/crates/hdk_derive/src/entry_def_registration.rs +++ b/crates/hdk_derive/src/entry_def_registration.rs @@ -17,6 +17,8 @@ struct VarOpts { visibility: Option, #[darling(default)] required_validations: Option, + #[darling(default)] + cache_at_agent_activity: Option, } #[derive(FromDeriveInput)] @@ -42,17 +44,20 @@ pub fn derive(input: TokenStream) -> TokenStream { name, visibility, required_validations, + cache_at_agent_activity, .. }| { let id = crate::util::to_snake_case(name, &v_ident); let visibility = parse_visibility(&v_ident, visibility); let required_validations = required_validations.unwrap_or_else(|| RequiredValidations::default().0); + let cache_at_agent_activity = cache_at_agent_activity.unwrap_or(false); quote::quote! { EntryDef { id: EntryDefId::App(AppEntryDefName::from_str(#id)), visibility: #visibility, required_validations: RequiredValidations(#required_validations), + cache_at_agent_activity: #cache_at_agent_activity, }, } }, diff --git a/crates/hdk_derive/src/lib.rs b/crates/hdk_derive/src/lib.rs index 4fcd0d367a..c65be8119d 100644 --- a/crates/hdk_derive/src/lib.rs +++ b/crates/hdk_derive/src/lib.rs @@ -77,6 +77,7 @@ impl Parse for EntryDef { id, visibility, required_validations, + cache_at_agent_activity: false, })) } } diff --git a/crates/holochain/src/conductor/entry_def_store.rs b/crates/holochain/src/conductor/entry_def_store.rs index 056dc42ba0..8885b46de2 100644 --- a/crates/holochain/src/conductor/entry_def_store.rs +++ b/crates/holochain/src/conductor/entry_def_store.rs @@ -133,11 +133,13 @@ mod tests { id: "post".into(), visibility: EntryVisibility::Public, required_validations: 5.into(), + ..Default::default() }; let comment_def = EntryDef { id: "comment".into(), visibility: EntryVisibility::Private, required_validations: 5.into(), + ..Default::default() }; let dna_wasm = DnaWasmHashed::from_content(TestWasm::EntryDefs.into()) .await diff --git a/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs b/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs index 181227d185..f3c0276c54 100644 --- a/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs +++ b/crates/holochain/src/core/ribosome/guest_callback/entry_defs.rs @@ -237,11 +237,13 @@ mod slow_tests { id: "post".into(), visibility: EntryVisibility::Public, required_validations: 5.into(), + ..Default::default() }, EntryDef { id: "comment".into(), visibility: EntryVisibility::Private, required_validations: 5.into(), + ..Default::default() }, ] .into(); diff --git a/crates/holochain/src/core/ribosome/host_fn/zome_info.rs b/crates/holochain/src/core/ribosome/host_fn/zome_info.rs index c9cdad2257..932fb67511 100644 --- a/crates/holochain/src/core/ribosome/host_fn/zome_info.rs +++ b/crates/holochain/src/core/ribosome/host_fn/zome_info.rs @@ -57,11 +57,13 @@ pub mod test { id: "post".into(), visibility: Default::default(), required_validations: Default::default(), + ..Default::default() }, EntryDef { id: "comment".into(), visibility: EntryVisibility::Private, required_validations: Default::default(), + ..Default::default() } ] .into(), diff --git a/crates/holochain_integrity_types/src/entry_def.rs b/crates/holochain_integrity_types/src/entry_def.rs index 56f95219e8..7a05f92889 100644 --- a/crates/holochain_integrity_types/src/entry_def.rs +++ b/crates/holochain_integrity_types/src/entry_def.rs @@ -50,6 +50,11 @@ pub struct EntryDef { pub visibility: EntryVisibility, /// how many validations to receive before considered "network saturated" (MAX value of 50?) pub required_validations: RequiredValidations, + /// Should this entry be cached with agent activity authorities + /// for reduced networked hops when using `must_get_agent_activity`. + /// Note this will result in more storage being used on the DHT. + /// Defaults to false. + pub cache_at_agent_activity: bool, } #[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] @@ -127,17 +132,22 @@ impl EntryDef { id: EntryDefId, visibility: EntryVisibility, required_validations: RequiredValidations, + cache_at_agent_activity: bool, ) -> Self { Self { id, visibility, required_validations, + cache_at_agent_activity, } } #[cfg(any(test, feature = "test_utils"))] pub fn default_with_id>(id: I) -> Self { - EntryDef::new(id.into(), Default::default(), Default::default()) + EntryDef { + id: id.into(), + ..Default::default() + } } } @@ -217,6 +227,7 @@ impl Default for EntryDef { id: EntryDefId::App(AppEntryDefName(Default::default())), visibility: Default::default(), required_validations: Default::default(), + cache_at_agent_activity: false, } } } diff --git a/crates/holochain_zome_types/src/fixt.rs b/crates/holochain_zome_types/src/fixt.rs index aceac3c234..48adaa0c04 100644 --- a/crates/holochain_zome_types/src/fixt.rs +++ b/crates/holochain_zome_types/src/fixt.rs @@ -480,7 +480,7 @@ fixturator!( fixturator!( EntryDef; - constructor fn new(EntryDefId, EntryVisibility, RequiredValidations); + constructor fn new(EntryDefId, EntryVisibility, RequiredValidations, bool); ); fixturator!( From 86488a7198cf2b6c73a8e74cdaab60a9ac7988a5 Mon Sep 17 00:00:00 2001 From: neonphog Date: Thu, 18 Aug 2022 11:32:01 -0600 Subject: [PATCH 042/111] initial lair reconnect --- .../src/crude_mock_keystore.rs | 26 +- .../src/meta_lair_client.rs | 237 ++++++++++++++---- .../holochain_keystore/src/test_keystore.rs | 3 +- .../test_utils/wasm/wasm_workspace/Cargo.lock | 14 +- 4 files changed, 208 insertions(+), 72 deletions(-) diff --git a/crates/holochain_keystore/src/crude_mock_keystore.rs b/crates/holochain_keystore/src/crude_mock_keystore.rs index d5a3a2f770..31d94e2da5 100644 --- a/crates/holochain_keystore/src/crude_mock_keystore.rs +++ b/crates/holochain_keystore/src/crude_mock_keystore.rs @@ -18,9 +18,13 @@ pub async fn spawn_crude_mock_keystore(err_fn: F) -> MetaLairClient where F: Fn() -> one_err::OneErr + Send + Sync + 'static, { - MetaLairClient(Arc::new(parking_lot::Mutex::new(LairClient(Arc::new( - CrudeMockKeystore(Arc::new(err_fn)), - ))))) + let (s, _) = tokio::sync::mpsc::unbounded_channel(); + MetaLairClient( + Arc::new(parking_lot::Mutex::new(LairClient(Arc::new( + CrudeMockKeystore(Arc::new(err_fn)), + )))), + s, + ) } /// Spawn a test keystore that can switch between mocked and real. @@ -42,10 +46,12 @@ where let control = MockLairControl(use_mock); + let (s, _) = tokio::sync::mpsc::unbounded_channel(); Ok(( - MetaLairClient(Arc::new(parking_lot::Mutex::new(LairClient(Arc::new( - mock, - ))))), + MetaLairClient( + Arc::new(parking_lot::Mutex::new(LairClient(Arc::new(mock)))), + s, + ), control, )) } @@ -101,17 +107,17 @@ impl AsLairClient for CrudeMockKeystore { impl AsLairClient for RealOrMockKeystore { fn get_enc_ctx_key(&self) -> sodoken::BufReadSized<32> { - self.real.cli().get_enc_ctx_key() + self.real.cli().0.get_enc_ctx_key() } fn get_dec_ctx_key(&self) -> sodoken::BufReadSized<32> { - self.real.cli().get_dec_ctx_key() + self.real.cli().0.get_dec_ctx_key() } fn shutdown( &self, ) -> ghost_actor::dependencies::futures::future::BoxFuture<'static, LairResult<()>> { - self.real.cli().shutdown().boxed() + self.real.cli().0.shutdown().boxed() } fn request( @@ -123,7 +129,7 @@ impl AsLairClient for RealOrMockKeystore { let r = (self.mock)(request); async move { r }.boxed() } else { - AsLairClient::request(&*self.real.cli().0, request) + AsLairClient::request(&*self.real.cli().0 .0, request) } } } diff --git a/crates/holochain_keystore/src/meta_lair_client.rs b/crates/holochain_keystore/src/meta_lair_client.rs index eddd6cd583..faac0fb211 100644 --- a/crates/holochain_keystore/src/meta_lair_client.rs +++ b/crates/holochain_keystore/src/meta_lair_client.rs @@ -7,9 +7,28 @@ use std::sync::Arc; pub use kitsune_p2p_types::dependencies::lair_keystore_api::LairResult; +const TIME_CHECK_FREQ: std::time::Duration = std::time::Duration::from_secs(5); +const CON_CHECK_STUB_TAG: &str = "HC_CON_CHK_STUB"; +const RECON_INIT_MS: u64 = 100; +const RECON_MAX_MS: u64 = 5000; + +type Esnd = tokio::sync::mpsc::UnboundedSender<()>; + /// Abstraction around runtime switching/upgrade of lair keystore / client. #[derive(Clone)] -pub struct MetaLairClient(pub(crate) Arc>); +pub struct MetaLairClient(pub(crate) Arc>, pub(crate) Esnd); + +macro_rules! echk { + ($esnd:ident, $code:expr) => {{ + match $code { + Err(err) => { + let _ = $esnd.send(()); + return Err(err); + } + Ok(r) => r, + } + }}; +} impl MetaLairClient { pub(crate) async fn new( @@ -18,21 +37,104 @@ impl MetaLairClient { ) -> LairResult { use lair_keystore_api::ipc_keystore::*; let opts = IpcKeystoreClientOptions { - connection_url: connection_url.into(), - passphrase, + connection_url: connection_url.clone().into(), + passphrase: passphrase.clone(), exact_client_server_version_match: true, }; + let client = ipc_keystore_connect_options(opts).await?; - Ok(MetaLairClient(Arc::new(Mutex::new(client)))) + let inner = Arc::new(Mutex::new(client)); + + let (c_check_send, mut c_check_recv) = tokio::sync::mpsc::unbounded_channel(); + // initial check + let _ = c_check_send.send(()); + + // setup timeout for connection check + { + let c_check_send = c_check_send.clone(); + tokio::task::spawn(async move { + loop { + tokio::time::sleep(TIME_CHECK_FREQ).await; + if c_check_send.send(()).is_err() { + break; + } + } + }); + } + + // setup the connection check logic + { + let inner = inner.clone(); + let stub_tag: Arc = CON_CHECK_STUB_TAG.to_string().into(); + tokio::task::spawn(async move { + use tokio::sync::mpsc::error::TryRecvError; + 'top_loop: while c_check_recv.recv().await.is_some() { + 'drain_queue: loop { + match c_check_recv.try_recv() { + Ok(_) => (), + Err(TryRecvError::Empty) => break 'drain_queue, + Err(TryRecvError::Disconnected) => break 'top_loop, + } + } + + let client = inner.lock().clone(); + + // optimistic check - most often the stub will be there + if client.get_entry(stub_tag.clone()).await.is_ok() { + continue; + } + + // on the first run of a new install we need to create + let _ = client.new_seed(stub_tag.clone(), None, false).await; + + // then we can exit early again + if client.get_entry(stub_tag.clone()).await.is_ok() { + continue; + } + + // we couldn't fetch the stub, enter our reconnect loop + let mut backoff_ms = RECON_INIT_MS; + 'reconnect: loop { + 'drain_queue2: loop { + match c_check_recv.try_recv() { + Ok(_) => (), + Err(TryRecvError::Empty) => break 'drain_queue2, + Err(TryRecvError::Disconnected) => break 'top_loop, + } + } + + backoff_ms *= 2; + if backoff_ms >= RECON_MAX_MS { + backoff_ms = RECON_MAX_MS; + } + tokio::time::sleep(std::time::Duration::from_millis(backoff_ms)).await; + let opts = IpcKeystoreClientOptions { + connection_url: connection_url.clone().into(), + passphrase: passphrase.clone(), + exact_client_server_version_match: true, + }; + + let client = match ipc_keystore_connect_options(opts).await { + Err(_) => continue 'reconnect, + Ok(client) => client, + }; + *inner.lock() = client; + break 'reconnect; + } + } + }); + } + + Ok(MetaLairClient(inner, c_check_send)) } - pub(crate) fn cli(&self) -> LairClient { - self.0.lock().clone() + pub(crate) fn cli(&self) -> (LairClient, Esnd) { + (self.0.lock().clone(), self.1.clone()) } /// Shutdown this keystore client pub fn shutdown(&self) -> impl Future> + 'static + Send { - let client = self.cli(); + let (client, _esnd) = self.cli(); async move { client.shutdown().await } } @@ -40,10 +142,10 @@ impl MetaLairClient { pub fn new_sign_keypair_random( &self, ) -> impl Future> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { let tag = nanoid::nanoid!(); - let info = client.new_seed(tag.into(), None, false).await?; + let info = echk!(esnd, client.new_seed(tag.into(), None, false).await); let pub_key = holo_hash::AgentPubKey::from_raw_32(info.ed25519_pub_key.0.to_vec()); Ok(pub_key) } @@ -55,12 +157,15 @@ impl MetaLairClient { pub_key: holo_hash::AgentPubKey, data: Arc<[u8]>, ) -> impl Future> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { tokio::time::timeout(std::time::Duration::from_secs(30), async move { let mut pub_key_2 = [0; 32]; pub_key_2.copy_from_slice(pub_key.get_raw_32()); - let sig = client.sign_by_pub_key(pub_key_2.into(), None, data).await?; + let sig = echk!( + esnd, + client.sign_by_pub_key(pub_key_2.into(), None, data).await + ); Ok(Signature(*sig.0)) }) .await @@ -73,12 +178,12 @@ impl MetaLairClient { &self, tag: Arc, ) -> impl Future> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { // shared secrets are exportable // (it's hard to make them useful otherwise : ) let exportable = true; - let _info = client.new_seed(tag, None, exportable).await?; + let _info = echk!(esnd, client.new_seed(tag, None, exportable).await); Ok(()) } } @@ -90,11 +195,14 @@ impl MetaLairClient { sender_pub_key: X25519PubKey, recipient_pub_key: X25519PubKey, ) -> impl Future)>> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { - client - .export_seed_by_tag(tag, sender_pub_key, recipient_pub_key, None) - .await + Ok(echk!( + esnd, + client + .export_seed_by_tag(tag, sender_pub_key, recipient_pub_key, None) + .await + )) } } @@ -107,22 +215,25 @@ impl MetaLairClient { cipher: Arc<[u8]>, tag: Arc, ) -> impl Future> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { // shared secrets are exportable // (it's hard to make them useful otherwise : ) let exportable = true; - let _info = client - .import_seed( - sender_pub_key, - recipient_pub_key, - None, - nonce, - cipher, - tag, - exportable, - ) - .await?; + let _info = echk!( + esnd, + client + .import_seed( + sender_pub_key, + recipient_pub_key, + None, + nonce, + cipher, + tag, + exportable, + ) + .await + ); Ok(()) } } @@ -133,8 +244,13 @@ impl MetaLairClient { tag: Arc, data: Arc<[u8]>, ) -> impl Future)>> + 'static + Send { - let client = self.cli(); - async move { client.secretbox_xsalsa_by_tag(tag, None, data).await } + let (client, esnd) = self.cli(); + async move { + Ok(echk!( + esnd, + client.secretbox_xsalsa_by_tag(tag, None, data).await + )) + } } /// Decrypt using a shared secret / xsalsa20poly1305 secretbox. @@ -144,11 +260,14 @@ impl MetaLairClient { nonce: [u8; 24], cipher: Arc<[u8]>, ) -> impl Future>> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { - client - .secretbox_xsalsa_open_by_tag(tag, None, nonce, cipher) - .await + Ok(echk!( + esnd, + client + .secretbox_xsalsa_open_by_tag(tag, None, nonce, cipher) + .await + )) } } @@ -156,10 +275,10 @@ impl MetaLairClient { pub fn new_x25519_keypair_random( &self, ) -> impl Future> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { let tag = nanoid::nanoid!(); - let info = client.new_seed(tag.into(), None, false).await?; + let info = echk!(esnd, client.new_seed(tag.into(), None, false).await); let pub_key = info.x25519_pub_key; Ok(pub_key) } @@ -172,11 +291,14 @@ impl MetaLairClient { recipient_pub_key: X25519PubKey, data: Arc<[u8]>, ) -> impl Future)>> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { - client - .crypto_box_xsalsa_by_pub_key(sender_pub_key, recipient_pub_key, None, data) - .await + Ok(echk!( + esnd, + client + .crypto_box_xsalsa_by_pub_key(sender_pub_key, recipient_pub_key, None, data) + .await + )) } } @@ -188,17 +310,20 @@ impl MetaLairClient { nonce: [u8; 24], data: Arc<[u8]>, ) -> impl Future>> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { - client - .crypto_box_xsalsa_open_by_pub_key( - sender_pub_key, - recipient_pub_key, - None, - nonce, - data, - ) - .await + Ok(echk!( + esnd, + client + .crypto_box_xsalsa_open_by_pub_key( + sender_pub_key, + recipient_pub_key, + None, + nonce, + data, + ) + .await + )) } } @@ -208,8 +333,9 @@ impl MetaLairClient { tag: Arc, ) -> impl Future, sodoken::BufRead)>> + 'static + Send { - let client = self.cli(); + let (client, esnd) = self.cli(); async move { + // don't echk! this top one, it may be a valid error let info = match client.get_entry(tag.clone()).await { Ok(info) => match info { LairEntryInfo::WkaTlsCert { cert_info, .. } => cert_info, @@ -221,9 +347,12 @@ impl MetaLairClient { .into()) } }, - Err(_) => client.new_wka_tls_cert(tag.clone()).await?, + Err(_) => { + let esnd = esnd.clone(); + echk!(esnd, client.new_wka_tls_cert(tag.clone()).await) + } }; - let pk = client.get_wka_tls_cert_priv_key(tag).await?; + let pk = echk!(esnd, client.get_wka_tls_cert_priv_key(tag).await); Ok((info.digest, info.cert.to_vec().into(), pk)) } diff --git a/crates/holochain_keystore/src/test_keystore.rs b/crates/holochain_keystore/src/test_keystore.rs index 1219e1f7c8..a92e6c592f 100644 --- a/crates/holochain_keystore/src/test_keystore.rs +++ b/crates/holochain_keystore/src/test_keystore.rs @@ -72,5 +72,6 @@ pub async fn spawn_test_keystore() -> LairResult { // return the client let client = keystore.new_client().await?; - Ok(MetaLairClient(Arc::new(parking_lot::Mutex::new(client)))) + let (s, _) = tokio::sync::mpsc::unbounded_channel(); + Ok(MetaLairClient(Arc::new(parking_lot::Mutex::new(client)), s)) } diff --git a/crates/test_utils/wasm/wasm_workspace/Cargo.lock b/crates/test_utils/wasm/wasm_workspace/Cargo.lock index 3185ddefd5..89a60cf6f8 100644 --- a/crates/test_utils/wasm/wasm_workspace/Cargo.lock +++ b/crates/test_utils/wasm/wasm_workspace/Cargo.lock @@ -684,7 +684,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.17" +version = "0.0.18" dependencies = [ "hdk_derive", "holo_hash", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.145" +version = "0.0.146" dependencies = [ "getrandom", "hdi", @@ -718,7 +718,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.43" +version = "0.0.44" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -775,7 +775,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.14" +version = "0.0.15" dependencies = [ "arbitrary", "holo_hash", @@ -823,7 +823,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.46" +version = "0.0.47" dependencies = [ "hdk", "serde", @@ -858,7 +858,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.43" +version = "0.0.44" dependencies = [ "fixt", "holo_hash", @@ -966,7 +966,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.0.11" +version = "0.0.12" dependencies = [ "arbitrary", "chrono", From dc9f803182e234fb51501bb0ce475d8b88f4d751 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 13:29:06 -0700 Subject: [PATCH 043/111] Re-include missing test fns --- .../must_get_agent_activity/test.rs | 1 + crates/holochain_types/src/chain.rs | 2 +- crates/holochain_types/src/chain/test.rs | 10 +------ .../holochain_types/src/test_utils/chain.rs | 30 ++++++++++++++++++- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index 4d5c812b4f..6db9fbceaa 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -5,6 +5,7 @@ use holo_hash::AgentPubKey; use holo_hash::DnaHash; use holochain_sqlite::db::DbKindDht; use holochain_state::prelude::*; +use holochain_types::chain::test::*; use holochain_types::dht_op::DhtOpLight; use holochain_types::dht_op::OpOrder; use holochain_types::dht_op::UniqueForm; diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index c89e926ce7..364780978f 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -15,7 +15,7 @@ use holochain_zome_types::RegisterAgentActivity; use holochain_zome_types::SignedActionHashed; #[cfg(all(test, feature = "test_utils"))] -mod test; +pub mod test; /// Helpers for constructing AgentActivity pub trait AgentActivityExt { diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index 3067faf358..c35f6a7cf0 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,4 +1,4 @@ -use holo_hash::ActionHash; +use holo_hash::{ActionHash, EntryHash}; use std::collections::HashMap; use std::ops::Range; use test_case::test_case; @@ -7,14 +7,6 @@ use crate::test_utils::chain::*; use super::*; -/// Create a hash from a u32. -fn hash(i: u32) -> TestHash { - i.into() -} - -pub type TestHash = ::Hash; -pub type TestFilter = ChainFilter; - /// Build a chain of RegisterAgentActivity and then run them through the /// chain filter. fn build_chain(c: Vec, filter: TestFilter) -> Vec { diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 6df40df4a5..17bb790b56 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -4,7 +4,7 @@ use std::ops::Range; use arbitrary::Arbitrary; use arbitrary::Unstructured; -use holo_hash::ActionHash; +use holo_hash::*; use holochain_zome_types::*; use crate::prelude::ChainItem; @@ -92,6 +92,34 @@ fn forked_hash(n: u8, i: u8) -> TestChainHash { TestChainHash(n as u32 + (i as u32) * 256) } +pub type TestHash = ::Hash; +pub type TestFilter = ChainFilter; + +/// Create a hash from a u32. +fn hash(i: u32) -> TestHash { + i.into() +} + +pub fn action_hash(i: &[u8]) -> ActionHash { + ActionHash::from_raw_36(hash(i)) +} + +pub fn agent_hash(i: &[u8]) -> AgentPubKey { + AgentPubKey::from_raw_36(hash(i)) +} + +pub fn entry_hash(i: &[u8]) -> EntryHash { + EntryHash::from_raw_36(hash(i)) +} + +/// Create a chain per agent +pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { + ranges + .iter() + .map(|(a, range)| (agent_hash(&[*a]), chain(range.clone()))) + .collect() +} + /// Create a chain from a range where the first chain items /// previous hash == that items hash. pub fn chain(range: Range) -> Vec { From 7bdd53db2242bfa81bf525647d3d31ed4ddf414a Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 13:39:46 -0700 Subject: [PATCH 044/111] Get things compiling again --- Cargo.lock | 1 + crates/holochain_cascade/Cargo.toml | 1 + .../must_get_agent_activity/test.rs | 18 +++++++++--------- crates/holochain_types/src/chain/test.rs | 13 ++++++++++--- crates/holochain_types/src/test_utils/chain.rs | 17 ++++++++++------- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5871d2399e..16649a0e69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2072,6 +2072,7 @@ dependencies = [ "holochain_state", "holochain_types", "holochain_zome_types", + "isotest", "kitsune_p2p", "matches", "mockall 0.10.2", diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 5e7dc5be86..b396a4aa74 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -37,6 +37,7 @@ async-trait = { version = "0.1", optional = true } mockall = { version = "0.10.2", optional = true } [dev-dependencies] +isotest = "0.1.0-dev.3" matches = "0.1" pretty_assertions = "0.7.2" test-case = "2.1" diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index 6db9fbceaa..9de7ae3961 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -5,7 +5,6 @@ use holo_hash::AgentPubKey; use holo_hash::DnaHash; use holochain_sqlite::db::DbKindDht; use holochain_state::prelude::*; -use holochain_types::chain::test::*; use holochain_types::dht_op::DhtOpLight; use holochain_types::dht_op::OpOrder; use holochain_types::dht_op::UniqueForm; @@ -45,10 +44,11 @@ use test_case::test_case; /// Extracts the smallest range from the chain filter /// and then returns all actions within that range async fn returns_full_sequence_from_filter( - chain: Vec<(AgentPubKey, Vec)>, + chain: Vec<(AgentPubKey, Vec)>, agent: AgentPubKey, filter: ChainFilter, -) -> Vec<(AgentPubKey, Vec)> { +) -> Vec<(AgentPubKey, Vec)> { + use isotest::Iso; let db = commit_chain(chain); let data = must_get_agent_activity(db.clone().into(), agent.clone(), filter) .await @@ -56,10 +56,10 @@ async fn returns_full_sequence_from_filter( let data = match data { MustGetAgentActivityResponse::Activity(activity) => activity .into_iter() - .map(|RegisterAgentActivity { action: a }| ChainItem { - action_seq: a.hashed.action_seq(), - hash: a.as_hash().clone(), - prev_action: a.hashed.prev_action().cloned(), + .map(|RegisterAgentActivity { action: a }| TestChainItem { + seq: a.hashed.action_seq(), + hash: TestChainHash::test(a.as_hash()), + prev: a.hashed.prev_action().map(TestChainHash::test), }) .collect(), d @ _ => unreachable!("{:?}", d), @@ -95,7 +95,7 @@ async fn returns_full_sequence_from_filter( #[tokio::test(flavor = "multi_thread")] /// Check the query returns the appropriate responses. async fn test_responses( - chain: Vec<(AgentPubKey, Vec)>, + chain: Vec<(AgentPubKey, Vec)>, agent: AgentPubKey, filter: ChainFilter, ) -> MustGetAgentActivityResponse { @@ -105,7 +105,7 @@ async fn test_responses( .unwrap() } -fn commit_chain(chain: Vec<(AgentPubKey, Vec)>) -> DbWrite { +fn commit_chain(chain: Vec<(AgentPubKey, Vec)>) -> DbWrite { let data: Vec<_> = chain .into_iter() .map(|(a, c)| { diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index c35f6a7cf0..ccd5f9acde 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,4 +1,4 @@ -use holo_hash::{ActionHash, EntryHash}; +use holo_hash::*; use std::collections::HashMap; use std::ops::Range; use test_case::test_case; @@ -7,6 +7,14 @@ use crate::test_utils::chain::*; use super::*; +type TestHash = ::Hash; +type TestFilter = ChainFilter; + +/// Create a hash from a u32. +fn hash(i: u32) -> TestHash { + i.into() +} + /// Build a chain of RegisterAgentActivity and then run them through the /// chain filter. fn build_chain(c: Vec, filter: TestFilter) -> Vec { @@ -18,7 +26,6 @@ fn build_chain(c: Vec, filter: TestFilter) -> Vec fn pretty(expected: Vec) -> impl Fn(Vec) { move |actual: Vec| pretty_assertions::assert_eq!(actual, expected) } - #[test_case(1, 0, 0 => chain(0..0))] #[test_case(1, 0, 1 => chain(0..1))] #[test_case(1, 0, 10 => chain(0..1))] @@ -111,7 +118,7 @@ fn matches_chain(a: &Vec, seq: &[u32]) -> bool { forked_chain(&[4..6, 3..8]), ChainFilter::new(action_hash(&[5, 0])).until(action_hash(&[4, 1])), |h| if *h == action_hash(&[5, 0]) { Some(5) } else { Some(4) } => matches MustGetAgentActivityResponse::IncompleteChain ; "chain_top (5,0) until (4,1) chain (0,0) to (5,0) and (3,1) to (7,1)")] fn test_filter_then_check( - chain: Vec, + chain: Vec, filter: ChainFilter, mut f: impl FnMut(&ActionHash) -> Option, ) -> MustGetAgentActivityResponse { diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 17bb790b56..dee45dee4f 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -92,28 +92,31 @@ fn forked_hash(n: u8, i: u8) -> TestChainHash { TestChainHash(n as u32 + (i as u32) * 256) } -pub type TestHash = ::Hash; -pub type TestFilter = ChainFilter; - -/// Create a hash from a u32. -fn hash(i: u32) -> TestHash { - i.into() +/// Create a hash from a slice by repeating the slice to fill out the array. +fn hash(i: &[u8]) -> Vec { + let mut i = i.iter().copied().take(36).collect::>(); + let num_needed = 36 - i.len(); + i.extend(std::iter::repeat(0).take(num_needed)); + i } +/// Create a hash from a slice by repeating the slice to fill out the array pub fn action_hash(i: &[u8]) -> ActionHash { ActionHash::from_raw_36(hash(i)) } +/// Create a hash from a slice by repeating the slice to fill out the array pub fn agent_hash(i: &[u8]) -> AgentPubKey { AgentPubKey::from_raw_36(hash(i)) } +/// Create a hash from a slice by repeating the slice to fill out the array pub fn entry_hash(i: &[u8]) -> EntryHash { EntryHash::from_raw_36(hash(i)) } /// Create a chain per agent -pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { +pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { ranges .iter() .map(|(a, range)| (agent_hash(&[*a]), chain(range.clone()))) From e0bad04dc74077eade00379f73afd84de56fd036 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 13:48:37 -0700 Subject: [PATCH 045/111] Clippy from the future said to do this --- crates/kitsune_p2p/timestamp/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/kitsune_p2p/timestamp/src/error.rs b/crates/kitsune_p2p/timestamp/src/error.rs index b377431f70..1488493474 100644 --- a/crates/kitsune_p2p/timestamp/src/error.rs +++ b/crates/kitsune_p2p/timestamp/src/error.rs @@ -1,7 +1,7 @@ #[cfg(feature = "chrono")] use chrono::ParseError; -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum TimestampError { Overflow, #[cfg(feature = "chrono")] From e8e48f694e1991f06c3aa30b58a7b12852b8519f Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 15:35:07 -0700 Subject: [PATCH 046/111] Fix hash construction discrepancy --- crates/holochain_types/src/chain/test.rs | 6 +----- crates/holochain_types/src/test_utils/chain.rs | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index ccd5f9acde..24a62d19c2 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -215,11 +215,7 @@ fn hash_to_seq(hashes: &[u32]) -> impl FnMut(&ActionHash) -> Option { let map = hashes .iter() .map(|i| { - let hash = if *i > u8::MAX as u32 { - action_hash(&i.to_le_bytes()) - } else { - action_hash(&[*i as u8]) - }; + let hash = hash_from_u32(*i); (hash, *i) }) .collect::>(); diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index dee45dee4f..cbab6d4ff4 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -36,10 +36,7 @@ impl From for TestChainHash { } isotest::iso! { - TestChainHash => |h| { - let bytes: Vec = h.0.to_le_bytes().iter().cycle().take(32).copied().collect(); - ActionHash::from_raw_32(bytes) - }, + TestChainHash => |h| hash_from_u32(*h), ActionHash => |h| Self(u32::from_le_bytes(h.get_raw_32()[0..4].try_into().unwrap())) } @@ -89,7 +86,7 @@ impl AsRef for TestChainItem { } fn forked_hash(n: u8, i: u8) -> TestChainHash { - TestChainHash(n as u32 + (i as u32) * 256) + TestChainHash(u32::from_le_bytes([n, i, 0, 0])) } /// Create a hash from a slice by repeating the slice to fill out the array. @@ -100,6 +97,16 @@ fn hash(i: &[u8]) -> Vec { i } +/// Canonical way to construct a hash from a u32. +/// This is used in various places in our test code, and each must match. +pub fn hash_from_u32(i: u32) -> ActionHash { + if i > u8::MAX as u32 { + action_hash(&i.to_le_bytes()) + } else { + action_hash(&[i as u8]) + } +} + /// Create a hash from a slice by repeating the slice to fill out the array pub fn action_hash(i: &[u8]) -> ActionHash { ActionHash::from_raw_36(hash(i)) From b1a5cacdc8362560bb65c78af8ac414d99579636 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 17:42:02 -0700 Subject: [PATCH 047/111] Put test cases in iso! --- Cargo.lock | 86 ++++++++----------- Cargo.toml | 1 + .../holochain_types/src/test_utils/chain.rs | 61 +++++++------ 3 files changed, 73 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 16649a0e69..020564ab37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8" +checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305" [[package]] name = "approx" @@ -194,10 +194,11 @@ dependencies = [ [[package]] name = "async-io" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" +checksum = "0ab006897723d9352f63e2b13047177c3982d8d79709d713ce7747a8f19fd1b0" dependencies = [ + "autocfg 1.1.0", "concurrent-queue", "futures-lite", "libc", @@ -507,9 +508,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" [[package]] name = "bytecheck" @@ -534,9 +535,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f8cb64b4147a528e1e9e77583739e683541973295b35f3bd7e78d42c5971fd" +checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" [[package]] name = "byteorder" @@ -739,9 +740,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpufeatures" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +checksum = "1079fb8528d9f9c888b1e8aa651e6e079ade467323d58f75faf1d30b1808f540" dependencies = [ "libc", ] @@ -1284,9 +1285,9 @@ checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" [[package]] name = "either" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "encoding_rs" @@ -1759,9 +1760,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" dependencies = [ "bytes", "fnv", @@ -2670,9 +2671,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.44" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf7d67cf4a22adc5be66e75ebdf769b3f2ea032041437a7061f97a63dad4b" +checksum = "ad2bfd338099682614d3ee3fe0cd72e0b6a41ca6a87f6a74a3bd593c91650501" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2815,10 +2816,10 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "isotest" version = "0.1.0-dev.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6250b593b9410fe34cf5f2392f0c3e64db49a342b797e2bcd4306df278222c" +source = "git+https://github.com/maackle/isotest-rs.git#66a576c40c0b073abe173d2a6a452aef062363b9" dependencies = [ "futures", + "paste", ] [[package]] @@ -3155,7 +3156,7 @@ dependencies = [ "nanoid 0.4.0", "once_cell", "parking_lot 0.11.2", - "rcgen 0.8.13", + "rcgen 0.8.14", "serde", "serde_json", "serde_yaml", @@ -3180,9 +3181,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.131" +version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c3b4822ccebfa39c02fc03d1534441b22ead323fa0f48bb7ddd8e6ba076a40" +checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" [[package]] name = "libflate" @@ -3970,9 +3971,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" +checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" [[package]] name = "one_err" @@ -4215,17 +4216,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" -[[package]] -name = "pem" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" -dependencies = [ - "base64", - "once_cell", - "regex", -] - [[package]] name = "pem" version = "1.1.0" @@ -4924,12 +4914,12 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2351cbef4bf91837f5ff7face6091cb277ba960d1638d2c5ae2327859912fbba" +checksum = "5911d1403f4143c9d56a702069d593e8d0f3fab880a85e103604d0893ea31ba7" dependencies = [ "chrono", - "pem 0.8.3", + "pem", "ring", "yasna 0.4.0", ] @@ -4940,7 +4930,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ - "pem 1.1.0", + "pem", "ring", "time 0.3.13", "yasna 0.5.0", @@ -5389,9 +5379,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ "bitflags", "core-foundation", @@ -6760,9 +6750,9 @@ checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" [[package]] name = "wasm-encoder" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8905fd25fdadeb0e7e8bf43a9f46f9f972d6291ad0c7a32573b88dd13a6cfa6b" +checksum = "d443c5a7daae71697d97ec12ad70b4fe8766d3a0f4db16158ac8b781365892f7" dependencies = [ "leb128", ] @@ -6980,9 +6970,9 @@ checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" [[package]] name = "wast" -version = "45.0.0" +version = "46.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186c474c4f9bb92756b566d592a16591b4526b1a4841171caa3f31d7fe330d96" +checksum = "ea0ab19660e3ea6891bba69167b9be40fad00fb1fe3dd39c5eebcee15607131b" dependencies = [ "leb128", "memchr", @@ -6992,9 +6982,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d4bc4724b4f02a482c8cab053dac5ef26410f264c06ce914958f9a42813556" +checksum = "8f775282def4d5bffd94d60d6ecd57bfe6faa46171cdbf8d32bd5458842b1e3e" dependencies = [ "wast", ] @@ -7179,9 +7169,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.3.0" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" [[package]] name = "zip" diff --git a/Cargo.toml b/Cargo.toml index 744d1bd54f..2a3cc7806d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,6 +58,7 @@ incremental = false codegen-units = 16 [patch.crates-io] +isotest = { git = "https://github.com/maackle/isotest-rs.git" } # holochain_wasmer_guest = { git = "https://github.com/holochain/holochain-wasmer.git", branch = "pr/bump-serde" } # holochain_wasmer_host = { git = "https://github.com/holochain/holochain-wasmer.git", branch = "pr/bump-serde" } # holochain_wasmer_common = { git = "https://github.com/holochain/holochain-wasmer.git", branch = "pr/bump-serde" } diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index cbab6d4ff4..154969bed0 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -37,7 +37,16 @@ impl From for TestChainHash { isotest::iso! { TestChainHash => |h| hash_from_u32(*h), - ActionHash => |h| Self(u32::from_le_bytes(h.get_raw_32()[0..4].try_into().unwrap())) + ActionHash => |h| Self(u32::from_le_bytes(h.get_raw_32()[0..4].try_into().unwrap())), + test_cases: [ + TestChainHash(0), + TestChainHash(256), + TestChainHash(u32::MAX) + ], + real_cases: [ + ActionHash::from_raw_32(vec![0; 32]), + ActionHash::from_raw_32(vec![255; 32]) + ], } /// A test implementation of a minimal ChainItem which uses simple numbers for hashes @@ -234,30 +243,28 @@ isotest::iso! { hash: TestChainHash::test(a.get_hash()), prev: a.prev_hash().map(TestChainHash::test), } - } -} - -#[cfg(test)] -#[test_case::test_case(0)] -#[test_case::test_case(65536)] -fn test_hash_roundtrips(u: u32) { - let h1 = TestChainHash(u); - let h2 = ActionHash::from_raw_32(u.to_le_bytes().iter().cycle().take(32).copied().collect()); - isotest::test_iso_invariants(h1, h2); -} - -#[cfg(test)] -#[test_case::test_case(0, 0, None)] -#[test_case::test_case(0, 0, Some(0))] -#[test_case::test_case(1, 1, Some(0))] -#[test_case::test_case(1, 1, None => ignore)] // this case is unrepresentable with these types -fn test_chain_item_roundtrips(seq: u32, hash: u32, prev: Option) { - use ::fixt::prelude::*; - let item = TestChainItem { - seq, - hash: hash.into(), - prev: prev.map(Into::into), - }; - let action = fixt!(SignedActionHashed); - isotest::test_iso_invariants(item, action); + }, + test_cases: [ + TestChainItem { + seq: 0, + hash: 0.into(), + prev: None, + }, + TestChainItem { + seq: 0, + hash: 0.into(), + prev: Some(0.into()), + }, + TestChainItem { + seq: 1, + hash: 1.into(), + prev: Some(1.into()), + }, + TestChainItem { + seq: 1, + hash: 1.into(), + prev: None, + }, + ], + real_cases: [::fixt::fixt!(SignedActionHashed)] } From eafb72f85daaa831dd0af20a71761919a960d01c Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 17:58:49 -0700 Subject: [PATCH 048/111] Remove isotest patch --- Cargo.lock | 5 +++-- Cargo.toml | 2 +- crates/holochain/Cargo.toml | 2 +- crates/holochain_cascade/Cargo.toml | 2 +- crates/holochain_types/Cargo.toml | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 020564ab37..1b13362d77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2815,8 +2815,9 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "isotest" -version = "0.1.0-dev.3" -source = "git+https://github.com/maackle/isotest-rs.git#66a576c40c0b073abe173d2a6a452aef062363b9" +version = "0.1.0-dev.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35af8270f9d46608680c394324bc37b692b1327d07497fbb76eba0dd6cd4d9dd" dependencies = [ "futures", "paste", diff --git a/Cargo.toml b/Cargo.toml index 2a3cc7806d..ebebedf7ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ incremental = false codegen-units = 16 [patch.crates-io] -isotest = { git = "https://github.com/maackle/isotest-rs.git" } +# isotest = { git = "https://github.com/maackle/isotest-rs.git" } # holochain_wasmer_guest = { git = "https://github.com/holochain/holochain-wasmer.git", branch = "pr/bump-serde" } # holochain_wasmer_host = { git = "https://github.com/holochain/holochain-wasmer.git", branch = "pr/bump-serde" } # holochain_wasmer_common = { git = "https://github.com/holochain/holochain-wasmer.git", branch = "pr/bump-serde" } diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index b682e427a9..ff8994fce8 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -95,7 +95,7 @@ anyhow = "1.0.26" assert_cmd = "1.0.1" contrafact = "0.1.0-dev.1" criterion = { version = "0.3", features = [ "async_tokio" ] } -isotest = "0.1.0-dev.3" +isotest = "0.1.0-dev.4" kitsune_p2p_bootstrap = { path = "../kitsune_p2p/bootstrap" } maplit = "1" pretty_assertions = "0.6.1" diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index b396a4aa74..5cf958254b 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -37,7 +37,7 @@ async-trait = { version = "0.1", optional = true } mockall = { version = "0.10.2", optional = true } [dev-dependencies] -isotest = "0.1.0-dev.3" +isotest = "0.1.0-dev.4" matches = "0.1" pretty_assertions = "0.7.2" test-case = "2.1" diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index 29699533c3..e6b2ffc25b 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -57,7 +57,7 @@ tracing = "0.1.26" derive_builder = "0.9.0" arbitrary = { version = "1.0", features = ["derive"], optional = true} -isotest = { version = "0.1.0-dev.3", optional = true } +isotest = { version = "0.1.0-dev.4", optional = true } # contrafact contrafact = { version = "0.1.0-dev.1", optional = true } @@ -66,7 +66,7 @@ contrafact = { version = "0.1.0-dev.1", optional = true } holochain_types = { path = ".", features = ["test_utils"]} arbitrary = "1.0" -isotest = { version = "0.1.0-dev.3" } +isotest = { version = "0.1.0-dev.4" } maplit = "1" matches = "0.1" pretty_assertions = "0" From 3305f3ef20f25610b2c13142a834d2bbd2b00295 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 18:22:19 -0700 Subject: [PATCH 049/111] Remove impossible iso test case --- crates/holochain_types/src/test_utils/chain.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 154969bed0..10daf4ce52 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -260,11 +260,13 @@ isotest::iso! { hash: 1.into(), prev: Some(1.into()), }, - TestChainItem { - seq: 1, - hash: 1.into(), - prev: None, - }, + // This value has no equivalent representation as an Action, + // since a Dna Action cannot specify a seq number other than 0. + // TestChainItem { + // seq: 1, + // hash: 1.into(), + // prev: None, + // }, ], real_cases: [::fixt::fixt!(SignedActionHashed)] } From db5cc364adb122ad5961d7d1722abd44926833cb Mon Sep 17 00:00:00 2001 From: neonphog Date: Fri, 19 Aug 2022 09:31:11 -0600 Subject: [PATCH 050/111] cleanup deps --- Cargo.lock | 39 ++++++++++--------- crates/holochain_keystore/Cargo.toml | 3 +- .../src/agent_pubkey_ext.rs | 6 +-- .../src/crude_mock_keystore.rs | 16 +++----- crates/holochain_keystore/src/error.rs | 4 -- crates/holochain_keystore/src/lib.rs | 4 +- .../src/meta_lair_client.rs | 11 +++++- 7 files changed, 41 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f0c85e27be..f984d96a54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1521,9 +1521,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" dependencies = [ "futures-channel", "futures-core", @@ -1536,9 +1536,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" dependencies = [ "futures-core", "futures-sink", @@ -1546,15 +1546,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" dependencies = [ "futures-core", "futures-task", @@ -1563,9 +1563,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" [[package]] name = "futures-lite" @@ -1584,9 +1584,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" dependencies = [ "proc-macro2", "quote", @@ -1595,15 +1595,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" [[package]] name = "futures-timer" @@ -1613,9 +1613,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" dependencies = [ "futures-channel", "futures-core", @@ -2194,12 +2194,13 @@ name = "holochain_keystore" version = "0.0.50" dependencies = [ "base64", - "ghost_actor 0.3.0-alpha.4", + "futures", "holo_hash", "holochain_serialized_bytes", "holochain_sqlite", "holochain_zome_types", "kitsune_p2p_types", + "must_future", "nanoid 0.4.0", "one_err", "parking_lot 0.11.2", diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 446b69cd61..9935a02eef 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -12,11 +12,12 @@ edition = "2021" [dependencies] base64 = "0.13.0" -ghost_actor = "=0.3.0-alpha.4" +futures = "0.3.23" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.44"} kitsune_p2p_types = { version = "0.0.29", path = "../kitsune_p2p/types" } +must_future = "0.1.2" nanoid = "0.4.0" one_err = "0.0.5" parking_lot = "0.11" diff --git a/crates/holochain_keystore/src/agent_pubkey_ext.rs b/crates/holochain_keystore/src/agent_pubkey_ext.rs index e542915b08..5d91531a29 100644 --- a/crates/holochain_keystore/src/agent_pubkey_ext.rs +++ b/crates/holochain_keystore/src/agent_pubkey_ext.rs @@ -1,8 +1,8 @@ use crate::*; -use ghost_actor::dependencies::must_future::MustBoxFuture; use holochain_zome_types::prelude::*; use kitsune_p2p_types::dependencies::lair_keystore_api; use lair_keystore_api::LairResult; +use must_future::MustBoxFuture; use std::sync::Arc; /// Extend holo_hash::AgentPubKey with additional signature functionality @@ -40,7 +40,7 @@ pub trait AgentPubKeyExt { where S: Serialize + std::fmt::Debug, { - use ghost_actor::dependencies::futures::future::FutureExt; + use futures::future::FutureExt; let data = match holochain_serialized_bytes::encode(&input) { Err(e) => { @@ -57,7 +57,7 @@ pub trait AgentPubKeyExt { where D: TryInto, { - use ghost_actor::dependencies::futures::future::FutureExt; + use futures::future::FutureExt; let data = match data.try_into() { Err(e) => { diff --git a/crates/holochain_keystore/src/crude_mock_keystore.rs b/crates/holochain_keystore/src/crude_mock_keystore.rs index 31d94e2da5..0ff776e6e2 100644 --- a/crates/holochain_keystore/src/crude_mock_keystore.rs +++ b/crates/holochain_keystore/src/crude_mock_keystore.rs @@ -5,7 +5,7 @@ use std::sync::atomic::AtomicBool; use std::sync::Arc; -use ghost_actor::dependencies::futures::FutureExt; +use futures::FutureExt; use kitsune_p2p_types::dependencies::lair_keystore_api::lair_client::traits::AsLairClient; use kitsune_p2p_types::dependencies::lair_keystore_api::prelude::{LairApiEnum, LairClient}; use kitsune_p2p_types::dependencies::lair_keystore_api::LairResult; @@ -89,17 +89,14 @@ impl AsLairClient for CrudeMockKeystore { unimplemented!() } - fn shutdown( - &self, - ) -> ghost_actor::dependencies::futures::future::BoxFuture<'static, LairResult<()>> { + fn shutdown(&self) -> futures::future::BoxFuture<'static, LairResult<()>> { unimplemented!() } fn request( &self, _request: LairApiEnum, - ) -> ghost_actor::dependencies::futures::future::BoxFuture<'static, LairResult> - { + ) -> futures::future::BoxFuture<'static, LairResult> { let err = (self.0)(); async move { Err(err) }.boxed() } @@ -114,17 +111,14 @@ impl AsLairClient for RealOrMockKeystore { self.real.cli().0.get_dec_ctx_key() } - fn shutdown( - &self, - ) -> ghost_actor::dependencies::futures::future::BoxFuture<'static, LairResult<()>> { + fn shutdown(&self) -> futures::future::BoxFuture<'static, LairResult<()>> { self.real.cli().0.shutdown().boxed() } fn request( &self, request: LairApiEnum, - ) -> ghost_actor::dependencies::futures::future::BoxFuture<'static, LairResult> - { + ) -> futures::future::BoxFuture<'static, LairResult> { if self.use_mock.load(std::sync::atomic::Ordering::SeqCst) { let r = (self.mock)(request); async move { r }.boxed() diff --git a/crates/holochain_keystore/src/error.rs b/crates/holochain_keystore/src/error.rs index e3d5e1dbd6..1616bc3e5d 100644 --- a/crates/holochain_keystore/src/error.rs +++ b/crates/holochain_keystore/src/error.rs @@ -4,10 +4,6 @@ use holochain_zome_types::signature::Signature; /// Keystore Error Type. #[derive(Debug, thiserror::Error)] pub enum KeystoreError { - /// An error generated from the GhostActor system. - #[error("GhostError: {0}")] - GhostError(#[from] ghost_actor::GhostError), - /// Error serializing data. #[error("SerializedBytesError: {0}")] SerializedBytesError(#[from] SerializedBytesError), diff --git a/crates/holochain_keystore/src/lib.rs b/crates/holochain_keystore/src/lib.rs index f10914d7c7..171dc0f895 100644 --- a/crates/holochain_keystore/src/lib.rs +++ b/crates/holochain_keystore/src/lib.rs @@ -24,9 +24,7 @@ //! //! let signature = agent_pubkey.sign(&keystore, &my_data_1).await.unwrap(); //! -//! /* -//! assert!(agent_pubkey.verify_signature(&signature, &my_data_1).await.unwrap()); -//! */ +//! assert!(agent_pubkey.verify_signature(&signature, &my_data_1).await); //! }).await.unwrap(); //! } //! ``` diff --git a/crates/holochain_keystore/src/meta_lair_client.rs b/crates/holochain_keystore/src/meta_lair_client.rs index faac0fb211..cefbc86d7c 100644 --- a/crates/holochain_keystore/src/meta_lair_client.rs +++ b/crates/holochain_keystore/src/meta_lair_client.rs @@ -114,11 +114,20 @@ impl MetaLairClient { exact_client_server_version_match: true, }; + tracing::warn!("lair connection lost, attempting reconnect"); + let client = match ipc_keystore_connect_options(opts).await { - Err(_) => continue 'reconnect, + Err(err) => { + tracing::error!(?err, "lair connect error"); + continue 'reconnect; + } Ok(client) => client, }; + *inner.lock() = client; + + tracing::info!("lair reconnect success"); + break 'reconnect; } } From ec7c42e16b4034d8b80923161668334583198e1a Mon Sep 17 00:00:00 2001 From: neonphog Date: Mon, 22 Aug 2022 13:51:28 -0600 Subject: [PATCH 051/111] checkpoint --- Cargo.lock | 11 +++++ crates/holochain_keystore/Cargo.toml | 1 + .../src/bin/test-keystore-srv.rs | 44 +++++++++++++++++++ crates/holochain_keystore/src/lib.rs | 3 ++ .../holochain_keystore/src/test_reconnect.rs | 5 +++ 5 files changed, 64 insertions(+) create mode 100644 crates/holochain_keystore/src/bin/test-keystore-srv.rs create mode 100644 crates/holochain_keystore/src/test_reconnect.rs diff --git a/Cargo.lock b/Cargo.lock index f984d96a54..3e71c6b02f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2207,6 +2207,7 @@ dependencies = [ "serde", "serde_bytes", "sodoken", + "tempdir", "thiserror", "tokio", "tracing", @@ -5873,6 +5874,16 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" +[[package]] +name = "tempdir" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +dependencies = [ + "rand 0.4.6", + "remove_dir_all", +] + [[package]] name = "tempfile" version = "3.3.0" diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 9935a02eef..78769ab42f 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -24,6 +24,7 @@ parking_lot = "0.11" serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" sodoken = "=0.0.4" +tempdir = "0.3.7" thiserror = "1.0.22" tokio = { version = "1.11", features = [ "full" ] } tracing = "0.1" diff --git a/crates/holochain_keystore/src/bin/test-keystore-srv.rs b/crates/holochain_keystore/src/bin/test-keystore-srv.rs new file mode 100644 index 0000000000..d81c4589a8 --- /dev/null +++ b/crates/holochain_keystore/src/bin/test-keystore-srv.rs @@ -0,0 +1,44 @@ +use kitsune_p2p_types::dependencies::lair_keystore_api; +use lair_keystore_api::prelude::*; +use lair_keystore_api::ipc_keystore::*; +use lair_keystore_api::dependencies::hc_seed_bundle; +use std::sync::Arc; + +#[tokio::main(flavor = "multi_thread")] +async fn main() { + let mut arg_iter = std::env::args_os(); + arg_iter.next().unwrap(); + let path = std::path::PathBuf::from(arg_iter.next().expect("require lair path")); + + // set up a passphrase + let passphrase = sodoken::BufRead::from(&b"passphrase"[..]); + + // create the config for the test server + let config = Arc::new( + hc_seed_bundle::PwHashLimits::Minimum + .with_exec(|| { + LairServerConfigInner::new( + &path, + passphrase.clone(), + ) + }) + .await + .unwrap(), + ); + + // create an in-process keystore with an in-memory store + let keystore = IpcKeystoreServer::new( + config, + lair_keystore_api::mem_store::create_mem_store_factory(), + passphrase.clone(), + ) + .await + .unwrap(); + + let config = keystore.get_config(); + println!("{}", config); + + println!("OK"); + + futures::future::pending::<()>().await; +} diff --git a/crates/holochain_keystore/src/lib.rs b/crates/holochain_keystore/src/lib.rs index 171dc0f895..f4a9b9ddfb 100644 --- a/crates/holochain_keystore/src/lib.rs +++ b/crates/holochain_keystore/src/lib.rs @@ -43,3 +43,6 @@ pub use agent_pubkey_ext::*; pub mod crude_mock_keystore; pub mod lair_keystore; pub mod test_keystore; + +#[cfg(test)] +mod test_reconnect; diff --git a/crates/holochain_keystore/src/test_reconnect.rs b/crates/holochain_keystore/src/test_reconnect.rs new file mode 100644 index 0000000000..2101c2c367 --- /dev/null +++ b/crates/holochain_keystore/src/test_reconnect.rs @@ -0,0 +1,5 @@ +//use kitsune_p2p_types::dependencies::lair_keystore_api; + +#[tokio::test(flavor = "multi_thread")] +async fn test_reconnect() { +} From bfcdd6fc0b7ac799045ca478d8c77c68af54d1e6 Mon Sep 17 00:00:00 2001 From: neonphog Date: Mon, 22 Aug 2022 16:31:04 -0600 Subject: [PATCH 052/111] integration test for holochain_keystore reconnect --- Cargo.lock | 67 +++++++--- crates/holochain_keystore/Cargo.toml | 6 +- .../src/bin/test-keystore-srv.rs | 28 ++++- crates/holochain_keystore/src/lib.rs | 3 - .../holochain_keystore/src/test_reconnect.rs | 4 - .../tests/test_reconnect.rs | 117 ++++++++++++++++++ 6 files changed, 195 insertions(+), 30 deletions(-) delete mode 100644 crates/holochain_keystore/src/test_reconnect.rs create mode 100644 crates/holochain_keystore/tests/test_reconnect.rs diff --git a/Cargo.lock b/Cargo.lock index f3b2ed0aa3..cc3dc06b69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,6 +141,20 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "assert_cmd" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ae1ddd39efd67689deb1979d80bad3bf7f2b09c6e6117c8d1f2443b5e2f83e" +dependencies = [ + "bstr", + "doc-comment", + "predicates 2.1.1", + "predicates-core", + "predicates-tree", + "wait-timeout", +] + [[package]] name = "async-attributes" version = "1.1.2" @@ -1968,7 +1982,7 @@ version = "0.0.155" dependencies = [ "anyhow", "arbitrary", - "assert_cmd", + "assert_cmd 1.0.8", "async-recursion", "async-trait", "base64", @@ -2029,7 +2043,7 @@ dependencies = [ "sd-notify", "serde", "serde_json", - "serde_yaml", + "serde_yaml 0.8.24", "serial_test", "shrinkwraprs", "sodoken", @@ -2106,7 +2120,7 @@ name = "holochain_cli_bundle" version = "0.0.48" dependencies = [ "anyhow", - "assert_cmd", + "assert_cmd 1.0.8", "holochain_serialized_bytes", "holochain_types", "holochain_util", @@ -2115,7 +2129,7 @@ dependencies = [ "predicates 1.0.8", "serde", "serde_bytes", - "serde_yaml", + "serde_yaml 0.8.24", "structopt", "tempfile", "thiserror", @@ -2128,7 +2142,7 @@ version = "0.0.48" dependencies = [ "ansi_term 0.12.1", "anyhow", - "assert_cmd", + "assert_cmd 1.0.8", "chrono", "futures", "holochain_conductor_api", @@ -2142,7 +2156,7 @@ dependencies = [ "once_cell", "portpicker", "serde", - "serde_yaml", + "serde_yaml 0.8.24", "sodoken", "structopt", "tokio", @@ -2168,7 +2182,7 @@ dependencies = [ "observability", "serde", "serde_derive", - "serde_yaml", + "serde_yaml 0.8.24", "structopt", "thiserror", "tracing", @@ -2193,6 +2207,7 @@ dependencies = [ name = "holochain_keystore" version = "0.0.51" dependencies = [ + "assert_cmd 2.0.4", "base64", "futures", "holo_hash", @@ -2206,6 +2221,7 @@ dependencies = [ "parking_lot 0.11.2", "serde", "serde_bytes", + "serde_yaml 0.9.10", "sodoken", "tempdir", "thiserror", @@ -2421,7 +2437,7 @@ dependencies = [ "serde_derive", "serde_json", "serde_with", - "serde_yaml", + "serde_yaml 0.8.24", "shrinkwraprs", "strum", "strum_macros", @@ -2563,7 +2579,7 @@ dependencies = [ "rusqlite", "serde", "serde_bytes", - "serde_yaml", + "serde_yaml 0.8.24", "shrinkwraprs", "strum", "subtle", @@ -3068,7 +3084,7 @@ dependencies = [ "holochain_serialized_bytes", "rusqlite", "serde", - "serde_yaml", + "serde_yaml 0.8.24", ] [[package]] @@ -3150,7 +3166,7 @@ dependencies = [ "rcgen 0.8.13", "serde", "serde_json", - "serde_yaml", + "serde_yaml 0.8.24", "tokio", "toml", "tracing", @@ -3592,7 +3608,7 @@ dependencies = [ "serde", "serde_bytes", "serde_derive", - "serde_yaml", + "serde_yaml 0.8.24", "tempfile", "thiserror", "tokio", @@ -5400,9 +5416,9 @@ checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" dependencies = [ "serde_derive", ] @@ -5437,9 +5453,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", @@ -5504,6 +5520,19 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "serde_yaml" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a09f551ccc8210268ef848f0bab37b306e87b85b2e017b899e7fb815f5aed62" +dependencies = [ + "indexmap", + "itoa 1.0.2", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serial_test" version = "0.4.0" @@ -6465,6 +6494,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "unsafe-libyaml" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931179334a56395bcf64ba5e0ff56781381c1a5832178280c7d7f91d1679aeb0" + [[package]] name = "untrusted" version = "0.7.1" diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 870446bd15..830e3c1b41 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -24,7 +24,6 @@ parking_lot = "0.11" serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" sodoken = "=0.0.4" -tempdir = "0.3.7" thiserror = "1.0.22" tokio = { version = "1.11", features = [ "full" ] } tracing = "0.1" @@ -32,3 +31,8 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } + +[dev-dependencies] +assert_cmd = "2.0.4" +serde_yaml = "0.9.10" +tempdir = "0.3.7" diff --git a/crates/holochain_keystore/src/bin/test-keystore-srv.rs b/crates/holochain_keystore/src/bin/test-keystore-srv.rs index eaa7adcbe2..eff10713bc 100644 --- a/crates/holochain_keystore/src/bin/test-keystore-srv.rs +++ b/crates/holochain_keystore/src/bin/test-keystore-srv.rs @@ -4,22 +4,38 @@ use lair_keystore_api::ipc_keystore::*; use lair_keystore_api::prelude::*; use std::sync::Arc; +fn load_conf(conf_path: &std::path::Path) -> LairResult { + let bytes = std::fs::read(conf_path)?; + let inner = LairServerConfigInner::from_bytes(&bytes)?; + Ok(Arc::new(inner)) +} + #[tokio::main(flavor = "multi_thread")] async fn main() { let mut arg_iter = std::env::args_os(); arg_iter.next().unwrap(); let path = std::path::PathBuf::from(arg_iter.next().expect("require lair path")); + let mut conf_path = path.clone(); + conf_path.push("lair-config.yaml"); + // set up a passphrase let passphrase = sodoken::BufRead::from(&b"passphrase"[..]); // create the config for the test server - let config = Arc::new( - hc_seed_bundle::PwHashLimits::Minimum - .with_exec(|| LairServerConfigInner::new(&path, passphrase.clone())) - .await - .unwrap(), - ); + let config = match load_conf(&conf_path) { + Ok(config) => config, + Err(_) => { + let conf = Arc::new( + hc_seed_bundle::PwHashLimits::Minimum + .with_exec(|| LairServerConfigInner::new(&path, passphrase.clone())) + .await + .unwrap(), + ); + std::fs::write(conf_path, conf.to_string().as_bytes()).unwrap(); + conf + } + }; // create an in-process keystore with an in-memory store let keystore = IpcKeystoreServer::new( diff --git a/crates/holochain_keystore/src/lib.rs b/crates/holochain_keystore/src/lib.rs index f4a9b9ddfb..171dc0f895 100644 --- a/crates/holochain_keystore/src/lib.rs +++ b/crates/holochain_keystore/src/lib.rs @@ -43,6 +43,3 @@ pub use agent_pubkey_ext::*; pub mod crude_mock_keystore; pub mod lair_keystore; pub mod test_keystore; - -#[cfg(test)] -mod test_reconnect; diff --git a/crates/holochain_keystore/src/test_reconnect.rs b/crates/holochain_keystore/src/test_reconnect.rs deleted file mode 100644 index 84502b1e40..0000000000 --- a/crates/holochain_keystore/src/test_reconnect.rs +++ /dev/null @@ -1,4 +0,0 @@ -//use kitsune_p2p_types::dependencies::lair_keystore_api; - -#[tokio::test(flavor = "multi_thread")] -async fn test_reconnect() {} diff --git a/crates/holochain_keystore/tests/test_reconnect.rs b/crates/holochain_keystore/tests/test_reconnect.rs new file mode 100644 index 0000000000..dc1a28880d --- /dev/null +++ b/crates/holochain_keystore/tests/test_reconnect.rs @@ -0,0 +1,117 @@ +use assert_cmd::cargo::CommandCargoExt; +use holochain_keystore::lair_keystore::*; +use holochain_keystore::MetaLairClient; +use kitsune_p2p_types::dependencies::url2; +use std::io::BufRead; +use std::sync::Arc; + +struct Proc(std::process::Child); + +impl Drop for Proc { + fn drop(&mut self) { + self.0.kill().unwrap(); + self.0.wait().unwrap(); + } +} + +struct Cli(MetaLairClient); + +impl Drop for Cli { + fn drop(&mut self) { + let fut = self.0.shutdown(); + tokio::task::spawn(fut); + } +} + +impl std::ops::Deref for Cli { + type Target = MetaLairClient; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +fn run_test_keystore(dir: &std::path::Path) -> (Proc, url2::Url2) { + let mut cmd = std::process::Command::cargo_bin("test-keystore-srv").unwrap(); + cmd.arg(dir).stdout(std::process::Stdio::piped()); + + println!("{:?}", cmd); + + let mut cmd = cmd.spawn().unwrap(); + + let mut yaml = String::new(); + let mut lines = std::io::BufReader::new(cmd.stdout.take().unwrap()).lines(); + while let Some(line) = lines.next() { + let line = line.unwrap(); + if line == "OK" { + break; + } + yaml.push_str(&line); + yaml.push('\n'); + } + + tokio::task::spawn(async move { for _line in lines {} }); + + #[derive(Debug, serde::Deserialize)] + #[serde(rename_all = "camelCase")] + struct Conf { + connection_url: url2::Url2, + } + + let conf: Conf = serde_yaml::from_str(&yaml).unwrap(); + + (Proc(cmd), conf.connection_url) +} + +async fn connect_cli(connection_url: url2::Url2) -> Cli { + let passphrase = sodoken::BufRead::from(&b"passphrase"[..]); + let cli = spawn_lair_keystore(connection_url, passphrase) + .await + .unwrap(); + + Cli(cli) +} + +#[tokio::test(flavor = "multi_thread")] +async fn test_reconnect() { + let tmpdir = tempdir::TempDir::new("lair keystore test").unwrap(); + let tag: Arc = "test-tag".into(); + + let start = std::time::Instant::now(); + + let (proc, url) = run_test_keystore(tmpdir.path()); + let cli = connect_cli(url).await; + cli.get_or_create_tls_cert_by_tag(tag.clone()) + .await + .unwrap(); + + println!("launch to first test call in {:?}", start.elapsed()); + + drop(proc); + + tokio::time::sleep(std::time::Duration::from_millis(100)).await; + + assert!(cli + .get_or_create_tls_cert_by_tag(tag.clone()) + .await + .is_err()); + + let (proc, _url) = run_test_keystore(tmpdir.path()); + + let mut all_good = false; + + for _ in 0..10 { + tokio::time::sleep(std::time::Duration::from_millis(100)).await; + if cli.get_or_create_tls_cert_by_tag(tag.clone()).await.is_ok() { + all_good = true; + break; + } + } + + drop(cli); + drop(proc); + + if !all_good { + panic!("Reconnect was never successful"); + } +} From b4bfee0ba82c0f8af1759e5abc7d4e5ab2926ba5 Mon Sep 17 00:00:00 2001 From: neonphog Date: Mon, 22 Aug 2022 16:59:21 -0600 Subject: [PATCH 053/111] changelog --- crates/holochain_keystore/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/holochain_keystore/CHANGELOG.md b/crates/holochain_keystore/CHANGELOG.md index a8183fe7e7..9a1d25cc37 100644 --- a/crates/holochain_keystore/CHANGELOG.md +++ b/crates/holochain_keystore/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +- Add lair disconnect detection / reconnect loop with backoff for keystore resiliency. [\#1529](https://github.com/holochain/holochain/pull/1529) + ## 0.0.51 ## 0.0.50 From 52e8452ef089dd166c6f5558427df8490ccb3c69 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 13:29:06 -0700 Subject: [PATCH 054/111] Re-include missing test fns --- .../must_get_agent_activity/test.rs | 1 + crates/holochain_types/src/chain.rs | 2 +- crates/holochain_types/src/chain/test.rs | 10 +------ .../holochain_types/src/test_utils/chain.rs | 30 ++++++++++++++++++- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index 4d5c812b4f..6db9fbceaa 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -5,6 +5,7 @@ use holo_hash::AgentPubKey; use holo_hash::DnaHash; use holochain_sqlite::db::DbKindDht; use holochain_state::prelude::*; +use holochain_types::chain::test::*; use holochain_types::dht_op::DhtOpLight; use holochain_types::dht_op::OpOrder; use holochain_types::dht_op::UniqueForm; diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index ac7644b663..de8d373d91 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -13,7 +13,7 @@ use holochain_zome_types::ChainItem; use holochain_zome_types::SignedActionHashed; #[cfg(all(test, feature = "test_utils"))] -mod test; +pub mod test; /// Helpers for constructing AgentActivity pub trait AgentActivityExt { diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index ac743d3bd3..d41d4252e6 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,4 +1,4 @@ -use holo_hash::ActionHash; +use holo_hash::{ActionHash, EntryHash}; use std::collections::HashMap; use std::ops::Range; use test_case::test_case; @@ -7,14 +7,6 @@ use crate::{prelude::TestChainItem, test_utils::chain::*}; use super::*; -/// Create a hash from a u32. -fn hash(i: u32) -> TestHash { - i.into() -} - -pub type TestHash = ::Hash; -pub type TestFilter = ChainFilter; - /// Build a chain of RegisterAgentActivity and then run them through the /// chain filter. fn build_chain(c: Vec, filter: TestFilter) -> Vec { diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 400fb5fe43..4c42d797d6 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -2,7 +2,7 @@ use std::ops::Range; use arbitrary::Arbitrary; use arbitrary::Unstructured; -use holo_hash::ActionHash; +use holo_hash::*; use holochain_zome_types::*; use super::TestChainHash; @@ -12,6 +12,34 @@ fn forked_hash(n: u8, i: u8) -> TestChainHash { TestChainHash(n as u32 + (i as u32) * 256) } +pub type TestHash = ::Hash; +pub type TestFilter = ChainFilter; + +/// Create a hash from a u32. +fn hash(i: u32) -> TestHash { + i.into() +} + +pub fn action_hash(i: &[u8]) -> ActionHash { + ActionHash::from_raw_36(hash(i)) +} + +pub fn agent_hash(i: &[u8]) -> AgentPubKey { + AgentPubKey::from_raw_36(hash(i)) +} + +pub fn entry_hash(i: &[u8]) -> EntryHash { + EntryHash::from_raw_36(hash(i)) +} + +/// Create a chain per agent +pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { + ranges + .iter() + .map(|(a, range)| (agent_hash(&[*a]), chain(range.clone()))) + .collect() +} + /// Create a chain from a range where the first chain items /// previous hash == that items hash. pub fn chain(range: Range) -> Vec { From 8c8c3b40b4efab7630e41f843ff898e89b18f542 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 13:39:46 -0700 Subject: [PATCH 055/111] Get things compiling again --- Cargo.lock | 1 + crates/holochain_cascade/Cargo.toml | 1 + .../must_get_agent_activity/test.rs | 18 +++++++++--------- crates/holochain_types/src/chain/test.rs | 13 ++++++++++--- crates/holochain_types/src/test_utils/chain.rs | 17 ++++++++++------- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0c0271277..79cc635b78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2074,6 +2074,7 @@ dependencies = [ "holochain_state", "holochain_types", "holochain_zome_types", + "isotest", "kitsune_p2p", "matches", "mockall 0.10.2", diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index c9a4afe67e..40bc4b209d 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -37,6 +37,7 @@ async-trait = { version = "0.1", optional = true } mockall = { version = "0.10.2", optional = true } [dev-dependencies] +isotest = "0.1.0-dev.3" matches = "0.1" pretty_assertions = "0.7.2" test-case = "2.1" diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index 6db9fbceaa..9de7ae3961 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -5,7 +5,6 @@ use holo_hash::AgentPubKey; use holo_hash::DnaHash; use holochain_sqlite::db::DbKindDht; use holochain_state::prelude::*; -use holochain_types::chain::test::*; use holochain_types::dht_op::DhtOpLight; use holochain_types::dht_op::OpOrder; use holochain_types::dht_op::UniqueForm; @@ -45,10 +44,11 @@ use test_case::test_case; /// Extracts the smallest range from the chain filter /// and then returns all actions within that range async fn returns_full_sequence_from_filter( - chain: Vec<(AgentPubKey, Vec)>, + chain: Vec<(AgentPubKey, Vec)>, agent: AgentPubKey, filter: ChainFilter, -) -> Vec<(AgentPubKey, Vec)> { +) -> Vec<(AgentPubKey, Vec)> { + use isotest::Iso; let db = commit_chain(chain); let data = must_get_agent_activity(db.clone().into(), agent.clone(), filter) .await @@ -56,10 +56,10 @@ async fn returns_full_sequence_from_filter( let data = match data { MustGetAgentActivityResponse::Activity(activity) => activity .into_iter() - .map(|RegisterAgentActivity { action: a }| ChainItem { - action_seq: a.hashed.action_seq(), - hash: a.as_hash().clone(), - prev_action: a.hashed.prev_action().cloned(), + .map(|RegisterAgentActivity { action: a }| TestChainItem { + seq: a.hashed.action_seq(), + hash: TestChainHash::test(a.as_hash()), + prev: a.hashed.prev_action().map(TestChainHash::test), }) .collect(), d @ _ => unreachable!("{:?}", d), @@ -95,7 +95,7 @@ async fn returns_full_sequence_from_filter( #[tokio::test(flavor = "multi_thread")] /// Check the query returns the appropriate responses. async fn test_responses( - chain: Vec<(AgentPubKey, Vec)>, + chain: Vec<(AgentPubKey, Vec)>, agent: AgentPubKey, filter: ChainFilter, ) -> MustGetAgentActivityResponse { @@ -105,7 +105,7 @@ async fn test_responses( .unwrap() } -fn commit_chain(chain: Vec<(AgentPubKey, Vec)>) -> DbWrite { +fn commit_chain(chain: Vec<(AgentPubKey, Vec)>) -> DbWrite { let data: Vec<_> = chain .into_iter() .map(|(a, c)| { diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index d41d4252e6..551513b238 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -1,4 +1,4 @@ -use holo_hash::{ActionHash, EntryHash}; +use holo_hash::*; use std::collections::HashMap; use std::ops::Range; use test_case::test_case; @@ -7,6 +7,14 @@ use crate::{prelude::TestChainItem, test_utils::chain::*}; use super::*; +type TestHash = ::Hash; +type TestFilter = ChainFilter; + +/// Create a hash from a u32. +fn hash(i: u32) -> TestHash { + i.into() +} + /// Build a chain of RegisterAgentActivity and then run them through the /// chain filter. fn build_chain(c: Vec, filter: TestFilter) -> Vec { @@ -18,7 +26,6 @@ fn build_chain(c: Vec, filter: TestFilter) -> Vec fn pretty(expected: Vec) -> impl Fn(Vec) { move |actual: Vec| pretty_assertions::assert_eq!(actual, expected) } - #[test_case(1, 0, 0 => chain(0..0))] #[test_case(1, 0, 1 => chain(0..1))] #[test_case(1, 0, 10 => chain(0..1))] @@ -111,7 +118,7 @@ fn matches_chain(a: &Vec, seq: &[u32]) -> bool { forked_chain(&[4..6, 3..8]), ChainFilter::new(action_hash(&[5, 0])).until(action_hash(&[4, 1])), |h| if *h == action_hash(&[5, 0]) { Some(5) } else { Some(4) } => matches MustGetAgentActivityResponse::IncompleteChain ; "chain_top (5,0) until (4,1) chain (0,0) to (5,0) and (3,1) to (7,1)")] fn test_filter_then_check( - chain: Vec, + chain: Vec, filter: ChainFilter, mut f: impl FnMut(&ActionHash) -> Option, ) -> MustGetAgentActivityResponse { diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 4c42d797d6..9de2d709b0 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -12,28 +12,31 @@ fn forked_hash(n: u8, i: u8) -> TestChainHash { TestChainHash(n as u32 + (i as u32) * 256) } -pub type TestHash = ::Hash; -pub type TestFilter = ChainFilter; - -/// Create a hash from a u32. -fn hash(i: u32) -> TestHash { - i.into() +/// Create a hash from a slice by repeating the slice to fill out the array. +fn hash(i: &[u8]) -> Vec { + let mut i = i.iter().copied().take(36).collect::>(); + let num_needed = 36 - i.len(); + i.extend(std::iter::repeat(0).take(num_needed)); + i } +/// Create a hash from a slice by repeating the slice to fill out the array pub fn action_hash(i: &[u8]) -> ActionHash { ActionHash::from_raw_36(hash(i)) } +/// Create a hash from a slice by repeating the slice to fill out the array pub fn agent_hash(i: &[u8]) -> AgentPubKey { AgentPubKey::from_raw_36(hash(i)) } +/// Create a hash from a slice by repeating the slice to fill out the array pub fn entry_hash(i: &[u8]) -> EntryHash { EntryHash::from_raw_36(hash(i)) } /// Create a chain per agent -pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { +pub fn agent_chain(ranges: &[(u8, Range)]) -> Vec<(AgentPubKey, Vec)> { ranges .iter() .map(|(a, range)| (agent_hash(&[*a]), chain(range.clone()))) From f7266f02b0d05c16c8ff93350fd096933bdbeb5c Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 18 Aug 2022 15:35:07 -0700 Subject: [PATCH 056/111] Fix hash construction discrepancy, with errors to fix later --- Cargo.lock | 12 +++++++++++- .../must_get_agent_activity/test.rs | 9 ++++++--- crates/holochain_integrity_types/src/op.rs | 6 ++++++ crates/holochain_types/src/chain.rs | 1 + crates/holochain_types/src/chain/test.rs | 6 +----- crates/holochain_types/src/test_utils.rs | 7 +++---- crates/holochain_types/src/test_utils/chain.rs | 12 +++++++++++- 7 files changed, 39 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79cc635b78..e7cdb6ab57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2411,7 +2411,7 @@ dependencies = [ "nanoid 0.3.0", "observability", "parking_lot 0.10.2", - "pretty_assertions 0.6.1", + "pretty_assertions 0.7.2", "rand 0.8.5", "regex", "rusqlite", @@ -2812,6 +2812,16 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +[[package]] +name = "isotest" +version = "0.1.0-dev.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35af8270f9d46608680c394324bc37b692b1327d07497fbb76eba0dd6cd4d9dd" +dependencies = [ + "futures", + "paste", +] + [[package]] name = "itertools" version = "0.8.2" diff --git a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs index 9de7ae3961..5f149dcf0f 100644 --- a/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs +++ b/crates/holochain_cascade/src/authority/get_agent_activity_query/must_get_agent_activity/test.rs @@ -9,6 +9,7 @@ use holochain_types::dht_op::DhtOpLight; use holochain_types::dht_op::OpOrder; use holochain_types::dht_op::UniqueForm; use holochain_types::test_utils::chain::*; +use holochain_types::test_utils::TestChainItem; use holochain_zome_types::ActionRefMut; use holochain_zome_types::ChainFilter; use holochain_zome_types::Timestamp; @@ -48,7 +49,6 @@ async fn returns_full_sequence_from_filter( agent: AgentPubKey, filter: ChainFilter, ) -> Vec<(AgentPubKey, Vec)> { - use isotest::Iso; let db = commit_chain(chain); let data = must_get_agent_activity(db.clone().into(), agent.clone(), filter) .await @@ -58,8 +58,11 @@ async fn returns_full_sequence_from_filter( .into_iter() .map(|RegisterAgentActivity { action: a }| TestChainItem { seq: a.hashed.action_seq(), - hash: TestChainHash::test(a.as_hash()), - prev: a.hashed.prev_action().map(TestChainHash::test), + hash: todo!("fix in isotest merge"), + prev: a + .hashed + .prev_action() + .map(|_| todo!("fix in isotest merge")), }) .collect(), d @ _ => unreachable!("{:?}", d), diff --git a/crates/holochain_integrity_types/src/op.rs b/crates/holochain_integrity_types/src/op.rs index 3d898257a9..e33a16c6f7 100644 --- a/crates/holochain_integrity_types/src/op.rs +++ b/crates/holochain_integrity_types/src/op.rs @@ -192,6 +192,12 @@ pub struct RegisterAgentActivity { pub action: SignedActionHashed, } +impl AsRef for RegisterAgentActivity { + fn as_ref(&self) -> &SignedActionHashed { + &self.action + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerializedBytes)] #[cfg_attr(feature = "test_utils", derive(arbitrary::Arbitrary))] /// Registers a link between two [`Entry`]s. diff --git a/crates/holochain_types/src/chain.rs b/crates/holochain_types/src/chain.rs index de8d373d91..5edc73ab3a 100644 --- a/crates/holochain_types/src/chain.rs +++ b/crates/holochain_types/src/chain.rs @@ -10,6 +10,7 @@ use holochain_zome_types::prelude::ChainStatus; use holochain_zome_types::ChainFilter; use holochain_zome_types::ChainFilters; use holochain_zome_types::ChainItem; +use holochain_zome_types::RegisterAgentActivity; use holochain_zome_types::SignedActionHashed; #[cfg(all(test, feature = "test_utils"))] diff --git a/crates/holochain_types/src/chain/test.rs b/crates/holochain_types/src/chain/test.rs index 551513b238..ac1df28891 100644 --- a/crates/holochain_types/src/chain/test.rs +++ b/crates/holochain_types/src/chain/test.rs @@ -215,11 +215,7 @@ fn hash_to_seq(hashes: &[u32]) -> impl FnMut(&ActionHash) -> Option { let map = hashes .iter() .map(|i| { - let hash = if *i > u8::MAX as u32 { - action_hash(&i.to_le_bytes()) - } else { - action_hash(&[*i as u8]) - }; + let hash = hash_from_u32(*i); (hash, *i) }) .collect::>(); diff --git a/crates/holochain_types/src/test_utils.rs b/crates/holochain_types/src/test_utils.rs index 011c2f5316..8683acb7b6 100644 --- a/crates/holochain_types/src/test_utils.rs +++ b/crates/holochain_types/src/test_utils.rs @@ -172,15 +172,14 @@ impl From for TestChainHash { } impl From for ActionHash { - fn from(h: TestChainHash) -> Self { - let bytes: Vec = h.0.to_le_bytes().iter().cycle().take(32).copied().collect(); - ActionHash::from_raw_32(bytes) + fn from(_: TestChainHash) -> Self { + todo!("remove when isotest is merged") } } /// A test implementation of a minimal ChainItem which uses simple numbers for hashes /// and always points back to the previous number -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct TestChainItem { /// The sequence number pub seq: u32, diff --git a/crates/holochain_types/src/test_utils/chain.rs b/crates/holochain_types/src/test_utils/chain.rs index 9de2d709b0..b686dd096d 100644 --- a/crates/holochain_types/src/test_utils/chain.rs +++ b/crates/holochain_types/src/test_utils/chain.rs @@ -9,7 +9,7 @@ use super::TestChainHash; use super::TestChainItem; fn forked_hash(n: u8, i: u8) -> TestChainHash { - TestChainHash(n as u32 + (i as u32) * 256) + TestChainHash(u32::from_le_bytes([n, i, 0, 0])) } /// Create a hash from a slice by repeating the slice to fill out the array. @@ -20,6 +20,16 @@ fn hash(i: &[u8]) -> Vec { i } +/// Canonical way to construct a hash from a u32. +/// This is used in various places in our test code, and each must match. +pub fn hash_from_u32(i: u32) -> ActionHash { + if i > u8::MAX as u32 { + action_hash(&i.to_le_bytes()) + } else { + action_hash(&[i as u8]) + } +} + /// Create a hash from a slice by repeating the slice to fill out the array pub fn action_hash(i: &[u8]) -> ActionHash { ActionHash::from_raw_36(hash(i)) From b8b6ddaf8f2b880c224ed24fcb330468008a91d6 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 24 Aug 2022 07:15:35 +1000 Subject: [PATCH 057/111] docs(holochain_state): add docs and readme (#1531) * add docs and readme to holochain state * Update README.tpl * apply develop versions to changed crates the following crates changed since their most recent release and are therefore increased to a develop version: - holochain-0.0.156-dev.0 * create a release from branch release-20220823.103320 the following crates are part of this release: - holochain-0.0.156 * add holochain_state to automatic creation * add hyphen to "in-memory" * generate readmes * uncomment readme generation code Co-authored-by: Jost Schulte Co-authored-by: Holochain Core Dev Team Co-authored-by: release-ci --- crates/holochain_state/README.md | 46 +++++++++++++++++++++++++++- crates/holochain_state/README.tpl | 23 ++++++++++++++ crates/holochain_state/src/lib.rs | 51 +++++++++++++------------------ scripts/generate_readmes.sh | 2 +- 4 files changed, 90 insertions(+), 32 deletions(-) create mode 100644 crates/holochain_state/README.tpl diff --git a/crates/holochain_state/README.md b/crates/holochain_state/README.md index 3734ade858..d38ec1ed5f 100644 --- a/crates/holochain_state/README.md +++ b/crates/holochain_state/README.md @@ -1,3 +1,47 @@ + # holochain_state -TODO: write readme about SQLite usage +[![Project](https://img.shields.io/badge/project-holochain-blue.svg?style=flat-square)](http://holochain.org/) +[![Forum](https://img.shields.io/badge/chat-forum%2eholochain%2enet-blue.svg?style=flat-square)](https://forum.holochain.org) +[![Chat](https://img.shields.io/badge/chat-chat%2eholochain%2enet-blue.svg?style=flat-square)](https://chat.holochain.org) + +[![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://twitter.com/holochain) + +[![Crate](https://img.shields.io/crates/v/holochain_state.svg)](https://crates.io/crates/holochain_state) +[![API Docs](https://docs.rs/holochain_state/badge.svg)](https://docs.rs/holochain_state) + +The holochain state crate provides helpers and abstractions for working +with the `holochain_sqlite` crate. + +### Reads +The main abstraction for creating data read queries is the [`Query`](query::Query) trait. +This can be implemented to make constructing complex queries easier. + +The [`source_chain`] module provides the [`SourceChain`](source_chain::SourceChain) type, +which is the abstraction for working with chains of actions. + +The [`host_fn_workspace`] module provides abstractions for reading data during workflows. + +### Writes +The [`mutations`] module is the complete set of functions +for writing data to sqlite in holochain. + +### In-memory +The [`scratch`] module provides the [`Scratch`](scratch::Scratch) type for +reading and writing data in memory that is not visible anywhere else. + +The SourceChain type uses the Scratch for in-memory operations which +can be flushed to the database. + +The Query trait allows combining arbitrary database SQL queries with +the scratch space so reads can union across the database and in-memory data. + +## License + [![License: CAL 1.0](https://img.shields.io/badge/License-CAL-1.0-blue.svg)](https://github.com/holochain/cryptographic-autonomy-license) + +Copyright (C) 2019 - 2022, Holochain Foundation + +This program is free software: you can redistribute it and/or modify it under the terms of the license +provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. diff --git a/crates/holochain_state/README.tpl b/crates/holochain_state/README.tpl new file mode 100644 index 0000000000..445e659fa6 --- /dev/null +++ b/crates/holochain_state/README.tpl @@ -0,0 +1,23 @@ + +# {{crate}} + +[![Project](https://img.shields.io/badge/project-holochain-blue.svg?style=flat-square)](http://holochain.org/) +[![Forum](https://img.shields.io/badge/chat-forum%2eholochain%2enet-blue.svg?style=flat-square)](https://forum.holochain.org) +[![Chat](https://img.shields.io/badge/chat-chat%2eholochain%2enet-blue.svg?style=flat-square)](https://chat.holochain.org) + +[![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://twitter.com/holochain) + +[![Crate](https://img.shields.io/crates/v/holochain_state.svg)](https://crates.io/crates/holochain_state) +[![API Docs](https://docs.rs/holochain_state/badge.svg)](https://docs.rs/holochain_state) + +{{readme}} + +## License + [![License: CAL 1.0](https://img.shields.io/badge/License-CAL-1.0-blue.svg)](https://github.com/holochain/cryptographic-autonomy-license) + +Copyright (C) 2019 - 2022, Holochain Foundation + +This program is free software: you can redistribute it and/or modify it under the terms of the license +provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. diff --git a/crates/holochain_state/src/lib.rs b/crates/holochain_state/src/lib.rs index 590d4cc902..e1a4757bb6 100644 --- a/crates/holochain_state/src/lib.rs +++ b/crates/holochain_state/src/lib.rs @@ -1,37 +1,28 @@ -//! @todo: update diagram and types -//! # Persisted State building blocks +//! The holochain state crate provides helpers and abstractions for working +//! with the `holochain_sqlite` crate. //! -//! This crate provides a few types for working with databases. The types build upon those found in holochain_sqlite::buffer. -//! - RecordBuf the union of two CasBuffers, one for Entries, one for Actions -//! - ChainSequenceBuf: database representing the chain sequence DB, which provides a special method for accessing the chain head -//! - SourceChainBuf: the union of a RecordBuf and a ChainSequenceBuf, which fully represents a source chain -//! - MetadataBuf: (*unimplemented*) Uses a KvvBuffer to represent EAV-like relationships between CAS entries -//! - Cascade: (*unimplemented*) Unifies two RecordBuf and two MetadataBuf references (one of each is a cache) -//! in order to perform the complex metadata-aware queries for getting entries and links, including CRUD resolution +//! ## Reads +//! The main abstraction for creating data read queries is the [`Query`](query::Query) trait. +//! This can be implemented to make constructing complex queries easier. //! -//! The follow diagram shows the composition hierarchy. -//! The arrows mean "contains at least one of". +//! The [`source_chain`] module provides the [`SourceChain`](source_chain::SourceChain) type, +//! which is the abstraction for working with chains of actions. //! -//! ```none -//! Cascade SourceChain -//! | | -//! | V -//! | SourceChainBuf -//! | | -//! | | -//! +----------+ +-----+------+ -//! | | | | -//! | V V | -//! V RecordBuf V -//! MetadataBuf | ChainSequenceBuf -//! | V | -//! | CasBuf | -//! | | | -//! V V V -//! KvvBuf KvBuf IntKvBuf +//! The [`host_fn_workspace`] module provides abstractions for reading data during workflows. //! -//! source: https://textik.com/#d7907793784e17e9 -//! ``` +//! ## Writes +//! The [`mutations`] module is the complete set of functions +//! for writing data to sqlite in holochain. +//! +//! ## In-memory +//! The [`scratch`] module provides the [`Scratch`](scratch::Scratch) type for +//! reading and writing data in memory that is not visible anywhere else. +//! +//! The SourceChain type uses the Scratch for in-memory operations which +//! can be flushed to the database. +//! +//! The Query trait allows combining arbitrary database SQL queries with +//! the scratch space so reads can union across the database and in-memory data. #![allow(deprecated)] diff --git a/scripts/generate_readmes.sh b/scripts/generate_readmes.sh index 2f54ec97d7..76400b4ec1 100755 --- a/scripts/generate_readmes.sh +++ b/scripts/generate_readmes.sh @@ -1,6 +1,6 @@ #!/bin/bash -crates_to_document=("hdk" "holochain_keystore") +crates_to_document=("hdk" "holochain_keystore" "holochain_state") for crate in "${crates_to_document[@]}"; do echo 'generating README for crate' "$crate"; From e2d74b9b283c6a3e3e5afcf1132403b41a77210c Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 24 Aug 2022 01:43:53 +0000 Subject: [PATCH 058/111] apply develop versions to changed crates the following crates changed since their most recent release and are therefore increased to a develop version: - holochain_state-0.0.55-dev.0 - holochain_cli-0.0.53-dev.0 - holochain_cli_sandbox-0.0.49-dev.0 - holochain-0.0.157-dev.0 - holochain_conductor_api-0.0.55-dev.0 - holochain_cascade-0.0.56-dev.0 --- crates/hc/Cargo.toml | 4 ++-- crates/hc_sandbox/Cargo.toml | 4 ++-- crates/holochain/Cargo.toml | 8 ++++---- crates/holochain_cascade/Cargo.toml | 4 ++-- crates/holochain_conductor_api/Cargo.toml | 4 ++-- crates/holochain_state/Cargo.toml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index 684acb2776..d53ed4289d 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.52" +version = "0.0.53-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -22,7 +22,7 @@ path = "src/lib.rs" anyhow = "1.0" futures = "0.3" holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.48"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.48"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.49-dev.0"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index 769154ee02..ba17e99aed 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.48" +version = "0.0.49-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,7 +19,7 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.54"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.55-dev.0"} holochain_types = { path = "../holochain_types", version = "0.0.52"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} holochain_p2p = { path = "../holochain_p2p", version = "0.0.52"} diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 30dd2167d8..07e333aeee 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.156" +version = "0.0.157-dev.0" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,13 +24,13 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.55", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.54", path = "../holochain_conductor_api" } +holochain_cascade = { version = "0.0.56-dev.0", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.55-dev.0", path = "../holochain_conductor_api" } holochain_keystore = { version = "0.0.51", path = "../holochain_keystore" } holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.54", path = "../holochain_state" } +holochain_state = { version = "0.0.55-dev.0", path = "../holochain_state" } holochain_types = { version = "0.0.52", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index c9a4afe67e..19999bb99f 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.55" +version = "0.0.56-dev.0" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -21,7 +21,7 @@ holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.54", path = "../holochain_state" } +holochain_state = { version = "0.0.55-dev.0", path = "../holochain_state" } holochain_types = { version = "0.0.52", path = "../holochain_types" } holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } observability = "0.1.3" diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index 7d2442b258..47c978f436 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.54" +version = "0.0.55-dev.0" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -14,7 +14,7 @@ derive_more = "0.99.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } -holochain_state = { version = "0.0.54", path = "../holochain_state" } +holochain_state = { version = "0.0.55-dev.0", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" holochain_types = { version = "0.0.52", path = "../holochain_types" } holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index 93f21673e5..eb1675fc82 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.54" +version = "0.0.55-dev.0" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" From ddb20b2426d31e3f9a900558f4978c380ddbf67a Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 24 Aug 2022 01:47:47 +0000 Subject: [PATCH 059/111] create a release from branch release-20220824.014353 the following crates are part of this release: - holochain_state-0.0.55 - holochain_cascade-0.0.56 - holochain_conductor_api-0.0.55 - holochain-0.0.157 - holochain_cli_sandbox-0.0.49 - holochain_cli-0.0.53 --- CHANGELOG.md | 14 ++++++++++++++ Cargo.lock | 12 ++++++------ crates/hc/CHANGELOG.md | 2 ++ crates/hc/Cargo.toml | 4 ++-- crates/hc_sandbox/CHANGELOG.md | 2 ++ crates/hc_sandbox/Cargo.toml | 4 ++-- crates/holochain/CHANGELOG.md | 2 ++ crates/holochain/Cargo.toml | 8 ++++---- crates/holochain_cascade/CHANGELOG.md | 2 ++ crates/holochain_cascade/Cargo.toml | 4 ++-- crates/holochain_conductor_api/CHANGELOG.md | 2 ++ crates/holochain_conductor_api/Cargo.toml | 4 ++-- crates/holochain_state/CHANGELOG.md | 2 ++ crates/holochain_state/Cargo.toml | 2 +- 14 files changed, 45 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b52be26645..056a4a257a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # \[Unreleased\] +# 20220824.014353 + +## [holochain\_cli-0.0.53](crates/holochain_cli/CHANGELOG.md#0.0.53) + +## [holochain\_cli\_sandbox-0.0.49](crates/holochain_cli_sandbox/CHANGELOG.md#0.0.49) + +## [holochain-0.0.157](crates/holochain/CHANGELOG.md#0.0.157) + +## [holochain\_conductor\_api-0.0.55](crates/holochain_conductor_api/CHANGELOG.md#0.0.55) + +## [holochain\_cascade-0.0.56](crates/holochain_cascade/CHANGELOG.md#0.0.56) + +## [holochain\_state-0.0.55](crates/holochain_state/CHANGELOG.md#0.0.55) + # 20220823.103320 ## [holochain-0.0.156](crates/holochain/CHANGELOG.md#0.0.156) diff --git a/Cargo.lock b/Cargo.lock index a81b17c1b1..5f1b39e3ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1964,7 +1964,7 @@ dependencies = [ [[package]] name = "holochain" -version = "0.0.156" +version = "0.0.157" dependencies = [ "anyhow", "arbitrary", @@ -2056,7 +2056,7 @@ dependencies = [ [[package]] name = "holochain_cascade" -version = "0.0.55" +version = "0.0.56" dependencies = [ "async-trait", "derive_more", @@ -2090,7 +2090,7 @@ dependencies = [ [[package]] name = "holochain_cli" -version = "0.0.52" +version = "0.0.53" dependencies = [ "anyhow", "futures", @@ -2124,7 +2124,7 @@ dependencies = [ [[package]] name = "holochain_cli_sandbox" -version = "0.0.48" +version = "0.0.49" dependencies = [ "ansi_term 0.12.1", "anyhow", @@ -2153,7 +2153,7 @@ dependencies = [ [[package]] name = "holochain_conductor_api" -version = "0.0.54" +version = "0.0.55" dependencies = [ "derive_more", "directories", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "holochain_state" -version = "0.0.54" +version = "0.0.55" dependencies = [ "anyhow", "arbitrary", diff --git a/crates/hc/CHANGELOG.md b/crates/hc/CHANGELOG.md index 191141e3c0..af54504a13 100644 --- a/crates/hc/CHANGELOG.md +++ b/crates/hc/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.53 + ## 0.0.52 ## 0.0.51 diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index d53ed4289d..dee0da8c96 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.53-dev.0" +version = "0.0.53" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -22,7 +22,7 @@ path = "src/lib.rs" anyhow = "1.0" futures = "0.3" holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.48"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.49-dev.0"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.49"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_sandbox/CHANGELOG.md b/crates/hc_sandbox/CHANGELOG.md index 52fac781e5..582651b725 100644 --- a/crates/hc_sandbox/CHANGELOG.md +++ b/crates/hc_sandbox/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.49 + ## 0.0.48 ## 0.0.47 diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index ba17e99aed..7260b68cc7 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.49-dev.0" +version = "0.0.49" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,7 +19,7 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.55-dev.0"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.55"} holochain_types = { path = "../holochain_types", version = "0.0.52"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} holochain_p2p = { path = "../holochain_p2p", version = "0.0.52"} diff --git a/crates/holochain/CHANGELOG.md b/crates/holochain/CHANGELOG.md index 406235fd54..02ad957b3c 100644 --- a/crates/holochain/CHANGELOG.md +++ b/crates/holochain/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.157 + ## 0.0.156 - Effectively disable Wasm metering by setting the cranelift cost\_function to always return 0. This is meant as a temporary stop-gap and give us time to figure out a configurable approach. [\#1535](https://github.com/holochain/holochain/pull/1535) diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 07e333aeee..507cde4b80 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.157-dev.0" +version = "0.0.157" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,13 +24,13 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.56-dev.0", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.55-dev.0", path = "../holochain_conductor_api" } +holochain_cascade = { version = "0.0.56", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.55", path = "../holochain_conductor_api" } holochain_keystore = { version = "0.0.51", path = "../holochain_keystore" } holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.55-dev.0", path = "../holochain_state" } +holochain_state = { version = "0.0.55", path = "../holochain_state" } holochain_types = { version = "0.0.52", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } diff --git a/crates/holochain_cascade/CHANGELOG.md b/crates/holochain_cascade/CHANGELOG.md index 5cf8e336a9..7730e6df79 100644 --- a/crates/holochain_cascade/CHANGELOG.md +++ b/crates/holochain_cascade/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.56 + ## 0.0.55 ## 0.0.54 diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 19999bb99f..e9d3d7c093 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.56-dev.0" +version = "0.0.56" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -21,7 +21,7 @@ holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.55-dev.0", path = "../holochain_state" } +holochain_state = { version = "0.0.55", path = "../holochain_state" } holochain_types = { version = "0.0.52", path = "../holochain_types" } holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } observability = "0.1.3" diff --git a/crates/holochain_conductor_api/CHANGELOG.md b/crates/holochain_conductor_api/CHANGELOG.md index 5fa8d383f3..cd41de006b 100644 --- a/crates/holochain_conductor_api/CHANGELOG.md +++ b/crates/holochain_conductor_api/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.55 + ## 0.0.54 ## 0.0.53 diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index 47c978f436..ad7241c1a6 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.55-dev.0" +version = "0.0.55" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -14,7 +14,7 @@ derive_more = "0.99.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } -holochain_state = { version = "0.0.55-dev.0", path = "../holochain_state" } +holochain_state = { version = "0.0.55", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" holochain_types = { version = "0.0.52", path = "../holochain_types" } holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } diff --git a/crates/holochain_state/CHANGELOG.md b/crates/holochain_state/CHANGELOG.md index e5b19af684..8395442b35 100644 --- a/crates/holochain_state/CHANGELOG.md +++ b/crates/holochain_state/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.55 + ## 0.0.54 ## 0.0.53 diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index eb1675fc82..fc00f26cf6 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.55-dev.0" +version = "0.0.55" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" From 9d0423955c508ba716d05c71f8d325ed03cc42b3 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 23 Aug 2022 15:08:00 +0200 Subject: [PATCH 060/111] feat(release): increase parallelity to 2 it's feasible to try this again after the merge of standard and slow tests --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a6ddae1ce..43c4850499 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -352,8 +352,8 @@ jobs: if: ${{ matrix.testCommand.restoresCargoCache == true && needs.vars.outputs.skip_test != 'true' }} env: CARGO_TEST_ARGS: "--no-run" - CARGO_NEXTEST_ARGS: "list --build-jobs=1" - CARGO_BUILD_JOBS: "1" + CARGO_NEXTEST_ARGS: "list --build-jobs=2" + CARGO_BUILD_JOBS: "2" run: | set -e source "${HOLOCHAIN_RELEASE_SH}" From 461dfcdfab18ba05db152174c8a14688d4de020a Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 25 Aug 2022 03:02:21 +1000 Subject: [PATCH 061/111] docs(hdi): add docs and readme (#1532) * add docs and readme to hdi * fix doctest * add hdi to automatic README generation Co-authored-by: neonphog Co-authored-by: release-ci --- crates/hdi/README.md | 105 +++++++++++++++++++++++++++++++++++- crates/hdi/README.tpl | 22 ++++++++ crates/hdi/src/lib.rs | 78 +++++++++++++++++++++++---- scripts/generate_readmes.sh | 8 +-- 4 files changed, 197 insertions(+), 16 deletions(-) create mode 100644 crates/hdi/README.tpl diff --git a/crates/hdi/README.md b/crates/hdi/README.md index 3b80ded143..63e430aa28 100644 --- a/crates/hdi/README.md +++ b/crates/hdi/README.md @@ -1 +1,104 @@ -# Holochain Deterministic Integrity \ No newline at end of file + hdi + +[![Project](https://img.shields.io/badge/project-holochain-blue.svg?style=flat-square)](http://holochain.org/) +[![Forum](https://img.shields.io/badge/chat-forum%2eholochain%2enet-blue.svg?style=flat-square)](https://forum.holochain.org) +[![Chat](https://img.shields.io/badge/chat-chat%2eholochain%2enet-blue.svg?style=flat-square)](https://chat.holochain.org) + +[![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://twitter.com/holochain) + +[![Crate](https://img.shields.io/crates/v/hdi.svg)](https://crates.io/crates/hdi) +[![API Docs](https://docs.rs/hdi/badge.svg)](https://docs.rs/hdi) + +Holochain Deterministic Integrity (HDI) is Holochain's data model and integrity toolset for +writing zomes. + +The logic of a Holochain DNA can be divided into two parts: integrity and coordination. +Integrity is the part of the hApp that defines the data types and validates data +manipulations. Coordination encompasses the domain logic and implements the functions +that manipulate data. + +## Examples + +An example of an integrity zome with data definition and data validation can be found in the +wasm workspace of the Holochain repository: +. + +## Data definition + +The DNA's data model is defined in integrity zomes. They comprise all data type definitions +as well as relationships between those types. Integrity zomes are purely definitions and do +not contain functions to manipulate the data. Therefore a hApp's data model is encapsulated +and completely independent of the domain logic, which is encoded in coordinator zomes. + +The MVC (model, view, controller) design pattern can be used as an analogy. **The +application’s integrity zomes comprise its model layer** — everything that defines the shape +of the data. In practice, this means three things: +- entry type definitions +- link type definitions +- a validation callback that constrains the kinds of data that can validly be called entries +and links of those types (see also [`validate`](prelude::validate)). + +**The coordination zomes comprise the application's controller layer** — the code that actually +writes and retrieves data, handles countersigning sessions and sends and receives messages +between peers or between a cell and its UI. In other words, all the zome functions, `init` +functions, remote signal receivers, and scheduler callbacks will all live in coordinator zomes. + +Advantages of this approach are: +* The DNA hash is constant as long as the integrity zomes remain the same. The peer network of +a DNA is tied to its hash. Changes to the DNA hash result in a new peer network. Changes to the +domain logic enclosed in coordinator zomes, however, do not affect the DNA hash. Hence the DNAs +and therefore hApps can be modified without creating a new peer network on every +deployment. +* Integrity zomes can be shared among DNAs. Any coordinator zome can import an integrity +zome's data types and implement functions for data manipulation. This composability of +integrity and coordinator zomes allows for a multitude of permutations with shared integrity +zomes, i. e. a shared data model. + +## Data validation + +The second fundamental part of integrity zomes is data validation. For every [operation](holochain_integrity_types::Op) +that can be performed on the data, a validation rule can be specified. Both data types and data +values can be validated. All of these validation rules are written in a central callback +which is called by the Holochain engine for each operation. + +There's a helper type called [`OpType`](holochain_integrity_types::OpType) available for easy +access to all link and entry variants when validating an operation. In many cases, this type can +be easier to work with than the bare [`Op`](holochain_integrity_types::Op), which contains the +same information as `OpType`, but the former has a flatter data structure, whereas the latter has +a deeply nested structure. + +```rust +match op.to_type()? { + OpType::StoreEntry(OpEntry::CreateEntry { entry_type, .. }) => match entry_type { + EntryTypes::A(_) => Ok(ValidateCallbackResult::Valid), + EntryTypes::B(_) => Ok(ValidateCallbackResult::Invalid( + "No Bs allowed in this app".to_string(), + )), + }, + OpType::RegisterCreateLink { + base_address: _, + target_address: _, + tag: _, + link_type, + } => match link_type { + LinkTypes::A => Ok(ValidateCallbackResult::Valid), + LinkTypes::B => Ok(ValidateCallbackResult::Invalid( + "No Bs allowed in this app".to_string(), + )), + }, + _ => Ok(ValidateCallbackResult::Valid), +}; +``` +See an example of the `validate` callback in an integrity zome in the WASM workspace: +. +Many more validation examples can be browsed in that very workspace. + +## License + [![License: CAL 1.0](https://img.shields.io/badge/License-CAL-1.0-blue.svg)](https://github.com/holochain/cryptographic-autonomy-license) + +Copyright (C) 2019 - 2022, Holochain Foundation + +This program is free software: you can redistribute it and/or modify it under the terms of the license +provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. diff --git a/crates/hdi/README.tpl b/crates/hdi/README.tpl new file mode 100644 index 0000000000..b5332e4d8d --- /dev/null +++ b/crates/hdi/README.tpl @@ -0,0 +1,22 @@ + {{crate}} + +[![Project](https://img.shields.io/badge/project-holochain-blue.svg?style=flat-square)](http://holochain.org/) +[![Forum](https://img.shields.io/badge/chat-forum%2eholochain%2enet-blue.svg?style=flat-square)](https://forum.holochain.org) +[![Chat](https://img.shields.io/badge/chat-chat%2eholochain%2enet-blue.svg?style=flat-square)](https://chat.holochain.org) + +[![Twitter Follow](https://img.shields.io/twitter/follow/holochain.svg?style=social&label=Follow)](https://twitter.com/holochain) + +[![Crate](https://img.shields.io/crates/v/hdi.svg)](https://crates.io/crates/hdi) +[![API Docs](https://docs.rs/hdi/badge.svg)](https://docs.rs/hdi) + +{{readme}} + +## License + [![License: CAL 1.0](https://img.shields.io/badge/License-CAL-1.0-blue.svg)](https://github.com/holochain/cryptographic-autonomy-license) + +Copyright (C) 2019 - 2022, Holochain Foundation + +This program is free software: you can redistribute it and/or modify it under the terms of the license +provided in the LICENSE file (CAL-1.0). This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. \ No newline at end of file diff --git a/crates/hdi/src/lib.rs b/crates/hdi/src/lib.rs index f7967ff6ce..2ba2618285 100644 --- a/crates/hdi/src/lib.rs +++ b/crates/hdi/src/lib.rs @@ -55,22 +55,78 @@ //! be easier to work with than the bare [`Op`](holochain_integrity_types::Op), which contains the //! same information as `OpType`, but the former has a flatter data structure, whereas the latter has //! a deeply nested structure. -//! ```ignore -//! let op_type: OpType = op.to_type()?; -//! match op_type { +//! +//! ``` +//! # #[cfg(not(feature = "test_utils"))] +//! # fn main() -> Result<(), Box> { +//! # Ok(()) +//! # } +//! # #[cfg(feature = "test_utils")] +//! # fn main() -> Result<(), Box> { +//! # use hdi::prelude::*; +//! # #[hdk_entry_helper] +//! # pub struct A; +//! # #[hdk_entry_helper] +//! # pub struct B; +//! # #[hdk_entry_defs(skip_hdk_extern = true)] +//! # #[unit_enum(UnitEntryTypes)] +//! # pub enum EntryTypes { +//! # A(A), +//! # B(B), +//! # } +//! # #[hdk_link_types(skip_no_mangle = true)] +//! # pub enum LinkTypes { +//! # A, +//! # B, +//! # } +//! # let op = holochain_integrity_types::Op::RegisterCreateLink( +//! # holochain_integrity_types::RegisterCreateLink { +//! # create_link: holochain_integrity_types::SignedHashed { +//! # hashed: holo_hash::HoloHashed { +//! # content: holochain_integrity_types::CreateLink { +//! # author: AgentPubKey::from_raw_36(vec![0u8; 36]), +//! # timestamp: Timestamp(0), +//! # action_seq: 1, +//! # prev_action: ActionHash::from_raw_36(vec![0u8; 36]), +//! # base_address: EntryHash::from_raw_36(vec![0u8; 36]).into(), +//! # target_address: EntryHash::from_raw_36(vec![0u8; 36]).into(), +//! # zome_id: 0.into(), +//! # link_type: 0.into(), +//! # tag: ().into(), +//! # weight: Default::default(), +//! # }, +//! # hash: ActionHash::from_raw_36(vec![0u8; 36]), +//! # }, +//! # signature: Signature([0u8; 64]), +//! # }, +//! # }, +//! # ); +//! # #[cfg(feature = "test_utils")] +//! # hdi::test_utils::set_zome_types(&[(0, 2)], &[(0, 2)]); +//! # let result: Result> = +//! match op.to_type()? { +//! OpType::StoreEntry(OpEntry::CreateEntry { entry_type, .. }) => match entry_type { +//! EntryTypes::A(_) => Ok(ValidateCallbackResult::Valid), +//! EntryTypes::B(_) => Ok(ValidateCallbackResult::Invalid( +//! "No Bs allowed in this app".to_string(), +//! )), +//! }, //! OpType::RegisterCreateLink { -//! base_address, -//! target_address, -//! tag, +//! base_address: _, +//! target_address: _, +//! tag: _, //! link_type, //! } => match link_type { -//! LinkTypes::MyLink1 => Ok(ValidateCallbackResult::Valid), -//! _ => Ok(ValidateCallbackResult::Invalid("wrong link type".to_string())) +//! LinkTypes::A => Ok(ValidateCallbackResult::Valid), +//! LinkTypes::B => Ok(ValidateCallbackResult::Invalid( +//! "No Bs allowed in this app".to_string(), +//! )), //! }, -//! ... -//! } +//! _ => Ok(ValidateCallbackResult::Valid), +//! }; +//! # Ok(()) +//! # } //! ``` -//! //! See an example of the `validate` callback in an integrity zome in the WASM workspace: //! . //! Many more validation examples can be browsed in that very workspace. diff --git a/scripts/generate_readmes.sh b/scripts/generate_readmes.sh index 76400b4ec1..b79fd0c248 100755 --- a/scripts/generate_readmes.sh +++ b/scripts/generate_readmes.sh @@ -1,6 +1,6 @@ #!/bin/bash -crates_to_document=("hdk" "holochain_keystore" "holochain_state") +crates_to_document=("hdi" "hdk" "holochain_keystore" "holochain_state") for crate in "${crates_to_document[@]}"; do echo 'generating README for crate' "$crate"; @@ -12,7 +12,7 @@ git diff --exit-code --quiet readmes_updated=$? if [[ "$readmes_updated" == 1 ]]; then echo 'READMEs have been updated, committing changes' - git config user.name release-ci - git config user.email ci@holo.host - git commit -am "docs(crate-level): generate READMEs from doc comments" + # git config user.name release-ci + # git config user.email ci@holo.host + # git commit -am "docs(crate-level): generate READMEs from doc comments" fi \ No newline at end of file From a9677b9163b58aa67752c9c01e6e1e73a81e5452 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 26 Aug 2022 13:46:55 -0700 Subject: [PATCH 062/111] Add large entry gossip test (with entries that are not very large yet) --- Cargo.lock | 46 +++++----- .../holochain/src/test_utils/inline_zomes.rs | 8 ++ crates/holochain/tests/sharded_gossip/mod.rs | 88 +++++++++++++++---- crates/holochain_integrity_types/src/entry.rs | 8 ++ 4 files changed, 113 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 044d96281b..7781199913 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -223,11 +223,12 @@ dependencies = [ [[package]] name = "async-process" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" +checksum = "02111fd8655a613c25069ea89fc8d9bb89331fa77486eb3bc059ee757cfa481c" dependencies = [ "async-io", + "autocfg 1.1.0", "blocking", "cfg-if 1.0.0", "event-listener", @@ -740,9 +741,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpufeatures" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1079fb8528d9f9c888b1e8aa651e6e079ade467323d58f75faf1d30b1808f540" +checksum = "dc948ebb96241bb40ab73effeb80d9f93afaad49359d159a5e61be51619fe813" dependencies = [ "libc", ] @@ -4336,9 +4337,9 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plotters" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9428003b84df1496fb9d6eeee9c5f8145cb41ca375eb0dad204328888832811f" +checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b" dependencies = [ "num-traits", "plotters-backend", @@ -4355,19 +4356,20 @@ checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0918736323d1baff32ee0eade54984f6f201ad7e97d5cfb5d6ab4a358529615" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] [[package]] name = "polling" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +checksum = "899b00b9c8ab553c743b3e11e87c5c7d423b2a2de229ba95b24a756344748011" dependencies = [ + "autocfg 1.1.0", "cfg-if 1.0.0", "libc", "log", @@ -4574,9 +4576,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21afdc492bf2a8688cb386be6605d1163b6ace89afa5e3b529037d2b4334b860" +checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" dependencies = [ "bytes", "futures-channel", @@ -4933,7 +4935,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.13", + "time 0.3.14", "yasna 0.5.0", ] @@ -5409,9 +5411,9 @@ checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" [[package]] name = "serde" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" dependencies = [ "serde_derive", ] @@ -5446,9 +5448,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", @@ -5457,9 +5459,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ "indexmap", "itoa 1.0.3", @@ -6031,9 +6033,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db76ff9fa4b1458b3c7f077f3ff9887394058460d21e634355b273aaf11eea45" +checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b" dependencies = [ "libc", "num_threads", @@ -7165,7 +7167,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346d34a236c9d3e5f3b9b74563f238f955bbd05fa0b8b4efa53c130c43982f4c" dependencies = [ - "time 0.3.13", + "time 0.3.14", ] [[package]] diff --git a/crates/holochain/src/test_utils/inline_zomes.rs b/crates/holochain/src/test_utils/inline_zomes.rs index 45b980816f..8b8bcd6c05 100644 --- a/crates/holochain/src/test_utils/inline_zomes.rs +++ b/crates/holochain/src/test_utils/inline_zomes.rs @@ -71,6 +71,7 @@ pub fn batch_create_zome() -> InlineZomeSet { #[derive( Debug, + Clone, PartialEq, Eq, PartialOrd, @@ -126,6 +127,13 @@ pub fn simple_crud_zome() -> InlineZomeSet { api.get(vec![GetInput::new(hash.into(), GetOptions::default())]) .map_err(Into::into) }) + .callback("read_multi", |api, hashes: Vec| { + let gets = hashes + .iter() + .map(|h| GetInput::new(h.clone().into(), GetOptions::default())) + .collect(); + api.get(gets).map_err(Into::into) + }) .callback("read_entry", |api, hash: EntryHash| { api.get(vec![GetInput::new(hash.into(), GetOptions::default())]) .map_err(Into::into) diff --git a/crates/holochain/tests/sharded_gossip/mod.rs b/crates/holochain/tests/sharded_gossip/mod.rs index e6a8a4d4e4..4bebaedd00 100644 --- a/crates/holochain/tests/sharded_gossip/mod.rs +++ b/crates/holochain/tests/sharded_gossip/mod.rs @@ -1,11 +1,15 @@ use std::sync::Arc; +use std::time::{Duration, Instant}; use hdk::prelude::*; use holo_hash::DhtOpHash; use holochain::conductor::config::ConductorConfig; -use holochain::sweettest::{SweetConductor, SweetConductorBatch, SweetDnaFile}; -use holochain::test_utils::consistency_10s; +use holochain::conductor::handle::DevSettingsDelta; +use holochain::sweettest::{SweetConductor, SweetConductorBatch, SweetDnaFile, SweetEasyInline}; +use holochain::test_utils::inline_zomes::{batch_create_zome, simple_crud_zome}; +use holochain::test_utils::inline_zomes::{simple_create_read_zome, AppString}; use holochain::test_utils::network_simulation::{data_zome, generate_test_data}; +use holochain::test_utils::{consistency, consistency_10s}; use holochain::{ conductor::ConductorBuilder, test_utils::consistency::local_machine_session_with_hashes, }; @@ -16,17 +20,17 @@ use kitsune_p2p::gossip::sharded_gossip::test_utils::{check_ops_boom, create_age use kitsune_p2p::KitsuneP2pConfig; use kitsune_p2p_types::config::RECENT_THRESHOLD_DEFAULT; -#[derive(serde::Serialize, serde::Deserialize, Debug)] -#[serde(transparent)] -#[repr(transparent)] -struct AppString(String); - fn make_config(recent_threshold: Option) -> ConductorConfig { let mut tuning = kitsune_p2p_types::config::tuning_params_struct::KitsuneP2pTuningParams::default(); tuning.gossip_strategy = "sharded-gossip".to_string(); tuning.danger_gossip_recent_threshold_secs = recent_threshold.unwrap_or(RECENT_THRESHOLD_DEFAULT.as_secs()); + tuning.gossip_inbound_target_mbps = 100.0; + tuning.gossip_outbound_target_mbps = 100.0; + tuning.gossip_historic_outbound_target_mbps = 100.0; + tuning.gossip_historic_inbound_target_mbps = 100.0; + // tuning.gossip_max_batch_size = 32_000_000; let mut network = KitsuneP2pConfig::default(); network.transport_pool = vec![kitsune_p2p::TransportConfig::Quic { @@ -43,10 +47,6 @@ fn make_config(recent_threshold: Option) -> ConductorConfig { #[cfg(feature = "test_utils")] #[tokio::test(flavor = "multi_thread")] async fn fullsync_sharded_gossip() -> anyhow::Result<()> { - use holochain::{ - conductor::handle::DevSettingsDelta, test_utils::inline_zomes::simple_create_read_zome, - }; - let _g = observability::test_run().ok(); const NUM_CONDUCTORS: usize = 2; @@ -97,10 +97,6 @@ async fn fullsync_sharded_gossip() -> anyhow::Result<()> { #[cfg(feature = "test_utils")] #[tokio::test(flavor = "multi_thread")] async fn fullsync_sharded_gossip_high_data() -> anyhow::Result<()> { - use holochain::{ - conductor::handle::DevSettingsDelta, test_utils::inline_zomes::batch_create_zome, - }; - // let _g = observability::test_run().ok(); const NUM_CONDUCTORS: usize = 3; @@ -186,6 +182,68 @@ async fn fullsync_sharded_gossip_high_data() -> anyhow::Result<()> { Ok(()) } +#[cfg(feature = "slow_tests")] +#[tokio::test(flavor = "multi_thread")] +async fn large_entry_test() { + observability::test_run().ok(); + let mut conductors = SweetConductorBatch::from_config(2, make_config(Some(0))).await; + let start = Instant::now(); + dbg!(start.elapsed()); + + for c in conductors.iter() { + c.update_dev_settings(DevSettingsDelta { + publish: Some(false), + ..Default::default() + }); + } + + let (dna_file, _, _) = SweetDnaFile::unique_from_inline_zomes(simple_crud_zome()) + .await + .unwrap(); + + let apps = conductors.setup_app("app", &[dna_file]).await.unwrap(); + let ((cell_1,), (cell_2,)) = apps.into_tuples(); + + let zome_1 = cell_1.zome(SweetEasyInline::COORDINATOR); + let zome_2 = cell_2.zome(SweetEasyInline::COORDINATOR); + + // TODO: we should be able to get up to multiple entries each 10MB or more being gossiped + // in a reasonable time, but right now we can only handle about 1MB in a timely fashion. + + // let size = 1_000; + // let size = 10_000; + let size = 100_000; + // let size = 1_000_000; + // let size = 10_000_000; + // let size = 15_000_000; + let num = 10; + let mut hashes = vec![]; + for i in 0..num { + let app_string = AppString(String::from_utf8(vec![42u8 + i as u8; size]).unwrap()); + let hash: ActionHash = conductors[0] + .call(&zome_1, "create_string", app_string.clone()) + .await; + hashes.push(hash); + dbg!(start.elapsed()); + } + + conductors.exchange_peer_info().await; + consistency(&[&cell_1, &cell_2], 15, Duration::from_secs(1)).await; + + let records: Vec> = conductors[1].call(&zome_2, "read_multi", hashes).await; + assert_eq!(records.len(), num); + assert_eq!( + records.iter().filter(|r| r.is_some()).count(), + num, + "couldn't get records at positions: {:?}", + records + .iter() + .enumerate() + .filter_map(|(i, r)| r.is_none().then(|| i)) + .collect::>() + ); +} + #[cfg(feature = "test_utils")] #[tokio::test(flavor = "multi_thread")] async fn fullsync_sharded_local_gossip() -> anyhow::Result<()> { diff --git a/crates/holochain_integrity_types/src/entry.rs b/crates/holochain_integrity_types/src/entry.rs index 7410b0ae18..48d5fb2b5d 100644 --- a/crates/holochain_integrity_types/src/entry.rs +++ b/crates/holochain_integrity_types/src/entry.rs @@ -119,6 +119,14 @@ impl Entry { } } + /// If this entry represents an App entry, return `AppEntryBytes`. + pub fn as_app_entry(&self) -> Option<&AppEntryBytes> { + match self { + Entry::App(bytes) => Some(bytes), + _ => None, + } + } + /// Create an Entry::App from SerializedBytes pub fn app(sb: SerializedBytes) -> Result { Ok(Entry::App(AppEntryBytes::try_from(sb)?)) From 309fa43e8e833bec4a50365a87fc017923884ff6 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 26 Aug 2022 14:09:36 -0700 Subject: [PATCH 063/111] Drastically raise default gossip bandwidth limits --- crates/kitsune_p2p/types/src/config.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/kitsune_p2p/types/src/config.rs b/crates/kitsune_p2p/types/src/config.rs index 1e8851ee5d..0d060dd221 100644 --- a/crates/kitsune_p2p/types/src/config.rs +++ b/crates/kitsune_p2p/types/src/config.rs @@ -87,22 +87,22 @@ pub mod tuning_params_struct { gossip_loop_iteration_delay_ms: u32 = 1000, /// The gossip loop will attempt to rate-limit output - /// to this count mega bits per second. [Default: 0.5] - gossip_outbound_target_mbps: f64 = 0.5, + /// to this count mega bits per second. [Default: 100.0] + gossip_outbound_target_mbps: f64 = 100.0, /// The gossip loop will attempt to rate-limit input - /// to this count mega bits per second. [Default: 0.5] - gossip_inbound_target_mbps: f64 = 0.5, + /// to this count mega bits per second. [Default: 100.0] + gossip_inbound_target_mbps: f64 = 100.0, /// The gossip loop will attempt to rate-limit outbound /// traffic for the historic loop (if there is one) - /// to this count mega bits per second. [Default: 0.1] - gossip_historic_outbound_target_mbps: f64 = 0.1, + /// to this count mega bits per second. [Default: 100.0] + gossip_historic_outbound_target_mbps: f64 = 100.0, /// The gossip loop will attempt to rate-limit inbound /// traffic for the historic loop (if there is one) - /// to this count mega bits per second. [Default: 0.1] - gossip_historic_inbound_target_mbps: f64 = 0.1, + /// to this count mega bits per second. [Default: 100.0] + gossip_historic_inbound_target_mbps: f64 = 100.0, /// How long should we hold off talking to a peer /// we've previously spoken successfully to. From 3394a39062310fd96531e47f961eee98d12dbb26 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 26 Aug 2022 15:21:37 -0700 Subject: [PATCH 064/111] Configurable gossip burst size --- .../src/gossip/sharded_gossip/bandwidth.rs | 51 ++++++++++++------- .../src/gossip/sharded_gossip/ops.rs | 12 ++++- .../switchboard/switchboard_state.rs | 2 +- crates/kitsune_p2p/types/src/config.rs | 25 ++++++--- 4 files changed, 60 insertions(+), 30 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs index 32dc07c6ee..4b020042d7 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs @@ -20,10 +20,12 @@ impl BandwidthThrottles { let recent = BandwidthThrottle::new( tuning_params.gossip_inbound_target_mbps, tuning_params.gossip_outbound_target_mbps, + tuning_params.gossip_burst_ratio, ); let historic = BandwidthThrottle::new( tuning_params.gossip_historic_inbound_target_mbps, tuning_params.gossip_historic_outbound_target_mbps, + tuning_params.gossip_burst_ratio, ); Self { recent: Arc::new(recent), @@ -63,10 +65,11 @@ where impl BandwidthThrottle { /// Set the inbound and outbound bandwidth limits in megabits per second. - pub fn new(inbound_mbps: f64, outbound_mbps: f64) -> Self { + pub fn new(inbound_mbps: f64, outbound_mbps: f64, burst_ratio: f64) -> Self { Self::new_inner( inbound_mbps, outbound_mbps, + burst_ratio, governor::clock::DefaultClock::default(), ) } @@ -77,9 +80,10 @@ impl BandwidthThrottle { fn test( inbound_mbps: f64, outbound_mbps: f64, + burst_ratio: f64, clock: governor::clock::FakeRelativeClock, ) -> Self { - Self::new_inner(inbound_mbps, outbound_mbps, clock) + Self::new_inner(inbound_mbps, outbound_mbps, burst_ratio, clock) } } @@ -87,26 +91,21 @@ impl BandwidthThrottle where C: Clock, { - fn new_inner(inbound_mbps: f64, outbound_mbps: f64, clock: C) -> Self { + fn new_inner(inbound_mbps: f64, outbound_mbps: f64, burst_ratio: f64, clock: C) -> Self { // Convert to bits per second. let inbound_bps = inbound_mbps * 1000.0 * 1000.0; let outbound_bps = outbound_mbps * 1000.0 * 1000.0; - // Double the max message size to allow room for padding. - let max_burst_bits = - NonZeroU32::new(MAX_SEND_BUF_BYTES as u32 * 8 * 2).expect("This can't be zero"); - let inbound = NonZeroU32::new(inbound_bps as u32).map(|inbound_bps| { - RateLimiter::direct_with_clock( - Quota::per_second(inbound_bps).allow_burst(max_burst_bits), - &clock, - ) + let inbound = NonZeroU32::new(inbound_bps as u32).map(|bps| { + let burst = NonZeroU32::new((inbound_bps * burst_ratio) as u32) + .expect("burst_ratio cannot be 0"); + RateLimiter::direct_with_clock(Quota::per_second(bps).allow_burst(burst), &clock) }); - let outbound = NonZeroU32::new(outbound_bps as u32).map(|outbound_bps| { - RateLimiter::direct_with_clock( - Quota::per_second(outbound_bps).allow_burst(max_burst_bits), - &clock, - ) + let outbound = NonZeroU32::new(outbound_bps as u32).map(|bps| { + let burst = NonZeroU32::new((outbound_bps * burst_ratio) as u32) + .expect("burst_ratio cannot be 0"); + RateLimiter::direct_with_clock(Quota::per_second(bps).allow_burst(burst), &clock) }); Self { clock, @@ -140,10 +139,23 @@ where } tokio::time::sleep(dur).await; } - governor::NegativeMultiDecision::InsufficientCapacity(_) => { + governor::NegativeMultiDecision::InsufficientCapacity(mut cap) => { tracing::error!( - "Tried to send a message larger than the max message size" + "Tried to send {} bits, which is larger than the maximum possible of {} bits. Allowing this large message through anyway!", bits, cap ); + // TODO: rather than allowing this message through, we should bubble this error up so that the sender can split + // the message into smaller chunks. We don't easily have that capacity right now, so, better to violate rate + // limiting than to go into an infinite loop... + + // Drain the rate limiter's capacity completely, to be as accurate as possible. + // (ideally we would just drain the capacity completely in one fell swoop, but `governor`'s API does not allow this.) + while cap > 1 { + outbound + .check_n(unsafe { NonZeroU32::new_unchecked(cap) }) + .ok(); + cap /= 2; + } + break; } } } @@ -246,7 +258,8 @@ mod tests { #[tokio::test(flavor = "current_thread", start_paused = true)] async fn test_limiter() { let clock = governor::clock::FakeRelativeClock::default(); - let bandwidth = BandwidthThrottle::test(0.1, 0.1, clock.clone()); + let burst = MAX_SEND_BUF_BYTES as f64 / 0.1; + let bandwidth = BandwidthThrottle::test(0.1, 0.1, burst, clock.clone()); let bytes = MAX_SEND_BUF_BYTES; // Hit the burst limit. bandwidth.outgoing_bytes(MAX_SEND_BUF_BYTES).await; diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs index 7d00f27018..70a248273f 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs @@ -29,6 +29,14 @@ pub fn get_region_queue_batch(queue: &mut VecDeque, batch_size: u32) -> size += region.data.size; if first || size <= batch_size { to_fetch.push(queue.pop_front().unwrap()); + if size > batch_size { + // TODO: we should split this Region up into smaller chunks + tracing::warn!( + "Including a region of size {}, which is larger than the batch size of {}", + size, + batch_size + ); + } } first = false; if size > batch_size { @@ -38,13 +46,13 @@ pub fn get_region_queue_batch(queue: &mut VecDeque, batch_size: u32) -> to_fetch } -/// Queued missing ops hashes can either +/// Queued MissingOps hashes can either /// be saved as the remaining hashes or if this /// is too large the bloom filter is saved so the /// remaining hashes can be generated in the future. enum QueuedOps { /// Hashes that need to be fetched and returned - /// as missing ops to a remote node. + /// as MissingOps to a remote node. Hashes(Vec>), /// A remote nodes bloom filter that has been adjusted /// to the remaining time window to fetch the remaining hashes. diff --git a/crates/kitsune_p2p/kitsune_p2p/src/test_util/switchboard/switchboard_state.rs b/crates/kitsune_p2p/kitsune_p2p/src/test_util/switchboard/switchboard_state.rs index fc6f31c900..de1fe2936d 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/test_util/switchboard/switchboard_state.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/test_util/switchboard/switchboard_state.rs @@ -130,7 +130,7 @@ impl Switchboard { let host_api = Arc::new(evt_handler.clone()); let (evt_sender, handler_task) = spawn_handler(evt_handler.clone()).await; - let bandwidth = Arc::new(BandwidthThrottle::new(1000.0, 1000.0)); + let bandwidth = Arc::new(BandwidthThrottle::new(1000.0, 1000.0, 10.0)); let gossip = ShardedGossip::new( tuning_params, diff --git a/crates/kitsune_p2p/types/src/config.rs b/crates/kitsune_p2p/types/src/config.rs index 0d060dd221..f84f9d6b9a 100644 --- a/crates/kitsune_p2p/types/src/config.rs +++ b/crates/kitsune_p2p/types/src/config.rs @@ -87,22 +87,31 @@ pub mod tuning_params_struct { gossip_loop_iteration_delay_ms: u32 = 1000, /// The gossip loop will attempt to rate-limit output - /// to this count mega bits per second. [Default: 100.0] - gossip_outbound_target_mbps: f64 = 100.0, + /// to this count megabits per second. [Default: 10.0] + gossip_outbound_target_mbps: f64 = 10.0, /// The gossip loop will attempt to rate-limit input - /// to this count mega bits per second. [Default: 100.0] - gossip_inbound_target_mbps: f64 = 100.0, + /// to this count megabits per second. [Default: 10.0] + gossip_inbound_target_mbps: f64 = 10.0, /// The gossip loop will attempt to rate-limit outbound /// traffic for the historic loop (if there is one) - /// to this count mega bits per second. [Default: 100.0] - gossip_historic_outbound_target_mbps: f64 = 100.0, + /// to this count megabits per second. [Default: 10.0] + gossip_historic_outbound_target_mbps: f64 = 10.0, /// The gossip loop will attempt to rate-limit inbound /// traffic for the historic loop (if there is one) - /// to this count mega bits per second. [Default: 100.0] - gossip_historic_inbound_target_mbps: f64 = 100.0, + /// to this count megabits per second. [Default: 10.0] + gossip_historic_inbound_target_mbps: f64 = 10.0, + + /// The gossip loop accomodates this amount of excess capacity + /// before enacting the target rate limit, expressed as a ratio + /// of the target rate limit. For instance, if the historic + /// outbound target is 10mbps, a burst ratio of 50 will allow + /// an extra 500mb of outbound traffic before the target rate + /// limiting kicks in (and this extra capacity will take 50 + /// seconds to "refill"). [Default: 100] + gossip_burst_ratio: f64 = 100.0, /// How long should we hold off talking to a peer /// we've previously spoken successfully to. From 56e200042d2eaadeb939ce20bb17f5e03d3b29f9 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 26 Aug 2022 15:51:03 -0700 Subject: [PATCH 065/111] Adjust limiter test --- crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md | 3 +++ .../kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md index f1033bacce..8b2c7a0229 100644 --- a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md +++ b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md @@ -4,6 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +- +Adds `gossip_burst_ratio` to `KitsuneTuningParams`, allowing + ## 0.0.42 ## 0.0.41 diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs index 4b020042d7..5d8c9a3089 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs @@ -257,9 +257,12 @@ mod tests { #[tokio::test(flavor = "current_thread", start_paused = true)] async fn test_limiter() { + observability::test_run().ok(); let clock = governor::clock::FakeRelativeClock::default(); - let burst = MAX_SEND_BUF_BYTES as f64 / 0.1; - let bandwidth = BandwidthThrottle::test(0.1, 0.1, burst, clock.clone()); + // max * 2 * 8 = 0.1 * 1_000_000 * burst_ratio => burst_ratio = max * 2 * 8 / 0.1 / 1_000_000 + let burst_ratio = MAX_SEND_BUF_BYTES as f64 * 2.0 * 8.0 / 1_000_000.0 / 0.1; + assert_eq!(burst_ratio, 2560.0); + let bandwidth = BandwidthThrottle::test(0.1, 0.1, burst_ratio, clock.clone()); let bytes = MAX_SEND_BUF_BYTES; // Hit the burst limit. bandwidth.outgoing_bytes(MAX_SEND_BUF_BYTES).await; @@ -276,7 +279,7 @@ mod tests { clock.advance(advance_by); let r = tokio::time::timeout(Duration::from_secs(10), bandwidth.outgoing_bytes(bytes)) .await; - // When we advance the clock 1 second less then the required time + // When we advance the clock 1 second less than the required time // the outgoing bytes times out because the clock is set to just before // enough time to send the bytes assert!(r.is_err()); From 109cb208b97fc9c839eb93a9cd901eb412a3d6d3 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 26 Aug 2022 15:58:37 -0700 Subject: [PATCH 066/111] CHANGELOG --- crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md index 8b2c7a0229..a204d443bb 100644 --- a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md +++ b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md @@ -4,8 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] -- -Adds `gossip_burst_ratio` to `KitsuneTuningParams`, allowing +- Increases all gossip bandwidth rate limits to 10mbps, up from 0.1mbps, allowing for gossip of larger entries +- Adds `gossip_burst_ratio` to `KitsuneTuningParams`, allowing tuning of bandwidth bursts +- Fixes a bug where a too-large gossip payload could put the rate limiter into an infinite loop ## 0.0.42 From 0261dbe9d61b88f619a37dca474233cb7c855132 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Fri, 26 Aug 2022 18:25:19 -0700 Subject: [PATCH 067/111] Rearrange initiate logic, better Debug impl for AppEntryBytes, fail test --- crates/holochain/tests/sharded_gossip/mod.rs | 4 +- .../src/entry/app_entry_bytes.rs | 34 +++++++++- crates/holochain_state/src/mutations.rs | 3 + crates/holochain_state/src/source_chain.rs | 4 ++ .../kitsune_p2p/src/gossip/sharded_gossip.rs | 2 +- .../src/gossip/sharded_gossip/initiate.rs | 68 +++++++++---------- 6 files changed, 76 insertions(+), 39 deletions(-) diff --git a/crates/holochain/tests/sharded_gossip/mod.rs b/crates/holochain/tests/sharded_gossip/mod.rs index 4bebaedd00..43c099502f 100644 --- a/crates/holochain/tests/sharded_gossip/mod.rs +++ b/crates/holochain/tests/sharded_gossip/mod.rs @@ -212,8 +212,8 @@ async fn large_entry_test() { // let size = 1_000; // let size = 10_000; - let size = 100_000; - // let size = 1_000_000; + // let size = 100_000; + let size = 1_000_000; // let size = 10_000_000; // let size = 15_000_000; let num = 10; diff --git a/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs b/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs index d9a1605ca5..c082f2ebcf 100644 --- a/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs +++ b/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs @@ -3,10 +3,42 @@ use super::ENTRY_SIZE_LIMIT; use holochain_serialized_bytes::prelude::*; /// Newtype for the bytes comprising an App entry -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct AppEntryBytes(pub SerializedBytes); +impl std::fmt::Debug for AppEntryBytes { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut t = f.debug_tuple("AppEntryBytes"); + if self.0.bytes().len() <= 32 { + t.field(&self.0).finish() + } else { + let z = self.0.bytes(); + let l = z.len(); + t.field(&format!( + "[{},{},{},{},{},{},{},{},...,{},{},{},{},{},{},{},{}]", + z[0], + z[1], + z[2], + z[3], + z[4], + z[5], + z[6], + z[7], + z[l - 1], + z[l - 2], + z[l - 3], + z[l - 4], + z[l - 5], + z[l - 6], + z[l - 7], + z[l - 8], + )) + .finish() + } + } +} + impl AppEntryBytes { /// Get the inner SerializedBytes pub fn into_sb(self) -> SerializedBytes { diff --git a/crates/holochain_state/src/mutations.rs b/crates/holochain_state/src/mutations.rs index 78408cadbe..c6aec9d756 100644 --- a/crates/holochain_state/src/mutations.rs +++ b/crates/holochain_state/src/mutations.rs @@ -156,6 +156,7 @@ pub fn insert_op(txn: &mut Transaction, op: &DhtOpHashed) -> StateMutationResult /// can be used in queries with other databases. /// Because we are sharing queries across databases /// we need the data in the same shape. +#[tracing::instrument(skip(txn))] pub fn insert_op_lite_into_authored( txn: &mut Transaction, op_lite: &DhtOpLight, @@ -394,6 +395,7 @@ pub fn set_receipts_complete( } /// Insert a [`Action`] into the database. +#[tracing::instrument(skip(txn))] pub fn insert_action( txn: &mut Transaction, action: &SignedActionHashed, @@ -499,6 +501,7 @@ pub fn insert_action( } /// Insert an [`Entry`] into the database. +#[tracing::instrument(skip(txn, entry))] pub fn insert_entry( txn: &mut Transaction, hash: &EntryHash, diff --git a/crates/holochain_state/src/source_chain.rs b/crates/holochain_state/src/source_chain.rs index c222154bd9..e0916a6898 100644 --- a/crates/holochain_state/src/source_chain.rs +++ b/crates/holochain_state/src/source_chain.rs @@ -255,6 +255,7 @@ impl SourceChain { } #[async_recursion] + #[tracing::instrument(skip(self, network))] pub async fn flush( &self, network: &(dyn HolochainP2pDnaT + Send + Sync), @@ -331,13 +332,16 @@ impl SourceChain { } } + tracing::debug!("Inserting entry"); for entry in entries { insert_entry(txn, entry.as_hash(), entry.as_content())?; } + tracing::debug!("Inserting action"); for shh in actions.iter() { insert_action(txn, shh)?; } for (op, op_hash, op_order, timestamp, _) in &ops { + tracing::debug!("Inserting op_lite"); insert_op_lite_into_authored(txn, op, op_hash, op_order, timestamp)?; // If this is a countersigning session we want to withhold // publishing the ops until the session is successful. diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs index c32e553363..40b8054e11 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs @@ -307,7 +307,7 @@ impl ShardedGossip { Ok(()) }) { tracing::error!( - "Gossip failed to get share nut when trying to initiate with {:?}", + "Gossip failed to get share mut when trying to initiate with {:?}", err ); } diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs index 084f658b0f..f0ba1fee30 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/initiate.rs @@ -38,42 +38,40 @@ impl ShardedGossipLocal { .find_remote_agent_within_arcset(Arc::new(intervals.clone().into()), &local_agents) .await?; - let id = rand::thread_rng().gen(); - - let agent_list = self - .evt_sender - .query_agents( - QueryAgentsEvt::new(self.space.clone()).by_agents(local_agents.iter().cloned()), - ) - .await - .map_err(KitsuneError::other)?; - - let maybe_gossip = self.inner.share_mut(|inner, _| { - Ok( - if let Some(next_target::Node { - agent_info_list, - cert, - url, - }) = remote_agent - { - let gossip = ShardedGossipWire::initiate(intervals, id, agent_list); - - let tgt = ShardedGossipTarget { - remote_agent_list: agent_info_list, - cert: cert.clone(), - tie_break: id, - when_initiated: Some(Instant::now()), - url: url.clone(), - }; - - inner.initiate_tgt = Some(tgt); + let maybe_gossip = if let Some(next_target::Node { + agent_info_list, + cert, + url, + }) = remote_agent + { + let id = rand::thread_rng().gen(); + + let agent_list = self + .evt_sender + .query_agents( + QueryAgentsEvt::new(self.space.clone()).by_agents(local_agents.iter().cloned()), + ) + .await + .map_err(KitsuneError::other)?; + + let gossip = ShardedGossipWire::initiate(intervals, id, agent_list); + + let tgt = ShardedGossipTarget { + remote_agent_list: agent_info_list, + cert: cert.clone(), + tie_break: id, + when_initiated: Some(Instant::now()), + url: url.clone(), + }; - Some((cert, HowToConnect::Url(url), gossip)) - } else { - None - }, - ) - })?; + self.inner.share_mut(|inner, _| { + inner.initiate_tgt = Some(tgt); + Ok(()) + })?; + Some((cert, HowToConnect::Url(url), gossip)) + } else { + None + }; Ok(maybe_gossip) } From b05fc034f0f8b52626a045d7cc859c6457a02ab4 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 29 Aug 2022 20:29:38 +0400 Subject: [PATCH 068/111] fix changelog --- crates/hdi/CHANGELOG.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index 05db77c107..ea0b6feee3 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -14,16 +14,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Docs: Add `OpType` helper example to HDI validation section [\#1505](https://github.com/holochain/holochain/pull/1505) -## 0.0.18 - -## 0.0.17 - -## 0.0.16 - -- Docs: Add `OpType` helper example to HDI validation section [\#1505](https://github.com/holochain/holochain/pull/1505) - -- Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [#1503](https://github.com/holochain/holochain/pull/1502) - ## 0.0.15 - Adds the `OpHelper` trait to create the `OpType` convenience type to help with writing validation code. [\#1488](https://github.com/holochain/holochain/pull/1488) From a5d54a5ceafb1eb4b5e6399f858d1798e8270d9e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 29 Aug 2022 20:30:11 +0400 Subject: [PATCH 069/111] fix changelog --- crates/hdi/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index ea0b6feee3..010c1b64a7 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [#1502](https://github.com/holochain/holochain/pull/1502) +## 0.0.19 + ## 0.0.18 ## 0.0.17 From ce450d59ddba137c86f25d945ba4599bc0059dac Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Mon, 29 Aug 2022 13:12:10 -0700 Subject: [PATCH 070/111] DRY up throttle error checking --- .../src/gossip/sharded_gossip/bandwidth.rs | 102 ++++++++---------- 1 file changed, 47 insertions(+), 55 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs index 5d8c9a3089..89d6db78f2 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/bandwidth.rs @@ -121,44 +121,56 @@ where } } + async fn try_throttle( + &self, + verb: &str, + throttle: &RateLimiter, + bytes: usize, + bits: NonZeroU32, + ) { + while let Err(e) = throttle.check_n(bits) { + match e { + governor::NegativeMultiDecision::BatchNonConforming(_, n) => { + let dur = n.wait_time_from(governor::clock::Clock::now(&self.clock)); + if dur.as_secs() > 1 { + tracing::info!( + "Waiting {:?} to {} {} bits, {} bytes", + dur, + verb, + bits, + bytes + ); + } + tokio::time::sleep(dur).await; + } + governor::NegativeMultiDecision::InsufficientCapacity(mut cap) => { + tracing::error!( + "Tried to {} {} bits, which is larger than the maximum possible of {} bits. Allowing this large message through anyway!", + verb, bits, cap + ); + // TODO: rather than allowing this message through, we should bubble this error up so that the sender can split + // the message into smaller chunks. We don't easily have that capacity right now, so, better to violate rate + // limiting than to go into an infinite loop... + + // Drain the rate limiter's capacity completely, to be as accurate as possible. + // (ideally we would just drain the capacity completely in one fell swoop, but `governor`'s API does not allow this.) + while cap > 1 { + throttle + .check_n(unsafe { NonZeroU32::new_unchecked(cap) }) + .ok(); + cap /= 2; + } + break; + } + } + } + } + /// Wait until there's enough bandwidth to send this many bytes. pub async fn outgoing_bytes(&self, bytes: usize) { if let Some(bits) = NonZeroU32::new(bytes as u32 * 8) { if let Some(outbound) = &self.outbound { - while let Err(e) = outbound.check_n(bits) { - match e { - governor::NegativeMultiDecision::BatchNonConforming(_, n) => { - let dur = n.wait_time_from(governor::clock::Clock::now(&self.clock)); - if dur.as_secs() > 1 { - tracing::info!( - "Waiting {:?} to send {} bits, {} bytes", - dur, - bits, - bytes - ); - } - tokio::time::sleep(dur).await; - } - governor::NegativeMultiDecision::InsufficientCapacity(mut cap) => { - tracing::error!( - "Tried to send {} bits, which is larger than the maximum possible of {} bits. Allowing this large message through anyway!", bits, cap - ); - // TODO: rather than allowing this message through, we should bubble this error up so that the sender can split - // the message into smaller chunks. We don't easily have that capacity right now, so, better to violate rate - // limiting than to go into an infinite loop... - - // Drain the rate limiter's capacity completely, to be as accurate as possible. - // (ideally we would just drain the capacity completely in one fell swoop, but `governor`'s API does not allow this.) - while cap > 1 { - outbound - .check_n(unsafe { NonZeroU32::new_unchecked(cap) }) - .ok(); - cap /= 2; - } - break; - } - } - } + self.try_throttle("send", outbound, bytes, bits).await; } let el = self.start_time.elapsed(); let last_s = self @@ -195,27 +207,7 @@ where pub async fn incoming_bytes(&self, bytes: usize) { if let Some(bits) = NonZeroU32::new(bytes as u32 * 8) { if let Some(inbound) = &self.inbound { - while let Err(e) = inbound.check_n(bits) { - match e { - governor::NegativeMultiDecision::BatchNonConforming(_, n) => { - let dur = n.wait_time_from(governor::clock::Clock::now(&self.clock)); - if dur.as_secs() > 1 { - tracing::info!( - "Waiting {:?} to receive {} bits, {} bytes", - dur, - bits, - bytes - ); - } - tokio::time::sleep(dur).await; - } - governor::NegativeMultiDecision::InsufficientCapacity(_) => { - tracing::error!( - "Tried to receive a message larger than the max message size" - ); - } - } - } + self.try_throttle("receive", inbound, bytes, bits).await; } let el = self.start_time.elapsed(); let last_s = self From 6dac75fc1d79f8cccaf9ba96a9c688ad9e2f8cec Mon Sep 17 00:00:00 2001 From: Abraham Njama <62102332+abe-njama@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:04:55 +0300 Subject: [PATCH 071/111] Update inline_zome.rs --- crates/holochain_zome_types/src/zome/inline_zome.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/holochain_zome_types/src/zome/inline_zome.rs b/crates/holochain_zome_types/src/zome/inline_zome.rs index 00a6e933ac..0b8fc99b3c 100644 --- a/crates/holochain_zome_types/src/zome/inline_zome.rs +++ b/crates/holochain_zome_types/src/zome/inline_zome.rs @@ -28,7 +28,7 @@ pub type InlineCoordinatorZome = InlineZome; /// An InlineZome, which consists pub struct InlineZome { /// Inline zome type marker. - pub _t: PhantomData, + _t: PhantomData, /// Since closures cannot be serialized, we include a UID which /// is the only part of an InlineZome that gets serialized. /// This uuid becomes part of the determination of the DnaHash From 1fd5743fca42cc3f6d395dcbbd2537ad8a03fcae Mon Sep 17 00:00:00 2001 From: Abraham Njama <62102332+abe-njama@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:06:08 +0300 Subject: [PATCH 072/111] Update zome.rs --- crates/holochain_zome_types/src/zome.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/holochain_zome_types/src/zome.rs b/crates/holochain_zome_types/src/zome.rs index a761d10bd5..beef2866ea 100644 --- a/crates/holochain_zome_types/src/zome.rs +++ b/crates/holochain_zome_types/src/zome.rs @@ -30,7 +30,7 @@ use std::sync::Arc; pub struct Zome { pub name: ZomeName, #[cfg_attr(feature = "full-dna-def", shrinkwrap(main_field))] - def: T, + pub def: T, } pub type IntegrityZome = Zome; From 4feba131c81192ab5ed591fddf39d443753f6d70 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Wed, 31 Aug 2022 00:18:51 +0400 Subject: [PATCH 073/111] fix tests --- crates/hdi/tests/op/mod.rs | 1 + crates/test_utils/wasm/wasm_workspace/Cargo.lock | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/hdi/tests/op/mod.rs b/crates/hdi/tests/op/mod.rs index a0730d2fb1..13aae9155e 100644 --- a/crates/hdi/tests/op/mod.rs +++ b/crates/hdi/tests/op/mod.rs @@ -926,6 +926,7 @@ fn op_to_type(op: OpType) { } }; let r = RegisterAgentActivity { + cached_entry: None, action: SignedHashed { hashed: HoloHashed::from_content_sync(r), signature: Signature::arbitrary(&mut ud).unwrap(), diff --git a/crates/test_utils/wasm/wasm_workspace/Cargo.lock b/crates/test_utils/wasm/wasm_workspace/Cargo.lock index 89a60cf6f8..23df0031ce 100644 --- a/crates/test_utils/wasm/wasm_workspace/Cargo.lock +++ b/crates/test_utils/wasm/wasm_workspace/Cargo.lock @@ -684,7 +684,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.18" +version = "0.0.19" dependencies = [ "hdk_derive", "holo_hash", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.146" +version = "0.0.147" dependencies = [ "getrandom", "hdi", @@ -718,7 +718,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.44" +version = "0.0.45" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -823,7 +823,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.47" +version = "0.0.48" dependencies = [ "hdk", "serde", From adb1e55f0eb64136c1333abdf05020a6fca7ddaf Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 31 Aug 2022 01:59:22 +0000 Subject: [PATCH 074/111] apply develop versions to changed crates the following crates changed since their most recent release and are therefore increased to a develop version: - holochain_cascade-0.0.57-dev.0 - holochain_wasm_test_utils-0.0.55-dev.0 - hdk-0.0.148-dev.0 - holochain_test_wasm_common-0.0.49-dev.0 - hdk_derive-0.0.46-dev.0 - holochain_types-0.0.53-dev.0 - holochain_cli-0.0.54-dev.0 - holochain_cli_sandbox-0.0.50-dev.0 - holochain_cli_bundle-0.0.49-dev.0 - holochain_conductor_api-0.0.56-dev.0 - holochain_state-0.0.56-dev.0 - holochain_zome_types-0.0.45-dev.0 - holochain_keystore-0.0.52-dev.0 - holochain_sqlite-0.0.51-dev.0 - holochain_integrity_types-0.0.16-dev.0 - hdi-0.0.20-dev.0 - holochain-0.0.158-dev.0 - holochain_p2p-0.0.53-dev.0 --- crates/hc/Cargo.toml | 6 ++--- crates/hc_bundle/Cargo.toml | 4 +-- crates/hc_sandbox/Cargo.toml | 8 +++--- crates/hdi/Cargo.toml | 6 ++--- crates/hdk/Cargo.toml | 8 +++--- crates/hdk_derive/Cargo.toml | 4 +-- crates/holochain/Cargo.toml | 30 ++++++++++----------- crates/holochain_cascade/Cargo.toml | 16 +++++------ crates/holochain_conductor_api/Cargo.toml | 10 +++---- crates/holochain_integrity_types/Cargo.toml | 2 +- crates/holochain_keystore/Cargo.toml | 6 ++--- crates/holochain_p2p/Cargo.toml | 8 +++--- crates/holochain_sqlite/Cargo.toml | 4 +-- crates/holochain_state/Cargo.toml | 12 ++++----- crates/holochain_types/Cargo.toml | 8 +++--- crates/holochain_zome_types/Cargo.toml | 4 +-- crates/test_utils/wasm/Cargo.toml | 4 +-- crates/test_utils/wasm_common/Cargo.toml | 4 +-- 18 files changed, 72 insertions(+), 72 deletions(-) diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index dee0da8c96..4aec9eaec9 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.53" +version = "0.0.54-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -21,8 +21,8 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0" futures = "0.3" -holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.48"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.49"} +holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.49-dev.0"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.50-dev.0"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_bundle/Cargo.toml b/crates/hc_bundle/Cargo.toml index 7a4407a767..7db7bb6610 100644 --- a/crates/hc_bundle/Cargo.toml +++ b/crates/hc_bundle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_bundle" -version = "0.0.48" +version = "0.0.49-dev.0" description = "DNA and hApp bundling functionality for the `hc` Holochain CLI utility" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ path = "src/bin/hc-dna.rs" anyhow = "1.0" holochain_util = { path = "../holochain_util", features = ["backtrace"], version = "0.0.11"} holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.52", path = "../holochain_types" } +holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } mr_bundle = {version = "0.0.15", path = "../mr_bundle"} serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index 7260b68cc7..a8fe37e407 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.49" +version = "0.0.50-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,10 +19,10 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.55"} -holochain_types = { path = "../holochain_types", version = "0.0.52"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.56-dev.0"} +holochain_types = { path = "../holochain_types", version = "0.0.53-dev.0"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} -holochain_p2p = { path = "../holochain_p2p", version = "0.0.52"} +holochain_p2p = { path = "../holochain_p2p", version = "0.0.53-dev.0"} holochain_util = { version = "0.0.11", path = "../holochain_util", features = [ "pw" ] } nanoid = "0.3" observability = "0.1.3" diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index e77d90f8d0..ff2ba9a4dd 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.0.19" +version = "0.0.20-dev.0" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" @@ -23,12 +23,12 @@ test_utils = [ ] [dependencies] -hdk_derive = { version = "0.0.45", path = "../hdk_derive" } +hdk_derive = { version = "0.0.46-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_integrity_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_integrity_types = { version = "0.0.15", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.16-dev.0", path = "../holochain_integrity_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index 2db828e834..7b78892d0b 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.147" +version = "0.0.148-dev.0" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,13 +27,13 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.0.19", path = "../hdi", features = ["trace"] } -hdk_derive = { version = "0.0.45", path = "../hdk_derive" } +hdi = { version = "0.0.20-dev.0", path = "../hdi", features = ["trace"] } +hdk_derive = { version = "0.0.46-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types", default-features = false } +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk_derive/Cargo.toml b/crates/hdk_derive/Cargo.toml index 9f566e9e5e..e991d144ae 100644 --- a/crates/hdk_derive/Cargo.toml +++ b/crates/hdk_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk_derive" -version = "0.0.45" +version = "0.0.46-dev.0" description = "derive macros for the holochain hdk" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ darling = "0.14.1" heck = "0.4" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdi, to reduce code bloat -holochain_integrity_types = { version = "0.0.15", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.16-dev.0", path = "../holochain_integrity_types", default-features = false } proc-macro-error = "1.0.4" [features] diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 507cde4b80..b4291d7054 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.157" +version = "0.0.158-dev.0" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,17 +24,17 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.56", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.55", path = "../holochain_conductor_api" } -holochain_keystore = { version = "0.0.51", path = "../holochain_keystore" } -holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } -holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } +holochain_cascade = { version = "0.0.57-dev.0", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.56-dev.0", path = "../holochain_conductor_api" } +holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } +holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.55", path = "../holochain_state" } -holochain_types = { version = "0.0.52", path = "../holochain_types" } +holochain_state = { version = "0.0.56-dev.0", path = "../holochain_state" } +holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types", features = ["full"] } +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types", features = ["full"] } human-panic = "1.0.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } @@ -74,15 +74,15 @@ url = "1.7.2" url2 = "0.0.6" url_serde = "0.2.0" uuid = { version = "0.7", features = [ "serde", "v4" ] } -holochain_wasm_test_utils = { version = "0.0.54", path = "../test_utils/wasm" } +holochain_wasm_test_utils = { version = "0.0.55-dev.0", path = "../test_utils/wasm" } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.147", path = "../hdk", optional = true } +hdk = { version = "0.0.148-dev.0", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.48", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.49-dev.0", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -103,14 +103,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.147", path = "../hdk", optional = false } +hdk = { version = "0.0.148-dev.0", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.48", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.49-dev.0", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.147", path = "../hdk"} +hdk = { version = "0.0.148-dev.0", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index e9d3d7c093..3db900df2c 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.56" +version = "0.0.57-dev.0" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,15 +15,15 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.147", path = "../hdk" } -hdk_derive = { version = "0.0.45", path = "../hdk_derive" } +hdk = { version = "0.0.148-dev.0", path = "../hdk" } +hdk_derive = { version = "0.0.46-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } -holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } +holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.55", path = "../holochain_state" } -holochain_types = { version = "0.0.52", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } +holochain_state = { version = "0.0.56-dev.0", path = "../holochain_state" } +holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } observability = "0.1.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } serde = { version = "1.0", features = [ "derive" ] } diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index ad7241c1a6..0daf198227 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.55" +version = "0.0.56-dev.0" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -13,11 +13,11 @@ directories = "2.0.2" derive_more = "0.99.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } -holochain_state = { version = "0.0.55", path = "../holochain_state" } +holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } +holochain_state = { version = "0.0.56-dev.0", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.52", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_yaml = "0.8" diff --git a/crates/holochain_integrity_types/Cargo.toml b/crates/holochain_integrity_types/Cargo.toml index 7877a50ef8..d3a3b0810e 100644 --- a/crates/holochain_integrity_types/Cargo.toml +++ b/crates/holochain_integrity_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_integrity_types" -version = "0.0.15" +version = "0.0.16-dev.0" description = "Holochain integrity types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 1e91f0c346..73001267c8 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_keystore" -version = "0.0.51" +version = "0.0.52-dev.0" description = "keystore for libsodium keypairs" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,7 +15,7 @@ base64 = "0.13.0" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.44"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45-dev.0"} kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } nanoid = "0.4.0" one_err = "0.0.5" @@ -28,4 +28,4 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. -holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } diff --git a/crates/holochain_p2p/Cargo.toml b/crates/holochain_p2p/Cargo.toml index 4526097c8c..1693fdcae5 100644 --- a/crates/holochain_p2p/Cargo.toml +++ b/crates/holochain_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_p2p" -version = "0.0.52" +version = "0.0.53-dev.0" description = "holochain specific wrapper around more generic p2p module" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -17,10 +17,10 @@ fixt = { path = "../fixt", version = "0.0.14"} futures = "0.3" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash" } -holochain_keystore = { version = "0.0.51", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.52", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } mockall = "0.10.2" diff --git a/crates/holochain_sqlite/Cargo.toml b/crates/holochain_sqlite/Cargo.toml index a116d4a713..c7cef271c8 100644 --- a/crates/holochain_sqlite/Cargo.toml +++ b/crates/holochain_sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_sqlite" -version = "0.0.50" +version = "0.0.51-dev.0" description = "Abstractions for persistence of Holochain state via SQLite" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -25,7 +25,7 @@ fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3.1" holo_hash = { path = "../holo_hash", features = ["rusqlite"], version = "0.0.31"} holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types" } +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } lazy_static = "1.4.0" once_cell = "1.4.1" diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index fc00f26cf6..97d10789ac 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.55" +version = "0.0.56-dev.0" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -13,16 +13,16 @@ byteorder = "1.3.4" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } derive_more = "0.99.3" either = "1.5" -holochain_sqlite = { version = "0.0.50", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } fallible-iterator = "0.2.0" futures = "0.3" -holochain_keystore = { version = "0.0.51", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_p2p = { version = "0.0.52", path = "../holochain_p2p" } -holochain_types = { version = "0.0.52", path = "../holochain_types" } +holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } +holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } holochain_util = { version = "0.0.11", path = "../holochain_util" } -holochain_zome_types = { version = "0.0.44", path = "../holochain_zome_types", features = [ +holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types", features = [ "full", ] } kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index 06757eca5c..199313f195 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_types" -version = "0.0.52" +version = "0.0.53-dev.0" description = "Holochain common types" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -25,10 +25,10 @@ fixt = { path = "../fixt", version = "0.0.14"} flate2 = "1.0.14" futures = "0.3" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["encoding"] } -holochain_keystore = { version = "0.0.51", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.50"} -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.44", features = ["full"] } +holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.51-dev.0"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45-dev.0", features = ["full"] } itertools = { version = "0.10" } kitsune_p2p_dht = { version = "0.0.3", path = "../kitsune_p2p/dht" } lazy_static = "1.4.0" diff --git a/crates/holochain_zome_types/Cargo.toml b/crates/holochain_zome_types/Cargo.toml index d12735559f..da3ed9e8e8 100644 --- a/crates/holochain_zome_types/Cargo.toml +++ b/crates/holochain_zome_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_zome_types" -version = "0.0.44" +version = "0.0.45-dev.0" description = "Holochain zome types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -13,7 +13,7 @@ edition = "2021" [dependencies] kitsune_p2p_timestamp = { version = "0.0.12", path = "../kitsune_p2p/timestamp" } -holochain_integrity_types = { version = "0.0.15", path = "../holochain_integrity_types", features = ["tracing"] } +holochain_integrity_types = { version = "0.0.16-dev.0", path = "../holochain_integrity_types", features = ["tracing"] } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_serialized_bytes = "=0.0.51" paste = "=1.0.5" diff --git a/crates/test_utils/wasm/Cargo.toml b/crates/test_utils/wasm/Cargo.toml index 197c25c25a..14d6195ae0 100644 --- a/crates/test_utils/wasm/Cargo.toml +++ b/crates/test_utils/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wasm_test_utils" -version = "0.0.54" +version = "0.0.55-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Utilities for Wasm testing for Holochain" @@ -19,7 +19,7 @@ only_check = [] [dependencies] -holochain_types = { path = "../../holochain_types", version = "0.0.52"} +holochain_types = { path = "../../holochain_types", version = "0.0.53-dev.0"} strum = "0.18.0" strum_macros = "0.18.0" holochain_util = { version = "0.0.11", path = "../../holochain_util" } diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index e83e4f3ee0..0c87b35a10 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.48" +version = "0.0.49-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.147"} +hdk = { path = "../../hdk", version = "0.0.148-dev.0"} serde = "1.0" From 0cd777c789ee13ca655f9bffbd7fe11b49e47824 Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 31 Aug 2022 02:05:44 +0000 Subject: [PATCH 075/111] create a release from branch release-20220831.015922 the following crates are part of this release: - holochain_integrity_types-0.0.16 - hdk_derive-0.0.46 - hdi-0.0.20 - holochain_zome_types-0.0.45 - hdk-0.0.148 - holochain_sqlite-0.0.51 - holochain_keystore-0.0.52 - holochain_types-0.0.53 - holochain_p2p-0.0.53 - holochain_state-0.0.56 - holochain_cascade-0.0.57 - holochain_wasm_test_utils-0.0.55 - holochain_conductor_api-0.0.56 - holochain_test_wasm_common-0.0.49 - holochain-0.0.158 - holochain_cli_bundle-0.0.49 - holochain_cli_sandbox-0.0.50 - holochain_cli-0.0.54 --- CHANGELOG.md | 42 +++++++++++++++++++ Cargo.lock | 36 ++++++++-------- crates/hc/CHANGELOG.md | 2 + crates/hc/Cargo.toml | 6 +-- crates/hc_bundle/CHANGELOG.md | 2 + crates/hc_bundle/Cargo.toml | 4 +- crates/hc_sandbox/CHANGELOG.md | 2 + crates/hc_sandbox/Cargo.toml | 8 ++-- crates/hdi/CHANGELOG.md | 4 +- crates/hdi/Cargo.toml | 6 +-- crates/hdk/CHANGELOG.md | 2 + crates/hdk/Cargo.toml | 8 ++-- crates/hdk_derive/CHANGELOG.md | 2 + crates/hdk_derive/Cargo.toml | 4 +- crates/holochain/CHANGELOG.md | 2 + crates/holochain/Cargo.toml | 30 ++++++------- crates/holochain_cascade/CHANGELOG.md | 2 + crates/holochain_cascade/Cargo.toml | 16 +++---- crates/holochain_conductor_api/CHANGELOG.md | 2 + crates/holochain_conductor_api/Cargo.toml | 10 ++--- crates/holochain_integrity_types/CHANGELOG.md | 4 +- crates/holochain_integrity_types/Cargo.toml | 2 +- crates/holochain_keystore/CHANGELOG.md | 2 + crates/holochain_keystore/Cargo.toml | 6 +-- crates/holochain_p2p/CHANGELOG.md | 2 + crates/holochain_p2p/Cargo.toml | 8 ++-- crates/holochain_sqlite/CHANGELOG.md | 2 + crates/holochain_sqlite/Cargo.toml | 4 +- crates/holochain_state/CHANGELOG.md | 2 + crates/holochain_state/Cargo.toml | 12 +++--- crates/holochain_types/CHANGELOG.md | 2 + crates/holochain_types/Cargo.toml | 8 ++-- crates/holochain_zome_types/CHANGELOG.md | 2 + crates/holochain_zome_types/Cargo.toml | 4 +- crates/test_utils/wasm/CHANGELOG.md | 2 + crates/test_utils/wasm/Cargo.toml | 4 +- crates/test_utils/wasm_common/CHANGELOG.md | 2 + crates/test_utils/wasm_common/Cargo.toml | 4 +- 38 files changed, 170 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 056a4a257a..81649fc1e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # \[Unreleased\] +# 20220831.015922 + +## [holochain\_cli-0.0.54](crates/holochain_cli/CHANGELOG.md#0.0.54) + +## [holochain\_cli\_sandbox-0.0.50](crates/holochain_cli_sandbox/CHANGELOG.md#0.0.50) + +## [holochain\_cli\_bundle-0.0.49](crates/holochain_cli_bundle/CHANGELOG.md#0.0.49) + +## [holochain-0.0.158](crates/holochain/CHANGELOG.md#0.0.158) + +## [holochain\_test\_wasm\_common-0.0.49](crates/holochain_test_wasm_common/CHANGELOG.md#0.0.49) + +## [holochain\_conductor\_api-0.0.56](crates/holochain_conductor_api/CHANGELOG.md#0.0.56) + +## [holochain\_wasm\_test\_utils-0.0.55](crates/holochain_wasm_test_utils/CHANGELOG.md#0.0.55) + +## [holochain\_cascade-0.0.57](crates/holochain_cascade/CHANGELOG.md#0.0.57) + +## [holochain\_state-0.0.56](crates/holochain_state/CHANGELOG.md#0.0.56) + +## [holochain\_p2p-0.0.53](crates/holochain_p2p/CHANGELOG.md#0.0.53) + +## [holochain\_types-0.0.53](crates/holochain_types/CHANGELOG.md#0.0.53) + +## [holochain\_keystore-0.0.52](crates/holochain_keystore/CHANGELOG.md#0.0.52) + +## [holochain\_sqlite-0.0.51](crates/holochain_sqlite/CHANGELOG.md#0.0.51) + +## [hdk-0.0.148](crates/hdk/CHANGELOG.md#0.0.148) + +## [holochain\_zome\_types-0.0.45](crates/holochain_zome_types/CHANGELOG.md#0.0.45) + +## [hdi-0.0.20](crates/hdi/CHANGELOG.md#0.0.20) + +- Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [\#1502](https://github.com/holochain/holochain/pull/1502) + +## [hdk\_derive-0.0.46](crates/hdk_derive/CHANGELOG.md#0.0.46) + +## [holochain\_integrity\_types-0.0.16](crates/holochain_integrity_types/CHANGELOG.md#0.0.16) + +- Adds `ChainFilter` type for use in `must_get_agent_activity`. This allows specifying a chain top hash to start from and then creates a range either to genesis or `unit` a given hash or after `take`ing a number of actions. The range iterates backwards from the given chain top till it reaches on of the above possible chain bottoms. For this reason it will never contain forks. [\#1502](https://github.com/holochain/holochain/pull/1502) + # 20220824.014353 ## [holochain\_cli-0.0.53](crates/holochain_cli/CHANGELOG.md#0.0.53) diff --git a/Cargo.lock b/Cargo.lock index 5f1b39e3ef..3a890e5e26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1839,7 +1839,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.19" +version = "0.0.20" dependencies = [ "arbitrary", "fixt", @@ -1858,7 +1858,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.147" +version = "0.0.148" dependencies = [ "fixt", "getrandom 0.2.7", @@ -1879,7 +1879,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.45" +version = "0.0.46" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -1964,7 +1964,7 @@ dependencies = [ [[package]] name = "holochain" -version = "0.0.157" +version = "0.0.158" dependencies = [ "anyhow", "arbitrary", @@ -2056,7 +2056,7 @@ dependencies = [ [[package]] name = "holochain_cascade" -version = "0.0.56" +version = "0.0.57" dependencies = [ "async-trait", "derive_more", @@ -2090,7 +2090,7 @@ dependencies = [ [[package]] name = "holochain_cli" -version = "0.0.53" +version = "0.0.54" dependencies = [ "anyhow", "futures", @@ -2103,7 +2103,7 @@ dependencies = [ [[package]] name = "holochain_cli_bundle" -version = "0.0.48" +version = "0.0.49" dependencies = [ "anyhow", "assert_cmd", @@ -2124,7 +2124,7 @@ dependencies = [ [[package]] name = "holochain_cli_sandbox" -version = "0.0.49" +version = "0.0.50" dependencies = [ "ansi_term 0.12.1", "anyhow", @@ -2153,7 +2153,7 @@ dependencies = [ [[package]] name = "holochain_conductor_api" -version = "0.0.55" +version = "0.0.56" dependencies = [ "derive_more", "directories", @@ -2177,7 +2177,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.15" +version = "0.0.16" dependencies = [ "arbitrary", "holo_hash", @@ -2191,7 +2191,7 @@ dependencies = [ [[package]] name = "holochain_keystore" -version = "0.0.51" +version = "0.0.52" dependencies = [ "base64", "ghost_actor 0.3.0-alpha.4", @@ -2220,7 +2220,7 @@ dependencies = [ [[package]] name = "holochain_p2p" -version = "0.0.52" +version = "0.0.53" dependencies = [ "async-trait", "derive_more", @@ -2274,7 +2274,7 @@ dependencies = [ [[package]] name = "holochain_sqlite" -version = "0.0.50" +version = "0.0.51" dependencies = [ "anyhow", "async-trait", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "holochain_state" -version = "0.0.55" +version = "0.0.56" dependencies = [ "anyhow", "arbitrary", @@ -2368,7 +2368,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.48" +version = "0.0.49" dependencies = [ "hdk", "serde", @@ -2376,7 +2376,7 @@ dependencies = [ [[package]] name = "holochain_types" -version = "0.0.52" +version = "0.0.53" dependencies = [ "anyhow", "arbitrary", @@ -2447,7 +2447,7 @@ dependencies = [ [[package]] name = "holochain_wasm_test_utils" -version = "0.0.54" +version = "0.0.55" dependencies = [ "holochain_types", "holochain_util", @@ -2539,7 +2539,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.44" +version = "0.0.45" dependencies = [ "arbitrary", "contrafact", diff --git a/crates/hc/CHANGELOG.md b/crates/hc/CHANGELOG.md index af54504a13..03f94ef7ed 100644 --- a/crates/hc/CHANGELOG.md +++ b/crates/hc/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.54 + ## 0.0.53 ## 0.0.52 diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index 4aec9eaec9..2917d58ca0 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.54-dev.0" +version = "0.0.54" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -21,8 +21,8 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0" futures = "0.3" -holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.49-dev.0"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.50-dev.0"} +holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.49"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.50"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_bundle/CHANGELOG.md b/crates/hc_bundle/CHANGELOG.md index f99af0ba21..7407cf8a4f 100644 --- a/crates/hc_bundle/CHANGELOG.md +++ b/crates/hc_bundle/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.49 + ## 0.0.48 ## 0.0.47 diff --git a/crates/hc_bundle/Cargo.toml b/crates/hc_bundle/Cargo.toml index 7db7bb6610..894bbd9397 100644 --- a/crates/hc_bundle/Cargo.toml +++ b/crates/hc_bundle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_bundle" -version = "0.0.49-dev.0" +version = "0.0.49" description = "DNA and hApp bundling functionality for the `hc` Holochain CLI utility" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ path = "src/bin/hc-dna.rs" anyhow = "1.0" holochain_util = { path = "../holochain_util", features = ["backtrace"], version = "0.0.11"} holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } +holochain_types = { version = "0.0.53", path = "../holochain_types" } mr_bundle = {version = "0.0.15", path = "../mr_bundle"} serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" diff --git a/crates/hc_sandbox/CHANGELOG.md b/crates/hc_sandbox/CHANGELOG.md index 582651b725..21cd1c55ad 100644 --- a/crates/hc_sandbox/CHANGELOG.md +++ b/crates/hc_sandbox/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.50 + ## 0.0.49 ## 0.0.48 diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index a8fe37e407..eb14dabe08 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.50-dev.0" +version = "0.0.50" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,10 +19,10 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.56-dev.0"} -holochain_types = { path = "../holochain_types", version = "0.0.53-dev.0"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.56"} +holochain_types = { path = "../holochain_types", version = "0.0.53"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} -holochain_p2p = { path = "../holochain_p2p", version = "0.0.53-dev.0"} +holochain_p2p = { path = "../holochain_p2p", version = "0.0.53"} holochain_util = { version = "0.0.11", path = "../holochain_util", features = [ "pw" ] } nanoid = "0.3" observability = "0.1.3" diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index 010c1b64a7..f26d80cfcd 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -4,7 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased -- Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [#1502](https://github.com/holochain/holochain/pull/1502) +## 0.0.20 + +- Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [\#1502](https://github.com/holochain/holochain/pull/1502) ## 0.0.19 diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index ff2ba9a4dd..7e119ca1e1 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.0.20-dev.0" +version = "0.0.20" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" @@ -23,12 +23,12 @@ test_utils = [ ] [dependencies] -hdk_derive = { version = "0.0.46-dev.0", path = "../hdk_derive" } +hdk_derive = { version = "0.0.46", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_integrity_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_integrity_types = { version = "0.0.16-dev.0", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.16", path = "../holochain_integrity_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk/CHANGELOG.md b/crates/hdk/CHANGELOG.md index ccb0eb16d1..9e75eb3e2e 100644 --- a/crates/hdk/CHANGELOG.md +++ b/crates/hdk/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.148 + ## 0.0.147 ## 0.0.146 diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index 7b78892d0b..9d722baaae 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.148-dev.0" +version = "0.0.148" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,13 +27,13 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.0.20-dev.0", path = "../hdi", features = ["trace"] } -hdk_derive = { version = "0.0.46-dev.0", path = "../hdk_derive" } +hdi = { version = "0.0.20", path = "../hdi", features = ["trace"] } +hdk_derive = { version = "0.0.46", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types", default-features = false } +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk_derive/CHANGELOG.md b/crates/hdk_derive/CHANGELOG.md index b0ec9c9361..54895a6988 100644 --- a/crates/hdk_derive/CHANGELOG.md +++ b/crates/hdk_derive/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.46 + ## 0.0.45 ## 0.0.44 diff --git a/crates/hdk_derive/Cargo.toml b/crates/hdk_derive/Cargo.toml index e991d144ae..4c38f52c1d 100644 --- a/crates/hdk_derive/Cargo.toml +++ b/crates/hdk_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk_derive" -version = "0.0.46-dev.0" +version = "0.0.46" description = "derive macros for the holochain hdk" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ darling = "0.14.1" heck = "0.4" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdi, to reduce code bloat -holochain_integrity_types = { version = "0.0.16-dev.0", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.16", path = "../holochain_integrity_types", default-features = false } proc-macro-error = "1.0.4" [features] diff --git a/crates/holochain/CHANGELOG.md b/crates/holochain/CHANGELOG.md index 02ad957b3c..f37e2de4a4 100644 --- a/crates/holochain/CHANGELOG.md +++ b/crates/holochain/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.158 + ## 0.0.157 ## 0.0.156 diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index b4291d7054..0f8b29b510 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.158-dev.0" +version = "0.0.158" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,17 +24,17 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.57-dev.0", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.56-dev.0", path = "../holochain_conductor_api" } -holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } -holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } -holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } +holochain_cascade = { version = "0.0.57", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.56", path = "../holochain_conductor_api" } +holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } +holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.56-dev.0", path = "../holochain_state" } -holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } +holochain_state = { version = "0.0.56", path = "../holochain_state" } +holochain_types = { version = "0.0.53", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types", features = ["full"] } +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types", features = ["full"] } human-panic = "1.0.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } @@ -74,15 +74,15 @@ url = "1.7.2" url2 = "0.0.6" url_serde = "0.2.0" uuid = { version = "0.7", features = [ "serde", "v4" ] } -holochain_wasm_test_utils = { version = "0.0.55-dev.0", path = "../test_utils/wasm" } +holochain_wasm_test_utils = { version = "0.0.55", path = "../test_utils/wasm" } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.148-dev.0", path = "../hdk", optional = true } +hdk = { version = "0.0.148", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.49-dev.0", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.49", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -103,14 +103,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.148-dev.0", path = "../hdk", optional = false } +hdk = { version = "0.0.148", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.49-dev.0", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.49", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.148-dev.0", path = "../hdk"} +hdk = { version = "0.0.148", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/CHANGELOG.md b/crates/holochain_cascade/CHANGELOG.md index 7730e6df79..796e458f6b 100644 --- a/crates/holochain_cascade/CHANGELOG.md +++ b/crates/holochain_cascade/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.57 + ## 0.0.56 ## 0.0.55 diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 3db900df2c..17a8660a37 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.57-dev.0" +version = "0.0.57" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,15 +15,15 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.148-dev.0", path = "../hdk" } -hdk_derive = { version = "0.0.46-dev.0", path = "../hdk_derive" } +hdk = { version = "0.0.148", path = "../hdk" } +hdk_derive = { version = "0.0.46", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } -holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } +holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.56-dev.0", path = "../holochain_state" } -holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } +holochain_state = { version = "0.0.56", path = "../holochain_state" } +holochain_types = { version = "0.0.53", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } observability = "0.1.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } serde = { version = "1.0", features = [ "derive" ] } diff --git a/crates/holochain_conductor_api/CHANGELOG.md b/crates/holochain_conductor_api/CHANGELOG.md index cd41de006b..caf88f034a 100644 --- a/crates/holochain_conductor_api/CHANGELOG.md +++ b/crates/holochain_conductor_api/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.56 + ## 0.0.55 ## 0.0.54 diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index 0daf198227..b56b157b3b 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.56-dev.0" +version = "0.0.56" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -13,11 +13,11 @@ directories = "2.0.2" derive_more = "0.99.3" kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } -holochain_state = { version = "0.0.56-dev.0", path = "../holochain_state" } +holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } +holochain_state = { version = "0.0.56", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.53", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_yaml = "0.8" diff --git a/crates/holochain_integrity_types/CHANGELOG.md b/crates/holochain_integrity_types/CHANGELOG.md index 438bfb35a9..b11c6a59ee 100644 --- a/crates/holochain_integrity_types/CHANGELOG.md +++ b/crates/holochain_integrity_types/CHANGELOG.md @@ -4,7 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased -- Adds `ChainFilter` type for use in `must_get_agent_activity`. This allows specifying a chain top hash to start from and then creates a range either to genesis or `unit` a given hash or after `take`ing a number of actions. The range iterates backwards from the given chain top till it reaches on of the above possible chain bottoms. For this reason it will never contain forks. [#1502](https://github.com/holochain/holochain/pull/1502) +## 0.0.16 + +- Adds `ChainFilter` type for use in `must_get_agent_activity`. This allows specifying a chain top hash to start from and then creates a range either to genesis or `unit` a given hash or after `take`ing a number of actions. The range iterates backwards from the given chain top till it reaches on of the above possible chain bottoms. For this reason it will never contain forks. [\#1502](https://github.com/holochain/holochain/pull/1502) ## 0.0.15 diff --git a/crates/holochain_integrity_types/Cargo.toml b/crates/holochain_integrity_types/Cargo.toml index d3a3b0810e..30547bea3b 100644 --- a/crates/holochain_integrity_types/Cargo.toml +++ b/crates/holochain_integrity_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_integrity_types" -version = "0.0.16-dev.0" +version = "0.0.16" description = "Holochain integrity types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/holochain_keystore/CHANGELOG.md b/crates/holochain_keystore/CHANGELOG.md index a8183fe7e7..3c64d870dd 100644 --- a/crates/holochain_keystore/CHANGELOG.md +++ b/crates/holochain_keystore/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.52 + ## 0.0.51 ## 0.0.50 diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 73001267c8..f7153cac3c 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_keystore" -version = "0.0.52-dev.0" +version = "0.0.52" description = "keystore for libsodium keypairs" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,7 +15,7 @@ base64 = "0.13.0" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45-dev.0"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45"} kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } nanoid = "0.4.0" one_err = "0.0.5" @@ -28,4 +28,4 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. -holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } diff --git a/crates/holochain_p2p/CHANGELOG.md b/crates/holochain_p2p/CHANGELOG.md index 7767c19b32..bb02555229 100644 --- a/crates/holochain_p2p/CHANGELOG.md +++ b/crates/holochain_p2p/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.53 + ## 0.0.52 ## 0.0.51 diff --git a/crates/holochain_p2p/Cargo.toml b/crates/holochain_p2p/Cargo.toml index 1693fdcae5..7aedf3f2f6 100644 --- a/crates/holochain_p2p/Cargo.toml +++ b/crates/holochain_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_p2p" -version = "0.0.53-dev.0" +version = "0.0.53" description = "holochain specific wrapper around more generic p2p module" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -17,10 +17,10 @@ fixt = { path = "../fixt", version = "0.0.14"} futures = "0.3" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash" } -holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.53", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } mockall = "0.10.2" diff --git a/crates/holochain_sqlite/CHANGELOG.md b/crates/holochain_sqlite/CHANGELOG.md index ae2805b9fb..47fc12e2ae 100644 --- a/crates/holochain_sqlite/CHANGELOG.md +++ b/crates/holochain_sqlite/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.51 + ## 0.0.50 ## 0.0.49 diff --git a/crates/holochain_sqlite/Cargo.toml b/crates/holochain_sqlite/Cargo.toml index c7cef271c8..dd25fce2c7 100644 --- a/crates/holochain_sqlite/Cargo.toml +++ b/crates/holochain_sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_sqlite" -version = "0.0.51-dev.0" +version = "0.0.51" description = "Abstractions for persistence of Holochain state via SQLite" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -25,7 +25,7 @@ fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3.1" holo_hash = { path = "../holo_hash", features = ["rusqlite"], version = "0.0.31"} holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types" } +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } lazy_static = "1.4.0" once_cell = "1.4.1" diff --git a/crates/holochain_state/CHANGELOG.md b/crates/holochain_state/CHANGELOG.md index 8395442b35..85326253f3 100644 --- a/crates/holochain_state/CHANGELOG.md +++ b/crates/holochain_state/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.56 + ## 0.0.55 ## 0.0.54 diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index 97d10789ac..2df29daae5 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.56-dev.0" +version = "0.0.56" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -13,16 +13,16 @@ byteorder = "1.3.4" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } derive_more = "0.99.3" either = "1.5" -holochain_sqlite = { version = "0.0.51-dev.0", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } fallible-iterator = "0.2.0" futures = "0.3" -holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_p2p = { version = "0.0.53-dev.0", path = "../holochain_p2p" } -holochain_types = { version = "0.0.53-dev.0", path = "../holochain_types" } +holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } +holochain_types = { version = "0.0.53", path = "../holochain_types" } holochain_util = { version = "0.0.11", path = "../holochain_util" } -holochain_zome_types = { version = "0.0.45-dev.0", path = "../holochain_zome_types", features = [ +holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types", features = [ "full", ] } kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } diff --git a/crates/holochain_types/CHANGELOG.md b/crates/holochain_types/CHANGELOG.md index a1ac72c30c..1c25d136ad 100644 --- a/crates/holochain_types/CHANGELOG.md +++ b/crates/holochain_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.53 + ## 0.0.52 ## 0.0.51 diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index 199313f195..30e12e56d9 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_types" -version = "0.0.53-dev.0" +version = "0.0.53" description = "Holochain common types" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -25,10 +25,10 @@ fixt = { path = "../fixt", version = "0.0.14"} flate2 = "1.0.14" futures = "0.3" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["encoding"] } -holochain_keystore = { version = "0.0.52-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.51-dev.0"} -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45-dev.0", features = ["full"] } +holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.51"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45", features = ["full"] } itertools = { version = "0.10" } kitsune_p2p_dht = { version = "0.0.3", path = "../kitsune_p2p/dht" } lazy_static = "1.4.0" diff --git a/crates/holochain_zome_types/CHANGELOG.md b/crates/holochain_zome_types/CHANGELOG.md index 4038af9e4f..963b199c69 100644 --- a/crates/holochain_zome_types/CHANGELOG.md +++ b/crates/holochain_zome_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased](https://github.com/holochain/holochain/holochain_zome_types-v0.0.2-alpha.1...HEAD) +## 0.0.45 + ## 0.0.44 ## 0.0.43 diff --git a/crates/holochain_zome_types/Cargo.toml b/crates/holochain_zome_types/Cargo.toml index da3ed9e8e8..03074f6ff3 100644 --- a/crates/holochain_zome_types/Cargo.toml +++ b/crates/holochain_zome_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_zome_types" -version = "0.0.45-dev.0" +version = "0.0.45" description = "Holochain zome types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -13,7 +13,7 @@ edition = "2021" [dependencies] kitsune_p2p_timestamp = { version = "0.0.12", path = "../kitsune_p2p/timestamp" } -holochain_integrity_types = { version = "0.0.16-dev.0", path = "../holochain_integrity_types", features = ["tracing"] } +holochain_integrity_types = { version = "0.0.16", path = "../holochain_integrity_types", features = ["tracing"] } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_serialized_bytes = "=0.0.51" paste = "=1.0.5" diff --git a/crates/test_utils/wasm/CHANGELOG.md b/crates/test_utils/wasm/CHANGELOG.md index 65711dacda..867dccd2c4 100644 --- a/crates/test_utils/wasm/CHANGELOG.md +++ b/crates/test_utils/wasm/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.55 + ## 0.0.54 ## 0.0.53 diff --git a/crates/test_utils/wasm/Cargo.toml b/crates/test_utils/wasm/Cargo.toml index 14d6195ae0..607ae92b4d 100644 --- a/crates/test_utils/wasm/Cargo.toml +++ b/crates/test_utils/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wasm_test_utils" -version = "0.0.55-dev.0" +version = "0.0.55" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Utilities for Wasm testing for Holochain" @@ -19,7 +19,7 @@ only_check = [] [dependencies] -holochain_types = { path = "../../holochain_types", version = "0.0.53-dev.0"} +holochain_types = { path = "../../holochain_types", version = "0.0.53"} strum = "0.18.0" strum_macros = "0.18.0" holochain_util = { version = "0.0.11", path = "../../holochain_util" } diff --git a/crates/test_utils/wasm_common/CHANGELOG.md b/crates/test_utils/wasm_common/CHANGELOG.md index 9cc4b80e28..17c0d6a2a0 100644 --- a/crates/test_utils/wasm_common/CHANGELOG.md +++ b/crates/test_utils/wasm_common/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.49 + ## 0.0.48 ## 0.0.47 diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index 0c87b35a10..e3ca05089f 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.49-dev.0" +version = "0.0.49" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.148-dev.0"} +hdk = { path = "../../hdk", version = "0.0.148"} serde = "1.0" From a53493cd079971593981af596096150696121c45 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Mon, 29 Aug 2022 13:01:46 -0700 Subject: [PATCH 076/111] WIP --- Cargo.lock | 1 + crates/holochain/Cargo.toml | 1 + crates/holochain/src/sweettest/sweet_dna.rs | 4 +- crates/holochain/tests/sharded_gossip/mod.rs | 13 ++-- .../src/entry/app_entry_bytes.rs | 68 +++++++++++-------- crates/holochain_sqlite/src/db.rs | 1 + crates/kitsune_p2p/dht/src/region.rs | 20 ++---- .../kitsune_p2p/dht/src/region/region_data.rs | 12 ++++ crates/kitsune_p2p/dht/src/region_set/ltcs.rs | 44 +++++++----- .../kitsune_p2p/src/gossip/sharded_gossip.rs | 17 ++++- crates/kitsune_p2p/types/src/bin_types.rs | 48 ++++++++++++- 11 files changed, 161 insertions(+), 68 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7781199913..d69ad64e74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1970,6 +1970,7 @@ dependencies = [ "assert_cmd", "async-recursion", "async-trait", + "backtrace", "base64", "byteorder", "cfg-if 0.1.10", diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 53ccc06f7f..03220c1a57 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -11,6 +11,7 @@ edition = "2021" [dependencies] anyhow = "1.0.26" async-trait = "0.1" +backtrace = "0.3" # TODO: remove base64 = "0.13" byteorder = "1.3.4" cfg-if = "0.1" diff --git a/crates/holochain/src/sweettest/sweet_dna.rs b/crates/holochain/src/sweettest/sweet_dna.rs index 4fc6f5f2b8..d12ec43080 100644 --- a/crates/holochain/src/sweettest/sweet_dna.rs +++ b/crates/holochain/src/sweettest/sweet_dna.rs @@ -62,12 +62,14 @@ impl SweetDnaFile { .into_iter() .map(CoordinatorZome::into_inner) .collect(); + let one_hour_ago = + Timestamp::from_micros(Timestamp::now().as_micros() - (1_000_000 * 60 * 60)); let dna_def = DnaDefBuilder::default() .network_seed(network_seed) .integrity_zomes(iz) .coordinator_zomes(cz) .properties(properties.clone()) - .origin_time(Timestamp::HOLOCHAIN_EPOCH) + .origin_time(one_hour_ago) .build() .unwrap(); diff --git a/crates/holochain/tests/sharded_gossip/mod.rs b/crates/holochain/tests/sharded_gossip/mod.rs index 43c099502f..ba2dcdef00 100644 --- a/crates/holochain/tests/sharded_gossip/mod.rs +++ b/crates/holochain/tests/sharded_gossip/mod.rs @@ -26,10 +26,10 @@ fn make_config(recent_threshold: Option) -> ConductorConfig { tuning.gossip_strategy = "sharded-gossip".to_string(); tuning.danger_gossip_recent_threshold_secs = recent_threshold.unwrap_or(RECENT_THRESHOLD_DEFAULT.as_secs()); - tuning.gossip_inbound_target_mbps = 100.0; - tuning.gossip_outbound_target_mbps = 100.0; - tuning.gossip_historic_outbound_target_mbps = 100.0; - tuning.gossip_historic_inbound_target_mbps = 100.0; + tuning.gossip_inbound_target_mbps = 10000.0; + tuning.gossip_outbound_target_mbps = 10000.0; + tuning.gossip_historic_outbound_target_mbps = 10000.0; + tuning.gossip_historic_inbound_target_mbps = 10000.0; // tuning.gossip_max_batch_size = 32_000_000; let mut network = KitsuneP2pConfig::default(); @@ -213,7 +213,8 @@ async fn large_entry_test() { // let size = 1_000; // let size = 10_000; // let size = 100_000; - let size = 1_000_000; + // let size = 1_000_000; + let size = 5_000_000; // let size = 10_000_000; // let size = 15_000_000; let num = 10; @@ -228,7 +229,7 @@ async fn large_entry_test() { } conductors.exchange_peer_info().await; - consistency(&[&cell_1, &cell_2], 15, Duration::from_secs(1)).await; + consistency(&[&cell_1, &cell_2], 60 * 4, Duration::from_secs(1)).await; let records: Vec> = conductors[1].call(&zome_2, "read_multi", hashes).await; assert_eq!(records.len(), num); diff --git a/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs b/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs index c082f2ebcf..679658e716 100644 --- a/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs +++ b/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs @@ -9,33 +9,7 @@ pub struct AppEntryBytes(pub SerializedBytes); impl std::fmt::Debug for AppEntryBytes { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut t = f.debug_tuple("AppEntryBytes"); - if self.0.bytes().len() <= 32 { - t.field(&self.0).finish() - } else { - let z = self.0.bytes(); - let l = z.len(); - t.field(&format!( - "[{},{},{},{},{},{},{},{},...,{},{},{},{},{},{},{},{}]", - z[0], - z[1], - z[2], - z[3], - z[4], - z[5], - z[6], - z[7], - z[l - 1], - z[l - 2], - z[l - 3], - z[l - 4], - z[l - 5], - z[l - 6], - z[l - 7], - z[l - 8], - )) - .finish() - } + fmt_many_bytes("AppEntryBytes", f, self.0.bytes()) } } @@ -84,3 +58,43 @@ impl From for SerializedBytes { UnsafeBytes::from(aeb.0).into() } } + +/// Helpful pattern for debug formatting many bytes. +/// If the size is > 32 bytes, only the first 10 and last 10 bytes will be displayed. +pub fn fmt_many_bytes( + name: &str, + f: &mut std::fmt::Formatter<'_>, + bytes: &[u8], +) -> std::fmt::Result { + if bytes.len() <= 32 { + let mut t = f.debug_tuple(name); + t.field(&bytes).finish() + } else { + let mut t = f.debug_struct(name); + let l = bytes.len(); + t.field("length", &l); + t.field( + "bytes", + &format!( + "[{},{},{},{},{},{},{},{},...,{},{},{},{},{},{},{},{}]", + bytes[0], + bytes[1], + bytes[2], + bytes[3], + bytes[4], + bytes[5], + bytes[6], + bytes[7], + bytes[l - 1], + bytes[l - 2], + bytes[l - 3], + bytes[l - 4], + bytes[l - 5], + bytes[l - 6], + bytes[l - 7], + bytes[l - 8], + ), + ) + .finish() + } +} diff --git a/crates/holochain_sqlite/src/db.rs b/crates/holochain_sqlite/src/db.rs index 961c905e5a..b836f09fe1 100644 --- a/crates/holochain_sqlite/src/db.rs +++ b/crates/holochain_sqlite/src/db.rs @@ -132,6 +132,7 @@ impl PermittedConn for DbWrite { impl DbRead { pub fn conn(&self) -> DatabaseResult { + // TODO: track why so many connections are being opened. self.connection_pooled() } diff --git a/crates/kitsune_p2p/dht/src/region.rs b/crates/kitsune_p2p/dht/src/region.rs index 22376ee885..2b2dc9d12c 100644 --- a/crates/kitsune_p2p/dht/src/region.rs +++ b/crates/kitsune_p2p/dht/src/region.rs @@ -52,17 +52,11 @@ pub trait RegionDataConstraints: + serde::Serialize + serde::de::DeserializeOwned { -} -impl RegionDataConstraints for T where - T: Eq - + Zero - + AddAssign - + Sub - + Clone - + Send - + Sync - + std::fmt::Debug - + serde::Serialize - + serde::de::DeserializeOwned -{ + /// The number of ops in this region + fn count(&self) -> u32; + + /// The size of all ops in this region + fn size(&self) -> u32; + + // TODO: hash (not currently needed to be generic) } diff --git a/crates/kitsune_p2p/dht/src/region/region_data.rs b/crates/kitsune_p2p/dht/src/region/region_data.rs index 04962324f9..bebdaba113 100644 --- a/crates/kitsune_p2p/dht/src/region/region_data.rs +++ b/crates/kitsune_p2p/dht/src/region/region_data.rs @@ -2,6 +2,8 @@ use num_traits::Zero; use crate::hash::{OpHash, RegionHash}; +use super::RegionDataConstraints; + /// Take bitwise XOR of each element of both arrays pub fn array_xor(a: &mut [u8; N], b: &[u8; N]) { for i in 0..N { @@ -74,6 +76,16 @@ pub struct RegionData { pub count: u32, } +impl RegionDataConstraints for RegionData { + fn count(&self) -> u32 { + self.count + } + + fn size(&self) -> u32 { + self.count + } +} + impl num_traits::Zero for RegionData { fn zero() -> Self { Self { diff --git a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs index 4c2a63a587..4d2bab65ea 100644 --- a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs +++ b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs @@ -107,7 +107,7 @@ impl RegionCoordSetLtcs { /// The coordinates for the regions are specified by a few values. /// The data to match the coordinates are specified in a 2D vector which must /// correspond to the generated coordinates. -#[derive(Debug, serde::Serialize, serde::Deserialize, Derivative)] +#[derive(serde::Serialize, serde::Deserialize, Derivative)] #[derivative(PartialEq, Eq)] #[cfg_attr(feature = "test_utils", derive(Clone))] pub struct RegionSetLtcs { @@ -126,6 +126,17 @@ pub struct RegionSetLtcs { pub data: Vec>>, } +impl std::fmt::Debug for RegionSetLtcs { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("RegionSetLtcs") + .field( + "nonzero_regions", + &self.nonzero_regions().collect::>(), + ) + .finish() + } +} + impl RegionSetLtcs { /// An empty LTCS region set pub fn empty() -> Self { @@ -141,8 +152,8 @@ impl RegionSetLtcs { pub fn from_data(coords: RegionCoordSetLtcs, data: Vec>>) -> Self { Self { coords, - data, _region_coords: OnceCell::new(), + data, } } @@ -207,6 +218,19 @@ impl RegionSetLtcs { Ok(regions) } + + /// Return only the regions which have ops in them. Useful for testing + /// sparse scenarios. + pub fn nonzero_regions( + &self, + ) -> impl '_ + Iterator { + self.coords + .region_coords_flat() + .filter_map(|((a, x, y), c)| { + let d = &self.data[a][x][y]; + (d.count() > 0).then(|| ((a, x, y), c, d.clone())) + }) + } } #[cfg(feature = "test_utils")] @@ -220,19 +244,3 @@ impl RegionSetLtcs { coords.into_region_set_infallible(|(_, coords)| store.query_region_data(&coords)) } } - -#[cfg(feature = "test_utils")] -impl RegionSetLtcs { - /// Return only the regions which have ops in them. Useful for testing - /// sparse scenarios. - pub fn nonzero_regions( - &self, - ) -> impl '_ + Iterator { - self.coords - .region_coords_flat() - .filter_map(|((a, x, y), c)| { - let d = &self.data[a][x][y]; - (d.count > 0).then(|| ((a, x, y), c, d.clone())) - }) - } -} diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs index 40b8054e11..a35656951d 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs @@ -36,6 +36,8 @@ use super::{HowToConnect, MetaOpKey}; pub use bandwidth::BandwidthThrottles; +const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(1000); + #[cfg(any(test, feature = "test_utils"))] #[allow(missing_docs)] pub mod test_utils; @@ -199,7 +201,7 @@ impl ShardedGossip { .closing .load(std::sync::atomic::Ordering::Relaxed) { - tokio::time::sleep(std::time::Duration::from_millis(10)).await; + tokio::time::sleep(GOSSIP_LOOP_INTERVAL_MS).await; this.run_one_iteration().await; this.stats(&mut stats); } @@ -264,6 +266,16 @@ impl ShardedGossip { async fn process_incoming_outgoing(&self) -> KitsuneResult<()> { let (incoming, outgoing) = self.pop_queues()?; + + if incoming.is_some() || outgoing.is_some() { + println!( + "aiug {:?}: {:#?} / {:#?}", + self.ep_hnd.uniq(), + incoming.as_ref().map(|i| &i.2), + outgoing.as_ref().map(|o| &o.2), + ); + } + if let Some((con, remote_url, msg, bytes)) = incoming { self.bandwidth.incoming_bytes(bytes).await; let outgoing = match self.gossip.process_incoming(con.peer_cert(), msg).await { @@ -477,7 +489,7 @@ impl ShardedGossipLocalState { &self.local_agents } - fn log_state(&self) { + pub(crate) fn log_state(&self) { tracing::trace!( ?self.round_map, ?self.initiate_tgt, @@ -871,6 +883,7 @@ impl ShardedGossipLocal { } ShardedGossipWire::AlreadyInProgress(_) => { self.remove_target(&cert, false)?; + self.log_state(); Vec::with_capacity(0) } ShardedGossipWire::Busy(_) => { diff --git a/crates/kitsune_p2p/types/src/bin_types.rs b/crates/kitsune_p2p/types/src/bin_types.rs index a49d0d333a..d9457b579f 100644 --- a/crates/kitsune_p2p/types/src/bin_types.rs +++ b/crates/kitsune_p2p/types/src/bin_types.rs @@ -139,7 +139,7 @@ These metadata "Operations" each also have unique OpHashes."#, } /// The op data with its location -#[derive(Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +#[derive(PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[repr(transparent)] #[serde(transparent)] pub struct KitsuneOpData( @@ -160,6 +160,52 @@ impl KitsuneOpData { } } +/// Helpful pattern for debug formatting many bytes. +/// If the size is > 32 bytes, only the first 10 and last 10 bytes will be displayed. +pub fn fmt_many_bytes( + name: &str, + f: &mut std::fmt::Formatter<'_>, + bytes: &[u8], +) -> std::fmt::Result { + if bytes.len() <= 32 { + let mut t = f.debug_tuple(name); + t.field(&bytes).finish() + } else { + let mut t = f.debug_struct(name); + let l = bytes.len(); + t.field("length", &l); + t.field( + "bytes", + &format!( + "[{},{},{},{},{},{},{},{},...,{},{},{},{},{},{},{},{}]", + bytes[0], + bytes[1], + bytes[2], + bytes[3], + bytes[4], + bytes[5], + bytes[6], + bytes[7], + bytes[l - 1], + bytes[l - 2], + bytes[l - 3], + bytes[l - 4], + bytes[l - 5], + bytes[l - 6], + bytes[l - 7], + bytes[l - 8], + ), + ) + .finish() + } +} + +impl std::fmt::Debug for KitsuneOpData { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fmt_many_bytes("KitsuneOpData", f, self.0.as_slice()) + } +} + /// Convenience type pub type KOp = std::sync::Arc; From 62e3b4e09694ec2f8c9bacd83fa428c2327b4fb9 Mon Sep 17 00:00:00 2001 From: David Braden Date: Wed, 31 Aug 2022 15:20:06 -0600 Subject: [PATCH 077/111] Update crates/holochain/src/conductor/state.rs Co-authored-by: Michael Dougherty --- crates/holochain/src/conductor/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/holochain/src/conductor/state.rs b/crates/holochain/src/conductor/state.rs index 20dadf7ea8..9c667c3845 100644 --- a/crates/holochain/src/conductor/state.rs +++ b/crates/holochain/src/conductor/state.rs @@ -15,7 +15,7 @@ use super::error::{ConductorError, ConductorResult}; #[derive(Clone, Deserialize, Serialize, Debug, SerializedBytes)] #[cfg_attr(test, derive(PartialEq))] #[serde(transparent)] -pub struct Tag(pub Arc); +pub struct ConductorStateTag(pub Arc); impl Default for Tag { fn default() -> Self { From 522282de02e675982c193f7619404c2672275bab Mon Sep 17 00:00:00 2001 From: neonphog Date: Wed, 31 Aug 2022 15:24:41 -0600 Subject: [PATCH 078/111] address code review comments --- crates/holochain/src/conductor/state.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/holochain/src/conductor/state.rs b/crates/holochain/src/conductor/state.rs index 9c667c3845..d5fae9d8be 100644 --- a/crates/holochain/src/conductor/state.rs +++ b/crates/holochain/src/conductor/state.rs @@ -17,7 +17,7 @@ use super::error::{ConductorError, ConductorResult}; #[serde(transparent)] pub struct ConductorStateTag(pub Arc); -impl Default for Tag { +impl Default for ConductorStateTag { fn default() -> Self { Self(nanoid::nanoid!().into()) } @@ -33,7 +33,7 @@ impl Default for Tag { pub struct ConductorState { /// Unique conductor tag / identifier. #[serde(default)] - tag: Tag, + tag: ConductorStateTag, /// Apps that have been installed, regardless of status. #[serde(default)] installed_apps: InstalledAppMap, @@ -76,12 +76,12 @@ impl AppInterfaceId { impl ConductorState { /// A unique identifier for this conductor - pub fn tag(&self) -> &Tag { + pub fn tag(&self) -> &ConductorStateTag { &self.tag } #[cfg(test)] - pub fn set_tag(&mut self, tag: Tag) { + pub fn set_tag(&mut self, tag: ConductorStateTag) { self.tag = tag; } From eef05dc6b1c37d28bb9d98bbe68fd6bf6b036fc1 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Thu, 1 Sep 2022 23:01:58 -0700 Subject: [PATCH 079/111] Add context strings to all kitsune TimedOut errors --- .../kitsune_p2p/src/gossip/sharded_gossip.rs | 2 +- .../kitsune_p2p/src/spawn/actor/discover.rs | 2 +- crates/kitsune_p2p/transport_quic/src/tx2.rs | 6 +++--- crates/kitsune_p2p/types/src/lib.rs | 4 ++-- crates/kitsune_p2p/types/src/timeout.rs | 8 +++++--- crates/kitsune_p2p/types/src/tx2/framed.rs | 15 ++++++++++----- crates/kitsune_p2p/types/src/tx2/mem.rs | 3 ++- crates/kitsune_p2p/types/src/tx2/tx2_api.rs | 7 ++++++- .../kitsune_p2p/types/src/tx2/tx2_pool_promote.rs | 4 ++-- .../types/src/tx2/tx2_utils/resource_bucket.rs | 2 +- 10 files changed, 33 insertions(+), 20 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs index a35656951d..1c6284728d 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs @@ -36,7 +36,7 @@ use super::{HowToConnect, MetaOpKey}; pub use bandwidth::BandwidthThrottles; -const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(1000); +const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(100); #[cfg(any(test, feature = "test_utils"))] #[allow(missing_docs)] diff --git a/crates/kitsune_p2p/kitsune_p2p/src/spawn/actor/discover.rs b/crates/kitsune_p2p/kitsune_p2p/src/spawn/actor/discover.rs index 3ec87cfa37..8a5484aea4 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/spawn/actor/discover.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/spawn/actor/discover.rs @@ -175,7 +175,7 @@ pub(crate) fn search_remotes_covering_basis( } // if we've exhausted our timeout, we should exit - timeout.ok()?; + timeout.ok("search_remotes_covering_basis")?; if near_nodes.is_empty() { // maybe just wait and try again? diff --git a/crates/kitsune_p2p/transport_quic/src/tx2.rs b/crates/kitsune_p2p/transport_quic/src/tx2.rs index 5d6234cfa5..8f9738c2f0 100644 --- a/crates/kitsune_p2p/transport_quic/src/tx2.rs +++ b/crates/kitsune_p2p/transport_quic/src/tx2.rs @@ -157,7 +157,7 @@ impl ConAdapt for QuicConAdapt { fn out_chan(&self, timeout: KitsuneTimeout) -> OutChanFut { let maybe_out_fut = self.0.share_mut(|i, _| Ok(i.con.open_uni())); timeout - .mix(async move { + .mix("QuicConAdapt::out_chan", async move { let out = maybe_out_fut?.await.map_err(KitsuneError::other)?; let out: OutChan = Box::new(FramedWriter::new(Box::new(out))); Ok(out) @@ -338,7 +338,7 @@ impl EndpointAdapt for QuicEndpointAdapt { .0 .share_mut(|i, _| Ok((i.ep.clone(), i.local_cert.clone()))); timeout - .mix(async move { + .mix("QuicEndpointAdapt::connect", async move { let (ep, local_cert) = maybe_ep?; let addr = crate::url_to_addr(url.as_url2(), crate::SCHEME) .await @@ -436,7 +436,7 @@ impl BindAdapt for QuicBackendAdapt { let quic_srv = self.quic_srv.clone(); let quic_cli = self.quic_cli.clone(); timeout - .mix(async move { + .mix("QuicBackendAdapt::bind", async move { let addr = crate::url_to_addr(url.as_url2(), crate::SCHEME) .await .map_err(KitsuneError::other)?; diff --git a/crates/kitsune_p2p/types/src/lib.rs b/crates/kitsune_p2p/types/src/lib.rs index 69e0d8d42a..ae6e2fb530 100644 --- a/crates/kitsune_p2p/types/src/lib.rs +++ b/crates/kitsune_p2p/types/src/lib.rs @@ -227,7 +227,7 @@ pub enum KitsuneErrorKind { /// The operation timed out. #[error("Operation timed out")] - TimedOut, + TimedOut(String), /// This object is closed, calls on it are invalid. #[error("This object is closed, calls on it are invalid.")] @@ -242,7 +242,7 @@ impl PartialEq for KitsuneErrorKind { fn eq(&self, oth: &Self) -> bool { #[allow(clippy::match_like_matches_macro)] match (self, oth) { - (Self::TimedOut, Self::TimedOut) => true, + (Self::TimedOut(a), Self::TimedOut(b)) => a == b, (Self::Closed, Self::Closed) => true, _ => false, } diff --git a/crates/kitsune_p2p/types/src/timeout.rs b/crates/kitsune_p2p/types/src/timeout.rs index 26db9318a4..0c5acef641 100644 --- a/crates/kitsune_p2p/types/src/timeout.rs +++ b/crates/kitsune_p2p/types/src/timeout.rs @@ -82,9 +82,9 @@ impl KitsuneTimeout { } /// `Ok(())` if not expired, `Err(KitsuneError::TimedOut)` if expired. - pub fn ok(&self) -> KitsuneResult<()> { + pub fn ok(&self, ctx: &str) -> KitsuneResult<()> { if self.is_expired() { - Err(KitsuneErrorKind::TimedOut.into()) + Err(KitsuneErrorKind::TimedOut(ctx.into()).into()) } else { Ok(()) } @@ -93,6 +93,7 @@ impl KitsuneTimeout { /// Wrap a future with one that will timeout when this timeout expires. pub fn mix<'a, 'b, R, F>( &'a self, + ctx: &str, f: F, ) -> impl std::future::Future> + 'b + Send where @@ -100,10 +101,11 @@ impl KitsuneTimeout { F: std::future::Future> + 'b + Send, { let time_remaining = self.time_remaining(); + let ctx = ctx.to_string(); async move { match tokio::time::timeout(time_remaining, f).await { Ok(r) => r, - Err(_) => Err(KitsuneErrorKind::TimedOut.into()), + Err(_) => Err(KitsuneErrorKind::TimedOut(ctx).into()), } } } diff --git a/crates/kitsune_p2p/types/src/tx2/framed.rs b/crates/kitsune_p2p/types/src/tx2/framed.rs index 2f7e478eff..66b73d8a51 100644 --- a/crates/kitsune_p2p/types/src/tx2/framed.rs +++ b/crates/kitsune_p2p/types/src/tx2/framed.rs @@ -173,10 +173,12 @@ impl AsFramedReader for FramedReader { }; let out = match timeout - .mix(async { + .mix("FramedReader::read", async { + let start = std::time::Instant::now(); let mut read = 0; - - while read < MSG_SIZE_BYTES + MSG_ID_BYTES { + let want = MSG_SIZE_BYTES + MSG_ID_BYTES; + dbg!(want); + while read < want { let sub_read = inner .sub .read(&mut inner.local_buf[read..MSG_SIZE_BYTES + MSG_ID_BYTES]) @@ -187,6 +189,7 @@ impl AsFramedReader for FramedReader { } read += sub_read; } + println!("laksdgj {} : {:?}", read, start.elapsed()); let want_size = read_size(&inner.local_buf[..MSG_SIZE_BYTES]) - MSG_SIZE_BYTES @@ -197,7 +200,7 @@ impl AsFramedReader for FramedReader { let mut buf = PoolBuf::new(); buf.reserve(want_size); - + dbg!(want_size); while buf.len() < want_size { let to_read = std::cmp::min(inner.local_buf.len(), want_size - buf.len()); read = match inner @@ -214,6 +217,7 @@ impl AsFramedReader for FramedReader { } buf.extend_from_slice(&inner.local_buf[..read]); } + println!("adih {} : {:?}", buf.len(), start.elapsed()); Ok((msg_id, buf)) }) @@ -277,7 +281,7 @@ impl AsFramedWriter for FramedWriter { }; if let Err(e) = timeout - .mix(async { + .mix("FramedWriter::write", async { let total = (data.len() + MSG_SIZE_BYTES + MSG_ID_BYTES) as u32; data.reserve_front(MSG_SIZE_BYTES + MSG_ID_BYTES); @@ -294,6 +298,7 @@ impl AsFramedWriter for FramedWriter { }) .await { + tracing::error!(?e, "writer closing due to error"); let _ = inner.sub.close().await; return Err(e); } diff --git a/crates/kitsune_p2p/types/src/tx2/mem.rs b/crates/kitsune_p2p/types/src/tx2/mem.rs index 36a2a1fded..422a0f9a14 100644 --- a/crates/kitsune_p2p/types/src/tx2/mem.rs +++ b/crates/kitsune_p2p/types/src/tx2/mem.rs @@ -355,6 +355,7 @@ impl EndpointAdapt for MemEndpointAdapt { use futures::future::TryFutureExt; if timeout .mix( + "MemEndpointAdapt::connect", c_send .send((oth_con, oth_chan_recv)) .map_err(|_| KitsuneError::from(KitsuneErrorKind::Closed)), @@ -404,7 +405,7 @@ impl BindAdapt for MemBackendAdapt { fn bind(&self, _url: TxUrl, timeout: KitsuneTimeout) -> EndpointFut { let local_cert = self.0.clone(); timeout - .mix(async move { + .mix("MemBackendAdapt::bind", async move { let id = NEXT_MEM_ID.fetch_add(1, atomic::Ordering::SeqCst); let (c_send, c_recv) = t_chan(32); let (ep, ep_active) = MemEndpointAdapt::new(c_send.clone(), id, local_cert.clone()); diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_api.rs b/crates/kitsune_p2p/types/src/tx2/tx2_api.rs index 46c8a3d27b..ab4b6a9981 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_api.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_api.rs @@ -344,7 +344,12 @@ impl Tx2ConHnd { this.metrics.write_len(dbg_name, len); - timeout.mix(r_res.map_err(KitsuneError::other)).await? + timeout + .mix( + "Tx2ConHnd::priv_request", + r_res.map_err(KitsuneError::other), + ) + .await? } } diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs index 31a2d1ff18..0ea64e32a7 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs @@ -445,7 +445,7 @@ impl ConItem { remote: TxUrl, timeout: KitsuneTimeout, ) -> impl std::future::Future> { - timeout.mix(async move { + timeout.mix("ConItem::inner_con_inner", async move { let permit = con_limit .acquire_owned() .await @@ -838,7 +838,7 @@ impl AsEpFactory for PromoteFactory { let con_limit = Arc::new(Semaphore::new(max_cons)); let pair_fut = self.adapter.bind(bind_spec, timeout); timeout - .mix(async move { + .mix("PromoteFactory::bind", async move { let pair = pair_fut.await?; let ep = PromoteEp::new(tuning_params, max_cons, con_limit, pair).await?; let ep: Ep = Box::new(ep); diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_utils/resource_bucket.rs b/crates/kitsune_p2p/types/src/tx2/tx2_utils/resource_bucket.rs index fe9aea13f7..3aab00f3a0 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_utils/resource_bucket.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_utils/resource_bucket.rs @@ -86,7 +86,7 @@ impl ResourceBucket { match timeout { Some(timeout) => { timeout - .mix(async move { + .mix("ResourceBucket::acquire", async move { n.await; Ok(()) }) From 449d79a14dee27b5b08972e20b8b8d531ac2add4 Mon Sep 17 00:00:00 2001 From: neonphog Date: Fri, 2 Sep 2022 10:20:05 -0600 Subject: [PATCH 080/111] address code review comment --- crates/holochain_keystore/src/meta_lair_client.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/holochain_keystore/src/meta_lair_client.rs b/crates/holochain_keystore/src/meta_lair_client.rs index cefbc86d7c..50f7ff1566 100644 --- a/crates/holochain_keystore/src/meta_lair_client.rs +++ b/crates/holochain_keystore/src/meta_lair_client.rs @@ -18,6 +18,9 @@ type Esnd = tokio::sync::mpsc::UnboundedSender<()>; #[derive(Clone)] pub struct MetaLairClient(pub(crate) Arc>, pub(crate) Esnd); +/// A lair error could indicate a connection problem or user error. +/// If we get any error state, we send a signal to our connection validation +/// task indicating it should check our connection health. macro_rules! echk { ($esnd:ident, $code:expr) => {{ match $code { From 2a9785eaa922b802e71fa789a23e5864d36af94f Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 5 Sep 2022 18:56:55 +0400 Subject: [PATCH 081/111] fix bad merge --- crates/holochain_integrity_types/src/countersigning.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/holochain_integrity_types/src/countersigning.rs b/crates/holochain_integrity_types/src/countersigning.rs index 35ece2d382..ccd8f7c8d9 100644 --- a/crates/holochain_integrity_types/src/countersigning.rs +++ b/crates/holochain_integrity_types/src/countersigning.rs @@ -113,11 +113,6 @@ pub struct PreflightRequest { pub app_entry_hash: EntryHash, /// The agents that are participating in this countersignature session. pub signing_agents: CounterSigningAgents, -<<<<<<< HEAD - /// The agent that must receive and include all other actions in their own action. - /// @todo implement enzymes - pub enzyme_index: Option, -======= /// The optional additional M of N signers. /// If there are additional signers then M MUST be the majority of N. /// If there are additional signers then the enzyme MUST be used and is the @@ -130,7 +125,6 @@ pub struct PreflightRequest { /// If true AND optional_signing_agents are set then the first agent MUST /// be the same in both signing_agents and optional_signing_agents. pub enzymatic: bool, ->>>>>>> 7051a99332a25602b1724a0f8df0e6ec7e1b6b1f /// The session times. /// Session actions must all have the same timestamp, which is the session offset. pub session_times: CounterSigningSessionTimes, From 2aa3425971ef8938cdc54012cce443fa49644e6e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 5 Sep 2022 18:57:51 +0400 Subject: [PATCH 082/111] fix merge --- crates/holochain_integrity_types/src/countersigning.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/holochain_integrity_types/src/countersigning.rs b/crates/holochain_integrity_types/src/countersigning.rs index ccd8f7c8d9..535c30d9eb 100644 --- a/crates/holochain_integrity_types/src/countersigning.rs +++ b/crates/holochain_integrity_types/src/countersigning.rs @@ -472,14 +472,9 @@ impl Action { #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct CounterSigningSessionData { -<<<<<<< HEAD pub preflight_request: PreflightRequest, pub responses: Vec<(CounterSigningAgentState, Signature)>, -======= - preflight_request: PreflightRequest, - responses: Vec<(CounterSigningAgentState, Signature)>, - optional_responses: Vec<(CounterSigningAgentState, Signature)>, ->>>>>>> 7051a99332a25602b1724a0f8df0e6ec7e1b6b1f + pub optional_responses: Vec<(CounterSigningAgentState, Signature)>, } impl CounterSigningSessionData { From e5aea99f56b1d0d21468292b4bb7a34f5259275d Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 5 Sep 2022 19:09:29 +0400 Subject: [PATCH 083/111] docs --- .../holochain_integrity_types/src/countersigning.rs | 9 +++++++++ crates/test_utils/wasm/wasm_workspace/Cargo.lock | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/crates/holochain_integrity_types/src/countersigning.rs b/crates/holochain_integrity_types/src/countersigning.rs index 535c30d9eb..700c9ccdd2 100644 --- a/crates/holochain_integrity_types/src/countersigning.rs +++ b/crates/holochain_integrity_types/src/countersigning.rs @@ -30,7 +30,9 @@ mod error; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct CounterSigningSessionTimes { + /// The earliest allowable time for countersigning session responses to be valid. pub start: Timestamp, + /// The latest allowable time for countersigning session responses to be valid. pub end: Timestamp, } @@ -254,6 +256,7 @@ pub struct PreflightResponse { pub request: PreflightRequest, /// The agent must provide their current chain state, state their position in the preflight and sign everything. pub agent_state: CounterSigningAgentState, + /// The signature of the preflight resonse. pub signature: Signature, } @@ -429,8 +432,11 @@ impl CreateBase { #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct UpdateBase { + /// The original action being updated. pub original_action_address: ActionHash, + /// The original entry being updated. pub original_entry_address: EntryHash, + /// The entry type of the update. pub entry_type: EntryType, } @@ -472,8 +478,11 @@ impl Action { #[derive(Clone, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct CounterSigningSessionData { + /// The preflight request that was agreed upon by all parties for the session. pub preflight_request: PreflightRequest, + /// All the required responses from each party. pub responses: Vec<(CounterSigningAgentState, Signature)>, + /// Any optional responses if allowed for by the preflight request. pub optional_responses: Vec<(CounterSigningAgentState, Signature)>, } diff --git a/crates/test_utils/wasm/wasm_workspace/Cargo.lock b/crates/test_utils/wasm/wasm_workspace/Cargo.lock index 23df0031ce..60b63496c2 100644 --- a/crates/test_utils/wasm/wasm_workspace/Cargo.lock +++ b/crates/test_utils/wasm/wasm_workspace/Cargo.lock @@ -684,7 +684,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.19" +version = "0.0.20" dependencies = [ "hdk_derive", "holo_hash", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.147" +version = "0.0.148" dependencies = [ "getrandom", "hdi", @@ -718,7 +718,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.45" +version = "0.0.46" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -775,7 +775,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.15" +version = "0.0.16" dependencies = [ "arbitrary", "holo_hash", @@ -823,7 +823,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.48" +version = "0.0.49" dependencies = [ "hdk", "serde", @@ -858,7 +858,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.44" +version = "0.0.45" dependencies = [ "fixt", "holo_hash", From 5e01f54ba7212082ce5da3b3d28d4148b337db97 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 10:15:00 -0700 Subject: [PATCH 084/111] Use isotest v0.1.0 --- Cargo.lock | 203 ++++++++++++++-------------- crates/holochain/Cargo.toml | 2 +- crates/holochain_cascade/Cargo.toml | 2 +- crates/holochain_types/Cargo.toml | 4 +- 4 files changed, 107 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9f36254482..9e3ff14558 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,18 +42,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] [[package]] name = "android_system_properties" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ed72e1635e121ca3e79420540282af22da58be50de153d36f81ddc6b83aa9e" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305" +checksum = "b9a8f622bcf6ff3df478e9deba3e03e4e04b300f8e6a139e192c05fa3490afc7" [[package]] name = "approx" @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7924531f38b1970ff630f03eb20a2fde69db5c590c93b0f3482e95dcc5fd60" +checksum = "8931eb436ab9bf1980c6cb2b9d1ba5390cd6793b2c6e2d2ea8147da3570c2a2e" dependencies = [ "derive_arbitrary", ] @@ -178,9 +178,9 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5262ed948da60dd8956c6c5aca4d4163593dddb7b32d73267c93dab7b2e98940" +checksum = "0da5b41ee986eed3f524c380e6d64965aea573882a8907682ad100f7859305ca" dependencies = [ "async-channel", "async-executor", @@ -188,15 +188,14 @@ dependencies = [ "async-lock", "blocking", "futures-lite", - "num_cpus", "once_cell", ] [[package]] name = "async-io" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab006897723d9352f63e2b13047177c3982d8d79709d713ce7747a8f19fd1b0" +checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7" dependencies = [ "autocfg 1.1.0", "concurrent-queue", @@ -207,7 +206,7 @@ dependencies = [ "parking", "polling", "slab", - "socket2 0.4.4", + "socket2 0.4.7", "waker-fn", "winapi", ] @@ -223,11 +222,12 @@ dependencies = [ [[package]] name = "async-process" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" +checksum = "02111fd8655a613c25069ea89fc8d9bb89331fa77486eb3bc059ee757cfa481c" dependencies = [ "async-io", + "autocfg 1.1.0", "blocking", "cfg-if 1.0.0", "event-listener", @@ -452,9 +452,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array", ] @@ -740,9 +740,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpufeatures" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1079fb8528d9f9c888b1e8aa651e6e079ade467323d58f75faf1d30b1808f540" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] @@ -1100,13 +1100,14 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.3.4" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3495912c9c1ccf2e18976439f4443f3fee0fd61f424ff99fde6a66b15ecb448f" +checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" dependencies = [ "cfg-if 1.0.0", "hashbrown 0.12.3", - "lock_api 0.4.7", + "lock_api 0.4.8", + "once_cell", "parking_lot_core 0.9.3", ] @@ -1123,9 +1124,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a577516173adb681466d517d39bd468293bc2c2a16439375ef0f35bba45f3d" +checksum = "d749b611838b7e92cba33b8552187059f2dc32f91d4d66bdc4fe5da9526b4e07" dependencies = [ "proc-macro2", "quote", @@ -1203,7 +1204,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "block-buffer 0.10.2", + "block-buffer 0.10.3", "crypto-common", ] @@ -1519,9 +1520,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" +checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" dependencies = [ "futures-channel", "futures-core", @@ -1534,9 +1535,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" dependencies = [ "futures-core", "futures-sink", @@ -1544,15 +1545,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" [[package]] name = "futures-executor" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" +checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" dependencies = [ "futures-core", "futures-task", @@ -1561,9 +1562,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" +checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" [[package]] name = "futures-lite" @@ -1582,9 +1583,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" +checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ "proc-macro2", "quote", @@ -1593,15 +1594,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" [[package]] name = "futures-task" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" [[package]] name = "futures-timer" @@ -1611,9 +1612,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" dependencies = [ "futures-channel", "futures-core", @@ -1891,9 +1892,9 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" +checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64", "bitflags", @@ -1902,7 +1903,7 @@ dependencies = [ "http", "httpdate", "mime", - "sha-1 0.10.0", + "sha1", ] [[package]] @@ -2607,9 +2608,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -2649,7 +2650,7 @@ dependencies = [ "httpdate", "itoa 1.0.3", "pin-project-lite", - "socket2 0.4.4", + "socket2 0.4.7", "tokio", "tower-service", "tracing", @@ -2671,13 +2672,14 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.46" +version = "0.1.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2bfd338099682614d3ee3fe0cd72e0b6a41ca6a87f6a74a3bd593c91650501" +checksum = "4c495f162af0bf17656d0014a0eded5f3cd2f365fdd204548c2869db89359dc7" dependencies = [ "android_system_properties", "core-foundation-sys", "js-sys", + "once_cell", "wasm-bindgen", "winapi", ] @@ -2763,7 +2765,7 @@ dependencies = [ "clap 3.1.18", "crossbeam-channel", "crossbeam-utils", - "dashmap 5.3.4", + "dashmap 5.4.0", "env_logger", "indexmap", "itoa 1.0.3", @@ -2815,9 +2817,9 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "isotest" -version = "0.1.0-dev.4" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35af8270f9d46608680c394324bc37b692b1327d07497fbb76eba0dd6cd4d9dd" +checksum = "868ab2c0c71eff3fca21f4ea4673ade85ca0149c45a55c79016147562737aef8" dependencies = [ "futures", "paste", @@ -3297,9 +3299,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" dependencies = [ "autocfg 1.1.0", "scopeguard", @@ -3466,9 +3468,9 @@ checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", ] @@ -3972,9 +3974,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" +checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" [[package]] name = "one_err" @@ -4144,7 +4146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.7", + "lock_api 0.4.8", "parking_lot_core 0.8.5", ] @@ -4154,7 +4156,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.7", + "lock_api 0.4.8", "parking_lot_core 0.9.3", ] @@ -4336,9 +4338,9 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plotters" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9428003b84df1496fb9d6eeee9c5f8145cb41ca375eb0dad204328888832811f" +checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b" dependencies = [ "num-traits", "plotters-backend", @@ -4355,19 +4357,20 @@ checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0918736323d1baff32ee0eade54984f6f201ad7e97d5cfb5d6ab4a358529615" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] [[package]] name = "polling" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +checksum = "899b00b9c8ab553c743b3e11e87c5c7d423b2a2de229ba95b24a756344748011" dependencies = [ + "autocfg 1.1.0", "cfg-if 1.0.0", "libc", "log", @@ -4574,9 +4577,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21afdc492bf2a8688cb386be6605d1163b6ace89afa5e3b529037d2b4334b860" +checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" dependencies = [ "bytes", "futures-channel", @@ -4620,7 +4623,7 @@ dependencies = [ "futures-util", "libc", "quinn-proto", - "socket2 0.4.4", + "socket2 0.4.7", "tokio", "tracing", ] @@ -4933,7 +4936,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.13", + "time 0.3.14", "yasna 0.5.0", ] @@ -5409,9 +5412,9 @@ checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" [[package]] name = "serde" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" dependencies = [ "serde_derive", ] @@ -5446,9 +5449,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", @@ -5457,9 +5460,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ "indexmap", "itoa 1.0.3", @@ -5549,10 +5552,10 @@ dependencies = [ ] [[package]] -name = "sha-1" -version = "0.10.0" +name = "sha1" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -5678,9 +5681,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", @@ -5980,18 +5983,18 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "8c1b05ca9d106ba7d2e31a9dab4a64e7be2cce415321966ea3132c49a656e252" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487" dependencies = [ "proc-macro2", "quote", @@ -6031,9 +6034,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db76ff9fa4b1458b3c7f077f3ff9887394058460d21e634355b273aaf11eea45" +checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b" dependencies = [ "libc", "num_threads", @@ -6075,9 +6078,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.20.1" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" +checksum = "89797afd69d206ccd11fb0ea560a44bbb87731d020670e79416d442919257d42" dependencies = [ "autocfg 1.1.0", "bytes", @@ -6089,7 +6092,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.4", + "socket2 0.4.7", "tokio-macros", "winapi", ] @@ -6354,7 +6357,7 @@ dependencies = [ "log", "native-tls", "rand 0.8.5", - "sha-1 0.9.8", + "sha-1", "url 2.2.2", "utf-8", ] @@ -6374,7 +6377,7 @@ dependencies = [ "log", "native-tls", "rand 0.8.5", - "sha-1 0.9.8", + "sha-1", "thiserror", "url 2.2.2", "utf-8", @@ -6393,7 +6396,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha-1 0.9.8", + "sha-1", "thiserror", "url 2.2.2", "utf-8", @@ -7040,13 +7043,13 @@ dependencies = [ [[package]] name = "which" -version = "4.2.5" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ "either", - "lazy_static", "libc", + "once_cell", ] [[package]] @@ -7165,7 +7168,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346d34a236c9d3e5f3b9b74563f238f955bbd05fa0b8b4efa53c130c43982f4c" dependencies = [ - "time 0.3.13", + "time 0.3.14", ] [[package]] diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index f1d9e988ec..57ad23c6c3 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -95,7 +95,7 @@ anyhow = "1.0.26" assert_cmd = "1.0.1" contrafact = "0.1.0-dev.1" criterion = { version = "0.3", features = [ "async_tokio" ] } -isotest = "0.1.0-dev.4" +isotest = "0" kitsune_p2p_bootstrap = { path = "../kitsune_p2p/bootstrap" } maplit = "1" pretty_assertions = "0.6.1" diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 402cc03c50..6d281b246a 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -37,7 +37,7 @@ async-trait = { version = "0.1", optional = true } mockall = { version = "0.10.2", optional = true } [dev-dependencies] -isotest = "0.1.0-dev.4" +isotest = "0" matches = "0.1" pretty_assertions = "0.7.2" test-case = "2.1" diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index c87a79a5ab..eafbdcaef3 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -57,7 +57,7 @@ tracing = "0.1.26" derive_builder = "0.9.0" arbitrary = { version = "1.0", features = ["derive"], optional = true} -isotest = { version = "0.1.0-dev.4", optional = true } +isotest = { version = "0", optional = true } # contrafact contrafact = { version = "0.1.0-dev.1", optional = true } @@ -66,7 +66,7 @@ contrafact = { version = "0.1.0-dev.1", optional = true } holochain_types = { path = ".", features = ["test_utils"]} arbitrary = "1.0" -isotest = { version = "0.1.0-dev.4" } +isotest = { version = "0" } maplit = "1" matches = "0.1" pretty_assertions = "0" From 6e34df0adf274a7a03e407410abd3dc9b5636d26 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 10:29:32 -0700 Subject: [PATCH 085/111] Downgrade arbitrary --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a6fa36fb3..2f7c69fb5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.1.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8931eb436ab9bf1980c6cb2b9d1ba5390cd6793b2c6e2d2ea8147da3570c2a2e" +checksum = "25e0a02cf12f1b1f48b14cb7f8217b876d09992b39c816ffb3b1ba64dd979a87" dependencies = [ "derive_arbitrary", ] From bf4de05d7f9eca919b49f1fd93c06e0c0c4cb874 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 11:35:28 -0700 Subject: [PATCH 086/111] WIP, more dbg --- crates/kitsune_p2p/proxy/src/bin/kitsune-p2p-tx2-proxy.rs | 2 +- crates/kitsune_p2p/types/src/tx2/framed.rs | 2 +- crates/kitsune_p2p/types/src/tx2/tx2_pool.rs | 1 + crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs | 7 +++++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/kitsune_p2p/proxy/src/bin/kitsune-p2p-tx2-proxy.rs b/crates/kitsune_p2p/proxy/src/bin/kitsune-p2p-tx2-proxy.rs index 812e8251c1..b5e4ce0d2b 100644 --- a/crates/kitsune_p2p/proxy/src/bin/kitsune-p2p-tx2-proxy.rs +++ b/crates/kitsune_p2p/proxy/src/bin/kitsune-p2p-tx2-proxy.rs @@ -140,7 +140,7 @@ async fn inner() -> KitsuneResult<()> { let debug = serde_json::to_string_pretty(&debug).unwrap(); data.clear(); data.extend_from_slice(debug.as_bytes()); - let t = KitsuneTimeout::from_millis(30 * 3000); + let t = KitsuneTimeout::from_millis(30 * 1000); let msg_id = if msg_id.is_notify() { 0.into() } else { diff --git a/crates/kitsune_p2p/types/src/tx2/framed.rs b/crates/kitsune_p2p/types/src/tx2/framed.rs index 66b73d8a51..5a57faaab3 100644 --- a/crates/kitsune_p2p/types/src/tx2/framed.rs +++ b/crates/kitsune_p2p/types/src/tx2/framed.rs @@ -189,7 +189,6 @@ impl AsFramedReader for FramedReader { } read += sub_read; } - println!("laksdgj {} : {:?}", read, start.elapsed()); let want_size = read_size(&inner.local_buf[..MSG_SIZE_BYTES]) - MSG_SIZE_BYTES @@ -197,6 +196,7 @@ impl AsFramedReader for FramedReader { let msg_id = read_msg_id( &inner.local_buf[MSG_SIZE_BYTES..MSG_SIZE_BYTES + MSG_ID_BYTES], ); + println!("laksdgj MsgId: {:?} : {:?}", msg_id, start.elapsed()); let mut buf = PoolBuf::new(); buf.reserve(want_size); diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs b/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs index 1be4473074..2c0e5138c8 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs @@ -78,6 +78,7 @@ pub trait AsEpHnd: 'static + Send + Sync + Unpin { data: PoolBuf, timeout: KitsuneTimeout, ) -> BoxFuture<'static, KitsuneResult<()>> { + dbg!(&msg_id); let con_fut = self.get_connection(remote, timeout); futures::future::FutureExt::boxed(async move { con_fut.await?.write(msg_id, data, timeout).await diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs index 0ea64e32a7..56179ad7f0 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs @@ -282,11 +282,13 @@ impl AsConHnd for ConItem { timeout: KitsuneTimeout, ) -> BoxFuture<'static, KitsuneResult<()>> { let this = self.clone(); + dbg!(&msg_id); async move { let this = &this; let logic = move || async move { let len = data.len(); + dbg!(&msg_id); let (local_cert, peer_cert, writer_fut) = this.item.share_mut(|i, _| { Ok(( i.local_cert.clone(), @@ -294,15 +296,19 @@ impl AsConHnd for ConItem { i.writer_bucket.acquire(Some(timeout)), )) })?; + dbg!(&msg_id); let mut writer = writer_fut.await?; + dbg!(&msg_id); writer.writer.write(msg_id, data, timeout).await?; + dbg!(&msg_id); let res = this.item.share_mut(move |i, _| { i.writer_bucket.release(writer); Ok(()) }); + dbg!(&msg_id); tracing::trace!( ?local_cert, @@ -318,6 +324,7 @@ impl AsConHnd for ConItem { if let Err(e) = logic().await { let reason = format!("{:?}", e); + tracing::error!(?e, "Closing writer"); this.close(INTERNAL_ERR, &reason).await; return Err(e); } From 7ecf116d909dd2946c54cef23f4b22f236c4a93d Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 14:58:30 -0700 Subject: [PATCH 087/111] More concise output --- .../kitsune_p2p/src/gossip/sharded_gossip.rs | 10 +++++----- crates/kitsune_p2p/types/src/tx2/tx2_pool.rs | 1 - crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs | 6 ------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs index 1c6284728d..75c83dfde6 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs @@ -267,12 +267,12 @@ impl ShardedGossip { async fn process_incoming_outgoing(&self) -> KitsuneResult<()> { let (incoming, outgoing) = self.pop_queues()?; - if incoming.is_some() || outgoing.is_some() { - println!( - "aiug {:?}: {:#?} / {:#?}", + if outgoing.is_some() { + tracing::info!( + "aiug {:?} {:#?}", self.ep_hnd.uniq(), - incoming.as_ref().map(|i| &i.2), - outgoing.as_ref().map(|o| &o.2), + // incoming.as_ref().map(|i| (&i.1, &i.2)), + outgoing.as_ref().map(|o| (&o.1, &o.2)), ); } diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs b/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs index 2c0e5138c8..1be4473074 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_pool.rs @@ -78,7 +78,6 @@ pub trait AsEpHnd: 'static + Send + Sync + Unpin { data: PoolBuf, timeout: KitsuneTimeout, ) -> BoxFuture<'static, KitsuneResult<()>> { - dbg!(&msg_id); let con_fut = self.get_connection(remote, timeout); futures::future::FutureExt::boxed(async move { con_fut.await?.write(msg_id, data, timeout).await diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs index 56179ad7f0..fe9714aba1 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs @@ -282,13 +282,11 @@ impl AsConHnd for ConItem { timeout: KitsuneTimeout, ) -> BoxFuture<'static, KitsuneResult<()>> { let this = self.clone(); - dbg!(&msg_id); async move { let this = &this; let logic = move || async move { let len = data.len(); - dbg!(&msg_id); let (local_cert, peer_cert, writer_fut) = this.item.share_mut(|i, _| { Ok(( i.local_cert.clone(), @@ -296,19 +294,15 @@ impl AsConHnd for ConItem { i.writer_bucket.acquire(Some(timeout)), )) })?; - dbg!(&msg_id); let mut writer = writer_fut.await?; - dbg!(&msg_id); writer.writer.write(msg_id, data, timeout).await?; - dbg!(&msg_id); let res = this.item.share_mut(move |i, _| { i.writer_bucket.release(writer); Ok(()) }); - dbg!(&msg_id); tracing::trace!( ?local_cert, From ecab30261e898e1f3feaa38b8e4862fadfd00fa5 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 15:10:19 -0700 Subject: [PATCH 088/111] Clean up debugs --- Cargo.lock | 1 - crates/holochain/Cargo.toml | 1 - crates/holochain_state/src/source_chain.rs | 3 --- crates/kitsune_p2p/dht/src/region_set/ltcs.rs | 2 +- .../kitsune_p2p/src/gossip/sharded_gossip.rs | 14 +++++++++----- crates/kitsune_p2p/types/src/tx2/framed.rs | 5 ----- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 32bcc8f9a1..2f7c69fb5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1984,7 +1984,6 @@ dependencies = [ "assert_cmd 1.0.8", "async-recursion", "async-trait", - "backtrace", "base64", "byteorder", "cfg-if 0.1.10", diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index e7cec0f957..57ad23c6c3 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -11,7 +11,6 @@ edition = "2021" [dependencies] anyhow = "1.0.26" async-trait = "0.1" -backtrace = "0.3" # TODO: remove base64 = "0.13" byteorder = "1.3.4" cfg-if = "0.1" diff --git a/crates/holochain_state/src/source_chain.rs b/crates/holochain_state/src/source_chain.rs index e0916a6898..e98fd0bcf5 100644 --- a/crates/holochain_state/src/source_chain.rs +++ b/crates/holochain_state/src/source_chain.rs @@ -332,16 +332,13 @@ impl SourceChain { } } - tracing::debug!("Inserting entry"); for entry in entries { insert_entry(txn, entry.as_hash(), entry.as_content())?; } - tracing::debug!("Inserting action"); for shh in actions.iter() { insert_action(txn, shh)?; } for (op, op_hash, op_order, timestamp, _) in &ops { - tracing::debug!("Inserting op_lite"); insert_op_lite_into_authored(txn, op, op_hash, op_order, timestamp)?; // If this is a countersigning session we want to withhold // publishing the ops until the session is successful. diff --git a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs index 4d2bab65ea..0a63c05772 100644 --- a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs +++ b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs @@ -152,8 +152,8 @@ impl RegionSetLtcs { pub fn from_data(coords: RegionCoordSetLtcs, data: Vec>>) -> Self { Self { coords, - _region_coords: OnceCell::new(), data, + _region_coords: OnceCell::new(), } } diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs index 75c83dfde6..2b8409c533 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs @@ -36,7 +36,13 @@ use super::{HowToConnect, MetaOpKey}; pub use bandwidth::BandwidthThrottles; -const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(100); +/// How quickly to run a gossip iteration which attempts to initiate +/// with a new target. +/// +/// Ideally we want this to be as low as 10ms, but currently we have a +/// database query for fetching the list of agents that runs on every +/// loop, so we shouldn't run it too many times per second. +const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(250); #[cfg(any(test, feature = "test_utils"))] #[allow(missing_docs)] @@ -268,10 +274,9 @@ impl ShardedGossip { let (incoming, outgoing) = self.pop_queues()?; if outgoing.is_some() { - tracing::info!( - "aiug {:?} {:#?}", + tracing::debug!( + "OUTGOING GOSSIP {:?} {:#?}", self.ep_hnd.uniq(), - // incoming.as_ref().map(|i| (&i.1, &i.2)), outgoing.as_ref().map(|o| (&o.1, &o.2)), ); } @@ -883,7 +888,6 @@ impl ShardedGossipLocal { } ShardedGossipWire::AlreadyInProgress(_) => { self.remove_target(&cert, false)?; - self.log_state(); Vec::with_capacity(0) } ShardedGossipWire::Busy(_) => { diff --git a/crates/kitsune_p2p/types/src/tx2/framed.rs b/crates/kitsune_p2p/types/src/tx2/framed.rs index 5a57faaab3..208a56d54c 100644 --- a/crates/kitsune_p2p/types/src/tx2/framed.rs +++ b/crates/kitsune_p2p/types/src/tx2/framed.rs @@ -174,10 +174,8 @@ impl AsFramedReader for FramedReader { let out = match timeout .mix("FramedReader::read", async { - let start = std::time::Instant::now(); let mut read = 0; let want = MSG_SIZE_BYTES + MSG_ID_BYTES; - dbg!(want); while read < want { let sub_read = inner .sub @@ -196,11 +194,9 @@ impl AsFramedReader for FramedReader { let msg_id = read_msg_id( &inner.local_buf[MSG_SIZE_BYTES..MSG_SIZE_BYTES + MSG_ID_BYTES], ); - println!("laksdgj MsgId: {:?} : {:?}", msg_id, start.elapsed()); let mut buf = PoolBuf::new(); buf.reserve(want_size); - dbg!(want_size); while buf.len() < want_size { let to_read = std::cmp::min(inner.local_buf.len(), want_size - buf.len()); read = match inner @@ -217,7 +213,6 @@ impl AsFramedReader for FramedReader { } buf.extend_from_slice(&inner.local_buf[..read]); } - println!("adih {} : {:?}", buf.len(), start.elapsed()); Ok((msg_id, buf)) }) From 586c55e46583199bf699021f7670f4f62e05521f Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 16:28:29 -0700 Subject: [PATCH 089/111] Set gossip interval back to 10ms, with TODO --- .../kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs index 2b8409c533..6149c98b98 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip.rs @@ -39,10 +39,11 @@ pub use bandwidth::BandwidthThrottles; /// How quickly to run a gossip iteration which attempts to initiate /// with a new target. /// -/// Ideally we want this to be as low as 10ms, but currently we have a -/// database query for fetching the list of agents that runs on every -/// loop, so we shouldn't run it too many times per second. -const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(250); +/// TODO: Currently our gossip loop does a database query for remote nodes +/// on every iteration. We should add a longer interval for refreshing this +/// list (perhaps once per second), and use a cached value for other iterations, +/// so as not to do hundreds of DB queries per second. +const GOSSIP_LOOP_INTERVAL_MS: Duration = Duration::from_millis(10); #[cfg(any(test, feature = "test_utils"))] #[allow(missing_docs)] From cbc3a2eac3ca554adeb9afe11b13d0fe6abf8f44 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 15:10:45 -0700 Subject: [PATCH 090/111] Fix the gossip bug --- crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs index 7d00f27018..441f8932e3 100644 --- a/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs +++ b/crates/kitsune_p2p/kitsune_p2p/src/gossip/sharded_gossip/ops.rs @@ -339,7 +339,7 @@ impl OpsBatchQueue { self.0 .share_mut(|i, _| { i.queues.retain(|_, q| !q.is_empty()); - Ok(i.queues.is_empty()) + Ok(i.queues.is_empty() && i.region_queue.is_empty()) }) .unwrap_or(true) } From ec788b1a14770978e4755876f1e9c19d8dd9e809 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 15:16:47 -0700 Subject: [PATCH 091/111] CHANGELOG --- crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md index f1033bacce..41825946d8 100644 --- a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md +++ b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +- Fixes a regression where a node can prematurely end a gossip round if their partner signals that they are done sending data, even if the node itself still has more data to send, which can lead to persistent timeouts between the two nodes. [\#1553](https://github.com/holochain/holochain/pull/1553) + ## 0.0.42 ## 0.0.41 From 26711ff909f46ef0bd2bcf5459881992e6ab8b0b Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 17:22:03 -0700 Subject: [PATCH 092/111] Fix bad implementation of nonzero_regions --- crates/kitsune_p2p/dht/src/region_set/ltcs.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs index 0a63c05772..ce1c2b197d 100644 --- a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs +++ b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs @@ -227,8 +227,15 @@ impl RegionSetLtcs { self.coords .region_coords_flat() .filter_map(|((a, x, y), c)| { - let d = &self.data[a][x][y]; - (d.count() > 0).then(|| ((a, x, y), c, d.clone())) + let d = &self + .data + .get(a) + .map(|d| d.get(x)) + .flatten() + .map(|d| d.get(y)) + .flatten(); + d.filter(|d| d.count() > 0) + .map(|d| ((a, x, y), c, d.clone())) }) } } From ffa50c438efd9699705da3c651011936c67557e8 Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 7 Sep 2022 01:48:38 +0000 Subject: [PATCH 093/111] apply develop versions to changed crates the following crates changed since their most recent release and are therefore increased to a develop version: - holochain_cascade-0.0.58-dev.0 - kitsune_p2p_timestamp-0.0.13-dev.0 - holochain_cli-0.0.55-dev.0 - holochain_cli_sandbox-0.0.51-dev.0 - holochain_cli_bundle-0.0.50-dev.0 - holochain_test_wasm_common-0.0.50-dev.0 - holochain_conductor_api-0.0.57-dev.0 - holochain_state-0.0.57-dev.0 - holochain_p2p-0.0.54-dev.0 - holochain_sqlite-0.0.52-dev.0 - kitsune_p2p_proxy-0.0.31-dev.0 - kitsune_p2p_transport_quic-0.0.31-dev.0 - kitsune_p2p_dht-0.0.4-dev.0 - hdk_derive-0.0.47-dev.0 - holochain_zome_types-0.0.46-dev.0 - hdi-0.0.21-dev.0 - holochain_keystore-0.0.53-dev.0 - kitsune_p2p_types-0.0.31-dev.0 - holochain-0.0.159-dev.0 - holochain_wasm_test_utils-0.0.56-dev.0 - kitsune_p2p-0.0.43-dev.0 - holochain_integrity_types-0.0.17-dev.0 - holochain_types-0.0.54-dev.0 - hdk-0.0.149-dev.0 --- crates/hc/Cargo.toml | 6 ++-- crates/hc_bundle/Cargo.toml | 4 +-- crates/hc_sandbox/Cargo.toml | 8 ++--- crates/hdi/Cargo.toml | 6 ++-- crates/hdk/Cargo.toml | 8 ++--- crates/hdk_derive/Cargo.toml | 4 +-- crates/holochain/Cargo.toml | 34 ++++++++++---------- crates/holochain_cascade/Cargo.toml | 18 +++++------ crates/holochain_conductor_api/Cargo.toml | 12 +++---- crates/holochain_integrity_types/Cargo.toml | 4 +-- crates/holochain_keystore/Cargo.toml | 8 ++--- crates/holochain_keystore/README.md | 4 +-- crates/holochain_p2p/Cargo.toml | 12 +++---- crates/holochain_sqlite/Cargo.toml | 6 ++-- crates/holochain_state/Cargo.toml | 14 ++++---- crates/holochain_types/Cargo.toml | 10 +++--- crates/holochain_zome_types/Cargo.toml | 8 ++--- crates/kitsune_p2p/bootstrap/Cargo.toml | 2 +- crates/kitsune_p2p/dht/Cargo.toml | 4 +-- crates/kitsune_p2p/direct/Cargo.toml | 8 ++--- crates/kitsune_p2p/direct_test/Cargo.toml | 4 +-- crates/kitsune_p2p/kitsune_p2p/Cargo.toml | 10 +++--- crates/kitsune_p2p/proxy/Cargo.toml | 6 ++-- crates/kitsune_p2p/timestamp/Cargo.toml | 2 +- crates/kitsune_p2p/transport_quic/Cargo.toml | 4 +-- crates/kitsune_p2p/types/Cargo.toml | 4 +-- crates/test_utils/wasm/Cargo.toml | 4 +-- crates/test_utils/wasm_common/Cargo.toml | 4 +-- 28 files changed, 108 insertions(+), 110 deletions(-) diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index 2917d58ca0..4be2302350 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.54" +version = "0.0.55-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -21,8 +21,8 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0" futures = "0.3" -holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.49"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.50"} +holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.50-dev.0"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.51-dev.0"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_bundle/Cargo.toml b/crates/hc_bundle/Cargo.toml index 894bbd9397..97468b58ce 100644 --- a/crates/hc_bundle/Cargo.toml +++ b/crates/hc_bundle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_bundle" -version = "0.0.49" +version = "0.0.50-dev.0" description = "DNA and hApp bundling functionality for the `hc` Holochain CLI utility" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ path = "src/bin/hc-dna.rs" anyhow = "1.0" holochain_util = { path = "../holochain_util", features = ["backtrace"], version = "0.0.11"} holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.53", path = "../holochain_types" } +holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } mr_bundle = {version = "0.0.15", path = "../mr_bundle"} serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index eb14dabe08..c7307804b5 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.50" +version = "0.0.51-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,10 +19,10 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.56"} -holochain_types = { path = "../holochain_types", version = "0.0.53"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.57-dev.0"} +holochain_types = { path = "../holochain_types", version = "0.0.54-dev.0"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} -holochain_p2p = { path = "../holochain_p2p", version = "0.0.53"} +holochain_p2p = { path = "../holochain_p2p", version = "0.0.54-dev.0"} holochain_util = { version = "0.0.11", path = "../holochain_util", features = [ "pw" ] } nanoid = "0.3" observability = "0.1.3" diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index 7e119ca1e1..886d327a31 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.0.20" +version = "0.0.21-dev.0" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" @@ -23,12 +23,12 @@ test_utils = [ ] [dependencies] -hdk_derive = { version = "0.0.46", path = "../hdk_derive" } +hdk_derive = { version = "0.0.47-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_integrity_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_integrity_types = { version = "0.0.16", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.17-dev.0", path = "../holochain_integrity_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index 9d722baaae..2c0cc64955 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.148" +version = "0.0.149-dev.0" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,13 +27,13 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.0.20", path = "../hdi", features = ["trace"] } -hdk_derive = { version = "0.0.46", path = "../hdk_derive" } +hdi = { version = "0.0.21-dev.0", path = "../hdi", features = ["trace"] } +hdk_derive = { version = "0.0.47-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types", default-features = false } +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk_derive/Cargo.toml b/crates/hdk_derive/Cargo.toml index 4c38f52c1d..9b400a5091 100644 --- a/crates/hdk_derive/Cargo.toml +++ b/crates/hdk_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk_derive" -version = "0.0.46" +version = "0.0.47-dev.0" description = "derive macros for the holochain hdk" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ darling = "0.14.1" heck = "0.4" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdi, to reduce code bloat -holochain_integrity_types = { version = "0.0.16", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.17-dev.0", path = "../holochain_integrity_types", default-features = false } proc-macro-error = "1.0.4" [features] diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 57ad23c6c3..84dce61f3f 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.158" +version = "0.0.159-dev.0" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,20 +24,20 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.57", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.56", path = "../holochain_conductor_api" } -holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } -holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } -holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } +holochain_cascade = { version = "0.0.58-dev.0", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.57-dev.0", path = "../holochain_conductor_api" } +holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } +holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.56", path = "../holochain_state" } -holochain_types = { version = "0.0.53", path = "../holochain_types" } +holochain_state = { version = "0.0.57-dev.0", path = "../holochain_state" } +holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types", features = ["full"] } +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types", features = ["full"] } human-panic = "1.0.3" -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../kitsune_p2p/types" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { version = "0.0.15", path = "../mr_bundle" } @@ -74,15 +74,15 @@ url = "1.7.2" url2 = "0.0.6" url_serde = "0.2.0" uuid = { version = "0.7", features = [ "serde", "v4" ] } -holochain_wasm_test_utils = { version = "0.0.55", path = "../test_utils/wasm" } +holochain_wasm_test_utils = { version = "0.0.56-dev.0", path = "../test_utils/wasm" } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.148", path = "../hdk", optional = true } +hdk = { version = "0.0.149-dev.0", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.49", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.50-dev.0", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -104,14 +104,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.148", path = "../hdk", optional = false } +hdk = { version = "0.0.149-dev.0", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.49", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.50-dev.0", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.148", path = "../hdk"} +hdk = { version = "0.0.149-dev.0", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 6d281b246a..41be8a9de8 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.57" +version = "0.0.58-dev.0" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,17 +15,17 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.148", path = "../hdk" } -hdk_derive = { version = "0.0.46", path = "../hdk_derive" } +hdk = { version = "0.0.149-dev.0", path = "../hdk" } +hdk_derive = { version = "0.0.47-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } -holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } +holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.56", path = "../holochain_state" } -holochain_types = { version = "0.0.53", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } +holochain_state = { version = "0.0.57-dev.0", path = "../holochain_state" } +holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } observability = "0.1.3" -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index b56b157b3b..825fa9696d 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.56" +version = "0.0.57-dev.0" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -11,13 +11,13 @@ edition = "2021" [dependencies] directories = "2.0.2" derive_more = "0.99.3" -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } -holochain_state = { version = "0.0.56", path = "../holochain_state" } +holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } +holochain_state = { version = "0.0.57-dev.0", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.53", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_yaml = "0.8" diff --git a/crates/holochain_integrity_types/Cargo.toml b/crates/holochain_integrity_types/Cargo.toml index 30547bea3b..dc3e0ecd57 100644 --- a/crates/holochain_integrity_types/Cargo.toml +++ b/crates/holochain_integrity_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_integrity_types" -version = "0.0.16" +version = "0.0.17-dev.0" description = "Holochain integrity types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -17,7 +17,7 @@ serde_bytes = "0.11" # Just the bare minimum timestamp with no extra features. # TODO: This needs to point to a published version of this crate and be pinned. -kitsune_p2p_timestamp = { version = "0.0.12", path = "../kitsune_p2p/timestamp", default-features = false } +kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../kitsune_p2p/timestamp", default-features = false } # TODO: Figure out how to remove these dependencies. subtle = "2" diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 99511b2f38..38966085ae 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_keystore" -version = "0.0.52" +version = "0.0.53-dev.0" description = "keystore for libsodium keypairs" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13.0" futures = "0.3.23" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45"} -kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46-dev.0"} +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../kitsune_p2p/types" } must_future = "0.1.2" nanoid = "0.4.0" one_err = "0.0.5" @@ -30,7 +30,7 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. -holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } [dev-dependencies] assert_cmd = "2.0.4" diff --git a/crates/holochain_keystore/README.md b/crates/holochain_keystore/README.md index 800f1fad30..377d13ced9 100644 --- a/crates/holochain_keystore/README.md +++ b/crates/holochain_keystore/README.md @@ -24,9 +24,7 @@ async fn main() { let signature = agent_pubkey.sign(&keystore, &my_data_1).await.unwrap(); - /* - assert!(agent_pubkey.verify_signature(&signature, &my_data_1).await.unwrap()); - */ + assert!(agent_pubkey.verify_signature(&signature, &my_data_1).await); }).await.unwrap(); } ``` diff --git a/crates/holochain_p2p/Cargo.toml b/crates/holochain_p2p/Cargo.toml index 7aedf3f2f6..4fe795fe7f 100644 --- a/crates/holochain_p2p/Cargo.toml +++ b/crates/holochain_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_p2p" -version = "0.0.53" +version = "0.0.54-dev.0" description = "holochain specific wrapper around more generic p2p module" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -17,12 +17,12 @@ fixt = { path = "../fixt", version = "0.0.14"} futures = "0.3" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash" } -holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.53", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.30", path = "../kitsune_p2p/types" } +holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../kitsune_p2p/types" } mockall = "0.10.2" observability = "0.1.3" rand = "0.8.5" diff --git a/crates/holochain_sqlite/Cargo.toml b/crates/holochain_sqlite/Cargo.toml index dd25fce2c7..a9910698db 100644 --- a/crates/holochain_sqlite/Cargo.toml +++ b/crates/holochain_sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_sqlite" -version = "0.0.51" +version = "0.0.52-dev.0" description = "Abstractions for persistence of Holochain state via SQLite" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -25,8 +25,8 @@ fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3.1" holo_hash = { path = "../holo_hash", features = ["rusqlite"], version = "0.0.31"} holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } lazy_static = "1.4.0" once_cell = "1.4.1" must_future = "0.1.1" diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index 2df29daae5..7aa5847976 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.56" +version = "0.0.57-dev.0" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -13,19 +13,19 @@ byteorder = "1.3.4" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } derive_more = "0.99.3" either = "1.5" -holochain_sqlite = { version = "0.0.51", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } fallible-iterator = "0.2.0" futures = "0.3" -holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_p2p = { version = "0.0.53", path = "../holochain_p2p" } -holochain_types = { version = "0.0.53", path = "../holochain_types" } +holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } +holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } holochain_util = { version = "0.0.11", path = "../holochain_util" } -holochain_zome_types = { version = "0.0.45", path = "../holochain_zome_types", features = [ +holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types", features = [ "full", ] } -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } mockall = "0.10.2" one_err = "0.0.5" parking_lot = "0.10" diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index eafbdcaef3..e307dce6eb 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_types" -version = "0.0.53" +version = "0.0.54-dev.0" description = "Holochain common types" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -25,12 +25,12 @@ fixt = { path = "../fixt", version = "0.0.14"} flate2 = "1.0.14" futures = "0.3" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["encoding"] } -holochain_keystore = { version = "0.0.52", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.51"} -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.45", features = ["full"] } +holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.52-dev.0"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46-dev.0", features = ["full"] } itertools = { version = "0.10" } -kitsune_p2p_dht = { version = "0.0.3", path = "../kitsune_p2p/dht" } +kitsune_p2p_dht = { version = "0.0.4-dev.0", path = "../kitsune_p2p/dht" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { path = "../mr_bundle", features = ["packing"], version = "0.0.15"} diff --git a/crates/holochain_zome_types/Cargo.toml b/crates/holochain_zome_types/Cargo.toml index 03074f6ff3..1842402795 100644 --- a/crates/holochain_zome_types/Cargo.toml +++ b/crates/holochain_zome_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_zome_types" -version = "0.0.45" +version = "0.0.46-dev.0" description = "Holochain zome types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -12,8 +12,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -kitsune_p2p_timestamp = { version = "0.0.12", path = "../kitsune_p2p/timestamp" } -holochain_integrity_types = { version = "0.0.16", path = "../holochain_integrity_types", features = ["tracing"] } +kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../kitsune_p2p/timestamp" } +holochain_integrity_types = { version = "0.0.17-dev.0", path = "../holochain_integrity_types", features = ["tracing"] } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_serialized_bytes = "=0.0.51" paste = "=1.0.5" @@ -36,7 +36,7 @@ num_enum = { version = "0.5", optional = true } # full-dna-def dependencies derive_builder = { version = "0.9", optional = true } -kitsune_p2p_dht = { version = "0.0.3", path = "../kitsune_p2p/dht", optional = true } +kitsune_p2p_dht = { version = "0.0.4-dev.0", path = "../kitsune_p2p/dht", optional = true } nanoid = { version = "0.3", optional = true } shrinkwraprs = { version = "0.3", optional = true } diff --git a/crates/kitsune_p2p/bootstrap/Cargo.toml b/crates/kitsune_p2p/bootstrap/Cargo.toml index f3a3dcec92..91ee13c336 100644 --- a/crates/kitsune_p2p/bootstrap/Cargo.toml +++ b/crates/kitsune_p2p/bootstrap/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" [dependencies] clap = "=3.1.18" futures = "0.3.15" -kitsune_p2p_types = { version = "0.0.30", path = "../types" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } once_cell = "1.7.2" parking_lot = "0.11" rand = "0.8.5" diff --git a/crates/kitsune_p2p/dht/Cargo.toml b/crates/kitsune_p2p/dht/Cargo.toml index 6469fc66e5..6549aafeb4 100644 --- a/crates/kitsune_p2p/dht/Cargo.toml +++ b/crates/kitsune_p2p/dht/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_dht" -version = "0.0.3" +version = "0.0.4-dev.0" description = "Kitsune P2p DHT definition" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -19,7 +19,7 @@ derive_more = "0.99" futures = "0.3" gcollections = "1.5" kitsune_p2p_dht_arc = { version = "0.0.14", path = "../dht_arc"} -kitsune_p2p_timestamp = { version = "0.0.12", path = "../timestamp", features = ["now"]} +kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../timestamp", features = ["now"]} intervallum = "1.4" must_future = "0.1" num-traits = "0.2.14" diff --git a/crates/kitsune_p2p/direct/Cargo.toml b/crates/kitsune_p2p/direct/Cargo.toml index fedb789402..f57ae0f12c 100644 --- a/crates/kitsune_p2p/direct/Cargo.toml +++ b/crates/kitsune_p2p/direct/Cargo.toml @@ -19,10 +19,10 @@ hyper = { version = "0.14", features = ["server","http1","http2","tcp"] } if-addrs = "0.6" kitsune_p2p_bootstrap = { version = "0.0.12-dev.0", path = "../bootstrap" } kitsune_p2p_direct_api = { version = "0.0.1", path = "../direct_api" } -kitsune_p2p_types = { version = "0.0.30", path = "../types" } -kitsune_p2p = { version = "0.0.42", path = "../kitsune_p2p", features = ["test_utils"] } -kitsune_p2p_transport_quic = { version = "0.0.30", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.30", path = "../proxy" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } +kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p", features = ["test_utils"] } +kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.31-dev.0", path = "../proxy" } rand = "0.8.5" serde = { version = "1", features = ["derive", "rc"] } serde_json = { version = "1", features = ["preserve_order"] } diff --git a/crates/kitsune_p2p/direct_test/Cargo.toml b/crates/kitsune_p2p/direct_test/Cargo.toml index 8abd40a7b7..6824db9dc1 100644 --- a/crates/kitsune_p2p/direct_test/Cargo.toml +++ b/crates/kitsune_p2p/direct_test/Cargo.toml @@ -12,8 +12,8 @@ edition = "2021" [dependencies] kitsune_p2p_direct = { version = "0.0.1", path = "../direct" } -kitsune_p2p_transport_quic = { version = "0.0.30", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.30", path = "../proxy" } +kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.31-dev.0", path = "../proxy" } rand = "0.8.5" structopt = "0.3.21" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml index 3527740948..76110a1633 100644 --- a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml +++ b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p" -version = "0.0.42" +version = "0.0.43-dev.0" description = "p2p / dht communication framework" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -20,10 +20,10 @@ ghost_actor = "=0.3.0-alpha.4" governor = "0.3.2" itertools = "0.10" kitsune_p2p_mdns = { version = "0.0.3", path = "../mdns" } -kitsune_p2p_proxy = { version = "0.0.30", path = "../proxy" } -kitsune_p2p_timestamp = { version = "0.0.12", path = "../timestamp", features = ["now"] } -kitsune_p2p_transport_quic = { version = "0.0.30", path = "../transport_quic" } -kitsune_p2p_types = { version = "0.0.30", path = "../types" } +kitsune_p2p_proxy = { version = "0.0.31-dev.0", path = "../proxy" } +kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../timestamp", features = ["now"] } +kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } must_future = "0.1.1" num-traits = "0.2" observability = "0.1.3" diff --git a/crates/kitsune_p2p/proxy/Cargo.toml b/crates/kitsune_p2p/proxy/Cargo.toml index 42f538e081..3dc7b1b03e 100644 --- a/crates/kitsune_p2p/proxy/Cargo.toml +++ b/crates/kitsune_p2p/proxy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_proxy" -version = "0.0.30" +version = "0.0.31-dev.0" description = "Proxy transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13" blake2b_simd = "0.5.10" derive_more = "0.99.7" futures = "0.3" -kitsune_p2p_types = { version = "0.0.30", path = "../types" } -kitsune_p2p_transport_quic = { version = "0.0.30", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } +kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } nanoid = "0.3" observability = "0.1.3" parking_lot = "0.11" diff --git a/crates/kitsune_p2p/timestamp/Cargo.toml b/crates/kitsune_p2p/timestamp/Cargo.toml index 57edef8a49..d6b901a430 100644 --- a/crates/kitsune_p2p/timestamp/Cargo.toml +++ b/crates/kitsune_p2p/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_timestamp" -version = "0.0.12" +version = "0.0.13-dev.0" description = "Microsecond-precision timestamp datatype for kitsune_p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/kitsune_p2p/transport_quic/Cargo.toml b/crates/kitsune_p2p/transport_quic/Cargo.toml index bd79a8f41f..936bcdd9ef 100644 --- a/crates/kitsune_p2p/transport_quic/Cargo.toml +++ b/crates/kitsune_p2p/transport_quic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_transport_quic" -version = "0.0.30" +version = "0.0.31-dev.0" description = "QUIC transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -14,7 +14,7 @@ edition = "2021" blake2b_simd = "1.0.0" futures = "0.3.21" if-addrs = "0.7.0" -kitsune_p2p_types = { version = "0.0.30", path = "../types" } +kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } nanoid = "0.4.0" once_cell = "1.9.0" quinn = "0.8.1" diff --git a/crates/kitsune_p2p/types/Cargo.toml b/crates/kitsune_p2p/types/Cargo.toml index e7fc21fb11..770d7b20e6 100644 --- a/crates/kitsune_p2p/types/Cargo.toml +++ b/crates/kitsune_p2p/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_types" -version = "0.0.30" +version = "0.0.31-dev.0" description = "types subcrate for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -16,7 +16,7 @@ base64 = "0.13" derive_more = "0.99.7" futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -kitsune_p2p_dht = { version = "0.0.3", path = "../dht" } +kitsune_p2p_dht = { version = "0.0.4-dev.0", path = "../dht" } kitsune_p2p_dht_arc = { version = "0.0.14", path = "../dht_arc" } lru = "0.6.5" mockall = { version = "0.10.2", optional = true } diff --git a/crates/test_utils/wasm/Cargo.toml b/crates/test_utils/wasm/Cargo.toml index 607ae92b4d..a868ab494f 100644 --- a/crates/test_utils/wasm/Cargo.toml +++ b/crates/test_utils/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wasm_test_utils" -version = "0.0.55" +version = "0.0.56-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Utilities for Wasm testing for Holochain" @@ -19,7 +19,7 @@ only_check = [] [dependencies] -holochain_types = { path = "../../holochain_types", version = "0.0.53"} +holochain_types = { path = "../../holochain_types", version = "0.0.54-dev.0"} strum = "0.18.0" strum_macros = "0.18.0" holochain_util = { version = "0.0.11", path = "../../holochain_util" } diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index e3ca05089f..c255d66745 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.49" +version = "0.0.50-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.148"} +hdk = { path = "../../hdk", version = "0.0.149-dev.0"} serde = "1.0" From 46d6a5bef9e08518b198cbbacca592ec0d99fc6e Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 7 Sep 2022 02:07:47 +0000 Subject: [PATCH 094/111] create a release from branch release-20220907.014838 the following crates are part of this release: - kitsune_p2p_timestamp-0.0.13 - holochain_integrity_types-0.0.17 - hdk_derive-0.0.47 - hdi-0.0.21 - kitsune_p2p_dht-0.0.4 - holochain_zome_types-0.0.46 - hdk-0.0.149 - kitsune_p2p_types-0.0.31 - kitsune_p2p_transport_quic-0.0.31 - kitsune_p2p_proxy-0.0.31 - kitsune_p2p-0.0.43 - holochain_sqlite-0.0.52 - holochain_keystore-0.0.53 - holochain_types-0.0.54 - holochain_p2p-0.0.54 - holochain_state-0.0.57 - holochain_cascade-0.0.58 - holochain_wasm_test_utils-0.0.56 - holochain_conductor_api-0.0.57 - holochain_test_wasm_common-0.0.50 - holochain-0.0.159 - holochain_cli_bundle-0.0.50 - holochain_cli_sandbox-0.0.51 - holochain_cli-0.0.55 --- CHANGELOG.md | 58 +++++++++++++++++++ Cargo.lock | 50 ++++++++-------- crates/hc/CHANGELOG.md | 2 + crates/hc/Cargo.toml | 6 +- crates/hc_bundle/CHANGELOG.md | 2 + crates/hc_bundle/Cargo.toml | 4 +- crates/hc_sandbox/CHANGELOG.md | 2 + crates/hc_sandbox/Cargo.toml | 8 +-- crates/hdi/CHANGELOG.md | 2 + crates/hdi/Cargo.toml | 6 +- crates/hdk/CHANGELOG.md | 2 + crates/hdk/Cargo.toml | 8 +-- crates/hdk_derive/CHANGELOG.md | 2 + crates/hdk_derive/Cargo.toml | 4 +- crates/holochain/CHANGELOG.md | 4 +- crates/holochain/Cargo.toml | 34 +++++------ crates/holochain_cascade/CHANGELOG.md | 2 + crates/holochain_cascade/Cargo.toml | 18 +++--- crates/holochain_conductor_api/CHANGELOG.md | 2 + crates/holochain_conductor_api/Cargo.toml | 12 ++-- crates/holochain_integrity_types/CHANGELOG.md | 2 + crates/holochain_integrity_types/Cargo.toml | 4 +- crates/holochain_keystore/CHANGELOG.md | 2 + crates/holochain_keystore/Cargo.toml | 8 +-- crates/holochain_p2p/CHANGELOG.md | 2 + crates/holochain_p2p/Cargo.toml | 12 ++-- crates/holochain_sqlite/CHANGELOG.md | 2 + crates/holochain_sqlite/Cargo.toml | 6 +- crates/holochain_state/CHANGELOG.md | 2 + crates/holochain_state/Cargo.toml | 14 ++--- crates/holochain_types/CHANGELOG.md | 2 + crates/holochain_types/Cargo.toml | 10 ++-- crates/holochain_zome_types/CHANGELOG.md | 2 + crates/holochain_zome_types/Cargo.toml | 8 +-- crates/kitsune_p2p/bootstrap/Cargo.toml | 2 +- crates/kitsune_p2p/dht/CHANGELOG.md | 2 + crates/kitsune_p2p/dht/Cargo.toml | 4 +- crates/kitsune_p2p/direct/Cargo.toml | 8 +-- crates/kitsune_p2p/direct_test/Cargo.toml | 4 +- crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md | 2 + crates/kitsune_p2p/kitsune_p2p/Cargo.toml | 10 ++-- crates/kitsune_p2p/proxy/CHANGELOG.md | 2 + crates/kitsune_p2p/proxy/Cargo.toml | 6 +- crates/kitsune_p2p/timestamp/CHANGELOG.md | 2 + crates/kitsune_p2p/timestamp/Cargo.toml | 2 +- .../kitsune_p2p/transport_quic/CHANGELOG.md | 2 + crates/kitsune_p2p/transport_quic/Cargo.toml | 4 +- crates/kitsune_p2p/types/CHANGELOG.md | 2 + crates/kitsune_p2p/types/Cargo.toml | 4 +- crates/test_utils/wasm/CHANGELOG.md | 2 + crates/test_utils/wasm/Cargo.toml | 4 +- crates/test_utils/wasm_common/CHANGELOG.md | 2 + crates/test_utils/wasm_common/Cargo.toml | 4 +- 53 files changed, 239 insertions(+), 133 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81649fc1e7..a5c289dc40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,64 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # \[Unreleased\] +# 20220907.014838 + +## [holochain\_cli-0.0.55](crates/holochain_cli/CHANGELOG.md#0.0.55) + +## [holochain\_cli\_sandbox-0.0.51](crates/holochain_cli_sandbox/CHANGELOG.md#0.0.51) + +## [holochain\_cli\_bundle-0.0.50](crates/holochain_cli_bundle/CHANGELOG.md#0.0.50) + +## [holochain-0.0.159](crates/holochain/CHANGELOG.md#0.0.159) + +- Updates TLS certificate handling so that multiple conductors can share the same lair, but use different TLS certificates by storing a “tag” in the conductor state database. This should not be a breaking change, but *will* result in a new TLS certificate being used per conductor. [\#1519](https://github.com/holochain/holochain/pull/1519) + +## [holochain\_test\_wasm\_common-0.0.50](crates/holochain_test_wasm_common/CHANGELOG.md#0.0.50) + +## [holochain\_conductor\_api-0.0.57](crates/holochain_conductor_api/CHANGELOG.md#0.0.57) + +## [holochain\_wasm\_test\_utils-0.0.56](crates/holochain_wasm_test_utils/CHANGELOG.md#0.0.56) + +## [holochain\_cascade-0.0.58](crates/holochain_cascade/CHANGELOG.md#0.0.58) + +## [holochain\_state-0.0.57](crates/holochain_state/CHANGELOG.md#0.0.57) + +## [holochain\_p2p-0.0.54](crates/holochain_p2p/CHANGELOG.md#0.0.54) + +## [holochain\_types-0.0.54](crates/holochain_types/CHANGELOG.md#0.0.54) + +## [holochain\_keystore-0.0.53](crates/holochain_keystore/CHANGELOG.md#0.0.53) + +- Add lair disconnect detection / reconnect loop with backoff for keystore resiliency. [\#1529](https://github.com/holochain/holochain/pull/1529) + +## [holochain\_sqlite-0.0.52](crates/holochain_sqlite/CHANGELOG.md#0.0.52) + +## [kitsune\_p2p-0.0.43](crates/kitsune_p2p/CHANGELOG.md#0.0.43) + +- Increases all gossip bandwidth rate limits to 10mbps, up from 0.1mbps, allowing for gossip of larger entries +- Adds `gossip_burst_ratio` to `KitsuneTuningParams`, allowing tuning of bandwidth bursts +- Fixes a bug where a too-large gossip payload could put the rate limiter into an infinite loop + +## [kitsune\_p2p\_proxy-0.0.31](crates/kitsune_p2p_proxy/CHANGELOG.md#0.0.31) + +## [kitsune\_p2p\_transport\_quic-0.0.31](crates/kitsune_p2p_transport_quic/CHANGELOG.md#0.0.31) + +## [kitsune\_p2p\_types-0.0.31](crates/kitsune_p2p_types/CHANGELOG.md#0.0.31) + +## [hdk-0.0.149](crates/hdk/CHANGELOG.md#0.0.149) + +## [holochain\_zome\_types-0.0.46](crates/holochain_zome_types/CHANGELOG.md#0.0.46) + +## [kitsune\_p2p\_dht-0.0.4](crates/kitsune_p2p_dht/CHANGELOG.md#0.0.4) + +## [hdi-0.0.21](crates/hdi/CHANGELOG.md#0.0.21) + +## [hdk\_derive-0.0.47](crates/hdk_derive/CHANGELOG.md#0.0.47) + +## [holochain\_integrity\_types-0.0.17](crates/holochain_integrity_types/CHANGELOG.md#0.0.17) + +## [kitsune\_p2p\_timestamp-0.0.13](crates/kitsune_p2p_timestamp/CHANGELOG.md#0.0.13) + # 20220831.015922 ## [holochain\_cli-0.0.54](crates/holochain_cli/CHANGELOG.md#0.0.54) diff --git a/Cargo.lock b/Cargo.lock index 2f7c69fb5b..b0c5c332d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1852,7 +1852,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.20" +version = "0.0.21" dependencies = [ "arbitrary", "fixt", @@ -1871,7 +1871,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.148" +version = "0.0.149" dependencies = [ "fixt", "getrandom 0.2.7", @@ -1892,7 +1892,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.46" +version = "0.0.47" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -1977,7 +1977,7 @@ dependencies = [ [[package]] name = "holochain" -version = "0.0.158" +version = "0.0.159" dependencies = [ "anyhow", "arbitrary", @@ -2070,7 +2070,7 @@ dependencies = [ [[package]] name = "holochain_cascade" -version = "0.0.57" +version = "0.0.58" dependencies = [ "async-trait", "derive_more", @@ -2105,7 +2105,7 @@ dependencies = [ [[package]] name = "holochain_cli" -version = "0.0.54" +version = "0.0.55" dependencies = [ "anyhow", "futures", @@ -2118,7 +2118,7 @@ dependencies = [ [[package]] name = "holochain_cli_bundle" -version = "0.0.49" +version = "0.0.50" dependencies = [ "anyhow", "assert_cmd 1.0.8", @@ -2139,7 +2139,7 @@ dependencies = [ [[package]] name = "holochain_cli_sandbox" -version = "0.0.50" +version = "0.0.51" dependencies = [ "ansi_term 0.12.1", "anyhow", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "holochain_conductor_api" -version = "0.0.56" +version = "0.0.57" dependencies = [ "derive_more", "directories", @@ -2192,7 +2192,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.16" +version = "0.0.17" dependencies = [ "arbitrary", "holo_hash", @@ -2206,7 +2206,7 @@ dependencies = [ [[package]] name = "holochain_keystore" -version = "0.0.52" +version = "0.0.53" dependencies = [ "assert_cmd 2.0.4", "base64", @@ -2240,7 +2240,7 @@ dependencies = [ [[package]] name = "holochain_p2p" -version = "0.0.53" +version = "0.0.54" dependencies = [ "async-trait", "derive_more", @@ -2294,7 +2294,7 @@ dependencies = [ [[package]] name = "holochain_sqlite" -version = "0.0.51" +version = "0.0.52" dependencies = [ "anyhow", "async-trait", @@ -2343,7 +2343,7 @@ dependencies = [ [[package]] name = "holochain_state" -version = "0.0.56" +version = "0.0.57" dependencies = [ "anyhow", "arbitrary", @@ -2388,7 +2388,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.49" +version = "0.0.50" dependencies = [ "hdk", "serde", @@ -2396,7 +2396,7 @@ dependencies = [ [[package]] name = "holochain_types" -version = "0.0.53" +version = "0.0.54" dependencies = [ "anyhow", "arbitrary", @@ -2432,7 +2432,7 @@ dependencies = [ "nanoid 0.3.0", "observability", "parking_lot 0.10.2", - "pretty_assertions 0.7.2", + "pretty_assertions 0.6.1", "rand 0.8.5", "regex", "rusqlite", @@ -2470,7 +2470,7 @@ dependencies = [ [[package]] name = "holochain_wasm_test_utils" -version = "0.0.55" +version = "0.0.56" dependencies = [ "holochain_types", "holochain_util", @@ -2562,7 +2562,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.45" +version = "0.0.46" dependencies = [ "arbitrary", "contrafact", @@ -2885,7 +2885,7 @@ dependencies = [ [[package]] name = "kitsune_p2p" -version = "0.0.42" +version = "0.0.43" dependencies = [ "arbitrary", "arrayref", @@ -2953,7 +2953,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht" -version = "0.0.3" +version = "0.0.4" dependencies = [ "colored", "derivative", @@ -3066,7 +3066,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_proxy" -version = "0.0.30" +version = "0.0.31" dependencies = [ "base64", "blake2b_simd 0.5.11", @@ -3091,7 +3091,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.0.12" +version = "0.0.13" dependencies = [ "arbitrary", "chrono", @@ -3104,7 +3104,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_transport_quic" -version = "0.0.30" +version = "0.0.31" dependencies = [ "blake2b_simd 1.0.0", "futures", @@ -3122,7 +3122,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_types" -version = "0.0.30" +version = "0.0.31" dependencies = [ "arbitrary", "base64", diff --git a/crates/hc/CHANGELOG.md b/crates/hc/CHANGELOG.md index 03f94ef7ed..ec070067d2 100644 --- a/crates/hc/CHANGELOG.md +++ b/crates/hc/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.55 + ## 0.0.54 ## 0.0.53 diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index 4be2302350..b2b25ee3f4 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.55-dev.0" +version = "0.0.55" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -21,8 +21,8 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0" futures = "0.3" -holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.50-dev.0"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.51-dev.0"} +holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.50"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.51"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_bundle/CHANGELOG.md b/crates/hc_bundle/CHANGELOG.md index 7407cf8a4f..673a745b19 100644 --- a/crates/hc_bundle/CHANGELOG.md +++ b/crates/hc_bundle/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.50 + ## 0.0.49 ## 0.0.48 diff --git a/crates/hc_bundle/Cargo.toml b/crates/hc_bundle/Cargo.toml index 97468b58ce..f3d69fbee7 100644 --- a/crates/hc_bundle/Cargo.toml +++ b/crates/hc_bundle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_bundle" -version = "0.0.50-dev.0" +version = "0.0.50" description = "DNA and hApp bundling functionality for the `hc` Holochain CLI utility" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ path = "src/bin/hc-dna.rs" anyhow = "1.0" holochain_util = { path = "../holochain_util", features = ["backtrace"], version = "0.0.11"} holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } +holochain_types = { version = "0.0.54", path = "../holochain_types" } mr_bundle = {version = "0.0.15", path = "../mr_bundle"} serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" diff --git a/crates/hc_sandbox/CHANGELOG.md b/crates/hc_sandbox/CHANGELOG.md index 21cd1c55ad..32ef5f9d02 100644 --- a/crates/hc_sandbox/CHANGELOG.md +++ b/crates/hc_sandbox/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.51 + ## 0.0.50 ## 0.0.49 diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index c7307804b5..3503520f43 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.51-dev.0" +version = "0.0.51" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,10 +19,10 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.57-dev.0"} -holochain_types = { path = "../holochain_types", version = "0.0.54-dev.0"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.57"} +holochain_types = { path = "../holochain_types", version = "0.0.54"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} -holochain_p2p = { path = "../holochain_p2p", version = "0.0.54-dev.0"} +holochain_p2p = { path = "../holochain_p2p", version = "0.0.54"} holochain_util = { version = "0.0.11", path = "../holochain_util", features = [ "pw" ] } nanoid = "0.3" observability = "0.1.3" diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index f26d80cfcd..60262e972c 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.21 + ## 0.0.20 - Adds `must_get_agent_activity` which allows depending on an agents source chain by using a deterministic hash bounded range query. [\#1502](https://github.com/holochain/holochain/pull/1502) diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index 886d327a31..b2c97c6499 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.0.21-dev.0" +version = "0.0.21" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" @@ -23,12 +23,12 @@ test_utils = [ ] [dependencies] -hdk_derive = { version = "0.0.47-dev.0", path = "../hdk_derive" } +hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_integrity_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_integrity_types = { version = "0.0.17-dev.0", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.17", path = "../holochain_integrity_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk/CHANGELOG.md b/crates/hdk/CHANGELOG.md index 9e75eb3e2e..ded0d0479d 100644 --- a/crates/hdk/CHANGELOG.md +++ b/crates/hdk/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.149 + ## 0.0.148 ## 0.0.147 diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index 2c0cc64955..c8f66341aa 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.149-dev.0" +version = "0.0.149" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,13 +27,13 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.0.21-dev.0", path = "../hdi", features = ["trace"] } -hdk_derive = { version = "0.0.47-dev.0", path = "../hdk_derive" } +hdi = { version = "0.0.21", path = "../hdi", features = ["trace"] } +hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types", default-features = false } +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk_derive/CHANGELOG.md b/crates/hdk_derive/CHANGELOG.md index 54895a6988..925da82f4f 100644 --- a/crates/hdk_derive/CHANGELOG.md +++ b/crates/hdk_derive/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.47 + ## 0.0.46 ## 0.0.45 diff --git a/crates/hdk_derive/Cargo.toml b/crates/hdk_derive/Cargo.toml index 9b400a5091..735d1b58bd 100644 --- a/crates/hdk_derive/Cargo.toml +++ b/crates/hdk_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk_derive" -version = "0.0.47-dev.0" +version = "0.0.47" description = "derive macros for the holochain hdk" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ darling = "0.14.1" heck = "0.4" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdi, to reduce code bloat -holochain_integrity_types = { version = "0.0.17-dev.0", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.17", path = "../holochain_integrity_types", default-features = false } proc-macro-error = "1.0.4" [features] diff --git a/crates/holochain/CHANGELOG.md b/crates/holochain/CHANGELOG.md index ac1825afda..dc4b8a173f 100644 --- a/crates/holochain/CHANGELOG.md +++ b/crates/holochain/CHANGELOG.md @@ -4,7 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased -- Updates TLS certificate handling so that multiple conductors can share the same lair, but use different TLS certificates by storing a "tag" in the conductor state database. This should not be a breaking change, but *will* result in a new TLS certificate being used per conductor. [\#1519](https://github.com/holochain/holochain/pull/1519) +## 0.0.159 + +- Updates TLS certificate handling so that multiple conductors can share the same lair, but use different TLS certificates by storing a “tag” in the conductor state database. This should not be a breaking change, but *will* result in a new TLS certificate being used per conductor. [\#1519](https://github.com/holochain/holochain/pull/1519) ## 0.0.158 diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 84dce61f3f..ee22d74e49 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.159-dev.0" +version = "0.0.159" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,20 +24,20 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.58-dev.0", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.57-dev.0", path = "../holochain_conductor_api" } -holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } -holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } -holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } +holochain_cascade = { version = "0.0.58", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.57", path = "../holochain_conductor_api" } +holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } +holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.57-dev.0", path = "../holochain_state" } -holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } +holochain_state = { version = "0.0.57", path = "../holochain_state" } +holochain_types = { version = "0.0.54", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types", features = ["full"] } +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types", features = ["full"] } human-panic = "1.0.3" -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../kitsune_p2p/types" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.31", path = "../kitsune_p2p/types" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { version = "0.0.15", path = "../mr_bundle" } @@ -74,15 +74,15 @@ url = "1.7.2" url2 = "0.0.6" url_serde = "0.2.0" uuid = { version = "0.7", features = [ "serde", "v4" ] } -holochain_wasm_test_utils = { version = "0.0.56-dev.0", path = "../test_utils/wasm" } +holochain_wasm_test_utils = { version = "0.0.56", path = "../test_utils/wasm" } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.149-dev.0", path = "../hdk", optional = true } +hdk = { version = "0.0.149", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.50-dev.0", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.50", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -104,14 +104,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.149-dev.0", path = "../hdk", optional = false } +hdk = { version = "0.0.149", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.50-dev.0", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.50", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.149-dev.0", path = "../hdk"} +hdk = { version = "0.0.149", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/CHANGELOG.md b/crates/holochain_cascade/CHANGELOG.md index 796e458f6b..ee79101f25 100644 --- a/crates/holochain_cascade/CHANGELOG.md +++ b/crates/holochain_cascade/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.58 + ## 0.0.57 ## 0.0.56 diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 41be8a9de8..d240919c94 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.58-dev.0" +version = "0.0.58" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,17 +15,17 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.149-dev.0", path = "../hdk" } -hdk_derive = { version = "0.0.47-dev.0", path = "../hdk_derive" } +hdk = { version = "0.0.149", path = "../hdk" } +hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } -holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } +holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.57-dev.0", path = "../holochain_state" } -holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } +holochain_state = { version = "0.0.57", path = "../holochain_state" } +holochain_types = { version = "0.0.54", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } observability = "0.1.3" -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/holochain_conductor_api/CHANGELOG.md b/crates/holochain_conductor_api/CHANGELOG.md index caf88f034a..4b4a7ae408 100644 --- a/crates/holochain_conductor_api/CHANGELOG.md +++ b/crates/holochain_conductor_api/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.57 + ## 0.0.56 ## 0.0.55 diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index 825fa9696d..1a6452963f 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.57-dev.0" +version = "0.0.57" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -11,13 +11,13 @@ edition = "2021" [dependencies] directories = "2.0.2" derive_more = "0.99.3" -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } -holochain_state = { version = "0.0.57-dev.0", path = "../holochain_state" } +holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } +holochain_state = { version = "0.0.57", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.54", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_yaml = "0.8" diff --git a/crates/holochain_integrity_types/CHANGELOG.md b/crates/holochain_integrity_types/CHANGELOG.md index b11c6a59ee..bebc1b0a44 100644 --- a/crates/holochain_integrity_types/CHANGELOG.md +++ b/crates/holochain_integrity_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.17 + ## 0.0.16 - Adds `ChainFilter` type for use in `must_get_agent_activity`. This allows specifying a chain top hash to start from and then creates a range either to genesis or `unit` a given hash or after `take`ing a number of actions. The range iterates backwards from the given chain top till it reaches on of the above possible chain bottoms. For this reason it will never contain forks. [\#1502](https://github.com/holochain/holochain/pull/1502) diff --git a/crates/holochain_integrity_types/Cargo.toml b/crates/holochain_integrity_types/Cargo.toml index dc3e0ecd57..0c1cbd10b6 100644 --- a/crates/holochain_integrity_types/Cargo.toml +++ b/crates/holochain_integrity_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_integrity_types" -version = "0.0.17-dev.0" +version = "0.0.17" description = "Holochain integrity types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -17,7 +17,7 @@ serde_bytes = "0.11" # Just the bare minimum timestamp with no extra features. # TODO: This needs to point to a published version of this crate and be pinned. -kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../kitsune_p2p/timestamp", default-features = false } +kitsune_p2p_timestamp = { version = "0.0.13", path = "../kitsune_p2p/timestamp", default-features = false } # TODO: Figure out how to remove these dependencies. subtle = "2" diff --git a/crates/holochain_keystore/CHANGELOG.md b/crates/holochain_keystore/CHANGELOG.md index d74e4335f5..71efb47143 100644 --- a/crates/holochain_keystore/CHANGELOG.md +++ b/crates/holochain_keystore/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.53 + - Add lair disconnect detection / reconnect loop with backoff for keystore resiliency. [\#1529](https://github.com/holochain/holochain/pull/1529) ## 0.0.52 diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 38966085ae..69b88126ad 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_keystore" -version = "0.0.53-dev.0" +version = "0.0.53" description = "keystore for libsodium keypairs" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13.0" futures = "0.3.23" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46-dev.0"} -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../kitsune_p2p/types" } +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46"} +kitsune_p2p_types = { version = "0.0.31", path = "../kitsune_p2p/types" } must_future = "0.1.2" nanoid = "0.4.0" one_err = "0.0.5" @@ -30,7 +30,7 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. -holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } [dev-dependencies] assert_cmd = "2.0.4" diff --git a/crates/holochain_p2p/CHANGELOG.md b/crates/holochain_p2p/CHANGELOG.md index bb02555229..579fee2888 100644 --- a/crates/holochain_p2p/CHANGELOG.md +++ b/crates/holochain_p2p/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.54 + ## 0.0.53 ## 0.0.52 diff --git a/crates/holochain_p2p/Cargo.toml b/crates/holochain_p2p/Cargo.toml index 4fe795fe7f..9a799dae8e 100644 --- a/crates/holochain_p2p/Cargo.toml +++ b/crates/holochain_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_p2p" -version = "0.0.54-dev.0" +version = "0.0.54" description = "holochain specific wrapper around more generic p2p module" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -17,12 +17,12 @@ fixt = { path = "../fixt", version = "0.0.14"} futures = "0.3" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash" } -holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../kitsune_p2p/types" } +holochain_types = { version = "0.0.54", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.31", path = "../kitsune_p2p/types" } mockall = "0.10.2" observability = "0.1.3" rand = "0.8.5" diff --git a/crates/holochain_sqlite/CHANGELOG.md b/crates/holochain_sqlite/CHANGELOG.md index 47fc12e2ae..dc8033c480 100644 --- a/crates/holochain_sqlite/CHANGELOG.md +++ b/crates/holochain_sqlite/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.52 + ## 0.0.51 ## 0.0.50 diff --git a/crates/holochain_sqlite/Cargo.toml b/crates/holochain_sqlite/Cargo.toml index a9910698db..a8b7a1c493 100644 --- a/crates/holochain_sqlite/Cargo.toml +++ b/crates/holochain_sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_sqlite" -version = "0.0.52-dev.0" +version = "0.0.52" description = "Abstractions for persistence of Holochain state via SQLite" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -25,8 +25,8 @@ fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3.1" holo_hash = { path = "../holo_hash", features = ["rusqlite"], version = "0.0.31"} holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } lazy_static = "1.4.0" once_cell = "1.4.1" must_future = "0.1.1" diff --git a/crates/holochain_state/CHANGELOG.md b/crates/holochain_state/CHANGELOG.md index 85326253f3..9614b62bcf 100644 --- a/crates/holochain_state/CHANGELOG.md +++ b/crates/holochain_state/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.57 + ## 0.0.56 ## 0.0.55 diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index 7aa5847976..6d82fcd09a 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.57-dev.0" +version = "0.0.57" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -13,19 +13,19 @@ byteorder = "1.3.4" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } derive_more = "0.99.3" either = "1.5" -holochain_sqlite = { version = "0.0.52-dev.0", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } fallible-iterator = "0.2.0" futures = "0.3" -holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_p2p = { version = "0.0.54-dev.0", path = "../holochain_p2p" } -holochain_types = { version = "0.0.54-dev.0", path = "../holochain_types" } +holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } +holochain_types = { version = "0.0.54", path = "../holochain_types" } holochain_util = { version = "0.0.11", path = "../holochain_util" } -holochain_zome_types = { version = "0.0.46-dev.0", path = "../holochain_zome_types", features = [ +holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types", features = [ "full", ] } -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } mockall = "0.10.2" one_err = "0.0.5" parking_lot = "0.10" diff --git a/crates/holochain_types/CHANGELOG.md b/crates/holochain_types/CHANGELOG.md index 1c25d136ad..65f07d93dd 100644 --- a/crates/holochain_types/CHANGELOG.md +++ b/crates/holochain_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.54 + ## 0.0.53 ## 0.0.52 diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index e307dce6eb..2f5f4670bf 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_types" -version = "0.0.54-dev.0" +version = "0.0.54" description = "Holochain common types" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -25,12 +25,12 @@ fixt = { path = "../fixt", version = "0.0.14"} flate2 = "1.0.14" futures = "0.3" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["encoding"] } -holochain_keystore = { version = "0.0.53-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.52-dev.0"} -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46-dev.0", features = ["full"] } +holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.52"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46", features = ["full"] } itertools = { version = "0.10" } -kitsune_p2p_dht = { version = "0.0.4-dev.0", path = "../kitsune_p2p/dht" } +kitsune_p2p_dht = { version = "0.0.4", path = "../kitsune_p2p/dht" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { path = "../mr_bundle", features = ["packing"], version = "0.0.15"} diff --git a/crates/holochain_zome_types/CHANGELOG.md b/crates/holochain_zome_types/CHANGELOG.md index 963b199c69..e9d6f643e6 100644 --- a/crates/holochain_zome_types/CHANGELOG.md +++ b/crates/holochain_zome_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased](https://github.com/holochain/holochain/holochain_zome_types-v0.0.2-alpha.1...HEAD) +## 0.0.46 + ## 0.0.45 ## 0.0.44 diff --git a/crates/holochain_zome_types/Cargo.toml b/crates/holochain_zome_types/Cargo.toml index 1842402795..6ffd850e3d 100644 --- a/crates/holochain_zome_types/Cargo.toml +++ b/crates/holochain_zome_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_zome_types" -version = "0.0.46-dev.0" +version = "0.0.46" description = "Holochain zome types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -12,8 +12,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../kitsune_p2p/timestamp" } -holochain_integrity_types = { version = "0.0.17-dev.0", path = "../holochain_integrity_types", features = ["tracing"] } +kitsune_p2p_timestamp = { version = "0.0.13", path = "../kitsune_p2p/timestamp" } +holochain_integrity_types = { version = "0.0.17", path = "../holochain_integrity_types", features = ["tracing"] } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_serialized_bytes = "=0.0.51" paste = "=1.0.5" @@ -36,7 +36,7 @@ num_enum = { version = "0.5", optional = true } # full-dna-def dependencies derive_builder = { version = "0.9", optional = true } -kitsune_p2p_dht = { version = "0.0.4-dev.0", path = "../kitsune_p2p/dht", optional = true } +kitsune_p2p_dht = { version = "0.0.4", path = "../kitsune_p2p/dht", optional = true } nanoid = { version = "0.3", optional = true } shrinkwraprs = { version = "0.3", optional = true } diff --git a/crates/kitsune_p2p/bootstrap/Cargo.toml b/crates/kitsune_p2p/bootstrap/Cargo.toml index 91ee13c336..979725f54b 100644 --- a/crates/kitsune_p2p/bootstrap/Cargo.toml +++ b/crates/kitsune_p2p/bootstrap/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" [dependencies] clap = "=3.1.18" futures = "0.3.15" -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } +kitsune_p2p_types = { version = "0.0.31", path = "../types" } once_cell = "1.7.2" parking_lot = "0.11" rand = "0.8.5" diff --git a/crates/kitsune_p2p/dht/CHANGELOG.md b/crates/kitsune_p2p/dht/CHANGELOG.md index f0ecd24906..d8005dbe49 100644 --- a/crates/kitsune_p2p/dht/CHANGELOG.md +++ b/crates/kitsune_p2p/dht/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.4 + ## 0.0.3 ## 0.0.2 diff --git a/crates/kitsune_p2p/dht/Cargo.toml b/crates/kitsune_p2p/dht/Cargo.toml index 6549aafeb4..3a7a66d598 100644 --- a/crates/kitsune_p2p/dht/Cargo.toml +++ b/crates/kitsune_p2p/dht/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_dht" -version = "0.0.4-dev.0" +version = "0.0.4" description = "Kitsune P2p DHT definition" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -19,7 +19,7 @@ derive_more = "0.99" futures = "0.3" gcollections = "1.5" kitsune_p2p_dht_arc = { version = "0.0.14", path = "../dht_arc"} -kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../timestamp", features = ["now"]} +kitsune_p2p_timestamp = { version = "0.0.13", path = "../timestamp", features = ["now"]} intervallum = "1.4" must_future = "0.1" num-traits = "0.2.14" diff --git a/crates/kitsune_p2p/direct/Cargo.toml b/crates/kitsune_p2p/direct/Cargo.toml index f57ae0f12c..c4c5fb4cc0 100644 --- a/crates/kitsune_p2p/direct/Cargo.toml +++ b/crates/kitsune_p2p/direct/Cargo.toml @@ -19,10 +19,10 @@ hyper = { version = "0.14", features = ["server","http1","http2","tcp"] } if-addrs = "0.6" kitsune_p2p_bootstrap = { version = "0.0.12-dev.0", path = "../bootstrap" } kitsune_p2p_direct_api = { version = "0.0.1", path = "../direct_api" } -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } -kitsune_p2p = { version = "0.0.43-dev.0", path = "../kitsune_p2p", features = ["test_utils"] } -kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.31-dev.0", path = "../proxy" } +kitsune_p2p_types = { version = "0.0.31", path = "../types" } +kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p", features = ["test_utils"] } +kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.31", path = "../proxy" } rand = "0.8.5" serde = { version = "1", features = ["derive", "rc"] } serde_json = { version = "1", features = ["preserve_order"] } diff --git a/crates/kitsune_p2p/direct_test/Cargo.toml b/crates/kitsune_p2p/direct_test/Cargo.toml index 6824db9dc1..36aad9fbf7 100644 --- a/crates/kitsune_p2p/direct_test/Cargo.toml +++ b/crates/kitsune_p2p/direct_test/Cargo.toml @@ -12,8 +12,8 @@ edition = "2021" [dependencies] kitsune_p2p_direct = { version = "0.0.1", path = "../direct" } -kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.31-dev.0", path = "../proxy" } +kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.31", path = "../proxy" } rand = "0.8.5" structopt = "0.3.21" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md index a204d443bb..761cea49fa 100644 --- a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md +++ b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.43 + - Increases all gossip bandwidth rate limits to 10mbps, up from 0.1mbps, allowing for gossip of larger entries - Adds `gossip_burst_ratio` to `KitsuneTuningParams`, allowing tuning of bandwidth bursts - Fixes a bug where a too-large gossip payload could put the rate limiter into an infinite loop diff --git a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml index 76110a1633..3ef6776b9c 100644 --- a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml +++ b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p" -version = "0.0.43-dev.0" +version = "0.0.43" description = "p2p / dht communication framework" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -20,10 +20,10 @@ ghost_actor = "=0.3.0-alpha.4" governor = "0.3.2" itertools = "0.10" kitsune_p2p_mdns = { version = "0.0.3", path = "../mdns" } -kitsune_p2p_proxy = { version = "0.0.31-dev.0", path = "../proxy" } -kitsune_p2p_timestamp = { version = "0.0.13-dev.0", path = "../timestamp", features = ["now"] } -kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } +kitsune_p2p_proxy = { version = "0.0.31", path = "../proxy" } +kitsune_p2p_timestamp = { version = "0.0.13", path = "../timestamp", features = ["now"] } +kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.31", path = "../types" } must_future = "0.1.1" num-traits = "0.2" observability = "0.1.3" diff --git a/crates/kitsune_p2p/proxy/CHANGELOG.md b/crates/kitsune_p2p/proxy/CHANGELOG.md index fb7b3795b5..2cbaac4419 100644 --- a/crates/kitsune_p2p/proxy/CHANGELOG.md +++ b/crates/kitsune_p2p/proxy/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.31 + ## 0.0.30 ## 0.0.29 diff --git a/crates/kitsune_p2p/proxy/Cargo.toml b/crates/kitsune_p2p/proxy/Cargo.toml index 3dc7b1b03e..2119849c70 100644 --- a/crates/kitsune_p2p/proxy/Cargo.toml +++ b/crates/kitsune_p2p/proxy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_proxy" -version = "0.0.31-dev.0" +version = "0.0.31" description = "Proxy transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13" blake2b_simd = "0.5.10" derive_more = "0.99.7" futures = "0.3" -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } -kitsune_p2p_transport_quic = { version = "0.0.31-dev.0", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.31", path = "../types" } +kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } nanoid = "0.3" observability = "0.1.3" parking_lot = "0.11" diff --git a/crates/kitsune_p2p/timestamp/CHANGELOG.md b/crates/kitsune_p2p/timestamp/CHANGELOG.md index b163cdfad0..7f4d1d610b 100644 --- a/crates/kitsune_p2p/timestamp/CHANGELOG.md +++ b/crates/kitsune_p2p/timestamp/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.13 + ## 0.0.12 ## 0.0.11 diff --git a/crates/kitsune_p2p/timestamp/Cargo.toml b/crates/kitsune_p2p/timestamp/Cargo.toml index d6b901a430..2bdb30289a 100644 --- a/crates/kitsune_p2p/timestamp/Cargo.toml +++ b/crates/kitsune_p2p/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_timestamp" -version = "0.0.13-dev.0" +version = "0.0.13" description = "Microsecond-precision timestamp datatype for kitsune_p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/kitsune_p2p/transport_quic/CHANGELOG.md b/crates/kitsune_p2p/transport_quic/CHANGELOG.md index fb7b3795b5..2cbaac4419 100644 --- a/crates/kitsune_p2p/transport_quic/CHANGELOG.md +++ b/crates/kitsune_p2p/transport_quic/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.31 + ## 0.0.30 ## 0.0.29 diff --git a/crates/kitsune_p2p/transport_quic/Cargo.toml b/crates/kitsune_p2p/transport_quic/Cargo.toml index 936bcdd9ef..391a4ab2dc 100644 --- a/crates/kitsune_p2p/transport_quic/Cargo.toml +++ b/crates/kitsune_p2p/transport_quic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_transport_quic" -version = "0.0.31-dev.0" +version = "0.0.31" description = "QUIC transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -14,7 +14,7 @@ edition = "2021" blake2b_simd = "1.0.0" futures = "0.3.21" if-addrs = "0.7.0" -kitsune_p2p_types = { version = "0.0.31-dev.0", path = "../types" } +kitsune_p2p_types = { version = "0.0.31", path = "../types" } nanoid = "0.4.0" once_cell = "1.9.0" quinn = "0.8.1" diff --git a/crates/kitsune_p2p/types/CHANGELOG.md b/crates/kitsune_p2p/types/CHANGELOG.md index ff0fb75fef..413009e17a 100644 --- a/crates/kitsune_p2p/types/CHANGELOG.md +++ b/crates/kitsune_p2p/types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.31 + ## 0.0.30 ## 0.0.29 diff --git a/crates/kitsune_p2p/types/Cargo.toml b/crates/kitsune_p2p/types/Cargo.toml index 770d7b20e6..dd0731de65 100644 --- a/crates/kitsune_p2p/types/Cargo.toml +++ b/crates/kitsune_p2p/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_types" -version = "0.0.31-dev.0" +version = "0.0.31" description = "types subcrate for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -16,7 +16,7 @@ base64 = "0.13" derive_more = "0.99.7" futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -kitsune_p2p_dht = { version = "0.0.4-dev.0", path = "../dht" } +kitsune_p2p_dht = { version = "0.0.4", path = "../dht" } kitsune_p2p_dht_arc = { version = "0.0.14", path = "../dht_arc" } lru = "0.6.5" mockall = { version = "0.10.2", optional = true } diff --git a/crates/test_utils/wasm/CHANGELOG.md b/crates/test_utils/wasm/CHANGELOG.md index 867dccd2c4..c5138dbadd 100644 --- a/crates/test_utils/wasm/CHANGELOG.md +++ b/crates/test_utils/wasm/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.56 + ## 0.0.55 ## 0.0.54 diff --git a/crates/test_utils/wasm/Cargo.toml b/crates/test_utils/wasm/Cargo.toml index a868ab494f..efd64306eb 100644 --- a/crates/test_utils/wasm/Cargo.toml +++ b/crates/test_utils/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wasm_test_utils" -version = "0.0.56-dev.0" +version = "0.0.56" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Utilities for Wasm testing for Holochain" @@ -19,7 +19,7 @@ only_check = [] [dependencies] -holochain_types = { path = "../../holochain_types", version = "0.0.54-dev.0"} +holochain_types = { path = "../../holochain_types", version = "0.0.54"} strum = "0.18.0" strum_macros = "0.18.0" holochain_util = { version = "0.0.11", path = "../../holochain_util" } diff --git a/crates/test_utils/wasm_common/CHANGELOG.md b/crates/test_utils/wasm_common/CHANGELOG.md index 17c0d6a2a0..1e450d78fd 100644 --- a/crates/test_utils/wasm_common/CHANGELOG.md +++ b/crates/test_utils/wasm_common/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.50 + ## 0.0.49 ## 0.0.48 diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index c255d66745..327dc84099 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.50-dev.0" +version = "0.0.50" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.149-dev.0"} +hdk = { path = "../../hdk", version = "0.0.149"} serde = "1.0" From 703185cf8fcc3a12a3539e56b8bc0bcd541b3d1f Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Tue, 6 Sep 2022 22:47:22 -0700 Subject: [PATCH 095/111] Clippy improvement --- crates/kitsune_p2p/dht/src/region_set/ltcs.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs index ce1c2b197d..3e01a2b32a 100644 --- a/crates/kitsune_p2p/dht/src/region_set/ltcs.rs +++ b/crates/kitsune_p2p/dht/src/region_set/ltcs.rs @@ -230,10 +230,8 @@ impl RegionSetLtcs { let d = &self .data .get(a) - .map(|d| d.get(x)) - .flatten() - .map(|d| d.get(y)) - .flatten(); + .and_then(|d| d.get(x)) + .and_then(|d| d.get(y)); d.filter(|d| d.count() > 0) .map(|d| ((a, x, y), c, d.clone())) }) From d711e690f24c17b93ce917a7c10a2d7cf307d0fe Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 22:33:37 +0200 Subject: [PATCH 096/111] fix(release): only restore cargo cache if tests aren't skipped --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43c4850499..78f923b6c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -321,7 +321,7 @@ jobs: - name: Restore cargo related state and build files uses: steveeJ-forks/actions-cache/restore@main - if: ${{ matrix.testCommand.restoresCargoCache == true }} + if: ${{ matrix.testCommand.restoresCargoCache == true && needs.vars.outputs.skip_test != 'true' }} with: path: | /tmp/holochain_repo/.cargo/bin/ From 497170d05a1cbd00fc95772afca1f097ab5799aa Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Wed, 7 Sep 2022 09:24:21 +0200 Subject: [PATCH 097/111] fix(release-automation): fix lockfile updates --- crates/release-automation/src/lib/crate_selection/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/release-automation/src/lib/crate_selection/mod.rs b/crates/release-automation/src/lib/crate_selection/mod.rs index 9e3de35c1d..9335e9d688 100644 --- a/crates/release-automation/src/lib/crate_selection/mod.rs +++ b/crates/release-automation/src/lib/crate_selection/mod.rs @@ -1082,8 +1082,8 @@ impl<'a> ReleaseWorkspace<'a> { vec![ vec!["fetch", "--verbose", "--manifest-path", mp], vec![ - vec!["update", "--offline", "--verbose", "--manifest-path", mp], - vec![if dry_run { "--dry-run" } else { "" }], + vec!["update", "--workspace", "--offline", "--verbose", "--manifest-path", mp], + if dry_run { vec!["--dry-run"] } else { vec![] } ] .concat(), ] From d52c13a2c7aff8cc42489eee1033a9a78873a0ce Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Wed, 7 Sep 2022 09:29:56 +0200 Subject: [PATCH 098/111] fix(ci/github/release-preprare): add wasm_workspace manifest for lockfile update --- .github/workflows/release-prepare.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-prepare.yml b/.github/workflows/release-prepare.yml index 8c43f29b69..ef68df7582 100644 --- a/.github/workflows/release-prepare.yml +++ b/.github/workflows/release-prepare.yml @@ -227,6 +227,7 @@ jobs: --force-tag-creation \ --match-filter="^(holochain|holochain_cli|kitsune_p2p_proxy)$" \ --disallowed-version-reqs=">=0.1" \ + --additional-manifests="crates/test_utils/wasm/wasm_workspace/Cargo.toml" \ --steps=BumpReleaseVersions cargo sweep -f From e9afe94822f9215412e84c5c494e363a62e5b8e6 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 21:43:14 +0200 Subject: [PATCH 099/111] fix(nix): inherit the custom rust version into the local overlay --- default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default.nix b/default.nix index aba46a7711..7a7118f4c2 100644 --- a/default.nix +++ b/default.nix @@ -49,6 +49,8 @@ let cargo = holonix.pkgs.custom_rustc; }; + inherit (self.rustPlatform.rust) rustc cargo; + crate2nix = import sources.crate2nix.outPath { }; cargo-nextest = self.rustPlatform.buildRustPackage { From 281860887798b8e93ed67b64a0a25ca25481f710 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 21:09:10 +0200 Subject: [PATCH 100/111] feat(nix): add hc-regen-nix-expressions script --- nix/pkgs/core.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nix/pkgs/core.nix b/nix/pkgs/core.nix index e9aa8ef5cf..f9f0c6c15c 100644 --- a/nix/pkgs/core.nix +++ b/nix/pkgs/core.nix @@ -255,6 +255,15 @@ rec { hcRegenReadmes = writeShellScriptBin "hc-regen-readmes" '' cargo-readme readme --project-root=crates/release-automation/ --output=README.md; ''; + + hcRegenNixExpressions = writeShellScriptBin "hc-regen-nix-expressions" '' + set -xe + pushd ${hcToplevelDir} + crate2nix generate \ + -f crates/release-automation/Cargo.toml \ + -o crates/release-automation/Cargo.nix + git commit crates/release-automation/Cargo.nix -m "chore: hc-regen-nix-expressions" + ''; } // (if stdenv.isLinux then { hcCoverageTest = writeShellScriptBin "hc-coverage-test" '' set -euxo pipefail From b34ea4b01364e9264481fa964cbf9b8c2032311d Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 10:35:54 +0200 Subject: [PATCH 101/111] feat(ci/github/release-prepare): bump disallowed-version-reqs this is in preparation of the upcoming version bump for `hdi-0.1.0` --- .github/workflows/release-prepare.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-prepare.yml b/.github/workflows/release-prepare.yml index 8c43f29b69..a1693df80e 100644 --- a/.github/workflows/release-prepare.yml +++ b/.github/workflows/release-prepare.yml @@ -226,7 +226,7 @@ jobs: --no-verify-pre \ --force-tag-creation \ --match-filter="^(holochain|holochain_cli|kitsune_p2p_proxy)$" \ - --disallowed-version-reqs=">=0.1" \ + --disallowed-version-reqs=">=0.2" \ --steps=BumpReleaseVersions cargo sweep -f From 7a0781789226c178c7a1fd96c90f63a86c2d5706 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 19:18:49 +0200 Subject: [PATCH 102/111] feat(hdi): mark for minor version bump --- crates/hdi/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index 60262e972c..482ccc678e 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -1,8 +1,13 @@ +--- +semver_increment_mode: minor +--- + # Changelog The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +- Initial minor version bump. This indicates our impression that we have made significant progress towards stabilizing the detereministic integrity layer's API. [\#1550](https://github.com/holochain/holochain/pull/1550) ## 0.0.21 From ee2cc9f1bc488f901ccbc86b14f2ec55490a6979 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 19:17:19 +0200 Subject: [PATCH 103/111] feat(release-automation): support different semver levels increments and reseting the frontmatter --- crates/release-automation/Cargo.lock | 44 +++++- crates/release-automation/Cargo.toml | 5 +- .../release-automation/src/lib/changelog.rs | 141 +++++++++++++++++- crates/release-automation/src/lib/common.rs | 66 ++++++++ crates/release-automation/src/lib/crate_.rs | 9 +- crates/release-automation/src/lib/release.rs | 49 +++--- .../release-automation/src/lib/tests/cli.rs | 41 +++-- .../src/lib/tests/workspace_mocker.rs | 6 +- 8 files changed, 301 insertions(+), 60 deletions(-) diff --git a/crates/release-automation/Cargo.lock b/crates/release-automation/Cargo.lock index eac0bfdef4..99a01fa321 100644 --- a/crates/release-automation/Cargo.lock +++ b/crates/release-automation/Cargo.lock @@ -2113,6 +2113,7 @@ dependencies = [ "serde_yaml", "structopt 0.3.26", "tempfile", + "test-case", "thiserror", "toml_edit", "yaml-rust", @@ -2280,18 +2281,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2 1.0.43", "quote 1.0.21", @@ -2365,14 +2366,15 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.26" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "89f31df3f50926cdf2855da5fd8812295c34752cb20438dae42a67f79e021ac3" dependencies = [ "indexmap", + "itoa 1.0.3", "ryu", "serde", - "yaml-rust", + "unsafe-libyaml", ] [[package]] @@ -2596,6 +2598,28 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" +[[package]] +name = "test-case" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07aea929e9488998b64adc414c29fe5620398f01c2e3f58164122b17e567a6d5" +dependencies = [ + "test-case-macros", +] + +[[package]] +name = "test-case-macros" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c95968eedc6fc4f5c21920e0f4264f78ec5e4c56bb394f319becc1a5830b3e54" +dependencies = [ + "cfg-if", + "proc-macro-error", + "proc-macro2 1.0.43", + "quote 1.0.21", + "syn 1.0.99", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -2839,6 +2863,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "unsafe-libyaml" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931179334a56395bcf64ba5e0ff56781381c1a5832178280c7d7f91d1679aeb0" + [[package]] name = "url" version = "2.2.2" diff --git a/crates/release-automation/Cargo.toml b/crates/release-automation/Cargo.toml index fce1f82293..78fcabdd69 100644 --- a/crates/release-automation/Cargo.toml +++ b/crates/release-automation/Cargo.toml @@ -20,8 +20,8 @@ once_cell = "1.7" anyhow = "1.0" # needs to be in sync with what cargo is using semver = "1.0.3" -serde = "1.0" -serde_yaml = "0.8" +serde = "1.0.144" +serde_yaml = "0.9.11" educe = "0.4" indoc = "1.0" git2 = "0.13" @@ -55,3 +55,4 @@ tempfile = "3" cargo-test-support = { git = "https://github.com/rust-lang/cargo", branch = "rust-1.53.0" } assert_cmd = "1.0" predicates = "1.0" +test-case = "2.2.1" diff --git a/crates/release-automation/src/lib/changelog.rs b/crates/release-automation/src/lib/changelog.rs index e4204e9960..452139f15c 100644 --- a/crates/release-automation/src/lib/changelog.rs +++ b/crates/release-automation/src/lib/changelog.rs @@ -1,3 +1,4 @@ +use crate::common::SemverIncrementMode; use crate::crate_selection::Crate; use crate::release::ReleaseWorkspace; use crate::Fallible; @@ -7,18 +8,25 @@ use comrak::nodes::{AstNode, NodeValue}; use comrak::{format_commonmark, parse_document, Arena, ComrakOptions}; use log::{debug, trace, warn}; use once_cell::unsync::OnceCell; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; use std::io::Write; use std::ops::Add; use std::path::{Path, PathBuf}; use std::{cell::RefCell, convert::TryFrom}; use std::{collections::HashSet, convert::TryInto}; -#[derive(Default, Debug, PartialEq, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Deserialize, Serialize)] pub(crate) struct Frontmatter { + #[serde(skip_serializing_if = "Option::is_none")] unreleasable: Option, - + #[serde(skip_serializing_if = "Option::is_none")] default_unreleasable: Option, + + #[serde(skip_serializing_if = "Option::is_none")] + semver_increment_mode: Option, + #[serde(skip_serializing_if = "Option::is_none")] + default_semver_increment_mode: Option, } impl Frontmatter { @@ -26,6 +34,32 @@ impl Frontmatter { self.unreleasable .unwrap_or_else(|| self.default_unreleasable.unwrap_or_default()) } + + pub(crate) fn semver_increment_mode(&self) -> SemverIncrementMode { + self.semver_increment_mode.clone().unwrap_or_else(|| { + self.default_semver_increment_mode + .clone() + .unwrap_or_default() + }) + } + + pub(crate) fn is_empty(&self) -> bool { + self.unreleasable.is_none() + && self.default_unreleasable.is_none() + && self.semver_increment_mode.is_none() + && self.default_semver_increment_mode.is_none() + } + + /// Remove any non-default values in the frontmatter. + pub(crate) fn reset_to_defaults(&mut self) { + if self.unreleasable.is_some() { + self.unreleasable = None; + } + + if self.semver_increment_mode.is_some() { + self.semver_increment_mode = None; + } + } } /// Trims potential brackets and spaces @@ -424,6 +458,59 @@ impl<'a> ChangelogT<'a, CrateChangelog> { format_commonmark(root, self.options(), &mut buf).unwrap(); let mut output_file = std::fs::File::create(&self.path())?; output_file.write_all(&buf)?; + output_file.flush()?; + + Ok(()) + } + + fn erase_front_matter(&'a self, write_file: bool) -> Fallible { + let frontmatter_re = regex::Regex::new(r"(?ms)^---$.*^---$\w*").unwrap(); + let cl = sanitize(std::fs::read_to_string(self.path())?); + + let cl_edited = sanitize(frontmatter_re.replace(&cl, "").to_string()); + + if write_file { + std::fs::File::create(&self.path())?.write_all(cl_edited.as_bytes())?; + } + + trace!("changelog without fm:\n{}", cl_edited); + + Ok(cl_edited) + } + + /// Writes the given Frontmatter back to the changelog file + fn set_front_matter(&'a self, fm: &Frontmatter) -> Fallible<()> { + let cl_str = if self.front_matter()?.is_some() { + self.erase_front_matter(false)? + } else { + std::fs::read_to_string(self.path())? + }; + + let cl_final = sanitize(if fm.is_empty() { + cl_str + } else { + let fm_str = serde_yaml::to_string(&fm)?; + trace!("new frontmatter:\n{}", fm_str); + indoc::formatdoc!("---\n{}---\n\n{}", fm_str, cl_str) + }); + + trace!("new changelog:\n{}", cl_final); + + std::fs::File::create(&self.path())?.write_all(cl_final.as_bytes())?; + + Ok(()) + } + + /// Calls `Frontmatter::reset_to_defaults` + pub(crate) fn reset_front_matter_to_defaults(&'a self) -> Fallible<()> { + if let Some(fm) = self.front_matter()? { + let mut fm_reset = fm.clone(); + fm_reset.reset_to_defaults(); + + if fm != fm_reset { + return self.set_front_matter(&fm_reset); + } + } Ok(()) } @@ -1079,7 +1166,7 @@ mod tests { fn empty_frontmatter() { let workspace_mocker = example_workspace_1().unwrap(); let changelog = ChangelogT::::at_path( - &workspace_mocker.root().join("crates/crate_a/CHANGELOG.md"), + &workspace_mocker.root().join("crates/crate_b/CHANGELOG.md"), ); let fm: Result, String> = changelog.front_matter().map_err(|e| e.to_string()); @@ -1091,7 +1178,7 @@ mod tests { fn no_frontmatter() { let workspace_mocker = example_workspace_1().unwrap(); let changelog = ChangelogT::::at_path( - &workspace_mocker.root().join("crates/crate_b/CHANGELOG.md"), + &workspace_mocker.root().join("crates/crate_e/CHANGELOG.md"), ); let fm: Result, String> = changelog.front_matter().map_err(|e| e.to_string()); @@ -1112,6 +1199,7 @@ mod tests { Ok(Some(Frontmatter { unreleasable: Some(true), default_unreleasable: Some(true), + ..Default::default() })), fm ); @@ -1140,7 +1228,7 @@ mod tests { ); } - /// mock a release for crate_e and crate_f and the workspace, we expect these + /// mock a release for crate_c and crate_e and the workspace, we expect the releasable /// crates to be removed from the Unreleased heading when aggregating the /// changelog. #[test] @@ -1358,4 +1446,45 @@ mod tests { changes ); } + + use test_case::test_case; + + #[test_case(Frontmatter::default(), SemverIncrementMode::default())] + #[test_case(Frontmatter{ semver_increment_mode: None, ..Default::default()}, SemverIncrementMode::default())] + #[test_case(Frontmatter{ semver_increment_mode: Some(SemverIncrementMode::Minor), ..Default::default()}, SemverIncrementMode::Minor)] + #[test_case(Frontmatter{ default_semver_increment_mode: Some(SemverIncrementMode::Minor), ..Default::default()}, SemverIncrementMode::Minor)] + fn semver_increment_mode_getter(fm: Frontmatter, expected: SemverIncrementMode) { + assert_eq!(fm.semver_increment_mode(), expected) + } + + #[test] + fn crate_changelog_reset_front_matter() { + let workspace_mocker = example_workspace_1().unwrap(); + + let read_changelog = move || -> ChangelogT { + ChangelogT::::at_path( + &workspace_mocker.root().join("crates/crate_a/CHANGELOG.md"), + ) + }; + + let cl = read_changelog(); + let fm_orig = cl.front_matter().unwrap().expect("expected fm initially"); + + assert!( + fm_orig.semver_increment_mode.is_some(), + "expect semver_increment_mode initially" + ); + + cl.reset_front_matter_to_defaults().unwrap(); + + let cl = read_changelog(); + let fm_new_readback = cl.front_matter().unwrap().unwrap(); + + let fm_new_expected = Frontmatter { + semver_increment_mode: None, + + ..fm_orig + }; + assert_eq!(fm_new_expected, fm_new_readback); + } } diff --git a/crates/release-automation/src/lib/common.rs b/crates/release-automation/src/lib/common.rs index 60acbf258f..a7c810f819 100644 --- a/crates/release-automation/src/lib/common.rs +++ b/crates/release-automation/src/lib/common.rs @@ -4,6 +4,7 @@ use std::{ }; use semver::VersionReq; +use serde::{Deserialize, Serialize}; use super::*; @@ -137,3 +138,68 @@ fn load_from_file(path: &Path) -> Fallible { file.read_to_string(&mut s)?; Ok(s) } + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(rename_all = "lowercase")] +pub(crate) enum SemverIncrementMode { + Major, + Minor, + Patch, +} + +impl Default for SemverIncrementMode { + fn default() -> Self { + Self::Patch + } +} + +/// Increment the given Version according to the given `SemVerIncrementMode`. +pub(crate) fn increment_semver(v: &mut semver::Version, mode: SemverIncrementMode) { + match mode { + SemverIncrementMode::Major => { + v.major += 1; + v.minor = 0; + v.patch = 0; + } + SemverIncrementMode::Minor => { + v.minor += 1; + v.patch = 0; + } + SemverIncrementMode::Patch => { + v.patch += 1; + } + } + + v.pre = semver::Prerelease::EMPTY; + v.build = semver::BuildMetadata::EMPTY; +} + +#[cfg(test)] +mod test { + use test_case::test_case; + + use crate::common::{ + increment_semver, + SemverIncrementMode::{self, *}, + }; + + #[test_case("0.0.1", "0.0.2", Patch; "patch version bump")] + #[test_case("0.0.1", "0.1.0", Minor; "minor version bump")] + #[test_case("0.0.1", "1.0.0", Major; "major version bump")] + #[test_case("0.0.1-dev.0", "0.0.2", Patch; "patch version bump from pre-release")] + #[test_case("0.0.1-dev.0", "0.1.0", Minor; "minor version bump from pre-release")] + #[test_case("0.0.1-dev.0", "1.0.0", Major; "major version bump from pre-release")] + #[test_case("0.1.1-dev.0", "0.2.0", Minor; "non-zero minor version bump from pre-release")] + #[test_case("1.0.1-dev.0", "2.0.0", Major; "non-zero major version bump from pre-release")] + fn increment_semver_consistency( + input_version: &str, + expected_version: &str, + increment_mode: SemverIncrementMode, + ) { + let mut working_version = semver::Version::parse(input_version).unwrap(); + increment_semver(&mut working_version, increment_mode); + + let expected_version = semver::Version::parse(expected_version).unwrap(); + assert_eq!(expected_version, working_version); + } +} diff --git a/crates/release-automation/src/lib/crate_.rs b/crates/release-automation/src/lib/crate_.rs index 4430e5faf5..db742f1d88 100644 --- a/crates/release-automation/src/lib/crate_.rs +++ b/crates/release-automation/src/lib/crate_.rs @@ -9,6 +9,7 @@ use std::collections::{HashMap, HashSet}; use structopt::StructOpt; use crate::{ + common::{increment_semver, SemverIncrementMode}, crate_selection::Crate, release::{crates_index_helper, ReleaseWorkspace}, CommandResult, Fallible, @@ -399,7 +400,7 @@ pub(crate) fn apply_dev_vesrions_to_selection<'a>( continue; } - increment_patch(&mut version); + increment_semver(&mut version, SemverIncrementMode::Patch); version = semver::Version::parse(&format!("{}-{}", version, dev_suffix))?; debug!( @@ -426,12 +427,6 @@ pub(crate) fn apply_dev_vesrions_to_selection<'a>( Ok(msg) } -pub(crate) fn increment_patch(v: &mut semver::Version) { - v.patch += 1; - v.pre = semver::Prerelease::EMPTY; - v.build = semver::BuildMetadata::EMPTY; -} - pub(crate) fn fixup_unpublished_releases<'a>( ws: &'a ReleaseWorkspace<'a>, dev_suffix: &str, diff --git a/crates/release-automation/src/lib/release.rs b/crates/release-automation/src/lib/release.rs index 91ce50b442..f856681a86 100644 --- a/crates/release-automation/src/lib/release.rs +++ b/crates/release-automation/src/lib/release.rs @@ -28,11 +28,12 @@ use std::{ }; use structopt::StructOpt; -use crate::changelog::{Changelog, WorkspaceCrateReleaseHeading}; -use crate::crate_::ensure_crate_io_owners; -use crate::crate_::increment_patch; -use crate::crate_selection::ensure_release_order_consistency; -use crate::crate_selection::Crate; +use crate::{ + changelog::{Changelog, WorkspaceCrateReleaseHeading}, + common::{increment_semver, SemverIncrementMode}, + crate_::ensure_crate_io_owners, + crate_selection::{ensure_release_order_consistency, Crate}, +}; pub(crate) use crate_selection::{ReleaseWorkspace, SelectionCriteria}; const TARGET_DIR_SUFFIX: &str = "target/release_automation"; @@ -194,18 +195,23 @@ fn bump_release_versions<'a>( for crt in &selection { let current_version = crt.version(); - let maybe_previous_release_version = crt - .changelog() - .ok_or_else(|| { - anyhow::anyhow!( - "[{}] cannot determine most recent release: missing changelog", - crt.name() - ) - })? + let changelog = crt.changelog().ok_or_else(|| { + anyhow::anyhow!( + "[{}] cannot determine most recent release: missing changelog", + crt.name() + ) + })?; + + let maybe_previous_release_version = changelog .topmost_release()? .map(|change| semver::Version::parse(change.title())) .transpose()?; + let maybe_semver_increment_mode = changelog + .front_matter()? + .map(|fm| fm.semver_increment_mode()); + let semver_increment_mode = maybe_semver_increment_mode.unwrap_or_default(); + let release_version = if let Some(mut previous_release_version) = maybe_previous_release_version.clone() { @@ -213,8 +219,7 @@ fn bump_release_versions<'a>( bail!("previously documented release version '{}' is greater than this release version '{}'", previous_release_version, current_version); } - // todo(backlog): support configurable major/minor/patch/rc? version bumps - increment_patch(&mut previous_release_version); + increment_semver(&mut previous_release_version, semver_increment_mode); previous_release_version } else { @@ -222,8 +227,7 @@ fn bump_release_versions<'a>( let mut new_version = current_version.clone(); if new_version.is_prerelease() { - // todo(backlog): support configurable major/minor/patch/rc? version bumps - increment_patch(&mut new_version); + increment_semver(&mut new_version, semver_increment_mode); } new_version @@ -247,10 +251,6 @@ fn bump_release_versions<'a>( if maybe_previous_release_version.is_none() || greater_release { // create a new release entry in the crate's changelog and move all items from the unreleased heading if there are any - let changelog = crt - .changelog() - .ok_or_else(|| anyhow::anyhow!("{} doesn't have changelog", crt.name()))?; - debug!( "[{}] creating crate release heading '{}' in '{:?}'", crt.name(), @@ -262,6 +262,13 @@ fn bump_release_versions<'a>( changelog .add_release(crate_release_heading_name.clone()) .context(format!("adding release to changelog for '{}'", crt.name()))?; + + // FIXME: now we should reread the whole thing? + + if greater_release { + // rewrite frontmatter to reset it to its defaults + changelog.reset_front_matter_to_defaults()?; + } } changed_crate_changelogs.push(WorkspaceCrateReleaseHeading { diff --git a/crates/release-automation/src/lib/tests/cli.rs b/crates/release-automation/src/lib/tests/cli.rs index d97faadf46..a987059213 100644 --- a/crates/release-automation/src/lib/tests/cli.rs +++ b/crates/release-automation/src/lib/tests/cli.rs @@ -125,19 +125,18 @@ fn bump_versions_on_selection() { "--cargo-target-dir={}", workspace.root().join("target").display() ), - "--disallowed-version-reqs=>=0.1", + "--disallowed-version-reqs=>=0.2", "--allowed-matched-blockers=UnreleasableViaChangelogFrontmatter,DisallowedVersionReqViolated", "--steps=CreateReleaseBranch,BumpReleaseVersions", "--allowed-missing-dependencies=crate_b", - ]) - ; + ]); let output = assert_cmd_success!(cmd); println!("stderr:\n'{}'\n---\nstdout:\n'{}'\n---", output.0, output.1,); // set expectations let expected_crates = vec!["crate_b", "crate_a", "crate_e"]; - let expected_release_versions = vec!["0.0.1", "0.0.2", "0.0.1"]; + let expected_release_versions = vec!["0.0.1", "0.1.0", "0.0.1"]; // check manifests for new release headings assert_eq!( @@ -242,7 +241,7 @@ fn bump_versions_on_selection() { Awesome changes\! - ## [crate_a-0.0.2](crates/crate_a/CHANGELOG.md#0.0.2) + ## [crate_a-0.1.0](crates/crate_a/CHANGELOG.md#0.1.0) ### Added @@ -303,7 +302,7 @@ fn bump_versions_on_selection() { the following crates are part of this release: - crate_b-0.0.1 - - crate_a-0.0.2 + - crate_a-0.1.0 - crate_e-0.0.1 "#, topmost_workspace_release @@ -505,7 +504,7 @@ fn multiple_subsequent_releases() { ( // bump the first time as they're initially released // vec!["0.0.2-dev.0", "0.0.3-dev.0", "0.0.2-dev.0"], - vec!["0.0.1", "0.0.2", "0.0.1"], + vec!["0.0.1", "0.1.0", "0.0.1"], vec!["crate_b", "crate_a", "crate_e"], // allowed missing dependencies Vec::<&str>::new(), @@ -515,7 +514,7 @@ fn multiple_subsequent_releases() { ( // should not bump the second time without making any changes // vec!["0.0.2-dev.0", "0.0.3-dev.0", "0.0.2-dev.0"], - vec!["0.0.1", "0.0.2", "0.0.1"], + vec!["0.0.1", "0.1.0", "0.0.1"], vec!["crate_b", "crate_a", "crate_e"], // allowed missing dependencies Vec::<&str>::new(), @@ -524,7 +523,7 @@ fn multiple_subsequent_releases() { ), ( // only crate_a and crate_e have changed, expect these to be bumped - vec!["0.0.1", "0.0.3", "0.0.2"], + vec!["0.0.1", "0.1.1", "0.0.2"], vec!["crate_b", "crate_a", "crate_e"], // crate_b won't be part of the release so we allow it to be missing as we're not publishing vec!["crate_b"], @@ -550,7 +549,7 @@ fn multiple_subsequent_releases() { ), ( // change crate_b, and as crate_a depends on crate_b it'll be bumped as well - vec!["0.0.2", "0.0.4", "0.0.2"], + vec!["0.0.2", "0.1.2", "0.0.2"], vec!["crate_b", "crate_a", "crate_e"], // allowed missing dependencies vec![], @@ -612,16 +611,22 @@ fn multiple_subsequent_releases() { let mut cmd = assert_cmd::Command::cargo_bin("release-automation").unwrap(); let cmd = cmd.args(&[ &format!("--workspace-path={}", workspace.root().display()), - "--log-level=debug", + "--log-level=trace", "release", - &format!("--cargo-target-dir={}", workspace.root().join("target").display()), - "--disallowed-version-reqs=>=0.1", - "--allowed-matched-blockers=UnreleasableViaChangelogFrontmatter,DisallowedVersionReqViolated", + &format!( + "--cargo-target-dir={}", + workspace.root().join("target").display() + ), + "--disallowed-version-reqs=>=0.2", + "--match-filter=crate_(a|b|e)", + "--allowed-matched-blockers=UnreleasableViaChangelogFrontmatter", "--steps=CreateReleaseBranch,BumpReleaseVersions", &format!( "--allowed-missing-dependencies={}", - allowed_missing_dependencies.iter().fold("".to_string(), |acc, cur|{ acc + "," + *cur }) - ) + allowed_missing_dependencies + .iter() + .fold("".to_string(), |acc, cur| { acc + "," + *cur }) + ), ]); let output = assert_cmd_success!(cmd); println!("stderr:\n'{}'\n---\nstdout:\n'{}'\n---", output.0, output.1,); @@ -699,6 +704,10 @@ fn multiple_subsequent_releases() { // todo: change to other branch name generator? std::thread::sleep(std::time::Duration::new(1, 0)); } + + if matches!(option_env!("FAIL_CLI_RELEASE_TEST"), Some(_)) { + panic!("workspace root: {:?}", workspace_mocker.root()); + } } #[test] diff --git a/crates/release-automation/src/lib/tests/workspace_mocker.rs b/crates/release-automation/src/lib/tests/workspace_mocker.rs index 0435144438..af6ecd864a 100644 --- a/crates/release-automation/src/lib/tests/workspace_mocker.rs +++ b/crates/release-automation/src/lib/tests/workspace_mocker.rs @@ -336,6 +336,8 @@ pub(crate) fn example_workspace_1<'a>() -> Fallible { indoc::indoc!( r#" --- + semver_increment_mode: minor + default_semver_increment_mode: patch --- # Changelog @@ -373,6 +375,8 @@ pub(crate) fn example_workspace_1<'a>() -> Fallible { ty: workspace_mocker::MockProjectType::Lib, changelog: Some(indoc::formatdoc!( r#" + --- + --- # Changelog The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). @@ -444,7 +448,7 @@ pub(crate) fn example_workspace_1<'a>() -> Fallible { }, MockProject { name: "crate_f".to_string(), - version: "0.1.0".to_string(), + version: "0.2.0".to_string(), dependencies: vec![], excluded: false, ty: workspace_mocker::MockProjectType::Lib, From ac5569371c94f0b0f3c7bf43c32ee8fdc362093c Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 6 Sep 2022 21:10:11 +0200 Subject: [PATCH 104/111] chore: hc-regen-nix-expressions --- crates/release-automation/Cargo.nix | 2656 ++++++++++++++++++++------- 1 file changed, 2013 insertions(+), 643 deletions(-) diff --git a/crates/release-automation/Cargo.nix b/crates/release-automation/Cargo.nix index adfb24ac7d..9e64453b13 100644 --- a/crates/release-automation/Cargo.nix +++ b/crates/release-automation/Cargo.nix @@ -1,6 +1,6 @@ # This file was @generated by crate2nix 0.10.0 with the command: -# "generate" +# "generate" "-f" "crates/release-automation/Cargo.toml" "-o" "crates/release-automation/Cargo.nix" # See https://github.com/kolloch/crate2nix for more info. { nixpkgs ? @@ -101,8 +101,16 @@ rec { } ]; features = { + "alloc" = [ "dep:alloc" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "cpp_demangle" = [ "dep:cpp_demangle" ]; "default" = [ "rustc-demangle" "cpp_demangle" "std-object" "fallible-iterator" "smallvec" ]; + "fallible-iterator" = [ "dep:fallible-iterator" ]; + "object" = [ "dep:object" ]; + "rustc-demangle" = [ "dep:rustc-demangle" ]; "rustc-dep-of-std" = [ "core" "alloc" "compiler_builtins" "gimli/rustc-dep-of-std" ]; + "smallvec" = [ "dep:smallvec" ]; "std" = [ "gimli/std" ]; "std-object" = [ "std" "object" "object/std" "object/compression" "gimli/endian-reader" ]; }; @@ -116,6 +124,8 @@ rec { "Jonas Schievink " ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "default" = [ "std" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; }; @@ -142,6 +152,22 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; + "android_system_properties" = rec { + crateName = "android_system_properties"; + version = "0.1.4"; + edition = "2018"; + sha256 = "17mahdmxq7gq6qyibpjhprcdl8mgh815884lwyiiq4jycghp5vfp"; + authors = [ + "Nicolas Silva " + ]; + dependencies = [ + { + name = "libc"; + packageId = "libc"; + } + ]; + + }; "ansi_term 0.12.1" = rec { crateName = "ansi_term"; version = "0.12.1"; @@ -162,6 +188,7 @@ rec { ]; features = { "derive_serde_style" = [ "serde" ]; + "serde" = [ "dep:serde" ]; }; }; "ansi_term 0.9.0" = rec { @@ -177,13 +204,14 @@ rec { }; "anyhow" = rec { crateName = "anyhow"; - version = "1.0.53"; + version = "1.0.62"; edition = "2018"; - sha256 = "1q06xg4jn4lpad7lj1af28x5xdwymgl1k820zj2nnrhlbi2mp94l"; + sha256 = "01fk28gm3yyhzmp7rn69hx1r19gsjrf02rrpxq0v5rs5rk9d918l"; authors = [ "David Tolnay " ]; features = { + "backtrace" = [ "dep:backtrace" ]; "default" = [ "std" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; @@ -208,6 +236,7 @@ rec { ]; features = { "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; }; }; "assert_cmd" = rec { @@ -231,7 +260,7 @@ rec { } { name = "predicates"; - packageId = "predicates 2.0.3"; + packageId = "predicates 2.1.1"; usesDefaultFeatures = false; features = [ "diff" ]; } @@ -291,9 +320,9 @@ rec { }; "backtrace" = rec { crateName = "backtrace"; - version = "0.3.64"; + version = "0.3.66"; edition = "2018"; - sha256 = "07y3z67h9mybdw4l1cjrlqw3ng7h7m4y374d4jmk7ki3h3p1s4jy"; + sha256 = "19yrfx0gprqmzphmf6qv32g93w76ny5g751ks1abdkqnsqcl7f6a"; authors = [ "The Rust Project Developers" ]; @@ -335,10 +364,14 @@ rec { } ]; features = { + "cpp_demangle" = [ "dep:cpp_demangle" ]; "default" = [ "std" ]; + "rustc-serialize" = [ "dep:rustc-serialize" ]; + "serde" = [ "dep:serde" ]; "serialize-rustc" = [ "rustc-serialize" ]; "serialize-serde" = [ "serde" ]; "verify-winapi" = [ "winapi/dbghelp" "winapi/handleapi" "winapi/libloaderapi" "winapi/memoryapi" "winapi/minwindef" "winapi/processthreadsapi" "winapi/synchapi" "winapi/tlhelp32" "winapi/winbase" "winapi/winnt" ]; + "winapi" = [ "dep:winapi" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; @@ -358,9 +391,9 @@ rec { }; "bit-set" = rec { crateName = "bit-set"; - version = "0.5.2"; + version = "0.5.3"; edition = "2015"; - sha256 = "1pjrmpsnad5ipwjsv8ppi0qrhqvgpyn3wfbvk7jy8dga6mhf24bf"; + sha256 = "1wcm9vxi00ma4rcxkl3pzzjli6ihrpn9cfdi0c5b4cvga2mxs007"; authors = [ "Alexis Beingessner " ]; @@ -387,6 +420,7 @@ rec { ]; features = { "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; "serde_no_std" = [ "serde/alloc" ]; "serde_std" = [ "std" "serde/std" ]; }; @@ -401,6 +435,8 @@ rec { "The Rust Project Developers" ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; }; resolvedDefaultFeatures = [ "default" ]; @@ -454,48 +490,19 @@ rec { }; "block-buffer" = rec { crateName = "block-buffer"; - version = "0.7.3"; - edition = "2015"; - sha256 = "12v8wizynqin0hqf140kmp9s38q223mp1b0hkqk8j5pk8720v560"; + version = "0.10.2"; + edition = "2018"; + sha256 = "097k9xkd8gqrl03qg4fwhjvanp3ac0pq4drg8pynk9cyhi8zxxqb"; authors = [ "RustCrypto Developers" ]; dependencies = [ - { - name = "block-padding"; - packageId = "block-padding"; - } - { - name = "byte-tools"; - packageId = "byte-tools"; - } - { - name = "byteorder"; - packageId = "byteorder"; - usesDefaultFeatures = false; - } { name = "generic-array"; packageId = "generic-array"; } ]; - }; - "block-padding" = rec { - crateName = "block-padding"; - version = "0.1.5"; - edition = "2015"; - sha256 = "1xbkmysiz23vimd17rnsjpw9bgjxipwfslwyygqlkx4in3dxwygs"; - authors = [ - "RustCrypto Developers" - ]; - dependencies = [ - { - name = "byte-tools"; - packageId = "byte-tools"; - } - ]; - }; "bstr" = rec { crateName = "bstr"; @@ -531,6 +538,9 @@ rec { ]; features = { "default" = [ "std" "unicode" ]; + "lazy_static" = [ "dep:lazy_static" ]; + "regex-automata" = [ "dep:regex-automata" ]; + "serde" = [ "dep:serde" ]; "serde1" = [ "std" "serde1-nostd" "serde/std" ]; "serde1-nostd" = [ "serde" ]; "std" = [ "memchr/std" ]; @@ -540,9 +550,9 @@ rec { }; "bumpalo" = rec { crateName = "bumpalo"; - version = "3.7.1"; - edition = "2018"; - sha256 = "0f55q7915m5dx5cgn5cli72z0gk18nf2757rd63lky4ypzvngpyr"; + version = "3.11.0"; + edition = "2021"; + sha256 = "0pcfy89hpmixns4qqd4swbhsnvn3mkah0w229wijq3fj30hq5bf1"; authors = [ "Nick Fitzgerald " ]; @@ -550,16 +560,6 @@ rec { }; resolvedDefaultFeatures = [ "default" ]; }; - "byte-tools" = rec { - crateName = "byte-tools"; - version = "0.3.1"; - edition = "2015"; - sha256 = "1mqi29wsm8njpl51pfwr31wmpzs5ahlcb40wsjyd92l90ixcmdg3"; - authors = [ - "RustCrypto Developers" - ]; - - }; "byteorder" = rec { crateName = "byteorder"; version = "1.4.3"; @@ -575,15 +575,16 @@ rec { }; "bytes" = rec { crateName = "bytes"; - version = "1.1.0"; + version = "1.2.1"; edition = "2018"; - sha256 = "1y70b249m02lfp0j6565b29kviapj4xsl9whamcqwddnp9kjv1y4"; + sha256 = "1nsni0jbx1048inbrarn3hz6zxd000pp0rac2mr07s7xf1m7p2pc"; authors = [ "Carl Lerche " "Sean McArthur " ]; features = { "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; @@ -595,7 +596,9 @@ rec { authors = [ "Hyunsik Choi " ]; - + features = { + "serde" = [ "dep:serde" ]; + }; }; "cargo" = rec { crateName = "cargo"; @@ -628,7 +631,7 @@ rec { } { name = "cargo-util"; - packageId = "cargo-util 0.1.1"; + packageId = "cargo-util 0.1.2"; } { name = "clap"; @@ -808,7 +811,7 @@ rec { } { name = "unicode-xid"; - packageId = "unicode-xid 0.2.2"; + packageId = "unicode-xid 0.2.3"; } { name = "url"; @@ -839,7 +842,9 @@ rec { } ]; features = { + "openssl" = [ "dep:openssl" ]; "pretty-env-logger" = [ "pretty_env_logger" ]; + "pretty_env_logger" = [ "dep:pretty_env_logger" ]; "vendored-openssl" = [ "openssl/vendored" ]; }; }; @@ -1051,14 +1056,11 @@ rec { ]; }; - "cargo-util 0.1.1" = rec { + "cargo-util 0.1.2" = rec { crateName = "cargo-util"; - version = "0.1.1"; - edition = "2018"; - sha256 = "1szsqx6n9lvvpfnppw9xiah0d5mg8x80i5s17kv25q6lg8zn7gzj"; - authors = [ - "The Cargo Project Developers" - ]; + version = "0.1.2"; + edition = "2021"; + sha256 = "1sz0gzcyp9ycb4zwj69qs9gd8kn9hv9nh2dq42c59x5xccqph755"; dependencies = [ { name = "anyhow"; @@ -1126,10 +1128,10 @@ rec { }; "cc" = rec { crateName = "cc"; - version = "1.0.72"; + version = "1.0.73"; edition = "2018"; crateBin = []; - sha256 = "1vl50h2qh0nh0iddzj6gd1pnxnxpvwmbfxc30578c1pajmxi7a92"; + sha256 = "04ccylrjq94jssh8f7d7hxv64gs9f1m1jrsxb7wqgfxk4xljmzrg"; authors = [ "Alex Crichton " ]; @@ -1141,6 +1143,7 @@ rec { } ]; features = { + "jobserver" = [ "dep:jobserver" ]; "parallel" = [ "jobserver" ]; }; resolvedDefaultFeatures = [ "jobserver" "parallel" ]; @@ -1154,23 +1157,28 @@ rec { "Alex Crichton " ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; }; }; "chrono" = rec { crateName = "chrono"; - version = "0.4.19"; - edition = "2015"; - sha256 = "0wyfl6c00vhfl562spnfcna3zkw8jqvcp652m9iskhl8j26dc2k7"; - authors = [ - "Kang Seonghoon " - "Brandon W Maister " - ]; + version = "0.4.22"; + edition = "2018"; + sha256 = "1w8ykn9gay819zdwrsz353px580x279xxnrlg6fsi8xa3yrx3m5z"; dependencies = [ { - name = "libc"; - packageId = "libc"; + name = "iana-time-zone"; + packageId = "iana-time-zone"; + optional = true; + features = [ "fallback" ]; + } + { + name = "js-sys"; + packageId = "js-sys"; optional = true; + target = { target, features }: ((target."arch" == "wasm32") && (!((target."os" == "emscripten") || (target."os" == "wasi")))); } { name = "num-integer"; @@ -1193,6 +1201,12 @@ rec { packageId = "time"; optional = true; } + { + name = "wasm-bindgen"; + packageId = "wasm-bindgen"; + optional = true; + target = { target, features }: ((target."arch" == "wasm32") && (!((target."os" == "emscripten") || (target."os" == "wasi")))); + } { name = "winapi"; packageId = "winapi"; @@ -1202,13 +1216,24 @@ rec { } ]; features = { - "clock" = [ "libc" "std" "winapi" ]; - "default" = [ "clock" "std" "oldtime" ]; + "__internal_bench" = [ "criterion" ]; + "clock" = [ "std" "winapi" "iana-time-zone" ]; + "criterion" = [ "dep:criterion" ]; + "default" = [ "clock" "std" "oldtime" "wasmbind" ]; + "iana-time-zone" = [ "dep:iana-time-zone" ]; + "js-sys" = [ "dep:js-sys" ]; "oldtime" = [ "time" ]; + "pure-rust-locales" = [ "dep:pure-rust-locales" ]; + "rkyv" = [ "dep:rkyv" ]; + "rustc-serialize" = [ "dep:rustc-serialize" ]; + "serde" = [ "dep:serde" ]; + "time" = [ "dep:time" ]; "unstable-locales" = [ "pure-rust-locales" "alloc" ]; + "wasm-bindgen" = [ "dep:wasm-bindgen" ]; "wasmbind" = [ "wasm-bindgen" "js-sys" ]; + "winapi" = [ "dep:winapi" ]; }; - resolvedDefaultFeatures = [ "clock" "default" "libc" "oldtime" "serde" "std" "time" "winapi" ]; + resolvedDefaultFeatures = [ "clock" "default" "iana-time-zone" "js-sys" "oldtime" "serde" "std" "time" "wasm-bindgen" "wasmbind" "winapi" ]; }; "clap" = rec { crateName = "clap"; @@ -1254,20 +1279,27 @@ rec { } ]; features = { + "ansi_term" = [ "dep:ansi_term" ]; + "atty" = [ "dep:atty" ]; + "clippy" = [ "dep:clippy" ]; "color" = [ "ansi_term" "atty" ]; "default" = [ "suggestions" "color" "vec_map" ]; "doc" = [ "yaml" ]; + "strsim" = [ "dep:strsim" ]; "suggestions" = [ "strsim" ]; + "term_size" = [ "dep:term_size" ]; + "vec_map" = [ "dep:vec_map" ]; "wrap_help" = [ "term_size" "textwrap/term_size" ]; "yaml" = [ "yaml-rust" ]; + "yaml-rust" = [ "dep:yaml-rust" ]; }; resolvedDefaultFeatures = [ "ansi_term" "atty" "color" "default" "strsim" "suggestions" "vec_map" ]; }; "combine" = rec { crateName = "combine"; - version = "4.6.3"; + version = "4.6.6"; edition = "2018"; - sha256 = "0qihymj493vvs054gzpcmp4lzb098zrj2p9miv19yzvrrjm2gdsh"; + sha256 = "1m7s43cpi36vihmlda217xxgsdni3pbwgwfsa9zimdghhjfnxv9m"; authors = [ "Markus Westerlind " ]; @@ -1290,13 +1322,23 @@ rec { } ]; features = { + "bytes" = [ "dep:bytes" ]; + "bytes_05" = [ "dep:bytes_05" ]; "default" = [ "std" ]; "futures-03" = [ "pin-project" "std" "futures-core-03" "futures-io-03" "pin-project-lite" ]; + "futures-core-03" = [ "dep:futures-core-03" ]; + "futures-io-03" = [ "dep:futures-io-03" ]; "pin-project" = [ "pin-project-lite" ]; - "std" = [ "memchr/use_std" "bytes" "alloc" ]; + "pin-project-lite" = [ "dep:pin-project-lite" ]; + "regex" = [ "dep:regex" ]; + "std" = [ "memchr/std" "bytes" "alloc" ]; "tokio" = [ "tokio-dep" "tokio-util/io" "futures-core-03" "pin-project-lite" ]; "tokio-02" = [ "pin-project" "std" "tokio-02-dep" "futures-core-03" "pin-project-lite" "bytes_05" ]; + "tokio-02-dep" = [ "dep:tokio-02-dep" ]; "tokio-03" = [ "pin-project" "std" "tokio-03-dep" "futures-core-03" "pin-project-lite" ]; + "tokio-03-dep" = [ "dep:tokio-03-dep" ]; + "tokio-dep" = [ "dep:tokio-dep" ]; + "tokio-util" = [ "dep:tokio-util" ]; }; resolvedDefaultFeatures = [ "alloc" "bytes" "default" "std" ]; }; @@ -1315,6 +1357,7 @@ rec { } ]; features = { + "clippy" = [ "dep:clippy" ]; "lint" = [ "clippy" ]; }; }; @@ -1333,6 +1376,7 @@ rec { } ]; features = { + "clippy" = [ "dep:clippy" ]; "lint" = [ "clippy" ]; }; }; @@ -1394,6 +1438,7 @@ rec { } ]; features = { + "clap" = [ "dep:clap" ]; "default" = [ "clap" ]; }; resolvedDefaultFeatures = [ "clap" "default" ]; @@ -1410,9 +1455,9 @@ rec { }; "core-foundation" = rec { crateName = "core-foundation"; - version = "0.9.2"; + version = "0.9.3"; edition = "2015"; - sha256 = "1cs7dya58xf4px4b1953040fpz5lm3qhf7fzv0jf94xva42y3238"; + sha256 = "0ii1ihpjb30fk38gdikm5wqlkmyr8k46fh4k2r8sagz5dng7ljhr"; authors = [ "The Servo Project Developers" ]; @@ -1427,8 +1472,10 @@ rec { } ]; features = { + "chrono" = [ "dep:chrono" ]; "mac_os_10_7_support" = [ "core-foundation-sys/mac_os_10_7_support" ]; "mac_os_10_8_features" = [ "core-foundation-sys/mac_os_10_8_features" ]; + "uuid" = [ "dep:uuid" ]; "with-chrono" = [ "chrono" ]; "with-uuid" = [ "uuid" ]; }; @@ -1446,11 +1493,38 @@ rec { }; resolvedDefaultFeatures = [ "mac_os_10_7_support" ]; }; + "cpufeatures" = rec { + crateName = "cpufeatures"; + version = "0.2.3"; + edition = "2018"; + sha256 = "0h7m10c0plziz9sqzm93fd3dx6h7dqg6bap8n64ciyfr522zny8h"; + authors = [ + "RustCrypto Developers" + ]; + dependencies = [ + { + name = "libc"; + packageId = "libc"; + target = { target, features }: (stdenv.hostPlatform.config == "aarch64-apple-darwin"); + } + { + name = "libc"; + packageId = "libc"; + target = { target, features }: (stdenv.hostPlatform.config == "aarch64-linux-android"); + } + { + name = "libc"; + packageId = "libc"; + target = { target, features }: ((target."arch" == "aarch64") && (target."os" == "linux")); + } + ]; + + }; "crates-index" = rec { crateName = "crates-index"; - version = "0.18.5"; + version = "0.18.9"; edition = "2018"; - sha256 = "01p8hrk2d5p9agj82xxvg02654vjjgvqi8g2f9kz06v8530kihq0"; + sha256 = "0jp6av6mlksp2g3scda970qd57h2cr121rvgxsjq9521s43rvhgr"; authors = [ "Corey Farwell " "Kornel " @@ -1511,22 +1585,21 @@ rec { } ]; features = { - "default" = [ "git2/default" "parallel" ]; + "default" = [ "git2/https" "parallel" ]; "parallel" = [ "rayon" ]; + "rayon" = [ "dep:rayon" ]; + "ssh" = [ "git2/ssh" ]; "vendored-openssl" = [ "git2/vendored-openssl" ]; }; resolvedDefaultFeatures = [ "default" "parallel" "rayon" ]; }; "crates-io" = rec { crateName = "crates-io"; - version = "0.33.0"; - edition = "2018"; - sha256 = "147mggf85fz77vsrzsvsxxwid4f4fg30zwfyirx7sl1k7y33hw91"; + version = "0.33.1"; + edition = "2021"; + sha256 = "0nmpzr697a6v12ljwpmjrhqpmkf784nsm8m1g6jwadmkq96p3mxj"; libName = "crates_io"; libPath = "lib.rs"; - authors = [ - "Alex Crichton " - ]; dependencies = [ { name = "anyhow"; @@ -1642,9 +1715,9 @@ rec { }; "crossbeam-channel" = rec { crateName = "crossbeam-channel"; - version = "0.5.2"; + version = "0.5.6"; edition = "2018"; - sha256 = "1yhbpb72mrhcywq2j8nscr48glr5w33f7rmcb8ph9vmi7yyahkp5"; + sha256 = "08f5f043rljl82a06d1inda6nl2b030s7yfqp31ps8w8mzfh9pf2"; dependencies = [ { name = "cfg-if"; @@ -1658,6 +1731,7 @@ rec { } ]; features = { + "crossbeam-utils" = [ "dep:crossbeam-utils" ]; "default" = [ "std" ]; "std" = [ "crossbeam-utils/std" ]; }; @@ -1665,12 +1739,9 @@ rec { }; "crossbeam-deque" = rec { crateName = "crossbeam-deque"; - version = "0.8.1"; + version = "0.8.2"; edition = "2018"; - sha256 = "07nypn86id2lf912ahiww1jvqp0zbk2xa25ra7vzplph375c0mb4"; - authors = [ - "The Crossbeam Project Developers" - ]; + sha256 = "1z6ifz35lyk0mw818xcl3brgss2k8islhgdmfk9s5fwjnr982pki"; dependencies = [ { name = "cfg-if"; @@ -1690,6 +1761,8 @@ rec { } ]; features = { + "crossbeam-epoch" = [ "dep:crossbeam-epoch" ]; + "crossbeam-utils" = [ "dep:crossbeam-utils" ]; "default" = [ "std" ]; "std" = [ "crossbeam-epoch/std" "crossbeam-utils/std" ]; }; @@ -1697,9 +1770,9 @@ rec { }; "crossbeam-epoch" = rec { crateName = "crossbeam-epoch"; - version = "0.9.7"; + version = "0.9.10"; edition = "2018"; - sha256 = "1naymd4nz53hxh1jln6ax9xa7f9g8k5hac09k4fib2vfl8p6s3f0"; + sha256 = "1c8i4p08kz35vf245ymy4miza1qvwnrv1d3hjdabnwb4cqkvwph4"; dependencies = [ { name = "cfg-if"; @@ -1710,50 +1783,84 @@ rec { packageId = "crossbeam-utils"; usesDefaultFeatures = false; } - { - name = "lazy_static"; - packageId = "lazy_static"; - optional = true; - } { name = "memoffset"; packageId = "memoffset"; } + { + name = "once_cell"; + packageId = "once_cell"; + optional = true; + } { name = "scopeguard"; packageId = "scopeguard"; usesDefaultFeatures = false; } ]; + buildDependencies = [ + { + name = "autocfg"; + packageId = "autocfg"; + } + ]; features = { "default" = [ "std" ]; "loom" = [ "loom-crate" "crossbeam-utils/loom" ]; - "nightly" = [ "crossbeam-utils/nightly" "const_fn" ]; - "std" = [ "alloc" "crossbeam-utils/std" "lazy_static" ]; + "loom-crate" = [ "dep:loom-crate" ]; + "nightly" = [ "crossbeam-utils/nightly" ]; + "once_cell" = [ "dep:once_cell" ]; + "std" = [ "alloc" "crossbeam-utils/std" "once_cell" ]; }; - resolvedDefaultFeatures = [ "alloc" "lazy_static" "std" ]; + resolvedDefaultFeatures = [ "alloc" "once_cell" "std" ]; }; "crossbeam-utils" = rec { crateName = "crossbeam-utils"; - version = "0.8.7"; + version = "0.8.11"; edition = "2018"; - sha256 = "19hn7av0w65y894ab8aw42d20i9m5d4sb80nm0zm6sf2y78vxrdm"; + sha256 = "1g426qw2j7czkbg0vw6mzifhgy1ng4qgpp2sn4vlamkvvi57v22i"; dependencies = [ { name = "cfg-if"; packageId = "cfg-if"; } { - name = "lazy_static"; - packageId = "lazy_static"; + name = "once_cell"; + packageId = "once_cell"; optional = true; } ]; features = { "default" = [ "std" ]; - "std" = [ "lazy_static" ]; + "loom" = [ "dep:loom" ]; + "once_cell" = [ "dep:once_cell" ]; + "std" = [ "once_cell" ]; + }; + resolvedDefaultFeatures = [ "default" "once_cell" "std" ]; + }; + "crypto-common" = rec { + crateName = "crypto-common"; + version = "0.1.6"; + edition = "2018"; + sha256 = "1cvby95a6xg7kxdz5ln3rl9xh66nz66w46mm3g56ri1z5x815yqv"; + authors = [ + "RustCrypto Developers" + ]; + dependencies = [ + { + name = "generic-array"; + packageId = "generic-array"; + features = [ "more_lengths" ]; + } + { + name = "typenum"; + packageId = "typenum"; + } + ]; + features = { + "getrandom" = [ "rand_core/getrandom" ]; + "rand_core" = [ "dep:rand_core" ]; }; - resolvedDefaultFeatures = [ "default" "lazy_static" "std" ]; }; "crypto-hash" = rec { crateName = "crypto-hash"; @@ -1849,9 +1956,9 @@ rec { }; "ctor" = rec { crateName = "ctor"; - version = "0.1.21"; + version = "0.1.23"; edition = "2018"; - sha256 = "1am0a8m1gkaa0fii3w3s5wsymjljvg4sv5c50bscssl2kf5a9h6c"; + sha256 = "1jzlplcl2fi951hw0mpjsx3a8gi90bjkz0vgd7wi06jj3mzfizyd"; procMacro = true; authors = [ "Matt Mastracci " @@ -1859,11 +1966,11 @@ rec { dependencies = [ { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; usesDefaultFeatures = false; features = [ "full" "parsing" "printing" "proc-macro" ]; } @@ -1872,9 +1979,9 @@ rec { }; "curl" = rec { crateName = "curl"; - version = "0.4.42"; + version = "0.4.44"; edition = "2018"; - sha256 = "0fa9v0qxvqxxs1lhb4cs5wpisnxpm5yqvdzqxv65nnyx9s4ppsbx"; + sha256 = "08hsq6ssy228df56adv2wbgam05f5rw1f2wzs7mhkb678qbx36sh"; authors = [ "Alex Crichton " ]; @@ -1922,6 +2029,8 @@ rec { "http2" = [ "curl-sys/http2" ]; "mesalink" = [ "curl-sys/mesalink" ]; "ntlm" = [ "curl-sys/ntlm" ]; + "openssl-probe" = [ "dep:openssl-probe" ]; + "openssl-sys" = [ "dep:openssl-sys" ]; "poll_7_68_0" = [ "curl-sys/poll_7_68_0" ]; "protocol-ftp" = [ "curl-sys/protocol-ftp" ]; "rustls" = [ "curl-sys/rustls" ]; @@ -1936,9 +2045,9 @@ rec { }; "curl-sys" = rec { crateName = "curl-sys"; - version = "0.4.52+curl-7.81.0"; + version = "0.4.56+curl-7.83.1"; edition = "2018"; - sha256 = "0wc9l9345a31cw2nl4i1lhw01xwmir5jx2bvbgnzv99y0b8w5f0l"; + sha256 = "0vyjydzavbbp0qdvzr8zr18mbkfd26pgnjd6ix39xqjdvmly34v0"; libName = "curl_sys"; libPath = "lib.rs"; authors = [ @@ -1991,7 +2100,10 @@ rec { features = { "default" = [ "ssl" ]; "http2" = [ "libnghttp2-sys" ]; + "libnghttp2-sys" = [ "dep:libnghttp2-sys" ]; + "openssl-sys" = [ "dep:openssl-sys" ]; "rustls" = [ "rustls-ffi" ]; + "rustls-ffi" = [ "dep:rustls-ffi" ]; "ssl" = [ "openssl-sys" ]; "static-ssl" = [ "openssl-sys/vendored" ]; "zlib-ng-compat" = [ "libz-sys/zlib-ng" "static-curl" ]; @@ -2026,11 +2138,11 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; } { name = "synstructure"; @@ -2041,9 +2153,9 @@ rec { }; "darling" = rec { crateName = "darling"; - version = "0.13.1"; + version = "0.13.4"; edition = "2018"; - sha256 = "1x7pgzjswg28798zd5gk5g6nifhcaqq0apqmclydi39zd2w21myh"; + sha256 = "0g25pad4mhq7315mw9n4wpg8j3mwyhwvr541kgdl0aar1j2ra7d0"; authors = [ "Ted Driggs " ]; @@ -2066,9 +2178,9 @@ rec { }; "darling_core" = rec { crateName = "darling_core"; - version = "0.13.1"; + version = "0.13.4"; edition = "2018"; - sha256 = "0933k2avb6xk9j4ryr0bvp3pww5j8i0nrqvsnkgd3vic3lj0yd3s"; + sha256 = "046n83f9jpszlngpjxkqi39ayzxf5a35q673c69jr1dn0ylnb7c5"; authors = [ "Ted Driggs " ]; @@ -2083,11 +2195,11 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "strsim"; @@ -2096,20 +2208,21 @@ rec { } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" "extra-traits" ]; } ]; features = { + "strsim" = [ "dep:strsim" ]; "suggestions" = [ "strsim" ]; }; resolvedDefaultFeatures = [ "strsim" "suggestions" ]; }; "darling_macro" = rec { crateName = "darling_macro"; - version = "0.13.1"; + version = "0.13.4"; edition = "2018"; - sha256 = "0jzljnd0y7idi5lb7lhvymh3nkhaf32ksx0d38hv7zjjfcxipi3j"; + sha256 = "0d8q8ibmsb1yzby6vwgh2wx892jqqfv9clwhpm19rprvz1wjd5ww"; procMacro = true; authors = [ "Ted Driggs " @@ -2121,20 +2234,20 @@ rec { } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; } ]; }; "diff" = rec { crateName = "diff"; - version = "0.1.12"; + version = "0.1.13"; edition = "2015"; - sha256 = "16b40bhsa2qgvgvxs983l625pkxyp6m0mzmpwg2605cvj53yl98f"; + sha256 = "1j0nzjxci2zqx63hdcihkp0a4dkdmzxd7my4m7zk6cjyfy34j9an"; authors = [ "Utkarsh Kukreti " ]; @@ -2151,6 +2264,7 @@ rec { ]; features = { "bin" = [ "getopts" ]; + "getopts" = [ "dep:getopts" ]; }; resolvedDefaultFeatures = [ "default" ]; }; @@ -2166,21 +2280,35 @@ rec { }; "digest" = rec { crateName = "digest"; - version = "0.8.1"; - edition = "2015"; - sha256 = "1madjl27f3kj5ql7kwgvb9c8b7yb7bv7yfgx7rqzj4i3fp4cil7k"; + version = "0.10.3"; + edition = "2018"; + sha256 = "01nmj9cci5qdm4q4wlmz104rzr68d5m823kdzd95bypslq68dyzj"; authors = [ "RustCrypto Developers" ]; dependencies = [ { - name = "generic-array"; - packageId = "generic-array"; + name = "block-buffer"; + packageId = "block-buffer"; + optional = true; + } + { + name = "crypto-common"; + packageId = "crypto-common"; } ]; features = { + "blobby" = [ "dep:blobby" ]; + "block-buffer" = [ "dep:block-buffer" ]; + "core-api" = [ "block-buffer" ]; + "default" = [ "core-api" ]; "dev" = [ "blobby" ]; + "mac" = [ "subtle" ]; + "rand_core" = [ "crypto-common/rand_core" ]; + "std" = [ "alloc" "crypto-common/std" ]; + "subtle" = [ "dep:subtle" ]; }; + resolvedDefaultFeatures = [ "block-buffer" "core-api" "default" ]; }; "dirs 1.0.5" = rec { crateName = "dirs"; @@ -2210,11 +2338,11 @@ rec { ]; }; - "dirs 3.0.2" = rec { + "dirs 4.0.0" = rec { crateName = "dirs"; - version = "3.0.2"; + version = "4.0.0"; edition = "2015"; - sha256 = "028kqy0vrbfgrk1yc1flq2fqh8snyg17qlygawm0r79w211s1fih"; + sha256 = "0n8020zl4f0frfnzvgb9agvk4a14i1kjz4daqnxkgslndwmaffna"; authors = [ "Simon Ochsenreither " ]; @@ -2228,9 +2356,9 @@ rec { }; "dirs-sys" = rec { crateName = "dirs-sys"; - version = "0.3.6"; + version = "0.3.7"; edition = "2015"; - sha256 = "102pbpcrfhvhfyfnyvmvvwpl6mfvynh170f6ima6fyinxls6bn03"; + sha256 = "19md1cnkazham8a6kh22v12d8hh3raqahfk6yb043vrjr68is78v"; authors = [ "Simon Ochsenreither " ]; @@ -2242,7 +2370,7 @@ rec { } { name = "redox_users"; - packageId = "redox_users 0.4.0"; + packageId = "redox_users 0.4.3"; usesDefaultFeatures = false; target = { target, features }: (target."os" == "redox"); } @@ -2269,9 +2397,9 @@ rec { }; "educe" = rec { crateName = "educe"; - version = "0.4.18"; - edition = "2018"; - sha256 = "0kcxvwhqvmkcvlq811x7n9mrpc8gcsmr410n0rffrrq15a9m0szq"; + version = "0.4.19"; + edition = "2021"; + sha256 = "1b7wk1h4jhymwv6a012wfacn36wvjhh3pjjgnw6x224crp4pqyy0"; procMacro = true; authors = [ "Magic Len " @@ -2283,15 +2411,15 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" ]; } ]; @@ -2302,14 +2430,15 @@ rec { }; "either" = rec { crateName = "either"; - version = "1.6.1"; - edition = "2015"; - sha256 = "0mwl9vngqf5jvrhmhn9x60kr5hivxyjxbmby2pybncxfqhf4z3g7"; + version = "1.8.0"; + edition = "2018"; + sha256 = "15z70yaivlkpx27vzv99ibf8d2x5jp24yn69y0xi20w86v4c3rch"; authors = [ "bluss" ]; features = { "default" = [ "use_std" ]; + "serde" = [ "dep:serde" ]; }; }; "encode_unicode" = rec { @@ -2321,15 +2450,17 @@ rec { "Torbjørn Birch Moltu " ]; features = { + "ascii" = [ "dep:ascii" ]; + "clippy" = [ "dep:clippy" ]; "default" = [ "std" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; "encoding_rs" = rec { crateName = "encoding_rs"; - version = "0.8.30"; + version = "0.8.31"; edition = "2018"; - sha256 = "1pqirqhlj8mbaln0pv4dk65yr22clpx509ci6gdgs3r5pf5dr5kq"; + sha256 = "0azc6rblf75vd862ymjahdfch27j1sshb7zynshrx7ywi5an6llq"; authors = [ "Henri Sivonen " ]; @@ -2342,6 +2473,8 @@ rec { features = { "default" = [ "alloc" ]; "fast-legacy-encode" = [ "fast-hangul-encode" "fast-hanja-encode" "fast-kanji-encode" "fast-gb-hanzi-encode" "fast-big5-hanzi-encode" ]; + "packed_simd" = [ "dep:packed_simd" ]; + "serde" = [ "dep:serde" ]; "simd-accel" = [ "packed_simd" "packed_simd/into_bits" ]; }; resolvedDefaultFeatures = [ "alloc" "default" ]; @@ -2358,9 +2491,9 @@ rec { }; "enum-ordinalize" = rec { crateName = "enum-ordinalize"; - version = "3.1.10"; - edition = "2018"; - sha256 = "1vsgl2i1gs95qjxgy8whqg5f0jpmni5n1ab6crddsq436yg6q5hb"; + version = "3.1.11"; + edition = "2021"; + sha256 = "0v639grfkm9gvfmxrhd10w7jlk8q5bmdc1fxifd0g0z3zq7gqw11"; procMacro = true; authors = [ "Magic Len " @@ -2376,15 +2509,21 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; + } + ]; + buildDependencies = [ + { + name = "rustc_version"; + packageId = "rustc_version"; } ]; features = { @@ -2412,11 +2551,11 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "serde_derive_internals"; @@ -2424,7 +2563,7 @@ rec { } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "extra-traits" ]; } ]; @@ -2441,20 +2580,20 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } ]; }; "enumflags2" = rec { crateName = "enumflags2"; - version = "0.7.3"; + version = "0.7.5"; edition = "2018"; - sha256 = "1vsdy8aw6cqm39z0akv7kaz0nfhdxzfvwg0qrw8l3y5kasq90p52"; + sha256 = "1jswynhjjwsp6rfnyapbvhzxrf8lpfgr0f8mhd238f4m3g94qpg7"; authors = [ "maik klein " "Jakub \"NieDżejkob\" Kądziołka " @@ -2466,13 +2605,14 @@ rec { } ]; features = { + "serde" = [ "dep:serde" ]; }; }; "enumflags2_derive" = rec { crateName = "enumflags2_derive"; - version = "0.7.3"; + version = "0.7.4"; edition = "2018"; - sha256 = "194d20akzhyraj2dla4axcifyji6x5xwcp8jza26zaybjsacfkhl"; + sha256 = "1bnmyqv0x19b5lr4pqa28h1ks74gnak08qyly8cry9b8wk2w73gm"; procMacro = true; authors = [ "maik klein " @@ -2481,15 +2621,15 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" ]; } ]; @@ -2533,7 +2673,11 @@ rec { } ]; features = { + "atty" = [ "dep:atty" ]; "default" = [ "termcolor" "atty" "humantime" "regex" ]; + "humantime" = [ "dep:humantime" ]; + "regex" = [ "dep:regex" ]; + "termcolor" = [ "dep:termcolor" ]; }; resolvedDefaultFeatures = [ "atty" "default" "humantime" "regex" "termcolor" ]; }; @@ -2575,7 +2719,11 @@ rec { } ]; features = { + "atty" = [ "dep:atty" ]; "default" = [ "termcolor" "atty" "humantime" "regex" ]; + "humantime" = [ "dep:humantime" ]; + "regex" = [ "dep:regex" ]; + "termcolor" = [ "dep:termcolor" ]; }; resolvedDefaultFeatures = [ "atty" "default" "humantime" "regex" "termcolor" ]; }; @@ -2595,22 +2743,14 @@ rec { } ]; features = { + "backtrace" = [ "dep:backtrace" ]; "default" = [ "std" "derive" ]; "derive" = [ "failure_derive" ]; + "failure_derive" = [ "dep:failure_derive" ]; "std" = [ "backtrace" ]; }; resolvedDefaultFeatures = [ "backtrace" "std" ]; }; - "fake-simd" = rec { - crateName = "fake-simd"; - version = "0.1.2"; - edition = "2015"; - sha256 = "1vfylvk4va2ivqx85603lyqqp0zk52cgbs4n5nfbbbqx577qm2p8"; - authors = [ - "The Rust-Crypto Project Developers" - ]; - - }; "fancy-regex" = rec { crateName = "fancy-regex"; version = "0.6.0"; @@ -2635,9 +2775,9 @@ rec { }; "fastrand" = rec { crateName = "fastrand"; - version = "1.7.0"; + version = "1.8.0"; edition = "2018"; - sha256 = "1pvci54f2cm69ybc308z213xdybgqpvf2pcvq1kch69mwp7g1z63"; + sha256 = "16b4z2rig7zmyxw1hsiydv89h9wcshilds13dfpc919kmb7hg957"; authors = [ "Stjepan Glavina " ]; @@ -2660,9 +2800,9 @@ rec { }; "filetime" = rec { crateName = "filetime"; - version = "0.2.15"; + version = "0.2.17"; edition = "2018"; - sha256 = "165w8nrc4f7jqhf9f1c86s1vw9wh2v43h2l5h93dil6rv21wyp4p"; + sha256 = "0v6893j7jp0hzc1q54nnx6848yvrw8ipzdkmvlhbqm4klnx7njp9"; authors = [ "Alex Crichton " ]; @@ -2678,40 +2818,32 @@ rec { } { name = "redox_syscall"; - packageId = "redox_syscall 0.2.10"; + packageId = "redox_syscall 0.2.16"; target = { target, features }: (target."os" == "redox"); } { - name = "winapi"; - packageId = "winapi"; + name = "windows-sys"; + packageId = "windows-sys"; target = { target, features }: (target."windows" or false); - features = [ "fileapi" "minwindef" "winbase" ]; + features = [ "Win32_Foundation" "Win32_Storage_FileSystem" ]; } ]; }; "flate2" = rec { crateName = "flate2"; - version = "1.0.22"; + version = "1.0.24"; edition = "2018"; - sha256 = "0gy5iwfqylb2f0dd9n7r8w2xwbzlrqlsairvyj2w9jf1jzl8hs8y"; + sha256 = "1xmzzg91c0hdl39qz0hwph0w629bva1dh21j3zyqp7xd4x60yazq"; authors = [ "Alex Crichton " "Josh Triplett " ]; dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - } { name = "crc32fast"; packageId = "crc32fast"; } - { - name = "libc"; - packageId = "libc"; - } { name = "libz-sys"; packageId = "libz-sys"; @@ -2732,11 +2864,16 @@ rec { } ]; features = { + "cloudflare-zlib-sys" = [ "dep:cloudflare-zlib-sys" ]; "cloudflare_zlib" = [ "any_zlib" "cloudflare-zlib-sys" ]; "default" = [ "rust_backend" ]; + "libz-ng-sys" = [ "dep:libz-ng-sys" ]; + "libz-sys" = [ "dep:libz-sys" ]; + "miniz-sys" = [ "rust_backend" ]; + "miniz_oxide" = [ "dep:miniz_oxide" ]; "rust_backend" = [ "miniz_oxide" ]; - "tokio" = [ "tokio-io" "futures" ]; "zlib" = [ "any_zlib" "libz-sys" ]; + "zlib-ng" = [ "any_zlib" "libz-ng-sys" ]; "zlib-ng-compat" = [ "zlib" "libz-sys/zlib-ng" ]; }; resolvedDefaultFeatures = [ "any_zlib" "libz-sys" "zlib" ]; @@ -2760,6 +2897,7 @@ rec { ]; features = { "default" = [ "ratio" ]; + "num-traits" = [ "dep:num-traits" ]; "ratio" = [ "num-traits" ]; }; resolvedDefaultFeatures = [ "default" "num-traits" "ratio" ]; @@ -2826,9 +2964,9 @@ rec { }; "futures" = rec { crateName = "futures"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "17id2zvn2acny759indn6yj2acfa6lhkwzaidxr2pqfiaigycgzp"; + sha256 = "1yl1yjjy4ad7ckhb27j2yy2vdj06pg1253ymz8sydkxanrxfjc5b"; dependencies = [ { name = "futures-channel"; @@ -2876,6 +3014,7 @@ rec { "compat" = [ "std" "futures-util/compat" ]; "default" = [ "std" "async-await" "executor" ]; "executor" = [ "std" "futures-executor/std" ]; + "futures-executor" = [ "dep:futures-executor" ]; "io-compat" = [ "compat" "futures-util/io-compat" ]; "std" = [ "alloc" "futures-core/std" "futures-task/std" "futures-io/std" "futures-sink/std" "futures-util/std" "futures-util/io" "futures-util/channel" ]; "thread-pool" = [ "executor" "futures-executor/thread-pool" ]; @@ -2886,9 +3025,9 @@ rec { }; "futures-channel" = rec { crateName = "futures-channel"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "0420lz2fmxa356ax1rp2sqi7b27ykfhvq4w9f1sla4hlp7j3q263"; + sha256 = "18fakviglagvqn8myi3vqrv3vn0bpf988cs02yzlbmygvp5m5z1b"; dependencies = [ { name = "futures-core"; @@ -2905,6 +3044,7 @@ rec { features = { "alloc" = [ "futures-core/alloc" ]; "default" = [ "std" ]; + "futures-sink" = [ "dep:futures-sink" ]; "sink" = [ "futures-sink" ]; "std" = [ "alloc" "futures-core/std" ]; }; @@ -2912,9 +3052,9 @@ rec { }; "futures-core" = rec { crateName = "futures-core"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "1lqhc6mqklh5bmkpr77p42lqwjj8gaskk5ba2p3kl1z4nw2gs28c"; + sha256 = "058ii8sbxmf20cy5wvqkd0mppvgw21mlf8irdj9kb0nki2pfvb6j"; features = { "default" = [ "std" ]; "std" = [ "alloc" ]; @@ -2923,9 +3063,9 @@ rec { }; "futures-executor" = rec { crateName = "futures-executor"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "19mq96kwgf06axgdc2fbrjhqzdnxww9vw6cz8b82gqr9z86bj84l"; + sha256 = "0a05jcvpzg9sri01m5i4adn0gw2dvlmlq2f0h93ad1xmnlhsl48x"; dependencies = [ { name = "futures-core"; @@ -2945,6 +3085,7 @@ rec { ]; features = { "default" = [ "std" ]; + "num_cpus" = [ "dep:num_cpus" ]; "std" = [ "futures-core/std" "futures-task/std" "futures-util/std" ]; "thread-pool" = [ "std" "num_cpus" ]; }; @@ -2952,9 +3093,9 @@ rec { }; "futures-io" = rec { crateName = "futures-io"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "0swn29fysas36ikk5aw55104fi98117amvgxw9g96pjs5ab4ah7w"; + sha256 = "1r9829x3y4a98ksvw4jm9jp67njylfyd59jmw8x6m8ims336z9lk"; features = { "default" = [ "std" ]; }; @@ -2962,22 +3103,22 @@ rec { }; "futures-macro" = rec { crateName = "futures-macro"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "04pmj5xfk5rdhlj69wc7w3zvdg3xardg8srig96lszrk00wf3h9k"; + sha256 = "0p84r80c3ys94l6f0iflysf6pd8ly53b4sknyb6f5smh6bjwrf8d"; procMacro = true; dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" ]; } ]; @@ -2985,9 +3126,9 @@ rec { }; "futures-sink" = rec { crateName = "futures-sink"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "0s58gx5yw1a21xviw2qgc0wzk225vgn4kbzddrp141m3kw9kw5i1"; + sha256 = "0rb79vnbgbz0pmf78kbiphvppyb3mrsccr00kgyzfb3mx4gsw2ya"; features = { "default" = [ "std" ]; "std" = [ "alloc" ]; @@ -2996,9 +3137,9 @@ rec { }; "futures-task" = rec { crateName = "futures-task"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "0skpiz2ljisywajv79p70yapfwhkqhb39wxy3f09v47mdfbnmijp"; + sha256 = "01jkvifc3l2accz0cvl1c7i4q4vj2bxi7pjr9ni5ch0zjcxwcbw4"; features = { "default" = [ "std" ]; "std" = [ "alloc" ]; @@ -3007,9 +3148,9 @@ rec { }; "futures-util" = rec { crateName = "futures-util"; - version = "0.3.21"; + version = "0.3.23"; edition = "2018"; - sha256 = "0sh3wqi8p36csjffy0irq8nlx9shqxp7z4dsih6bknarsvaspdyq"; + sha256 = "0xwmb945qb8wbxza325pik2y6z4k2w0ahz6726f24h73f5a8m0ph"; dependencies = [ { name = "futures-channel"; @@ -3072,10 +3213,18 @@ rec { "channel" = [ "std" "futures-channel" ]; "compat" = [ "std" "futures_01" ]; "default" = [ "std" "async-await" "async-await-macro" ]; + "futures-channel" = [ "dep:futures-channel" ]; + "futures-io" = [ "dep:futures-io" ]; + "futures-macro" = [ "dep:futures-macro" ]; + "futures-sink" = [ "dep:futures-sink" ]; + "futures_01" = [ "dep:futures_01" ]; "io" = [ "std" "futures-io" "memchr" ]; "io-compat" = [ "io" "compat" "tokio-io" ]; + "memchr" = [ "dep:memchr" ]; "sink" = [ "futures-sink" ]; + "slab" = [ "dep:slab" ]; "std" = [ "alloc" "futures-core/std" "futures-task/std" "slab" ]; + "tokio-io" = [ "dep:tokio-io" ]; "unstable" = [ "futures-core/unstable" "futures-task/unstable" ]; "write-all-vectored" = [ "io" ]; }; @@ -3103,9 +3252,9 @@ rec { }; "generic-array" = rec { crateName = "generic-array"; - version = "0.12.4"; + version = "0.14.6"; edition = "2015"; - sha256 = "1gfpay78vijl9vrwl1k9v7fbvbhkhcmnrk4kfg9l6x24y4s9zpzz"; + sha256 = "1fgi07v268jd0mr6xc42rjbq0wzl8ngsgp5b8wj33wwpfaa9xx5z"; libName = "generic_array"; authors = [ "Bartłomiej Kamiński " @@ -3117,7 +3266,17 @@ rec { packageId = "typenum"; } ]; - + buildDependencies = [ + { + name = "version_check"; + packageId = "version_check"; + } + ]; + features = { + "serde" = [ "dep:serde" ]; + "zeroize" = [ "dep:zeroize" ]; + }; + resolvedDefaultFeatures = [ "more_lengths" ]; }; "getrandom 0.1.16" = rec { crateName = "getrandom"; @@ -3145,16 +3304,22 @@ rec { } ]; features = { + "bindgen" = [ "dep:bindgen" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "js-sys" = [ "dep:js-sys" ]; + "log" = [ "dep:log" ]; "rustc-dep-of-std" = [ "compiler_builtins" "core" ]; + "stdweb" = [ "dep:stdweb" ]; "test-in-browser" = [ "wasm-bindgen" ]; "wasm-bindgen" = [ "bindgen" "js-sys" ]; }; }; - "getrandom 0.2.3" = rec { + "getrandom 0.2.7" = rec { crateName = "getrandom"; - version = "0.2.3"; + version = "0.2.7"; edition = "2018"; - sha256 = "0lr7mnkvnzdh1xxmwmhhbm4gwg29k3m2rzhpjmjm4k2jcfa9kkbz"; + sha256 = "1ilfnp4yfgb2vjfqwip8l6xfwlbs7dcmmhgnxn8rcqh1lmjaicaf"; authors = [ "The Rand Project Developers" ]; @@ -3171,26 +3336,36 @@ rec { } { name = "wasi"; - packageId = "wasi 0.10.0+wasi-snapshot-preview1"; + packageId = "wasi 0.11.0+wasi-snapshot-preview1"; target = { target, features }: (target."os" == "wasi"); } ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "js" = [ "wasm-bindgen" "js-sys" ]; + "js-sys" = [ "dep:js-sys" ]; "rustc-dep-of-std" = [ "compiler_builtins" "core" "libc/rustc-dep-of-std" "wasi/rustc-dep-of-std" ]; + "wasm-bindgen" = [ "dep:wasm-bindgen" ]; }; resolvedDefaultFeatures = [ "std" ]; }; "gimli" = rec { crateName = "gimli"; - version = "0.26.1"; + version = "0.26.2"; edition = "2018"; - sha256 = "1m0vi36ypv4gx9gzcw6y456yqnlypizhwlcqrmg6vkwd0lnkgk3q"; + sha256 = "0pafbk64rznibgnvfidhm1pqxd14a5s9m50yvsgnbv38b8n0w0r2"; features = { + "alloc" = [ "dep:alloc" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "default" = [ "read" "write" "std" "fallible-iterator" "endian-reader" ]; "endian-reader" = [ "read" "stable_deref_trait" ]; + "fallible-iterator" = [ "dep:fallible-iterator" ]; + "indexmap" = [ "dep:indexmap" ]; "read" = [ "read-core" ]; "rustc-dep-of-std" = [ "core" "alloc" "compiler_builtins" ]; + "stable_deref_trait" = [ "dep:stable_deref_trait" ]; "std" = [ "fallible-iterator/std" "stable_deref_trait/std" ]; "write" = [ "indexmap" ]; }; @@ -3242,6 +3417,8 @@ rec { features = { "default" = [ "ssh" "https" "ssh_key_from_memory" ]; "https" = [ "libgit2-sys/https" "openssl-sys" "openssl-probe" ]; + "openssl-probe" = [ "dep:openssl-probe" ]; + "openssl-sys" = [ "dep:openssl-sys" ]; "ssh" = [ "libgit2-sys/ssh" ]; "ssh_key_from_memory" = [ "libgit2-sys/ssh_key_from_memory" ]; "vendored-libgit2" = [ "libgit2-sys/vendored" ]; @@ -3294,9 +3471,9 @@ rec { }; "globset" = rec { crateName = "globset"; - version = "0.4.8"; + version = "0.4.9"; edition = "2018"; - sha256 = "1gdzphnjjc0wdaawsq3n1nnypv9ja4prhca2n66hcahay2gksihh"; + sha256 = "02mx4yhpxfbv74pqfch0asicc868nszazhk4m4hvrv8r4qs1f7ha"; authors = [ "Andrew Gallant " ]; @@ -3318,6 +3495,7 @@ rec { { name = "log"; packageId = "log"; + optional = true; } { name = "regex"; @@ -3327,14 +3505,18 @@ rec { } ]; features = { + "default" = [ "log" ]; + "log" = [ "dep:log" ]; + "serde" = [ "dep:serde" ]; "serde1" = [ "serde" ]; }; + resolvedDefaultFeatures = [ "default" "log" ]; }; "h2" = rec { crateName = "h2"; - version = "0.3.11"; + version = "0.3.14"; edition = "2018"; - sha256 = "13pzhasjizgv0v21yvrx3majd4xpipc1z1vyvwvbmcn7vlbzgwfr"; + sha256 = "1gihmz4bwrh9xmr6222dqhi90gcvdizxhp42n757rb11ry92b8sw"; authors = [ "Carl Lerche " "Sean McArthur " @@ -3405,16 +3587,23 @@ rec { }; "hashbrown" = rec { crateName = "hashbrown"; - version = "0.11.2"; - edition = "2018"; - sha256 = "0vkjsf5nzs7qcia5ya79j9sq2p1caz4crrncr1675wwyj3ag0pmb"; + version = "0.12.3"; + edition = "2021"; + sha256 = "1268ka4750pyg2pbgsr43f0289l5zah4arir2k4igx5a8c6fg7la"; authors = [ "Amanieu d'Antras " ]; features = { + "ahash" = [ "dep:ahash" ]; "ahash-compile-time-rng" = [ "ahash/compile-time-rng" ]; + "alloc" = [ "dep:alloc" ]; + "bumpalo" = [ "dep:bumpalo" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "default" = [ "ahash" "inline-more" ]; + "rayon" = [ "dep:rayon" ]; "rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ]; + "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "raw" ]; }; @@ -3450,6 +3639,8 @@ rec { } ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins/rustc-dep-of-std" "libc/rustc-dep-of-std" ]; }; resolvedDefaultFeatures = [ "default" ]; @@ -3490,6 +3681,7 @@ rec { ]; features = { "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; "std" = [ "alloc" ]; }; resolvedDefaultFeatures = [ "alloc" "default" "serde" "std" ]; @@ -3514,9 +3706,9 @@ rec { }; "http" = rec { crateName = "http"; - version = "0.2.6"; + version = "0.2.8"; edition = "2018"; - sha256 = "00zxqk6m9qksxmlajmhnhgryw6xmqn9riimwx87nz1l4cmscdx1i"; + sha256 = "1693pkg43czk26fima0l0l5h2h9rvm8n84pff5zc35b9w90kvx3m"; authors = [ "Alex Crichton " "Carl Lerche " @@ -3533,16 +3725,16 @@ rec { } { name = "itoa"; - packageId = "itoa 1.0.1"; + packageId = "itoa 1.0.3"; } ]; }; "http-body" = rec { crateName = "http-body"; - version = "0.4.4"; + version = "0.4.5"; edition = "2018"; - sha256 = "1imjszmk34603m7chfnhd3rq263bxbdlaxhlbzd06wv7354zix0z"; + sha256 = "1l967qwwlvhp198xdrnc0p5d7jwfcp6q2lm510j6zqw4s4b8zwym"; authors = [ "Carl Lerche " "Lucio Franco " @@ -3566,9 +3758,9 @@ rec { }; "httparse" = rec { crateName = "httparse"; - version = "1.6.0"; + version = "1.7.1"; edition = "2015"; - sha256 = "1i66wqc7lkfsi8h26sm8s6kirzzh1xgpx2dlrkzbfpz1h944204i"; + sha256 = "0k60q1hx96cvmjn6k3yjkff87fz0ga2a4z0g9ss8a9x5nndy4v29"; authors = [ "Sean McArthur " ]; @@ -3599,9 +3791,9 @@ rec { }; "hyper" = rec { crateName = "hyper"; - version = "0.14.16"; + version = "0.14.20"; edition = "2018"; - sha256 = "0mbghfyp4ghhcllmf3kfx9098rgg6168w155jc1jz2n9pmi3xv5p";type = [ "lib" "staticlib" "cdylib" ]; + sha256 = "1b7vm9dzs3hg5a6dk401n4hhg1hqh5r94lj07jh3bqrrbkf2kj82"; authors = [ "Sean McArthur " ]; @@ -3647,7 +3839,7 @@ rec { } { name = "itoa"; - packageId = "itoa 0.4.8"; + packageId = "itoa 1.0.3"; } { name = "pin-project-lite"; @@ -3694,8 +3886,11 @@ rec { features = { "ffi" = [ "libc" ]; "full" = [ "client" "http1" "http2" "server" "stream" "runtime" ]; + "h2" = [ "dep:h2" ]; "http2" = [ "h2" ]; + "libc" = [ "dep:libc" ]; "runtime" = [ "tcp" "tokio/rt" "tokio/time" ]; + "socket2" = [ "dep:socket2" ]; "tcp" = [ "socket2" "tokio/net" "tokio/rt" "tokio/time" ]; }; resolvedDefaultFeatures = [ "client" "h2" "http1" "http2" "runtime" "socket2" "tcp" ]; @@ -3749,6 +3944,46 @@ rec { "vendored" = [ "native-tls/vendored" ]; }; }; + "iana-time-zone" = rec { + crateName = "iana-time-zone"; + version = "0.1.46"; + edition = "2018"; + sha256 = "0085cn8kqndxlds6lzx8lqfa9dp0fb6y0gzfsca2cs4rh0rzsaxd"; + authors = [ + "Andrew Straw " + ]; + dependencies = [ + { + name = "android_system_properties"; + packageId = "android_system_properties"; + target = { target, features }: (target."os" == "android"); + } + { + name = "core-foundation-sys"; + packageId = "core-foundation-sys"; + target = { target, features }: ((target."os" == "macos") || (target."os" == "ios")); + } + { + name = "js-sys"; + packageId = "js-sys"; + target = { target, features }: (target."arch" == "wasm32"); + } + { + name = "wasm-bindgen"; + packageId = "wasm-bindgen"; + target = { target, features }: (target."arch" == "wasm32"); + } + { + name = "winapi"; + packageId = "winapi"; + target = { target, features }: (target."os" == "windows"); + features = [ "activation" "combaseapi" "objbase" "roapi" "winerror" "winstring" ]; + } + ]; + features = { + }; + resolvedDefaultFeatures = [ "fallback" ]; + }; "ident_case" = rec { crateName = "ident_case"; version = "1.0.1"; @@ -3840,9 +4075,9 @@ rec { }; "im-rc" = rec { crateName = "im-rc"; - version = "15.0.0"; + version = "15.1.0"; edition = "2018"; - sha256 = "0gsgcs1nn38r40973l6zr1v4d85f4s9qyl32n5f20jphf5z9ba1w"; + sha256 = "1zp5vdjj4b4lg8jnrz0wmdln2cdd9gn24a4psdvwd050bykma6dg"; authors = [ "Bodil Stokke " ]; @@ -3875,18 +4110,20 @@ rec { } ]; features = { + "arbitrary" = [ "dep:arbitrary" ]; "pool" = [ "refpool" "sized-chunks/refpool" ]; + "proptest" = [ "dep:proptest" ]; + "quickcheck" = [ "dep:quickcheck" ]; + "rayon" = [ "dep:rayon" ]; + "refpool" = [ "dep:refpool" ]; + "serde" = [ "dep:serde" ]; }; }; "indexmap" = rec { crateName = "indexmap"; - version = "1.8.0"; - edition = "2018"; - sha256 = "08s2rdps98z4qggzad2cf58nx012lnznn0b5q02a9arcf93n4ai8"; - authors = [ - "bluss" - "Josh Stone " - ]; + version = "1.9.1"; + edition = "2021"; + sha256 = "07nli1wcz7m81svvig8l5j6vjycjnv9va46lwblgy803ffbmm8qh"; dependencies = [ { name = "hashbrown"; @@ -3902,25 +4139,22 @@ rec { } ]; features = { + "rayon" = [ "dep:rayon" ]; + "rustc-rayon" = [ "dep:rustc-rayon" ]; + "serde" = [ "dep:serde" ]; "serde-1" = [ "serde" ]; }; resolvedDefaultFeatures = [ "std" ]; }; "indoc" = rec { crateName = "indoc"; - version = "1.0.3"; + version = "1.0.7"; edition = "2018"; - sha256 = "0diih20xsxjb159nr0dq6jxnyhq7gg10dlsnh2siikphmvm5m9z5"; + sha256 = "1qs42cn8rj7kdpmp1dlkzhv62rfmbx3ffwvsfw67zyq86jm1xaxd"; procMacro = true; authors = [ "David Tolnay " ]; - dependencies = [ - { - name = "unindent"; - packageId = "unindent"; - } - ]; }; "instant" = rec { @@ -3938,18 +4172,27 @@ rec { } ]; features = { + "js-sys" = [ "dep:js-sys" ]; + "stdweb" = [ "dep:stdweb" ]; "wasm-bindgen" = [ "js-sys" "wasm-bindgen_rs" "web-sys" ]; + "wasm-bindgen_rs" = [ "dep:wasm-bindgen_rs" ]; + "web-sys" = [ "dep:web-sys" ]; }; }; "ipnet" = rec { crateName = "ipnet"; - version = "2.3.1"; - edition = "2015"; - sha256 = "1ad32j3kkbb0bgf5whzfkdw6843ywr48245dhk7c9gny5r7xdwk8"; + version = "2.5.0"; + edition = "2018"; + sha256 = "0asr5bwhbfxgxwappmvs0rvb0ncc5adnhfi9yiz4axlc9j1m97c7"; authors = [ "Kris Price " ]; - + features = { + "json" = [ "serde" "schemars" ]; + "schemars" = [ "dep:schemars" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "default" ]; }; "itertools" = rec { crateName = "itertools"; @@ -3985,11 +4228,11 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; - "itoa 1.0.1" = rec { + "itoa 1.0.3" = rec { crateName = "itoa"; - version = "1.0.1"; + version = "1.0.3"; edition = "2018"; - sha256 = "0d8wr2qf5b25a04xf10rz9r0pdbjdgb0zaw3xvf8k2sqcz1qzaqs"; + sha256 = "0m7773c6lb61c20gp81a0pac8sh8w473m4rck0x247zyfi3gi2kc"; authors = [ "David Tolnay " ]; @@ -4014,9 +4257,9 @@ rec { }; "js-sys" = rec { crateName = "js-sys"; - version = "0.3.55"; + version = "0.3.59"; edition = "2018"; - sha256 = "116cg9vn62cl3vifbs6cjdsg7hz98kr7sr8kpy31liccsg6gzjbw"; + sha256 = "1ciq26qw03j7b5ni78cj1igq0bn2famzvl8n6ksqlkxk22mm3115"; authors = [ "The wasm-bindgen Developers" ]; @@ -4037,6 +4280,7 @@ rec { "Marvin Löbel " ]; features = { + "spin" = [ "dep:spin" ]; "spin_no_std" = [ "spin" ]; }; }; @@ -4050,20 +4294,23 @@ rec { "Nikita Pekin " ]; features = { + "clippy" = [ "dep:clippy" ]; "nightly-testing" = [ "clippy" "nightly" ]; + "serde" = [ "dep:serde" ]; }; }; "libc" = rec { crateName = "libc"; - version = "0.2.117"; + version = "0.2.132"; edition = "2015"; - sha256 = "0v52a7r5kmgc97rjf1sm3p3gkw3djzrnld4sli65nnxnz7h74kg7"; + sha256 = "199vm5mz5gmd73lx07g06g2d9kl1qrd4dcky2bdrcfhw6kjy8wc3"; authors = [ "The Rust Project Developers" ]; features = { "default" = [ "std" ]; "rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ]; + "rustc-std-workspace-core" = [ "dep:rustc-std-workspace-core" ]; "use_std" = [ "std" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; @@ -4115,6 +4362,8 @@ rec { ]; features = { "https" = [ "openssl-sys" ]; + "libssh2-sys" = [ "dep:libssh2-sys" ]; + "openssl-sys" = [ "dep:openssl-sys" ]; "ssh" = [ "libssh2-sys" ]; "vendored-openssl" = [ "openssl-sys/vendored" ]; "zlib-ng-compat" = [ "libz-sys/zlib-ng" "libssh2-sys/zlib-ng-compat" ]; @@ -4195,15 +4444,16 @@ rec { ]; features = { "openssl-on-win32" = [ "openssl-sys" ]; + "openssl-sys" = [ "dep:openssl-sys" ]; "vendored-openssl" = [ "openssl-sys/vendored" ]; "zlib-ng-compat" = [ "libz-sys/zlib-ng" ]; }; }; "libz-sys" = rec { crateName = "libz-sys"; - version = "1.1.3"; - edition = "2015"; - sha256 = "0rpcxkccjn8da9114kvl8hrnrkspzsmdn0qcxlix85lwajw3am6y"; + version = "1.1.8"; + edition = "2018"; + sha256 = "1gqb8nk7j4ngvlcll8plm2fvjwic40p2g4qp20pwry1m74f7c0lp"; authors = [ "Alex Crichton " "Josh Triplett " @@ -4231,23 +4481,27 @@ rec { } ]; features = { + "cmake" = [ "dep:cmake" ]; "default" = [ "libc" "stock-zlib" ]; + "libc" = [ "dep:libc" ]; "zlib-ng" = [ "libc" "cmake" ]; }; resolvedDefaultFeatures = [ "libc" ]; }; "linked-hash-map" = rec { crateName = "linked-hash-map"; - version = "0.5.4"; + version = "0.5.6"; edition = "2015"; - sha256 = "1ww8zsraqnvrsknd315481185igwkx5n14xnhq5i8216z65b7fbz"; + sha256 = "03vpgw7x507g524nx5i1jf5dl8k3kv0fzg8v3ip6qqwbpkqww5q7"; authors = [ "Stepan Koltsov " "Andrew Paseltiner " ]; features = { + "heapsize" = [ "dep:heapsize" ]; "heapsize_impl" = [ "heapsize" ]; - "serde_impl" = [ "serde" "serde_test" ]; + "serde" = [ "dep:serde" ]; + "serde_impl" = [ "serde" ]; }; }; "linked_hash_set" = rec { @@ -4264,13 +4518,15 @@ rec { packageId = "linked-hash-map"; } ]; - + features = { + "serde" = [ "dep:serde" ]; + }; }; "log" = rec { crateName = "log"; - version = "0.4.14"; + version = "0.4.17"; edition = "2015"; - sha256 = "04175hv0v62shd82qydq58a48k3bjijmk54v38zgqlbxqkkbpfai"; + sha256 = "0biqlaaw1lsr8bpnmbcc0fvgjj34yy79ghqzyi0ali7vgil2xcdb"; authors = [ "The Rust Project Developers" ]; @@ -4285,19 +4541,12 @@ rec { "kv_unstable_serde" = [ "kv_unstable_std" "value-bag/serde" "serde" ]; "kv_unstable_std" = [ "std" "kv_unstable" "value-bag/error" ]; "kv_unstable_sval" = [ "kv_unstable" "value-bag/sval" "sval" ]; + "serde" = [ "dep:serde" ]; + "sval" = [ "dep:sval" ]; + "value-bag" = [ "dep:value-bag" ]; }; resolvedDefaultFeatures = [ "std" ]; }; - "maplit" = rec { - crateName = "maplit"; - version = "1.0.2"; - edition = "2015"; - sha256 = "07b5kjnhrrmfhgqm9wprjw8adx6i225lqp49gasgqg74lahnabiy"; - authors = [ - "bluss" - ]; - - }; "matches" = rec { crateName = "matches"; version = "0.1.9"; @@ -4311,15 +4560,18 @@ rec { }; "memchr" = rec { crateName = "memchr"; - version = "2.4.1"; + version = "2.5.0"; edition = "2018"; - sha256 = "0smq8xzd40njqpfzv5mghigj91fzlfrfg842iz8x0wqvw2dw731h"; + sha256 = "0vanfk5mzs1g1syqnj03q8n0syggnhn55dq535h2wxr7rwpfbzrd"; authors = [ "Andrew Gallant " "bluss" ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "default" = [ "std" ]; + "libc" = [ "dep:libc" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; "use_std" = [ "std" ]; }; @@ -4355,9 +4607,9 @@ rec { }; "miniz_oxide" = rec { crateName = "miniz_oxide"; - version = "0.4.4"; + version = "0.5.3"; edition = "2018"; - sha256 = "0jsfv00hl5rmx1nijn59sr9jmjd4rjnjhh4kdjy8d187iklih9d9"; + sha256 = "1k1wfxb35v129mhqy14yqhrj3wvknafrwygiq7zvi0m5iml7ap3g"; authors = [ "Frommi " "oyvindln " @@ -4369,27 +4621,31 @@ rec { usesDefaultFeatures = false; } ]; - buildDependencies = [ - { - name = "autocfg"; - packageId = "autocfg"; - } - ]; features = { + "alloc" = [ "dep:alloc" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "rustc-dep-of-std" = [ "core" "alloc" "compiler_builtins" "adler/rustc-dep-of-std" ]; + "simd" = [ "simd-adler32" ]; + "simd-adler32" = [ "dep:simd-adler32" ]; }; }; "mio" = rec { crateName = "mio"; - version = "0.7.14"; + version = "0.8.4"; edition = "2018"; - sha256 = "1k05cah6zdww6i2qc7gaxbbja4ppyjycipl2y0lhiiwpzq2b8rw0"; + sha256 = "1byahxxpnm42djgip44b545i2pr5d7fgyff3a290qfy6qwiirvjp"; authors = [ "Carl Lerche " "Thomas de Zeeuw " "Tokio Contributors " ]; dependencies = [ + { + name = "libc"; + packageId = "libc"; + target = { target, features }: (target."os" == "wasi"); + } { name = "libc"; packageId = "libc"; @@ -4400,31 +4656,21 @@ rec { packageId = "log"; } { - name = "miow"; - packageId = "miow"; - target = { target, features }: (target."windows" or false); - } - { - name = "ntapi"; - packageId = "ntapi"; - target = { target, features }: (target."windows" or false); + name = "wasi"; + packageId = "wasi 0.11.0+wasi-snapshot-preview1"; + target = { target, features }: (target."os" == "wasi"); } { - name = "winapi"; - packageId = "winapi"; + name = "windows-sys"; + packageId = "windows-sys"; target = { target, features }: (target."windows" or false); - features = [ "winsock2" "mswsock" "mstcpip" ]; + features = [ "Win32_Storage_FileSystem" "Win32_Foundation" "Win32_Networking_WinSock" "Win32_System_IO" "Win32_System_WindowsProgramming" ]; } ]; features = { - "os-ext" = [ "os-poll" ]; - "os-util" = [ "os-ext" ]; - "pipe" = [ "os-ext" ]; - "tcp" = [ "net" ]; - "udp" = [ "net" ]; - "uds" = [ "net" ]; + "os-ext" = [ "os-poll" "windows-sys/Win32_System_Pipes" "windows-sys/Win32_Security" ]; }; - resolvedDefaultFeatures = [ "default" "net" "os-ext" "os-poll" "os-util" "tcp" "udp" "uds" ]; + resolvedDefaultFeatures = [ "default" "net" "os-ext" "os-poll" ]; }; "miow" = rec { crateName = "miow"; @@ -4445,9 +4691,9 @@ rec { }; "native-tls" = rec { crateName = "native-tls"; - version = "0.2.8"; + version = "0.2.10"; edition = "2015"; - sha256 = "0kdj0drgp8cqk3v430c5ac7dfpzvhm1621w96cpz985m35vrzfj8"; + sha256 = "1ad4dhkbc3r9rbqdym1cl5zwkqzfa9i8bs0p1c79hzsm30v2yzpx"; authors = [ "Steven Fackler " ]; @@ -4511,6 +4757,7 @@ rec { ]; features = { "alpn" = [ "security-framework/alpn" ]; + "openssl-src" = [ "dep:openssl-src" ]; "vendored" = [ "openssl/vendored" ]; }; }; @@ -4524,27 +4771,6 @@ rec { ]; }; - "ntapi" = rec { - crateName = "ntapi"; - version = "0.3.6"; - edition = "2018"; - sha256 = "0i5daj9sr8wyi5jkpwpybln2jqpn59z0mqfc0dpdidipwh1bjsrz"; - authors = [ - "MSxDOS " - ]; - dependencies = [ - { - name = "winapi"; - packageId = "winapi"; - features = [ "cfg" "evntrace" "in6addr" "inaddr" "minwinbase" "ntsecapi" "windef" "winioctl" ]; - } - ]; - features = { - "default" = [ "user" ]; - "impl-default" = [ "winapi/impl-default" ]; - }; - resolvedDefaultFeatures = [ "default" "user" ]; - }; "num-bigint" = rec { crateName = "num-bigint"; version = "0.4.3"; @@ -4574,16 +4800,20 @@ rec { } ]; features = { + "arbitrary" = [ "dep:arbitrary" ]; "default" = [ "std" ]; + "quickcheck" = [ "dep:quickcheck" ]; + "rand" = [ "dep:rand" ]; + "serde" = [ "dep:serde" ]; "std" = [ "num-integer/std" "num-traits/std" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; "num-integer" = rec { crateName = "num-integer"; - version = "0.1.44"; + version = "0.1.45"; edition = "2015"; - sha256 = "1nq152y3304as1iai95hqz8prqnc94lks1s7q05sfjdmcf56kk6j"; + sha256 = "1ncwavvwdmsqzxnn65phv6c6nn72pnv9xhpmjd6a429mzf4k6p92"; authors = [ "The Rust Project Developers" ]; @@ -4609,9 +4839,9 @@ rec { }; "num-traits" = rec { crateName = "num-traits"; - version = "0.2.14"; + version = "0.2.15"; edition = "2015"; - sha256 = "144j176s2p76azy2ngk2vkdzgwdc0bc8c93jhki8c9fsbknb2r4s"; + sha256 = "1kfdqqw2ndz0wx2j75v9nbjx7d3mh3150zs4p5595y02rwsdx3jp"; authors = [ "The Rust Project Developers" ]; @@ -4623,6 +4853,7 @@ rec { ]; features = { "default" = [ "std" ]; + "libm" = [ "dep:libm" ]; }; resolvedDefaultFeatures = [ "default" "i128" "std" ]; }; @@ -4650,9 +4881,9 @@ rec { }; "object" = rec { crateName = "object"; - version = "0.27.1"; + version = "0.29.0"; edition = "2018"; - sha256 = "1ygv9zgi9wz6q5f2z9xn72i0c97jjr1dgj30kbyicdhxk8zivb37"; + sha256 = "0lzblxwxcih7j4z2cfx9094caax97hlfm9n0y5hlavda6cn8n591"; dependencies = [ { name = "memchr"; @@ -4662,44 +4893,46 @@ rec { ]; features = { "all" = [ "read" "write" "std" "compression" "wasm" ]; + "alloc" = [ "dep:alloc" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; "compression" = [ "flate2" "std" ]; + "core" = [ "dep:core" ]; + "crc32fast" = [ "dep:crc32fast" ]; "default" = [ "read" "compression" ]; - "doc" = [ "read_core" "write_core" "std" "compression" "archive" "coff" "elf" "macho" "pe" "wasm" ]; + "doc" = [ "read_core" "write_std" "std" "compression" "archive" "coff" "elf" "macho" "pe" "wasm" ]; + "flate2" = [ "dep:flate2" ]; + "hashbrown" = [ "dep:hashbrown" ]; + "indexmap" = [ "dep:indexmap" ]; "pe" = [ "coff" ]; "read" = [ "read_core" "archive" "coff" "elf" "macho" "pe" "unaligned" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins" "alloc" "memchr/rustc-dep-of-std" ]; "std" = [ "memchr/std" ]; "wasm" = [ "wasmparser" ]; - "write" = [ "write_core" "coff" "elf" "macho" "pe" ]; - "write_core" = [ "crc32fast" "indexmap/std" "std" ]; + "wasmparser" = [ "dep:wasmparser" ]; + "write" = [ "write_std" "coff" "elf" "macho" "pe" ]; + "write_core" = [ "crc32fast" "indexmap" "hashbrown" ]; + "write_std" = [ "write_core" "std" "indexmap/std" "crc32fast/std" ]; }; resolvedDefaultFeatures = [ "archive" "coff" "elf" "macho" "pe" "read_core" "unaligned" ]; }; "once_cell" = rec { crateName = "once_cell"; - version = "1.9.0"; + version = "1.13.1"; edition = "2018"; - sha256 = "1mfqhrsgi368x92bwnq3vi3p5nv0n1qlrn69gfflhvkfkxfm2cns"; + sha256 = "0kjyjf8yhm1rv5af0f0g7y66mzdy1l1865mr9sw76jbb43d68j07"; authors = [ "Aleksey Kladov " ]; features = { "alloc" = [ "race" ]; + "atomic-polyfill" = [ "dep:atomic-polyfill" ]; "default" = [ "std" ]; + "parking_lot" = [ "parking_lot_core" ]; + "parking_lot_core" = [ "dep:parking_lot_core" ]; "std" = [ "alloc" ]; }; resolvedDefaultFeatures = [ "alloc" "default" "race" "std" ]; }; - "opaque-debug" = rec { - crateName = "opaque-debug"; - version = "0.2.3"; - edition = "2015"; - sha256 = "172j6bs8ndclqxa2m64qc0y1772rr73g4l9fg2svscgicnbfff98"; - authors = [ - "RustCrypto Developers" - ]; - - }; "opener" = rec { crateName = "opener"; version = "0.5.0"; @@ -4725,9 +4958,9 @@ rec { }; "openssl" = rec { crateName = "openssl"; - version = "0.10.38"; + version = "0.10.41"; edition = "2018"; - sha256 = "15baqlphisr1f7ddq11jnrrzz4shdh35kwal24adyc2c4cif4yhc"; + sha256 = "1l2vpxq5ln326s64lbacqs4hq6k5yn2zhwqbyby0sj9nagvfp3v1"; authors = [ "Steven Fackler " ]; @@ -4752,6 +4985,10 @@ rec { name = "once_cell"; packageId = "once_cell"; } + { + name = "openssl-macros"; + packageId = "openssl-macros"; + } { name = "openssl-sys"; packageId = "openssl-sys"; @@ -4759,9 +4996,33 @@ rec { } ]; features = { + "bindgen" = [ "ffi/bindgen" ]; "vendored" = [ "ffi/vendored" ]; }; }; + "openssl-macros" = rec { + crateName = "openssl-macros"; + version = "0.1.0"; + edition = "2018"; + sha256 = "0v3kgnzbadrf9c06q4cqmbjas53av73n5w7wwz3n0nb6257y80dm"; + procMacro = true; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2 1.0.43"; + } + { + name = "quote"; + packageId = "quote 1.0.21"; + } + { + name = "syn"; + packageId = "syn 1.0.99"; + features = [ "full" ]; + } + ]; + + }; "openssl-probe" = rec { crateName = "openssl-probe"; version = "0.1.5"; @@ -4774,9 +5035,9 @@ rec { }; "openssl-sys" = rec { crateName = "openssl-sys"; - version = "0.9.72"; + version = "0.9.75"; edition = "2015"; - sha256 = "1jq3qbcvf16qn71yasdzw54b14n8nz98vr52l1gp60in72f10iky"; + sha256 = "0bxlrsfkvryv179na416mvj0s90v9yngkmkkv8y1lm0h4w6bvyg5"; build = "build/main.rs"; authors = [ "Alex Crichton " @@ -4808,14 +5069,16 @@ rec { } ]; features = { + "bindgen" = [ "dep:bindgen" ]; + "openssl-src" = [ "dep:openssl-src" ]; "vendored" = [ "openssl-src" ]; }; }; "os_info" = rec { crateName = "os_info"; - version = "3.2.0"; + version = "3.5.0"; edition = "2018"; - sha256 = "0h6kb5w5hw5b2anjyb45njfmqn0klrcl8bzxcz7pkx2yai6zhg82"; + sha256 = "16fkp3jrh2iwamxbrx9lfskb7sld9zh8jdm9jgs0s51c5cbb42aj"; authors = [ "Jan Schulte " "Stanislav Tkach " @@ -4840,6 +5103,7 @@ rec { ]; features = { "default" = [ "serde" ]; + "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "serde" ]; }; @@ -4873,27 +5137,39 @@ rec { }; "pest" = rec { crateName = "pest"; - version = "2.1.3"; - edition = "2015"; - sha256 = "0lry80bm90x47nq71wxq83kjrm9ashpz4kbm92p90ysdx4m8gx0h"; + version = "2.2.1"; + edition = "2018"; + sha256 = "1y7f45lg0gqnyikz9ksm6lwmc49kn004wyyvcabynaidihmnwj39"; authors = [ "Dragoș Tiselice " ]; dependencies = [ + { + name = "thiserror"; + packageId = "thiserror"; + optional = true; + } { name = "ucd-trie"; packageId = "ucd-trie"; + usesDefaultFeatures = false; } ]; features = { + "default" = [ "std" ]; "pretty-print" = [ "serde" "serde_json" ]; + "serde" = [ "dep:serde" ]; + "serde_json" = [ "dep:serde_json" ]; + "std" = [ "ucd-trie/std" "thiserror" ]; + "thiserror" = [ "dep:thiserror" ]; }; + resolvedDefaultFeatures = [ "default" "std" "thiserror" ]; }; "pest_derive" = rec { crateName = "pest_derive"; - version = "2.1.0"; - edition = "2015"; - sha256 = "1l5jfa6ril71cw5nsiw0r45br54dd8cj2r1nc2d1wq6wb3jilgc3"; + version = "2.2.1"; + edition = "2018"; + sha256 = "149bafz0anc905sqx7gyq8i92fqan5kdazg45k9ccczz79ip0ddi"; procMacro = true; authors = [ "Dragoș Tiselice " @@ -4902,19 +5178,25 @@ rec { { name = "pest"; packageId = "pest"; + usesDefaultFeatures = false; } { name = "pest_generator"; packageId = "pest_generator"; + usesDefaultFeatures = false; } ]; - + features = { + "default" = [ "std" ]; + "std" = [ "pest/std" "pest_generator/std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; }; "pest_generator" = rec { crateName = "pest_generator"; - version = "2.1.3"; - edition = "2015"; - sha256 = "0mfgl0p6v91ywdqr9i8w053v70cnfqjk8y5rhwbvir9idridpf4r"; + version = "2.2.1"; + edition = "2018"; + sha256 = "18679r8xckla14gqqyys8d6f2dpbqdsflnc8n6gwgz9ff3jngidk"; authors = [ "Dragoș Tiselice " ]; @@ -4922,6 +5204,7 @@ rec { { name = "pest"; packageId = "pest"; + usesDefaultFeatures = false; } { name = "pest_meta"; @@ -4929,31 +5212,35 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; } ]; - + features = { + "default" = [ "std" ]; + "std" = [ "pest/std" ]; + }; + resolvedDefaultFeatures = [ "std" ]; }; "pest_meta" = rec { crateName = "pest_meta"; - version = "2.1.3"; - edition = "2015"; - sha256 = "07d1jbbbpxpchk0j37ljas46sdyyg599z3zw2ac0f5sk9x06xgjl"; + version = "2.2.1"; + edition = "2018"; + sha256 = "1zi1x07aarwjyhvl1vnflb7ncawnin50m2x1qylazg9vxvjjpcsy"; authors = [ "Dragoș Tiselice " ]; dependencies = [ { - name = "maplit"; - packageId = "maplit"; + name = "once_cell"; + packageId = "once_cell"; } { name = "pest"; @@ -4984,9 +5271,9 @@ rec { }; "pin-project-lite" = rec { crateName = "pin-project-lite"; - version = "0.2.8"; + version = "0.2.9"; edition = "2018"; - sha256 = "0v2c5ds2jqr84q0nc94dfhv8fs7lachl9sarf9992b66gkkzp072"; + sha256 = "05n1z851l356hpgqadw4ar64mjanaxq1qlwqsf2k05ziq8xax9z0"; }; "pin-utils" = rec { @@ -5001,9 +5288,9 @@ rec { }; "pkg-config" = rec { crateName = "pkg-config"; - version = "0.3.24"; + version = "0.3.25"; edition = "2015"; - sha256 = "1ghcyjp5537r7qigmgl3dj62j01arlpddaq93a3i414v3iskz2aq"; + sha256 = "1bh3vij79cshj884py4can1f8rvk52niaii1vwxya9q69gnc9y0x"; authors = [ "Alex Crichton " ]; @@ -5045,14 +5332,18 @@ rec { ]; features = { "default" = [ "difference" "regex" "float-cmp" "normalize-line-endings" ]; + "difference" = [ "dep:difference" ]; + "float-cmp" = [ "dep:float-cmp" ]; + "normalize-line-endings" = [ "dep:normalize-line-endings" ]; + "regex" = [ "dep:regex" ]; }; resolvedDefaultFeatures = [ "default" "difference" "float-cmp" "normalize-line-endings" "regex" ]; }; - "predicates 2.0.3" = rec { + "predicates 2.1.1" = rec { crateName = "predicates"; - version = "2.0.3"; + version = "2.1.1"; edition = "2018"; - sha256 = "0x5ldd5yjlqhjkvy4k08fgqj28k1a0fdn0gc7rs07qdjs08yhv2w"; + sha256 = "0g0cjv6nn2s18kzsa3nkfhv7myxv9lbb710r0xrv8cj7dszbbam5"; authors = [ "Nick Stevens " ]; @@ -5072,10 +5363,16 @@ rec { } ]; features = { - "color" = [ "yansi" "concolor-control/std" ]; - "color-auto" = [ "color" "concolor-control/auto" ]; + "color" = [ "yansi" "concolor/std" ]; + "color-auto" = [ "color" "concolor/auto" ]; + "concolor" = [ "dep:concolor" ]; "default" = [ "diff" "regex" "float-cmp" "normalize-line-endings" ]; "diff" = [ "difflib" ]; + "difflib" = [ "dep:difflib" ]; + "float-cmp" = [ "dep:float-cmp" ]; + "normalize-line-endings" = [ "dep:normalize-line-endings" ]; + "regex" = [ "dep:regex" ]; + "yansi" = [ "dep:yansi" ]; }; resolvedDefaultFeatures = [ "diff" "difflib" ]; }; @@ -5111,9 +5408,9 @@ rec { }; "pretty_assertions" = rec { crateName = "pretty_assertions"; - version = "1.1.0"; + version = "1.2.1"; edition = "2018"; - sha256 = "0l2xpgqa1a73fkbacn0qxngixwmyp1fb90k496sql095nx4bbmbn"; + sha256 = "0qrmkdwqn56af498vi8zjyq44wzcyvj5ic1dv54d01s2r6d9i7y8"; authors = [ "Colin Kiegel " "Florent Fayolle " @@ -5207,6 +5504,7 @@ rec { } ]; features = { + "csv" = [ "dep:csv" ]; "default" = [ "win_crlf" "csv" ]; }; resolvedDefaultFeatures = [ "csv" "default" "win_crlf" ]; @@ -5226,15 +5524,15 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; optional = true; usesDefaultFeatures = false; } @@ -5247,6 +5545,7 @@ rec { ]; features = { "default" = [ "syn-error" ]; + "syn" = [ "dep:syn" ]; "syn-error" = [ "syn" ]; }; resolvedDefaultFeatures = [ "default" "syn" "syn-error" ]; @@ -5263,11 +5562,11 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } ]; buildDependencies = [ @@ -5297,19 +5596,19 @@ rec { }; resolvedDefaultFeatures = [ "default" "proc-macro" ]; }; - "proc-macro2 1.0.36" = rec { + "proc-macro2 1.0.43" = rec { crateName = "proc-macro2"; - version = "1.0.36"; + version = "1.0.43"; edition = "2018"; - sha256 = "0adh6gvs31x6pfwmygypmzrv1jc7kjq568vsqcfaxk7vhdc2sd67"; + sha256 = "1avvpf4qki8mg2na60yr3afbsfl5p6vllac6516xgwy93g3a4b0a"; authors = [ "David Tolnay " "Alex Crichton " ]; dependencies = [ { - name = "unicode-xid"; - packageId = "unicode-xid 0.2.2"; + name = "unicode-ident"; + packageId = "unicode-ident"; } ]; features = { @@ -5338,18 +5637,18 @@ rec { }; resolvedDefaultFeatures = [ "default" "proc-macro" ]; }; - "quote 1.0.15" = rec { + "quote 1.0.21" = rec { crateName = "quote"; - version = "1.0.15"; + version = "1.0.21"; edition = "2018"; - sha256 = "0id1q0875pvhkg0mlb5z8gzdm2g2rbbz76bfzhv331lrm2b3wkc6"; + sha256 = "0yai5cyd9h95n7hkwjcx8ig3yv0hindmz5gm60g9dmm7fzrlir5v"; authors = [ "David Tolnay " ]; dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; usesDefaultFeatures = false; } ]; @@ -5361,23 +5660,25 @@ rec { }; "rand_core" = rec { crateName = "rand_core"; - version = "0.5.1"; + version = "0.6.3"; edition = "2018"; - sha256 = "06bdvx08v3rkz451cm7z59xwwqn1rkfh6v9ay77b14f8dwlybgch"; + sha256 = "1rxlxc3bpzgwphcg9c9yasvv9idipcg2z2y4j0vlb52jyl418kyk"; authors = [ "The Rand Project Developers" "The Rust Project Developers" ]; features = { + "getrandom" = [ "dep:getrandom" ]; + "serde" = [ "dep:serde" ]; "serde1" = [ "serde" ]; "std" = [ "alloc" "getrandom" "getrandom/std" ]; }; }; "rand_xoshiro" = rec { crateName = "rand_xoshiro"; - version = "0.4.0"; + version = "0.6.0"; edition = "2018"; - sha256 = "013h45rikipv5bda2ixmwx5rwsk9wpc7mr0a77cz20hxi0pdvz59"; + sha256 = "1ajsic84rzwz5qr0mzlay8vi17swqi684bqvwqyiim3flfrcv5vg"; authors = [ "The Rand Project Developers" ]; @@ -5388,14 +5689,15 @@ rec { } ]; features = { + "serde" = [ "dep:serde" ]; "serde1" = [ "serde" ]; }; }; "rayon" = rec { crateName = "rayon"; - version = "1.5.1"; + version = "1.5.3"; edition = "2018"; - sha256 = "143dl2453bazgk7rwjrickmyqd0ks3q69nfz8axcins19n0clsn0"; + sha256 = "0z9sjcy1hnnvgkwx3cn1x44pf24jpwarp3172m9am2xd5rvyb6dx"; authors = [ "Niko Matsakis " "Josh Stone " @@ -5425,9 +5727,9 @@ rec { }; "rayon-core" = rec { crateName = "rayon-core"; - version = "1.9.1"; + version = "1.9.3"; edition = "2018"; - sha256 = "13kdcnqp2p1a5a3amamfjpnm7ay463vq4dfxy4rrh9shr3i210fp"; + sha256 = "0gv8k6612gc24kqqm4440f5qfx6gnyv2v6dj3d4libbdmjswv2r5"; authors = [ "Niko Matsakis " "Josh Stone " @@ -5445,10 +5747,6 @@ rec { name = "crossbeam-utils"; packageId = "crossbeam-utils"; } - { - name = "lazy_static"; - packageId = "lazy_static"; - } { name = "num_cpus"; packageId = "num_cpus"; @@ -5467,11 +5765,11 @@ rec { ]; }; - "redox_syscall 0.2.10" = rec { + "redox_syscall 0.2.16" = rec { crateName = "redox_syscall"; - version = "0.2.10"; + version = "0.2.16"; edition = "2018"; - sha256 = "1zq36bhw4c6xig340ja1jmr36iy0d3djp8smsabxx71676bg70w3"; + sha256 = "16jicm96kjyzm802cxdd1k9jmcph0db1a4lhslcnhjsvhp0mhnpv"; libName = "syscall"; authors = [ "Jeremy Soller " @@ -5511,14 +5809,15 @@ rec { features = { "auth" = [ "rust-argon2" ]; "default" = [ "auth" ]; + "rust-argon2" = [ "dep:rust-argon2" ]; }; resolvedDefaultFeatures = [ "auth" "default" "rust-argon2" ]; }; - "redox_users 0.4.0" = rec { + "redox_users 0.4.3" = rec { crateName = "redox_users"; - version = "0.4.0"; + version = "0.4.3"; edition = "2018"; - sha256 = "0r5y1a26flkn6gkayi558jg5dzh2m2fdsapgkpn7mj01v3rk51aj"; + sha256 = "0asw3s4iy69knafkhvlbchy230qawc297vddjdwjs5nglwvxhcxh"; authors = [ "Jose Narvaez " "Wesley Hershberger " @@ -5526,24 +5825,30 @@ rec { dependencies = [ { name = "getrandom"; - packageId = "getrandom 0.2.3"; + packageId = "getrandom 0.2.7"; features = [ "std" ]; } { name = "redox_syscall"; - packageId = "redox_syscall 0.2.10"; + packageId = "redox_syscall 0.2.16"; + } + { + name = "thiserror"; + packageId = "thiserror"; } ]; features = { - "auth" = [ "rust-argon2" ]; + "auth" = [ "rust-argon2" "zeroize" ]; "default" = [ "auth" ]; + "rust-argon2" = [ "dep:rust-argon2" ]; + "zeroize" = [ "dep:zeroize" ]; }; }; "regex" = rec { crateName = "regex"; - version = "1.5.4"; + version = "1.6.0"; edition = "2018"; - sha256 = "0qf479kjbmb582h4d1d6gfl75h0j8aq2nrdi5wg6zdcy6llqcynh"; + sha256 = "12wqvyh4i75j7pc8sgvmqh4yy3qaj4inc4alyv1cdf3lf4kb6kjc"; authors = [ "The Rust Project Developers" ]; @@ -5565,7 +5870,9 @@ rec { } ]; features = { + "aho-corasick" = [ "dep:aho-corasick" ]; "default" = [ "std" "perf" "unicode" "regex-syntax/default" ]; + "memchr" = [ "dep:memchr" ]; "perf" = [ "perf-cache" "perf-dfa" "perf-inline" "perf-literal" ]; "perf-literal" = [ "aho-corasick" "memchr" ]; "unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" "regex-syntax/unicode" ]; @@ -5591,15 +5898,17 @@ rec { ]; features = { "default" = [ "std" ]; + "fst" = [ "dep:fst" ]; + "regex-syntax" = [ "dep:regex-syntax" ]; "std" = [ "regex-syntax" ]; "transducer" = [ "std" "fst" ]; }; }; "regex-syntax" = rec { crateName = "regex-syntax"; - version = "0.6.25"; + version = "0.6.27"; edition = "2018"; - sha256 = "16y87hz1bxmmz6kk360cxwfm3jnbsxb3x4zw9x1gzz7khic2i5zl"; + sha256 = "0i32nnvyzzkvz1rqp2qyfxrp2170859z8ck37jd63c8irrrppy53"; authors = [ "The Rust Project Developers" ]; @@ -5617,6 +5926,8 @@ rec { { name = "release-automation"; path = "src/main.rs"; } ]; src = lib.cleanSourceWith { filter = sourceFilter; src = ./.; }; + libName = "release_automation"; + libPath = "src/lib/mod.rs"; authors = [ "Holochain Core Dev Team " ]; @@ -5640,6 +5951,8 @@ rec { { name = "chrono"; packageId = "chrono"; + usesDefaultFeatures = false; + features = [ "clock" "std" "oldtime" "serde" ]; } { name = "comrak"; @@ -5779,6 +6092,10 @@ rec { name = "tempfile"; packageId = "tempfile"; } + { + name = "test-case"; + packageId = "test-case"; + } ]; }; @@ -5802,9 +6119,9 @@ rec { }; "reqwest" = rec { crateName = "reqwest"; - version = "0.11.9"; + version = "0.11.11"; edition = "2018"; - sha256 = "0995ng67r8rry8864wxp2iwkpr4sc34fgny6p9wrllwa93ql5wl7"; + sha256 = "14mz9w3jf2jq1kv3606an637lvrw4npz4fp3xmkcrfq67ydacnmp"; authors = [ "Sean McArthur " ]; @@ -5812,7 +6129,6 @@ rec { { name = "base64"; packageId = "base64"; - target = { target, features }: (!(target."arch" == "wasm32")); } { name = "bytes"; @@ -5935,6 +6251,10 @@ rec { optional = true; target = { target, features }: (!(target."arch" == "wasm32")); } + { + name = "tower-service"; + packageId = "tower-service"; + } { name = "url"; packageId = "url"; @@ -5991,25 +6311,43 @@ rec { ]; features = { "__rustls" = [ "hyper-rustls" "tokio-rustls" "rustls" "__tls" "rustls-pemfile" ]; + "async-compression" = [ "dep:async-compression" ]; "blocking" = [ "futures-util/io" "tokio/rt-multi-thread" "tokio/sync" ]; "brotli" = [ "async-compression" "async-compression/brotli" "tokio-util" ]; + "cookie_crate" = [ "dep:cookie_crate" ]; + "cookie_store" = [ "dep:cookie_store" ]; "cookies" = [ "cookie_crate" "cookie_store" "proc-macro-hack" ]; "default" = [ "default-tls" ]; "default-tls" = [ "hyper-tls" "native-tls-crate" "__tls" "tokio-native-tls" ]; "deflate" = [ "async-compression" "async-compression/zlib" "tokio-util" ]; "gzip" = [ "async-compression" "async-compression/gzip" "tokio-util" ]; + "hyper-rustls" = [ "dep:hyper-rustls" ]; + "hyper-tls" = [ "dep:hyper-tls" ]; "json" = [ "serde_json" ]; + "mime_guess" = [ "dep:mime_guess" ]; "multipart" = [ "mime_guess" ]; "native-tls" = [ "default-tls" ]; "native-tls-alpn" = [ "native-tls" "native-tls-crate/alpn" ]; + "native-tls-crate" = [ "dep:native-tls-crate" ]; "native-tls-vendored" = [ "native-tls" "native-tls-crate/vendored" ]; + "proc-macro-hack" = [ "dep:proc-macro-hack" ]; + "rustls" = [ "dep:rustls" ]; + "rustls-native-certs" = [ "dep:rustls-native-certs" ]; + "rustls-pemfile" = [ "dep:rustls-pemfile" ]; "rustls-tls" = [ "rustls-tls-webpki-roots" ]; "rustls-tls-manual-roots" = [ "__rustls" ]; "rustls-tls-native-roots" = [ "rustls-native-certs" "__rustls" ]; "rustls-tls-webpki-roots" = [ "webpki-roots" "__rustls" ]; + "serde_json" = [ "dep:serde_json" ]; "socks" = [ "tokio-socks" ]; "stream" = [ "tokio/fs" "tokio-util" ]; + "tokio-native-tls" = [ "dep:tokio-native-tls" ]; + "tokio-rustls" = [ "dep:tokio-rustls" ]; + "tokio-socks" = [ "dep:tokio-socks" ]; + "tokio-util" = [ "dep:tokio-util" ]; "trust-dns" = [ "trust-dns-resolver" ]; + "trust-dns-resolver" = [ "dep:trust-dns-resolver" ]; + "webpki-roots" = [ "dep:webpki-roots" ]; }; resolvedDefaultFeatures = [ "__tls" "blocking" "default-tls" "hyper-tls" "json" "native-tls-crate" "serde_json" "tokio-native-tls" ]; }; @@ -6042,7 +6380,9 @@ rec { } ]; features = { + "crossbeam-utils" = [ "dep:crossbeam-utils" ]; "default" = [ "crossbeam-utils" ]; + "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "crossbeam-utils" "default" ]; }; @@ -6055,6 +6395,8 @@ rec { "Alex Crichton " ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; }; }; @@ -6080,12 +6422,29 @@ rec { "Alex Crichton " ]; + }; + "rustc_version" = rec { + crateName = "rustc_version"; + version = "0.4.0"; + edition = "2018"; + sha256 = "0rpk9rcdk405xhbmgclsh4pai0svn49x35aggl4nhbkd4a2zb85z"; + authors = [ + "Dirkjan Ochtman " + "Marvin Löbel " + ]; + dependencies = [ + { + name = "semver"; + packageId = "semver"; + } + ]; + }; "rustfix" = rec { crateName = "rustfix"; - version = "0.6.0"; + version = "0.6.1"; edition = "2018"; - sha256 = "0apkjxv3z70vhnyz2kpwsivvndk6qk7kkp0rf7sg8pk7q1gy02vg"; + sha256 = "10b4qlvfwljp7yss8afj0lnn8vqj78n93n9vfmkq9616kqyqblpc"; authors = [ "Pascal Hertleif " "Oliver Schneider " @@ -6116,28 +6475,17 @@ rec { } ]; - }; - "rustversion" = rec { - crateName = "rustversion"; - version = "1.0.6"; - edition = "2018"; - sha256 = "0gxj6skypbk0wlbks3pdqb0lclpwbzmyv9xbqkijsvk6zbl3ik7j"; - procMacro = true; - build = "build/build.rs"; - authors = [ - "David Tolnay " - ]; - }; "ryu" = rec { crateName = "ryu"; - version = "1.0.9"; + version = "1.0.11"; edition = "2018"; - sha256 = "17qlxkqm4h8h9xqj6rh2vnmwxyzikbsj5w223chmr5l2qx8bgd3k"; + sha256 = "02czvxrxhi2gmamw25drdvkfkkk9xd9758bpnk0s30mfyggsn0a5"; authors = [ "David Tolnay " ]; features = { + "no-panic" = [ "dep:no-panic" ]; }; }; "same-file" = rec { @@ -6159,9 +6507,9 @@ rec { }; "schannel" = rec { crateName = "schannel"; - version = "0.1.19"; - edition = "2015"; - sha256 = "0xdwr3clrylywpv2r5hw7mrxmsf7ljagwiymw2z60ki3kihbl1cg"; + version = "0.1.20"; + edition = "2018"; + sha256 = "1qnvajc4wg0gzfj4mmg4a9fd45nps5gyvcj4j9fs4bj68q8p7ml8"; authors = [ "Steven Fackler " "Steffen Butzer " @@ -6172,9 +6520,16 @@ rec { packageId = "lazy_static"; } { - name = "winapi"; - packageId = "winapi"; - features = [ "lmcons" "minschannel" "securitybaseapi" "schannel" "sspi" "sysinfoapi" "timezoneapi" "winbase" "wincrypt" "winerror" ]; + name = "windows-sys"; + packageId = "windows-sys"; + features = [ "Win32_Foundation" "Win32_Security_Cryptography" "Win32_Security_Authentication_Identity" "Win32_Security_Credentials" "Win32_System_Memory" ]; + } + ]; + devDependencies = [ + { + name = "windows-sys"; + packageId = "windows-sys"; + features = [ "Win32_System_SystemInformation" "Win32_System_Time" ]; } ]; @@ -6193,9 +6548,9 @@ rec { }; "security-framework" = rec { crateName = "security-framework"; - version = "2.4.2"; - edition = "2018"; - sha256 = "11vwvw2qnrf1z8i0ncbj9456vxwnwq9wyi9c2n6rkqd2znmw2nsj"; + version = "2.7.0"; + edition = "2021"; + sha256 = "0v1m0vchbibfr1l0pqiyscp0y7h7f7vkjmy52cc67xjah2bvph9b"; authors = [ "Steven Fackler " "Kornel " @@ -6231,15 +6586,17 @@ rec { "OSX_10_14" = [ "OSX_10_13" "security-framework-sys/OSX_10_14" ]; "OSX_10_9" = [ "security-framework-sys/OSX_10_9" ]; "default" = [ "OSX_10_9" ]; + "log" = [ "dep:log" ]; + "num-bigint" = [ "dep:num-bigint" ]; "serial-number-bigint" = [ "num-bigint" ]; }; resolvedDefaultFeatures = [ "OSX_10_9" "default" ]; }; "security-framework-sys" = rec { crateName = "security-framework-sys"; - version = "2.4.2"; + version = "2.6.1"; edition = "2018"; - sha256 = "0zlwc46mb7zkm4ngq5qv52zczvvk0l8kjr6npyvjidb067c19pd9"; + sha256 = "0mn5lm0jip9nm6ydqm6qd9alyiwq15c027777jsbyibs2wxa2q01"; authors = [ "Steven Fackler " "Kornel " @@ -6266,9 +6623,9 @@ rec { }; "semver" = rec { crateName = "semver"; - version = "1.0.5"; + version = "1.0.13"; edition = "2018"; - sha256 = "1ivj7z9yp6v46ml40nsr8aqh64fphzv5xfvkxpxni6pcja7731h4"; + sha256 = "049ppz71ayvgwy1sa87c0dh49gvj6ls8rvnyna5xc0whf0g89xlk"; authors = [ "David Tolnay " ]; @@ -6282,14 +6639,15 @@ rec { ]; features = { "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "serde" "std" ]; }; "serde" = rec { crateName = "serde"; - version = "1.0.136"; + version = "1.0.144"; edition = "2015"; - sha256 = "12a791cbdd3gi08536i4frrqsps0ak8gvhpijvgj9rg1055y4cff"; + sha256 = "0q3qy4cv4jjmwa23nrgrppfxh2g8ahr7fs4iijw47k9xvq87fx0g"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -6310,14 +6668,15 @@ rec { features = { "default" = [ "std" ]; "derive" = [ "serde_derive" ]; + "serde_derive" = [ "dep:serde_derive" ]; }; - resolvedDefaultFeatures = [ "default" "derive" "rc" "serde_derive" "std" ]; + resolvedDefaultFeatures = [ "alloc" "default" "derive" "rc" "serde_derive" "std" ]; }; "serde_derive" = rec { crateName = "serde_derive"; - version = "1.0.136"; + version = "1.0.144"; edition = "2015"; - sha256 = "1yb28smlymba4qbj2bn4c4myvblypqvkxv9q33s0dlzwa9qpwn88"; + sha256 = "003sx1ihjcfwj2az357qj7i38b1ji3w8krw35y0h3ldidy0kmvcl"; procMacro = true; authors = [ "Erick Tryzelaar " @@ -6326,15 +6685,15 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; } ]; features = { @@ -6354,15 +6713,15 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; usesDefaultFeatures = false; features = [ "derive" "parsing" "printing" "clone-impls" ]; } @@ -6371,9 +6730,9 @@ rec { }; "serde_ignored" = rec { crateName = "serde_ignored"; - version = "0.1.2"; + version = "0.1.5"; edition = "2018"; - sha256 = "0bzz3546g3p01hgwh6jh0gyqdwc28xcp3pir4al2wbsgs4wpsb0w"; + sha256 = "08bdbicajiicrkljc4ajqkbq9lbr3jfq4rvghrx68ryrxmzdmcw2"; authors = [ "David Tolnay " ]; @@ -6381,15 +6740,17 @@ rec { { name = "serde"; packageId = "serde"; + usesDefaultFeatures = false; + features = [ "alloc" ]; } ]; }; "serde_json" = rec { crateName = "serde_json"; - version = "1.0.78"; + version = "1.0.83"; edition = "2018"; - sha256 = "11c0fm7wb2wydlxmq9ziqfjwxl9j1cl0jxq16az49z8fryj1ng6j"; + sha256 = "19ymnc0rvm7pacy22dq99ngxhnpyxg7bv7gj3srpb7i7r3ih9p9q"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -6397,7 +6758,7 @@ rec { dependencies = [ { name = "itoa"; - packageId = "itoa 1.0.1"; + packageId = "itoa 1.0.3"; } { name = "ryu"; @@ -6409,10 +6770,18 @@ rec { usesDefaultFeatures = false; } ]; + devDependencies = [ + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + ]; features = { "alloc" = [ "serde/alloc" ]; "default" = [ "std" ]; - "preserve_order" = [ "indexmap" ]; + "indexmap" = [ "dep:indexmap" ]; + "preserve_order" = [ "indexmap" "std" ]; "std" = [ "serde/std" ]; }; resolvedDefaultFeatures = [ "default" "raw_value" "std" ]; @@ -6432,7 +6801,7 @@ rec { } { name = "itoa"; - packageId = "itoa 1.0.1"; + packageId = "itoa 1.0.3"; } { name = "ryu"; @@ -6447,18 +6816,14 @@ rec { }; "serde_with" = rec { crateName = "serde_with"; - version = "1.12.0"; + version = "1.14.0"; edition = "2018"; - sha256 = "1g7gkksb7i1ilw2acy30g90b3ws20wv0vb2fi4g5n3lmv326w7pc"; + sha256 = "1zqjlc9ypm8y0r9bcgdhh62zcdn2yzfxh31dsbn01gshkq35m2v7"; authors = [ "Jonas Bushart" "Marcin Kaźmierczak" ]; dependencies = [ - { - name = "rustversion"; - packageId = "rustversion"; - } { name = "serde"; packageId = "serde"; @@ -6472,19 +6837,28 @@ rec { ]; features = { "base64" = [ "base64_crate" ]; + "base64_crate" = [ "dep:base64_crate" ]; "chrono" = [ "chrono_crate" ]; + "chrono_crate" = [ "dep:chrono_crate" ]; "default" = [ "macros" ]; + "doc-comment" = [ "dep:doc-comment" ]; "guide" = [ "doc-comment" "macros" ]; + "hex" = [ "dep:hex" ]; + "indexmap" = [ "indexmap_crate" ]; + "indexmap_crate" = [ "dep:indexmap_crate" ]; "json" = [ "serde_json" ]; "macros" = [ "serde_with_macros" ]; + "serde_json" = [ "dep:serde_json" ]; + "serde_with_macros" = [ "dep:serde_with_macros" ]; + "time_0_3" = [ "dep:time_0_3" ]; }; resolvedDefaultFeatures = [ "default" "macros" "serde_with_macros" ]; }; "serde_with_macros" = rec { crateName = "serde_with_macros"; - version = "1.5.1"; + version = "1.5.2"; edition = "2018"; - sha256 = "0zljba24ymmvi9gxpfv7gap8j3ckzzai8ppvpag8hwhw8zlppr0j"; + sha256 = "10l0rsy0k61nvpn1brcfvzp8yfnvsqdgh6zdwp03qf85dzndd0p1"; procMacro = true; authors = [ "Jonas Bushart" @@ -6496,15 +6870,15 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" "parsing" ]; } ]; @@ -6512,9 +6886,9 @@ rec { }; "serde_yaml" = rec { crateName = "serde_yaml"; - version = "0.8.23"; - edition = "2018"; - sha256 = "1857pykxavramvf4p9bp40b3sqwrhnm8dqjfl9jw3183jkr239d4"; + version = "0.9.11"; + edition = "2021"; + sha256 = "1hqs0aggfrrawkd3h15j5isk8p192a4gv9axhprcs9h9yprivww9"; authors = [ "David Tolnay " ]; @@ -6522,6 +6896,11 @@ rec { { name = "indexmap"; packageId = "indexmap"; + features = [ "std" ]; + } + { + name = "itoa"; + packageId = "itoa 1.0.3"; } { name = "ryu"; @@ -6532,37 +6911,34 @@ rec { packageId = "serde"; } { - name = "yaml-rust"; - packageId = "yaml-rust"; + name = "unsafe-libyaml"; + packageId = "unsafe-libyaml"; } ]; }; "sha-1" = rec { crateName = "sha-1"; - version = "0.8.2"; - edition = "2015"; - sha256 = "1pv387q0r7llk2cqzyq0nivzvkgqgzsiygqzlv7b68z9xl5lvngp"; + version = "0.10.0"; + edition = "2018"; + sha256 = "03zag8zk4qlv40n2yryddapv5yxkam3hdr7n53d8qrzr2gali3q2"; libName = "sha1"; authors = [ "RustCrypto Developers" ]; dependencies = [ { - name = "block-buffer"; - packageId = "block-buffer"; - } - { - name = "digest"; - packageId = "digest"; + name = "cfg-if"; + packageId = "cfg-if"; } { - name = "fake-simd"; - packageId = "fake-simd"; + name = "cpufeatures"; + packageId = "cpufeatures"; + target = { target, features }: ((target."arch" == "aarch64") || (target."arch" == "x86") || (target."arch" == "x86_64")); } { - name = "opaque-debug"; - packageId = "opaque-debug"; + name = "digest"; + packageId = "digest"; } ]; devDependencies = [ @@ -6574,8 +6950,8 @@ rec { ]; features = { "asm" = [ "sha1-asm" ]; - "asm-aarch64" = [ "asm" "libc" ]; "default" = [ "std" ]; + "sha1-asm" = [ "dep:sha1-asm" ]; "std" = [ "digest/std" ]; }; }; @@ -6621,29 +6997,39 @@ rec { } ]; features = { + "arbitrary" = [ "dep:arbitrary" ]; + "array-ops" = [ "dep:array-ops" ]; "default" = [ "std" ]; + "refpool" = [ "dep:refpool" ]; "ringbuffer" = [ "array-ops" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; "slab" = rec { crateName = "slab"; - version = "0.4.5"; + version = "0.4.7"; edition = "2018"; - sha256 = "1ddg01hf8h4bpfm027h0snhb7jfcs1jzi497083y13q13vyr3vwx"; + sha256 = "1vyw3rkdfdfkzfa1mh83s237sll8v5kazfwxma60bq4b59msf526"; authors = [ "Carl Lerche " ]; + buildDependencies = [ + { + name = "autocfg"; + packageId = "autocfg"; + } + ]; features = { "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; "smartstring" = rec { crateName = "smartstring"; - version = "0.2.9"; - edition = "2018"; - sha256 = "16rc6n0p4r4aw6k6jxf2s37wyaijaa4pwpw7rqki7cn2q0qnmaii"; + version = "1.0.1"; + edition = "2021"; + sha256 = "0agf4x0jz79r30aqibyfjm1h9hrjdh0harcqcvb2vapv7rijrdrz"; authors = [ "Bodil Stokke " ]; @@ -6658,8 +7044,21 @@ rec { packageId = "static_assertions"; } ]; + buildDependencies = [ + { + name = "autocfg"; + packageId = "autocfg"; + } + { + name = "version_check"; + packageId = "version_check"; + } + ]; features = { + "arbitrary" = [ "dep:arbitrary" ]; "default" = [ "std" ]; + "proptest" = [ "dep:proptest" ]; + "serde" = [ "dep:serde" ]; "test" = [ "std" "arbitrary" "arbitrary/derive" ]; }; resolvedDefaultFeatures = [ "default" "serde" "std" ]; @@ -6688,6 +7087,7 @@ rec { ]; features = { }; + resolvedDefaultFeatures = [ "all" ]; }; "static_assertions" = rec { crateName = "static_assertions"; @@ -6803,6 +7203,7 @@ rec { "lints" = [ "clap/lints" ]; "no_cargo" = [ "clap/no_cargo" ]; "paw" = [ "structopt-derive/paw" "paw_dep" ]; + "paw_dep" = [ "dep:paw_dep" ]; "suggestions" = [ "clap/suggestions" ]; "wrap_help" = [ "clap/wrap_help" ]; "yaml" = [ "clap/yaml" ]; @@ -6860,15 +7261,15 @@ rec { } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" ]; } ]; @@ -6904,38 +7305,40 @@ rec { "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; "printing" = [ "quote" ]; "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; + "quote" = [ "dep:quote" ]; }; resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "parsing" "printing" "proc-macro" "quote" ]; }; - "syn 1.0.86" = rec { + "syn 1.0.99" = rec { crateName = "syn"; - version = "1.0.86"; + version = "1.0.99"; edition = "2018"; - sha256 = "0sqwa4nqxzm89nj8xd8sk4iz0hbrw3mb17b6hyc2w2d0zzsb6rca"; + sha256 = "04xba78p559nl737llv7nqcwm723dp6ah5bbp0h5w1amqrpfznsq"; authors = [ "David Tolnay " ]; dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; usesDefaultFeatures = false; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; optional = true; usesDefaultFeatures = false; } { - name = "unicode-xid"; - packageId = "unicode-xid 0.2.2"; + name = "unicode-ident"; + packageId = "unicode-ident"; } ]; features = { "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; "printing" = [ "quote" ]; "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; + "quote" = [ "dep:quote" ]; "test" = [ "syn-test-suite/all-features" ]; }; resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "full" "parsing" "printing" "proc-macro" "quote" "visit" ]; @@ -6951,23 +7354,23 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; usesDefaultFeatures = false; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; usesDefaultFeatures = false; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; usesDefaultFeatures = false; features = [ "derive" "parsing" "printing" "clone-impls" "visit" "extra-traits" ]; } { name = "unicode-xid"; - packageId = "unicode-xid 0.2.2"; + packageId = "unicode-xid 0.2.3"; } ]; features = { @@ -6997,6 +7400,7 @@ rec { ]; features = { "default" = [ "xattr" ]; + "xattr" = [ "dep:xattr" ]; }; }; "tempfile" = rec { @@ -7026,7 +7430,7 @@ rec { } { name = "redox_syscall"; - packageId = "redox_syscall 0.2.10"; + packageId = "redox_syscall 0.2.16"; target = { target, features }: (target."os" == "redox"); } { @@ -7074,9 +7478,9 @@ rec { }; "termcolor" = rec { crateName = "termcolor"; - version = "1.1.2"; + version = "1.1.3"; edition = "2018"; - sha256 = "1x65i1ny4m6z1by62ra6wdcrd557p2ysm866x0pg60zby2cxizid"; + sha256 = "0mbpflskhnz3jf312k50vn0hqbql8ga2rk0k79pkgchip4q4vcms"; authors = [ "Andrew Gallant " ]; @@ -7096,6 +7500,65 @@ rec { sha256 = "02y9lhad22p56y8pgwz04si2pd91nxcl5djmmall6v1vd2c9hzjh"; }; + "test-case" = rec { + crateName = "test-case"; + version = "2.2.1"; + edition = "2018"; + sha256 = "1md6czjifaqjcj0zbqy2067kj82nzqllqhfw9av9i2a8x4lskbh7"; + authors = [ + "Marcin Sas-Szymanski " + "Wojciech Polak " + "Łukasz Biel " + ]; + dependencies = [ + { + name = "test-case-macros"; + packageId = "test-case-macros"; + usesDefaultFeatures = false; + } + ]; + features = { + "regex" = [ "dep:regex" ]; + "with-regex" = [ "regex" "test-case-macros/with-regex" ]; + }; + }; + "test-case-macros" = rec { + crateName = "test-case-macros"; + version = "2.2.1"; + edition = "2018"; + sha256 = "0m1y1f1sbhgckcqlyfdvar65xv3q9wkg9q10371gbi3gvkp6hnf9"; + procMacro = true; + authors = [ + "Marcin Sas-Szymanski " + "Wojciech Polak " + "Łukasz Biel " + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "proc-macro-error"; + packageId = "proc-macro-error"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2 1.0.43"; + } + { + name = "quote"; + packageId = "quote 1.0.21"; + } + { + name = "syn"; + packageId = "syn 1.0.99"; + features = [ "full" "extra-traits" ]; + } + ]; + features = { + }; + }; "textwrap" = rec { crateName = "textwrap"; version = "0.11.0"; @@ -7110,13 +7573,16 @@ rec { packageId = "unicode-width"; } ]; - + features = { + "hyphenation" = [ "dep:hyphenation" ]; + "term_size" = [ "dep:term_size" ]; + }; }; "thiserror" = rec { crateName = "thiserror"; - version = "1.0.30"; + version = "1.0.32"; edition = "2018"; - sha256 = "05y4wm29ck8flwq5k1q6nhwh00a3b30cz3xr0qvnbwad5vjsnjw5"; + sha256 = "154ry4l3h9nv3ikb6l9y5yxndrr0p7krpizl641dqjkngxmmixpm"; authors = [ "David Tolnay " ]; @@ -7130,9 +7596,9 @@ rec { }; "thiserror-impl" = rec { crateName = "thiserror-impl"; - version = "1.0.30"; + version = "1.0.32"; edition = "2018"; - sha256 = "0jviwmvx6wzawsj6c9msic7h419wmsbjagl9dzhpydkzc8zzscma"; + sha256 = "08bc1x36izsg7ps5s9yrpj80mf0av2jlbcgirm4h2zjhaidzrfhj"; procMacro = true; authors = [ "David Tolnay " @@ -7140,15 +7606,15 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; } ]; @@ -7167,7 +7633,9 @@ rec { packageId = "once_cell"; } ]; - + features = { + "criterion" = [ "dep:criterion" ]; + }; }; "time" = rec { crateName = "time"; @@ -7201,13 +7669,15 @@ rec { features = [ "std" "processthreadsapi" "winbase" ]; } ]; - + features = { + "rustc-serialize" = [ "dep:rustc-serialize" ]; + }; }; "tinyvec" = rec { crateName = "tinyvec"; - version = "1.5.1"; + version = "1.6.0"; edition = "2018"; - sha256 = "1lnqnva56673r0d40586rkzyl2qqcz19wm29q8h5a95n89d1s71c"; + sha256 = "0l6bl2h62a5m44jdnpn7lmj14rd44via8180i7121fvm73mmrk47"; authors = [ "Lokathor " ]; @@ -7220,8 +7690,13 @@ rec { ]; features = { "alloc" = [ "tinyvec_macros" ]; + "arbitrary" = [ "dep:arbitrary" ]; "real_blackbox" = [ "criterion/real_blackbox" ]; "rustc_1_55" = [ "rustc_1_40" ]; + "rustc_1_57" = [ "rustc_1_55" ]; + "serde" = [ "dep:serde" ]; + "std" = [ "alloc" ]; + "tinyvec_macros" = [ "dep:tinyvec_macros" ]; }; resolvedDefaultFeatures = [ "alloc" "default" "tinyvec_macros" ]; }; @@ -7237,9 +7712,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.16.1"; + version = "1.20.1"; edition = "2018"; - sha256 = "02pwb89x5lixdpfpxjdmngqwq782jfx1cxy5x04x7rjxc95sc9qc"; + sha256 = "10d5n2r6dw0xcrg7jrzqs2xmq77d14j3ndhy0kfp8ivx7bv2b0vs"; authors = [ "Tokio Contributors " ]; @@ -7270,16 +7745,34 @@ rec { packageId = "num_cpus"; optional = true; } + { + name = "once_cell"; + packageId = "once_cell"; + optional = true; + } { name = "pin-project-lite"; packageId = "pin-project-lite"; } + { + name = "socket2"; + packageId = "socket2"; + optional = true; + features = [ "all" ]; + } { name = "winapi"; packageId = "winapi"; optional = true; usesDefaultFeatures = false; target = { target, features }: (target."windows" or false); + features = [ "std" ]; + } + ]; + buildDependencies = [ + { + name = "autocfg"; + packageId = "autocfg"; } ]; devDependencies = [ @@ -7288,18 +7781,36 @@ rec { packageId = "libc"; target = {target, features}: (target."unix" or false); } + { + name = "socket2"; + packageId = "socket2"; + target = {target, features}: (!(target."arch" == "wasm32")); + } ]; features = { + "bytes" = [ "dep:bytes" ]; "full" = [ "fs" "io-util" "io-std" "macros" "net" "parking_lot" "process" "rt" "rt-multi-thread" "signal" "sync" "time" ]; "io-util" = [ "memchr" "bytes" ]; + "libc" = [ "dep:libc" ]; "macros" = [ "tokio-macros" ]; - "net" = [ "libc" "mio/os-poll" "mio/os-util" "mio/tcp" "mio/udp" "mio/uds" "winapi/namedpipeapi" ]; - "process" = [ "bytes" "once_cell" "libc" "mio/os-poll" "mio/os-util" "mio/uds" "signal-hook-registry" "winapi/threadpoollegacyapiset" ]; + "memchr" = [ "dep:memchr" ]; + "mio" = [ "dep:mio" ]; + "net" = [ "libc" "mio/os-poll" "mio/os-ext" "mio/net" "socket2" "winapi/fileapi" "winapi/handleapi" "winapi/namedpipeapi" "winapi/winbase" "winapi/winnt" "winapi/minwindef" ]; + "num_cpus" = [ "dep:num_cpus" ]; + "once_cell" = [ "dep:once_cell" ]; + "parking_lot" = [ "dep:parking_lot" ]; + "process" = [ "bytes" "once_cell" "libc" "mio/os-poll" "mio/os-ext" "mio/net" "signal-hook-registry" "winapi/handleapi" "winapi/processthreadsapi" "winapi/threadpoollegacyapiset" "winapi/winbase" "winapi/winnt" "winapi/minwindef" ]; + "rt" = [ "once_cell" ]; "rt-multi-thread" = [ "num_cpus" "rt" ]; - "signal" = [ "once_cell" "libc" "mio/os-poll" "mio/uds" "mio/os-util" "signal-hook-registry" "winapi/consoleapi" ]; + "signal" = [ "once_cell" "libc" "mio/os-poll" "mio/net" "mio/os-ext" "signal-hook-registry" "winapi/consoleapi" "winapi/wincon" "winapi/minwindef" ]; + "signal-hook-registry" = [ "dep:signal-hook-registry" ]; + "socket2" = [ "dep:socket2" ]; "test-util" = [ "rt" "sync" "time" ]; + "tokio-macros" = [ "dep:tokio-macros" ]; + "tracing" = [ "dep:tracing" ]; + "winapi" = [ "dep:winapi" ]; }; - resolvedDefaultFeatures = [ "bytes" "default" "io-util" "libc" "memchr" "mio" "net" "num_cpus" "rt" "rt-multi-thread" "sync" "time" "winapi" ]; + resolvedDefaultFeatures = [ "bytes" "default" "io-util" "libc" "memchr" "mio" "net" "num_cpus" "once_cell" "rt" "rt-multi-thread" "socket2" "sync" "time" "winapi" ]; }; "tokio-native-tls" = rec { crateName = "tokio-native-tls"; @@ -7330,9 +7841,9 @@ rec { }; "tokio-util" = rec { crateName = "tokio-util"; - version = "0.6.9"; + version = "0.7.3"; edition = "2018"; - sha256 = "1h2cc3ickn6wj5c0bhw8v5drzrwr5r6n0rjbxgc6qdsx7scf36cy"; + sha256 = "0igzhn80k8l9w6r5qj0bci70kxhbsm1j31gr406pghyxvvc3qinc"; authors = [ "Tokio Contributors " ]; @@ -7349,10 +7860,6 @@ rec { name = "futures-sink"; packageId = "futures-sink"; } - { - name = "log"; - packageId = "log"; - } { name = "pin-project-lite"; packageId = "pin-project-lite"; @@ -7362,6 +7869,13 @@ rec { packageId = "tokio"; features = [ "sync" ]; } + { + name = "tracing"; + packageId = "tracing"; + optional = true; + usesDefaultFeatures = false; + features = [ "std" ]; + } ]; devDependencies = [ { @@ -7372,20 +7886,26 @@ rec { ]; features = { "__docs_rs" = [ "futures-util" ]; + "codec" = [ "tracing" ]; "compat" = [ "futures-io" ]; "full" = [ "codec" "compat" "io-util" "time" "net" "rt" ]; + "futures-io" = [ "dep:futures-io" ]; + "futures-util" = [ "dep:futures-util" ]; + "hashbrown" = [ "dep:hashbrown" ]; "io-util" = [ "io" "tokio/rt" "tokio/io-util" ]; "net" = [ "tokio/net" ]; - "rt" = [ "tokio/rt" ]; + "rt" = [ "tokio/rt" "tokio/sync" "futures-util" "hashbrown" ]; + "slab" = [ "dep:slab" ]; "time" = [ "tokio/time" "slab" ]; + "tracing" = [ "dep:tracing" ]; }; - resolvedDefaultFeatures = [ "codec" "default" ]; + resolvedDefaultFeatures = [ "codec" "default" "tracing" ]; }; "toml" = rec { crateName = "toml"; - version = "0.5.8"; + version = "0.5.9"; edition = "2018"; - sha256 = "1apcmjrrjw429pjw7mqlmdwwd67g8305vwqy4kw3swr612bl44d3"; + sha256 = "1mr40c0x3ma0dbzh4v43bfn4sj3k9ihpgq6fz1js88l6fnky30ld"; authors = [ "Alex Crichton " ]; @@ -7396,6 +7916,7 @@ rec { } ]; features = { + "indexmap" = [ "dep:indexmap" ]; "preserve_order" = [ "indexmap" ]; }; resolvedDefaultFeatures = [ "default" ]; @@ -7426,9 +7947,9 @@ rec { }; "tower-service" = rec { crateName = "tower-service"; - version = "0.3.1"; + version = "0.3.2"; edition = "2018"; - sha256 = "1iih764s3f6vlkspfmr72fkrs2lw1v3wiqmc6bd5zq1hdlfzs39n"; + sha256 = "0lmfzmmvid2yp2l36mbavhmqgsvzqf7r2wiwz73ml4xmwaf1rg5n"; authors = [ "Tower Maintainers " ]; @@ -7436,9 +7957,9 @@ rec { }; "tracing" = rec { crateName = "tracing"; - version = "0.1.30"; + version = "0.1.36"; edition = "2018"; - sha256 = "1faza94zaf6cwd3fmrwj6bq2xz538wpaxxakb46yba729wsr739d"; + sha256 = "01s3qsm1jfz4h4l401lhy8j2yfds45kpb234l447v9k0pmkrbkig"; authors = [ "Eliza Weisman " "Tokio Contributors " @@ -7461,32 +7982,36 @@ rec { features = { "attributes" = [ "tracing-attributes" ]; "default" = [ "std" "attributes" ]; + "log" = [ "dep:log" ]; "log-always" = [ "log" ]; "std" = [ "tracing-core/std" ]; + "tracing-attributes" = [ "dep:tracing-attributes" ]; "valuable" = [ "tracing-core/valuable" ]; }; resolvedDefaultFeatures = [ "std" ]; }; "tracing-core" = rec { crateName = "tracing-core"; - version = "0.1.22"; + version = "0.1.29"; edition = "2018"; - sha256 = "08wssa1n70vg02nfw6ykfzjhind88ws8vjqi64nsfch6718wpkq3"; + sha256 = "1xr2dqar64fj4y43vy0xvaxs6n3xssd3z0jbf408lmbn60qa9vjs"; authors = [ "Tokio Contributors " ]; dependencies = [ { - name = "lazy_static"; - packageId = "lazy_static"; + name = "once_cell"; + packageId = "once_cell"; optional = true; } ]; features = { "default" = [ "std" "valuable/std" ]; - "std" = [ "lazy_static" ]; + "once_cell" = [ "dep:once_cell" ]; + "std" = [ "once_cell" ]; + "valuable" = [ "dep:valuable" ]; }; - resolvedDefaultFeatures = [ "lazy_static" "std" ]; + resolvedDefaultFeatures = [ "once_cell" "std" ]; }; "try-lock" = rec { crateName = "try-lock"; @@ -7521,6 +8046,8 @@ rec { "all" = [ "jetscii" "pattern" ]; "benchmarks" = [ "galil-seiferas" "pattern" ]; "default" = [ "use_std" ]; + "galil-seiferas" = [ "dep:galil-seiferas" ]; + "jetscii" = [ "dep:jetscii" ]; "use_std" = [ "memchr/use_std" ]; }; resolvedDefaultFeatures = [ "default" "use_std" ]; @@ -7551,21 +8078,22 @@ rec { "Andre Bogus " ]; features = { + "scale-info" = [ "dep:scale-info" ]; "scale_info" = [ "scale-info/derive" ]; }; }; "ucd-trie" = rec { crateName = "ucd-trie"; - version = "0.1.3"; + version = "0.1.4"; edition = "2018"; - sha256 = "072cblf8v3wzyaz3lhbpzgil4s03dpzg1ppy3gqx2l4v622y3pjn"; + sha256 = "070lb1h3abm00zvrj4wa4gls8zwzx53sp2iq5gg8amgyqjchamw9"; authors = [ "Andrew Gallant " ]; features = { "default" = [ "std" ]; }; - resolvedDefaultFeatures = [ "default" "std" ]; + resolvedDefaultFeatures = [ "std" ]; }; "unchecked-index" = rec { crateName = "unchecked-index"; @@ -7579,25 +8107,38 @@ rec { }; "unicode-bidi" = rec { crateName = "unicode-bidi"; - version = "0.3.7"; + version = "0.3.8"; edition = "2018"; - sha256 = "13v7v8pp7mdqqf0ypk73va78c3b4xzpryvbls9p47nz3cd34008s"; + sha256 = "14p95n9kw9p7psp0vsp0j9yfkfg6sn1rlnymvmwmya0x60l736q9"; libName = "unicode_bidi"; authors = [ "The Servo Project Developers" ]; features = { - "default" = [ "std" ]; + "default" = [ "std" "hardcoded-data" ]; + "flame" = [ "dep:flame" ]; "flame_it" = [ "flame" "flamer" ]; + "flamer" = [ "dep:flamer" ]; + "serde" = [ "dep:serde" ]; "with_serde" = [ "serde" ]; }; - resolvedDefaultFeatures = [ "default" "std" ]; + resolvedDefaultFeatures = [ "default" "hardcoded-data" "std" ]; + }; + "unicode-ident" = rec { + crateName = "unicode-ident"; + version = "1.0.3"; + edition = "2018"; + sha256 = "1bqswc96ws8l6k7xx56dg521a3l5imi3mhlcz7rsi6a92mxb7xf4"; + authors = [ + "David Tolnay " + ]; + }; "unicode-normalization" = rec { crateName = "unicode-normalization"; - version = "0.1.19"; + version = "0.1.21"; edition = "2018"; - sha256 = "1yabhmg8zlcksda3ajly9hpbzqgbhknxwch8dwkfkaa1569r0ifm"; + sha256 = "1rk0zci96pc26sk21nwk5cdkxb3p6bfani0dhaff2smwyz2bsk45"; authors = [ "kwantam " "Manish Goregaokar " @@ -7636,7 +8177,10 @@ rec { "Manish Goregaokar " ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "rustc-dep-of-std" = [ "std" "core" "compiler_builtins" ]; + "std" = [ "dep:std" ]; }; resolvedDefaultFeatures = [ "default" ]; }; @@ -7653,11 +8197,11 @@ rec { }; resolvedDefaultFeatures = [ "default" ]; }; - "unicode-xid 0.2.2" = rec { + "unicode-xid 0.2.3" = rec { crateName = "unicode-xid"; - version = "0.2.2"; + version = "0.2.3"; edition = "2015"; - sha256 = "1wrkgcw557v311dkdb6n2hrix9dm2qdsb1zpw7pn79l03zb85jwc"; + sha256 = "015zxvwk0is9ls3v016krn5gpr5rk5smyzg6c9j58439ckrm2zlm"; authors = [ "erick.tryzelaar " "kwantam " @@ -7677,11 +8221,12 @@ rec { ]; }; - "unindent" = rec { - crateName = "unindent"; - version = "0.1.7"; - edition = "2018"; - sha256 = "1is1gmx1l89z426rn3xsi0mii4vhy2imhqmhx8x2pd8mji6y0kpi"; + "unsafe-libyaml" = rec { + crateName = "unsafe-libyaml"; + version = "0.2.2"; + edition = "2021"; + crateBin = []; + sha256 = "1c5fg4b1vyfpqy0845rjb0d1qf41czshypmsck7mnfan98rpj4ck"; authors = [ "David Tolnay " ]; @@ -7713,7 +8258,9 @@ rec { packageId = "percent-encoding"; } ]; - + features = { + "serde" = [ "dep:serde" ]; + }; }; "utf8parse" = rec { crateName = "utf8parse"; @@ -7773,6 +8320,7 @@ rec { ]; features = { "eders" = [ "serde" ]; + "serde" = [ "dep:serde" ]; }; }; "version_check" = rec { @@ -7811,6 +8359,7 @@ rec { } ]; features = { + "arrayvec" = [ "dep:arrayvec" ]; "default" = [ "no_std" ]; "nightly" = [ "utf8parse/nightly" ]; "no_std" = [ "arrayvec" ]; @@ -7829,11 +8378,11 @@ rec { dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } ]; @@ -7912,8 +8461,28 @@ rec { "The Cranelift Project Developers" ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "default" = [ "std" ]; + "rustc-dep-of-std" = [ "compiler_builtins" "core" "rustc-std-workspace-alloc" ]; + "rustc-std-workspace-alloc" = [ "dep:rustc-std-workspace-alloc" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "wasi 0.11.0+wasi-snapshot-preview1" = rec { + crateName = "wasi"; + version = "0.11.0+wasi-snapshot-preview1"; + edition = "2018"; + sha256 = "08z4hxwkpdpalxjps1ai9y7ihin26y9f476i53dv98v45gkqg3cw"; + authors = [ + "The Cranelift Project Developers" + ]; + features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "default" = [ "std" ]; "rustc-dep-of-std" = [ "compiler_builtins" "core" "rustc-std-workspace-alloc" ]; + "rustc-std-workspace-alloc" = [ "dep:rustc-std-workspace-alloc" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; @@ -7926,16 +8495,19 @@ rec { "The Cranelift Project Developers" ]; features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; "default" = [ "std" ]; "rustc-dep-of-std" = [ "compiler_builtins" "core" "rustc-std-workspace-alloc" ]; + "rustc-std-workspace-alloc" = [ "dep:rustc-std-workspace-alloc" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; - version = "0.2.78"; + version = "0.2.82"; edition = "2018"; - sha256 = "1kkzwj24z9ad7lq8c5ynlnpxpx8hwra6w6brl871a6dj6vi76bv3"; + sha256 = "0zaz3wfbzkycsmad2frcdqrvbffclk234j6mkj6nqw64yvim4xpw"; authors = [ "The wasm-bindgen Developers" ]; @@ -7952,7 +8524,9 @@ rec { features = { "default" = [ "spans" "std" ]; "enable-interning" = [ "std" ]; + "serde" = [ "dep:serde" ]; "serde-serialize" = [ "serde" "serde_json" "std" ]; + "serde_json" = [ "dep:serde_json" ]; "spans" = [ "wasm-bindgen-macro/spans" ]; "strict-macro" = [ "wasm-bindgen-macro/strict-macro" ]; "xxx_debug_only_print_generated_code" = [ "wasm-bindgen-macro/xxx_debug_only_print_generated_code" ]; @@ -7961,9 +8535,9 @@ rec { }; "wasm-bindgen-backend" = rec { crateName = "wasm-bindgen-backend"; - version = "0.2.78"; + version = "0.2.82"; edition = "2018"; - sha256 = "0yw3ma0ahd1cz3afxpqcgwy9rwwgmz2g8pn8nas7c95sky7vy5x3"; + sha256 = "0gxcqr6k772m867lvvz42a8vvnswz0fnnn5rf4lxassq0m4d8b36"; authors = [ "The wasm-bindgen Developers" ]; @@ -7972,25 +8546,25 @@ rec { name = "bumpalo"; packageId = "bumpalo"; } - { - name = "lazy_static"; - packageId = "lazy_static"; - } { name = "log"; packageId = "log"; } + { + name = "once_cell"; + packageId = "once_cell"; + } { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "full" ]; } { @@ -8005,9 +8579,9 @@ rec { }; "wasm-bindgen-futures" = rec { crateName = "wasm-bindgen-futures"; - version = "0.4.28"; + version = "0.4.32"; edition = "2018"; - sha256 = "0fax7x0iysa64iqmzq0lri8llw8v0f8acz1iq6b4qahzrcipb3cf"; + sha256 = "1badc8xgs3spnh1sbiqscsnq0sb029cyib2lbggwv2hz38ignxps"; authors = [ "The wasm-bindgen Developers" ]; @@ -8032,14 +8606,15 @@ rec { } ]; features = { + "futures-core" = [ "dep:futures-core" ]; "futures-core-03-stream" = [ "futures-core" ]; }; }; "wasm-bindgen-macro" = rec { crateName = "wasm-bindgen-macro"; - version = "0.2.78"; + version = "0.2.82"; edition = "2018"; - sha256 = "1ydcppds5qbj77c7kdinkg9qidcf7ahvwqvnb3v8nllmqkklcqfm"; + sha256 = "00n6abwrvh0j63nqr95fff1h698r7c1rr10j2pxis1qj60yz2q5j"; procMacro = true; authors = [ "The wasm-bindgen Developers" @@ -8047,7 +8622,7 @@ rec { dependencies = [ { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "wasm-bindgen-macro-support"; @@ -8062,24 +8637,24 @@ rec { }; "wasm-bindgen-macro-support" = rec { crateName = "wasm-bindgen-macro-support"; - version = "0.2.78"; + version = "0.2.82"; edition = "2018"; - sha256 = "1ay5qmbqh8hbsgf2dqkg7ia13srx3c1d6p2qvjmzhdaqlbpf00vq"; + sha256 = "1nl0gcsm2zsfvj5z1ka8bkvgm0ma443vk6ljq8b95dyrpmafds2v"; authors = [ "The wasm-bindgen Developers" ]; dependencies = [ { name = "proc-macro2"; - packageId = "proc-macro2 1.0.36"; + packageId = "proc-macro2 1.0.43"; } { name = "quote"; - packageId = "quote 1.0.15"; + packageId = "quote 1.0.21"; } { name = "syn"; - packageId = "syn 1.0.86"; + packageId = "syn 1.0.99"; features = [ "visit" "full" ]; } { @@ -8099,9 +8674,9 @@ rec { }; "wasm-bindgen-shared" = rec { crateName = "wasm-bindgen-shared"; - version = "0.2.78"; + version = "0.2.82"; edition = "2018"; - sha256 = "1k27dc57h0brx5ish4dwmzibyif7m9lfagvph1a7s0ygi4kj6dq2"; + sha256 = "02hlb8hvfxzvgbqdhc2fh20xrb027sraacb5zyai1mf7sc5xv635"; authors = [ "The wasm-bindgen Developers" ]; @@ -8109,9 +8684,9 @@ rec { }; "web-sys" = rec { crateName = "web-sys"; - version = "0.3.55"; + version = "0.3.59"; edition = "2018"; - sha256 = "1yz9dym9y9f9s1f99q5j5kl2dfc5kn2jpjfdnnkfmnar3igi1srq"; + sha256 = "189m6gbnxk1fmhn0ipq40pj3q6hbf8sj0sxqgqcj654lgyr5l1gd"; authors = [ "The wasm-bindgen Developers" ]; @@ -8222,7 +8797,9 @@ rec { "GamepadButtonEvent" = [ "Event" "GamepadEvent" ]; "GamepadEvent" = [ "Event" ]; "GpuDevice" = [ "EventTarget" ]; + "GpuOutOfMemoryError" = [ "GpuError" ]; "GpuUncapturedErrorEvent" = [ "Event" ]; + "GpuValidationError" = [ "GpuError" ]; "HashChangeEvent" = [ "Event" ]; "Hid" = [ "EventTarget" ]; "HidConnectionEvent" = [ "Event" ]; @@ -8314,6 +8891,7 @@ rec { "IdbVersionChangeEvent" = [ "Event" ]; "IirFilterNode" = [ "AudioNode" "EventTarget" ]; "ImageCaptureErrorEvent" = [ "Event" ]; + "ImageTrack" = [ "EventTarget" ]; "InputEvent" = [ "Event" "UiEvent" ]; "KeyboardEvent" = [ "Event" "UiEvent" ]; "KeyframeEffect" = [ "AnimationEffect" ]; @@ -8335,6 +8913,7 @@ rec { "MediaStreamEvent" = [ "Event" ]; "MediaStreamTrack" = [ "EventTarget" ]; "MediaStreamTrackEvent" = [ "Event" ]; + "MediaStreamTrackGenerator" = [ "EventTarget" "MediaStreamTrack" ]; "MessageEvent" = [ "Event" ]; "MessagePort" = [ "EventTarget" ]; "MidiAccess" = [ "EventTarget" ]; @@ -8411,6 +8990,7 @@ rec { "SpeechSynthesisUtterance" = [ "EventTarget" ]; "StereoPannerNode" = [ "AudioNode" "EventTarget" ]; "StorageEvent" = [ "Event" ]; + "SubmitEvent" = [ "Event" ]; "SvgAnimateElement" = [ "Element" "EventTarget" "Node" "SvgAnimationElement" "SvgElement" ]; "SvgAnimateMotionElement" = [ "Element" "EventTarget" "Node" "SvgAnimationElement" "SvgElement" ]; "SvgAnimateTransformElement" = [ "Element" "EventTarget" "Node" "SvgAnimationElement" "SvgElement" ]; @@ -8539,16 +9119,19 @@ rec { "XmlHttpRequest" = [ "EventTarget" "XmlHttpRequestEventTarget" ]; "XmlHttpRequestEventTarget" = [ "EventTarget" ]; "XmlHttpRequestUpload" = [ "EventTarget" "XmlHttpRequestEventTarget" ]; - "Xr" = [ "EventTarget" ]; "XrBoundedReferenceSpace" = [ "EventTarget" "XrReferenceSpace" "XrSpace" ]; "XrInputSourceEvent" = [ "Event" ]; "XrInputSourcesChangeEvent" = [ "Event" ]; + "XrLayer" = [ "EventTarget" ]; + "XrPermissionStatus" = [ "EventTarget" "PermissionStatus" ]; "XrReferenceSpace" = [ "EventTarget" "XrSpace" ]; "XrReferenceSpaceEvent" = [ "Event" ]; "XrSession" = [ "EventTarget" ]; "XrSessionEvent" = [ "Event" ]; "XrSpace" = [ "EventTarget" ]; + "XrSystem" = [ "EventTarget" ]; "XrViewerPose" = [ "XrPose" ]; + "XrWebGlLayer" = [ "EventTarget" "XrLayer" ]; }; resolvedDefaultFeatures = [ "Blob" "BlobPropertyBag" "Event" "EventTarget" "File" "FormData" "Headers" "MessageEvent" "Request" "RequestCredentials" "RequestInit" "RequestMode" "Response" "ServiceWorkerGlobalScope" "Window" "Worker" "WorkerGlobalScope" ]; }; @@ -8575,7 +9158,7 @@ rec { features = { "debug" = [ "impl-debug" ]; }; - resolvedDefaultFeatures = [ "basetsd" "cfg" "consoleapi" "errhandlingapi" "evntrace" "fileapi" "handleapi" "impl-debug" "impl-default" "in6addr" "inaddr" "ioapiset" "jobapi" "jobapi2" "knownfolders" "libloaderapi" "lmcons" "memoryapi" "minschannel" "minwinbase" "minwindef" "mstcpip" "mswsock" "namedpipeapi" "ntdef" "ntsecapi" "ntstatus" "objbase" "processenv" "processthreadsapi" "profileapi" "psapi" "schannel" "securitybaseapi" "shellapi" "shlobj" "sspi" "std" "synchapi" "sysinfoapi" "timezoneapi" "winbase" "wincon" "wincrypt" "windef" "winerror" "winioctl" "winnt" "winreg" "winsock2" "winuser" "ws2def" "ws2ipdef" "ws2tcpip" ]; + resolvedDefaultFeatures = [ "activation" "basetsd" "combaseapi" "consoleapi" "errhandlingapi" "fileapi" "handleapi" "impl-debug" "impl-default" "ioapiset" "jobapi" "jobapi2" "knownfolders" "libloaderapi" "memoryapi" "minwinbase" "minwindef" "namedpipeapi" "ntdef" "ntstatus" "objbase" "processenv" "processthreadsapi" "profileapi" "psapi" "roapi" "shellapi" "shlobj" "std" "synchapi" "sysinfoapi" "timezoneapi" "winbase" "wincon" "wincrypt" "winerror" "winnt" "winreg" "winsock2" "winstring" "winuser" "ws2def" "ws2ipdef" "ws2tcpip" ]; }; "winapi-i686-pc-windows-gnu" = rec { crateName = "winapi-i686-pc-windows-gnu"; @@ -8614,12 +9197,797 @@ rec { "Peter Atashian " ]; + }; + "windows-sys" = rec { + crateName = "windows-sys"; + version = "0.36.1"; + edition = "2018"; + sha256 = "1lmqangv0zg1l46xiq7rfnqwsx8f8m52mqbgg2mrx7x52rd1a17a"; + authors = [ + "Microsoft" + ]; + dependencies = [ + { + name = "windows_aarch64_msvc"; + packageId = "windows_aarch64_msvc"; + target = { target, features }: (stdenv.hostPlatform.config == "aarch64-pc-windows-msvc"); + } + { + name = "windows_aarch64_msvc"; + packageId = "windows_aarch64_msvc"; + target = { target, features }: (stdenv.hostPlatform.config == "aarch64-uwp-windows-msvc"); + } + { + name = "windows_i686_gnu"; + packageId = "windows_i686_gnu"; + target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-gnu"); + } + { + name = "windows_i686_gnu"; + packageId = "windows_i686_gnu"; + target = { target, features }: (stdenv.hostPlatform.config == "i686-uwp-windows-gnu"); + } + { + name = "windows_i686_msvc"; + packageId = "windows_i686_msvc"; + target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-msvc"); + } + { + name = "windows_i686_msvc"; + packageId = "windows_i686_msvc"; + target = { target, features }: (stdenv.hostPlatform.config == "i686-uwp-windows-msvc"); + } + { + name = "windows_x86_64_gnu"; + packageId = "windows_x86_64_gnu"; + target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-gnu"); + } + { + name = "windows_x86_64_gnu"; + packageId = "windows_x86_64_gnu"; + target = { target, features }: (stdenv.hostPlatform.config == "x86_64-uwp-windows-gnu"); + } + { + name = "windows_x86_64_msvc"; + packageId = "windows_x86_64_msvc"; + target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-msvc"); + } + { + name = "windows_x86_64_msvc"; + packageId = "windows_x86_64_msvc"; + target = { target, features }: (stdenv.hostPlatform.config == "x86_64-uwp-windows-msvc"); + } + ]; + features = { + "AI_MachineLearning" = [ "AI" ]; + "AI_MachineLearning_Preview" = [ "AI_MachineLearning" ]; + "ApplicationModel_Activation" = [ "ApplicationModel" ]; + "ApplicationModel_AppExtensions" = [ "ApplicationModel" ]; + "ApplicationModel_AppService" = [ "ApplicationModel" ]; + "ApplicationModel_Appointments" = [ "ApplicationModel" ]; + "ApplicationModel_Appointments_AppointmentsProvider" = [ "ApplicationModel_Appointments" ]; + "ApplicationModel_Appointments_DataProvider" = [ "ApplicationModel_Appointments" ]; + "ApplicationModel_Background" = [ "ApplicationModel" ]; + "ApplicationModel_Calls" = [ "ApplicationModel" ]; + "ApplicationModel_Calls_Background" = [ "ApplicationModel_Calls" ]; + "ApplicationModel_Calls_Provider" = [ "ApplicationModel_Calls" ]; + "ApplicationModel_Chat" = [ "ApplicationModel" ]; + "ApplicationModel_CommunicationBlocking" = [ "ApplicationModel" ]; + "ApplicationModel_Contacts" = [ "ApplicationModel" ]; + "ApplicationModel_Contacts_DataProvider" = [ "ApplicationModel_Contacts" ]; + "ApplicationModel_Contacts_Provider" = [ "ApplicationModel_Contacts" ]; + "ApplicationModel_ConversationalAgent" = [ "ApplicationModel" ]; + "ApplicationModel_Core" = [ "ApplicationModel" ]; + "ApplicationModel_DataTransfer" = [ "ApplicationModel" ]; + "ApplicationModel_DataTransfer_DragDrop" = [ "ApplicationModel_DataTransfer" ]; + "ApplicationModel_DataTransfer_DragDrop_Core" = [ "ApplicationModel_DataTransfer_DragDrop" ]; + "ApplicationModel_DataTransfer_ShareTarget" = [ "ApplicationModel_DataTransfer" ]; + "ApplicationModel_Email" = [ "ApplicationModel" ]; + "ApplicationModel_Email_DataProvider" = [ "ApplicationModel_Email" ]; + "ApplicationModel_ExtendedExecution" = [ "ApplicationModel" ]; + "ApplicationModel_ExtendedExecution_Foreground" = [ "ApplicationModel_ExtendedExecution" ]; + "ApplicationModel_Holographic" = [ "ApplicationModel" ]; + "ApplicationModel_LockScreen" = [ "ApplicationModel" ]; + "ApplicationModel_Payments" = [ "ApplicationModel" ]; + "ApplicationModel_Payments_Provider" = [ "ApplicationModel_Payments" ]; + "ApplicationModel_Preview" = [ "ApplicationModel" ]; + "ApplicationModel_Preview_Holographic" = [ "ApplicationModel_Preview" ]; + "ApplicationModel_Preview_InkWorkspace" = [ "ApplicationModel_Preview" ]; + "ApplicationModel_Preview_Notes" = [ "ApplicationModel_Preview" ]; + "ApplicationModel_Resources" = [ "ApplicationModel" ]; + "ApplicationModel_Resources_Core" = [ "ApplicationModel_Resources" ]; + "ApplicationModel_Resources_Management" = [ "ApplicationModel_Resources" ]; + "ApplicationModel_Search" = [ "ApplicationModel" ]; + "ApplicationModel_Search_Core" = [ "ApplicationModel_Search" ]; + "ApplicationModel_SocialInfo" = [ "ApplicationModel" ]; + "ApplicationModel_SocialInfo_Provider" = [ "ApplicationModel_SocialInfo" ]; + "ApplicationModel_Store" = [ "ApplicationModel" ]; + "ApplicationModel_Store_LicenseManagement" = [ "ApplicationModel_Store" ]; + "ApplicationModel_Store_Preview" = [ "ApplicationModel_Store" ]; + "ApplicationModel_Store_Preview_InstallControl" = [ "ApplicationModel_Store_Preview" ]; + "ApplicationModel_UserActivities" = [ "ApplicationModel" ]; + "ApplicationModel_UserActivities_Core" = [ "ApplicationModel_UserActivities" ]; + "ApplicationModel_UserDataAccounts" = [ "ApplicationModel" ]; + "ApplicationModel_UserDataAccounts_Provider" = [ "ApplicationModel_UserDataAccounts" ]; + "ApplicationModel_UserDataAccounts_SystemAccess" = [ "ApplicationModel_UserDataAccounts" ]; + "ApplicationModel_UserDataTasks" = [ "ApplicationModel" ]; + "ApplicationModel_UserDataTasks_DataProvider" = [ "ApplicationModel_UserDataTasks" ]; + "ApplicationModel_VoiceCommands" = [ "ApplicationModel" ]; + "ApplicationModel_Wallet" = [ "ApplicationModel" ]; + "ApplicationModel_Wallet_System" = [ "ApplicationModel_Wallet" ]; + "Data_Html" = [ "Data" ]; + "Data_Json" = [ "Data" ]; + "Data_Pdf" = [ "Data" ]; + "Data_Text" = [ "Data" ]; + "Data_Xml" = [ "Data" ]; + "Data_Xml_Dom" = [ "Data_Xml" ]; + "Data_Xml_Xsl" = [ "Data_Xml" ]; + "Devices_Adc" = [ "Devices" ]; + "Devices_Adc_Provider" = [ "Devices_Adc" ]; + "Devices_AllJoyn" = [ "Devices" ]; + "Devices_Background" = [ "Devices" ]; + "Devices_Bluetooth" = [ "Devices" ]; + "Devices_Bluetooth_Advertisement" = [ "Devices_Bluetooth" ]; + "Devices_Bluetooth_Background" = [ "Devices_Bluetooth" ]; + "Devices_Bluetooth_GenericAttributeProfile" = [ "Devices_Bluetooth" ]; + "Devices_Bluetooth_Rfcomm" = [ "Devices_Bluetooth" ]; + "Devices_Custom" = [ "Devices" ]; + "Devices_Display" = [ "Devices" ]; + "Devices_Display_Core" = [ "Devices_Display" ]; + "Devices_Enumeration" = [ "Devices" ]; + "Devices_Enumeration_Pnp" = [ "Devices_Enumeration" ]; + "Devices_Geolocation" = [ "Devices" ]; + "Devices_Geolocation_Geofencing" = [ "Devices_Geolocation" ]; + "Devices_Gpio" = [ "Devices" ]; + "Devices_Gpio_Provider" = [ "Devices_Gpio" ]; + "Devices_Haptics" = [ "Devices" ]; + "Devices_HumanInterfaceDevice" = [ "Devices" ]; + "Devices_I2c" = [ "Devices" ]; + "Devices_I2c_Provider" = [ "Devices_I2c" ]; + "Devices_Input" = [ "Devices" ]; + "Devices_Input_Preview" = [ "Devices_Input" ]; + "Devices_Lights" = [ "Devices" ]; + "Devices_Lights_Effects" = [ "Devices_Lights" ]; + "Devices_Midi" = [ "Devices" ]; + "Devices_Perception" = [ "Devices" ]; + "Devices_Perception_Provider" = [ "Devices_Perception" ]; + "Devices_PointOfService" = [ "Devices" ]; + "Devices_PointOfService_Provider" = [ "Devices_PointOfService" ]; + "Devices_Portable" = [ "Devices" ]; + "Devices_Power" = [ "Devices" ]; + "Devices_Printers" = [ "Devices" ]; + "Devices_Printers_Extensions" = [ "Devices_Printers" ]; + "Devices_Pwm" = [ "Devices" ]; + "Devices_Pwm_Provider" = [ "Devices_Pwm" ]; + "Devices_Radios" = [ "Devices" ]; + "Devices_Scanners" = [ "Devices" ]; + "Devices_Sensors" = [ "Devices" ]; + "Devices_Sensors_Custom" = [ "Devices_Sensors" ]; + "Devices_SerialCommunication" = [ "Devices" ]; + "Devices_SmartCards" = [ "Devices" ]; + "Devices_Sms" = [ "Devices" ]; + "Devices_Spi" = [ "Devices" ]; + "Devices_Spi_Provider" = [ "Devices_Spi" ]; + "Devices_Usb" = [ "Devices" ]; + "Devices_WiFi" = [ "Devices" ]; + "Devices_WiFiDirect" = [ "Devices" ]; + "Devices_WiFiDirect_Services" = [ "Devices_WiFiDirect" ]; + "Embedded_DeviceLockdown" = [ "Embedded" ]; + "Foundation_Collections" = [ "Foundation" ]; + "Foundation_Diagnostics" = [ "Foundation" ]; + "Foundation_Metadata" = [ "Foundation" ]; + "Foundation_Numerics" = [ "Foundation" ]; + "Gaming_Input" = [ "Gaming" ]; + "Gaming_Input_Custom" = [ "Gaming_Input" ]; + "Gaming_Input_ForceFeedback" = [ "Gaming_Input" ]; + "Gaming_Input_Preview" = [ "Gaming_Input" ]; + "Gaming_Preview" = [ "Gaming" ]; + "Gaming_Preview_GamesEnumeration" = [ "Gaming_Preview" ]; + "Gaming_UI" = [ "Gaming" ]; + "Gaming_XboxLive" = [ "Gaming" ]; + "Gaming_XboxLive_Storage" = [ "Gaming_XboxLive" ]; + "Globalization_Collation" = [ "Globalization" ]; + "Globalization_DateTimeFormatting" = [ "Globalization" ]; + "Globalization_Fonts" = [ "Globalization" ]; + "Globalization_NumberFormatting" = [ "Globalization" ]; + "Globalization_PhoneNumberFormatting" = [ "Globalization" ]; + "Graphics_Capture" = [ "Graphics" ]; + "Graphics_DirectX" = [ "Graphics" ]; + "Graphics_DirectX_Direct3D11" = [ "Graphics_DirectX" ]; + "Graphics_Display" = [ "Graphics" ]; + "Graphics_Display_Core" = [ "Graphics_Display" ]; + "Graphics_Effects" = [ "Graphics" ]; + "Graphics_Holographic" = [ "Graphics" ]; + "Graphics_Imaging" = [ "Graphics" ]; + "Graphics_Printing" = [ "Graphics" ]; + "Graphics_Printing3D" = [ "Graphics" ]; + "Graphics_Printing_OptionDetails" = [ "Graphics_Printing" ]; + "Graphics_Printing_PrintSupport" = [ "Graphics_Printing" ]; + "Graphics_Printing_PrintTicket" = [ "Graphics_Printing" ]; + "Graphics_Printing_Workflow" = [ "Graphics_Printing" ]; + "Management_Core" = [ "Management" ]; + "Management_Deployment" = [ "Management" ]; + "Management_Deployment_Preview" = [ "Management_Deployment" ]; + "Management_Policies" = [ "Management" ]; + "Management_Update" = [ "Management" ]; + "Management_Workplace" = [ "Management" ]; + "Media_AppBroadcasting" = [ "Media" ]; + "Media_AppRecording" = [ "Media" ]; + "Media_Audio" = [ "Media" ]; + "Media_Capture" = [ "Media" ]; + "Media_Capture_Core" = [ "Media_Capture" ]; + "Media_Capture_Frames" = [ "Media_Capture" ]; + "Media_Casting" = [ "Media" ]; + "Media_ClosedCaptioning" = [ "Media" ]; + "Media_ContentRestrictions" = [ "Media" ]; + "Media_Control" = [ "Media" ]; + "Media_Core" = [ "Media" ]; + "Media_Core_Preview" = [ "Media_Core" ]; + "Media_Devices" = [ "Media" ]; + "Media_Devices_Core" = [ "Media_Devices" ]; + "Media_DialProtocol" = [ "Media" ]; + "Media_Editing" = [ "Media" ]; + "Media_Effects" = [ "Media" ]; + "Media_FaceAnalysis" = [ "Media" ]; + "Media_Import" = [ "Media" ]; + "Media_MediaProperties" = [ "Media" ]; + "Media_Miracast" = [ "Media" ]; + "Media_Ocr" = [ "Media" ]; + "Media_PlayTo" = [ "Media" ]; + "Media_Playback" = [ "Media" ]; + "Media_Playlists" = [ "Media" ]; + "Media_Protection" = [ "Media" ]; + "Media_Protection_PlayReady" = [ "Media_Protection" ]; + "Media_Render" = [ "Media" ]; + "Media_SpeechRecognition" = [ "Media" ]; + "Media_SpeechSynthesis" = [ "Media" ]; + "Media_Streaming" = [ "Media" ]; + "Media_Streaming_Adaptive" = [ "Media_Streaming" ]; + "Media_Transcoding" = [ "Media" ]; + "Networking_BackgroundTransfer" = [ "Networking" ]; + "Networking_Connectivity" = [ "Networking" ]; + "Networking_NetworkOperators" = [ "Networking" ]; + "Networking_Proximity" = [ "Networking" ]; + "Networking_PushNotifications" = [ "Networking" ]; + "Networking_ServiceDiscovery" = [ "Networking" ]; + "Networking_ServiceDiscovery_Dnssd" = [ "Networking_ServiceDiscovery" ]; + "Networking_Sockets" = [ "Networking" ]; + "Networking_Vpn" = [ "Networking" ]; + "Networking_XboxLive" = [ "Networking" ]; + "Perception_Automation" = [ "Perception" ]; + "Perception_Automation_Core" = [ "Perception_Automation" ]; + "Perception_People" = [ "Perception" ]; + "Perception_Spatial" = [ "Perception" ]; + "Perception_Spatial_Preview" = [ "Perception_Spatial" ]; + "Perception_Spatial_Surfaces" = [ "Perception_Spatial" ]; + "Phone_ApplicationModel" = [ "Phone" ]; + "Phone_Devices" = [ "Phone" ]; + "Phone_Devices_Notification" = [ "Phone_Devices" ]; + "Phone_Devices_Power" = [ "Phone_Devices" ]; + "Phone_Management" = [ "Phone" ]; + "Phone_Management_Deployment" = [ "Phone_Management" ]; + "Phone_Media" = [ "Phone" ]; + "Phone_Media_Devices" = [ "Phone_Media" ]; + "Phone_Notification" = [ "Phone" ]; + "Phone_Notification_Management" = [ "Phone_Notification" ]; + "Phone_PersonalInformation" = [ "Phone" ]; + "Phone_PersonalInformation_Provisioning" = [ "Phone_PersonalInformation" ]; + "Phone_Speech" = [ "Phone" ]; + "Phone_Speech_Recognition" = [ "Phone_Speech" ]; + "Phone_StartScreen" = [ "Phone" ]; + "Phone_System" = [ "Phone" ]; + "Phone_System_Power" = [ "Phone_System" ]; + "Phone_System_Profile" = [ "Phone_System" ]; + "Phone_System_UserProfile" = [ "Phone_System" ]; + "Phone_System_UserProfile_GameServices" = [ "Phone_System_UserProfile" ]; + "Phone_System_UserProfile_GameServices_Core" = [ "Phone_System_UserProfile_GameServices" ]; + "Phone_UI" = [ "Phone" ]; + "Phone_UI_Input" = [ "Phone_UI" ]; + "Security_Authentication" = [ "Security" ]; + "Security_Authentication_Identity" = [ "Security_Authentication" ]; + "Security_Authentication_Identity_Core" = [ "Security_Authentication_Identity" ]; + "Security_Authentication_Identity_Provider" = [ "Security_Authentication_Identity" ]; + "Security_Authentication_OnlineId" = [ "Security_Authentication" ]; + "Security_Authentication_Web" = [ "Security_Authentication" ]; + "Security_Authentication_Web_Core" = [ "Security_Authentication_Web" ]; + "Security_Authentication_Web_Provider" = [ "Security_Authentication_Web" ]; + "Security_Authorization" = [ "Security" ]; + "Security_Authorization_AppCapabilityAccess" = [ "Security_Authorization" ]; + "Security_Credentials" = [ "Security" ]; + "Security_Credentials_UI" = [ "Security_Credentials" ]; + "Security_Cryptography" = [ "Security" ]; + "Security_Cryptography_Certificates" = [ "Security_Cryptography" ]; + "Security_Cryptography_Core" = [ "Security_Cryptography" ]; + "Security_Cryptography_DataProtection" = [ "Security_Cryptography" ]; + "Security_DataProtection" = [ "Security" ]; + "Security_EnterpriseData" = [ "Security" ]; + "Security_ExchangeActiveSyncProvisioning" = [ "Security" ]; + "Security_Isolation" = [ "Security" ]; + "Services_Cortana" = [ "Services" ]; + "Services_Maps" = [ "Services" ]; + "Services_Maps_Guidance" = [ "Services_Maps" ]; + "Services_Maps_LocalSearch" = [ "Services_Maps" ]; + "Services_Maps_OfflineMaps" = [ "Services_Maps" ]; + "Services_Store" = [ "Services" ]; + "Services_TargetedContent" = [ "Services" ]; + "Storage_AccessCache" = [ "Storage" ]; + "Storage_BulkAccess" = [ "Storage" ]; + "Storage_Compression" = [ "Storage" ]; + "Storage_FileProperties" = [ "Storage" ]; + "Storage_Pickers" = [ "Storage" ]; + "Storage_Pickers_Provider" = [ "Storage_Pickers" ]; + "Storage_Provider" = [ "Storage" ]; + "Storage_Search" = [ "Storage" ]; + "Storage_Streams" = [ "Storage" ]; + "System_Diagnostics" = [ "System" ]; + "System_Diagnostics_DevicePortal" = [ "System_Diagnostics" ]; + "System_Diagnostics_Telemetry" = [ "System_Diagnostics" ]; + "System_Diagnostics_TraceReporting" = [ "System_Diagnostics" ]; + "System_Display" = [ "System" ]; + "System_Implementation" = [ "System" ]; + "System_Implementation_FileExplorer" = [ "System_Implementation" ]; + "System_Inventory" = [ "System" ]; + "System_Power" = [ "System" ]; + "System_Power_Diagnostics" = [ "System_Power" ]; + "System_Preview" = [ "System" ]; + "System_Profile" = [ "System" ]; + "System_Profile_SystemManufacturers" = [ "System_Profile" ]; + "System_RemoteDesktop" = [ "System" ]; + "System_RemoteDesktop_Input" = [ "System_RemoteDesktop" ]; + "System_RemoteSystems" = [ "System" ]; + "System_Threading" = [ "System" ]; + "System_Threading_Core" = [ "System_Threading" ]; + "System_Update" = [ "System" ]; + "System_UserProfile" = [ "System" ]; + "UI_Accessibility" = [ "UI" ]; + "UI_ApplicationSettings" = [ "UI" ]; + "UI_Composition" = [ "UI" ]; + "UI_Composition_Core" = [ "UI_Composition" ]; + "UI_Composition_Desktop" = [ "UI_Composition" ]; + "UI_Composition_Diagnostics" = [ "UI_Composition" ]; + "UI_Composition_Effects" = [ "UI_Composition" ]; + "UI_Composition_Interactions" = [ "UI_Composition" ]; + "UI_Composition_Scenes" = [ "UI_Composition" ]; + "UI_Core" = [ "UI" ]; + "UI_Core_AnimationMetrics" = [ "UI_Core" ]; + "UI_Core_Preview" = [ "UI_Core" ]; + "UI_Input" = [ "UI" ]; + "UI_Input_Core" = [ "UI_Input" ]; + "UI_Input_Inking" = [ "UI_Input" ]; + "UI_Input_Inking_Analysis" = [ "UI_Input_Inking" ]; + "UI_Input_Inking_Core" = [ "UI_Input_Inking" ]; + "UI_Input_Inking_Preview" = [ "UI_Input_Inking" ]; + "UI_Input_Preview" = [ "UI_Input" ]; + "UI_Input_Preview_Injection" = [ "UI_Input_Preview" ]; + "UI_Input_Spatial" = [ "UI_Input" ]; + "UI_Notifications" = [ "UI" ]; + "UI_Notifications_Management" = [ "UI_Notifications" ]; + "UI_Popups" = [ "UI" ]; + "UI_Shell" = [ "UI" ]; + "UI_StartScreen" = [ "UI" ]; + "UI_Text" = [ "UI" ]; + "UI_Text_Core" = [ "UI_Text" ]; + "UI_UIAutomation" = [ "UI" ]; + "UI_UIAutomation_Core" = [ "UI_UIAutomation" ]; + "UI_ViewManagement" = [ "UI" ]; + "UI_ViewManagement_Core" = [ "UI_ViewManagement" ]; + "UI_WebUI" = [ "UI" ]; + "UI_WebUI_Core" = [ "UI_WebUI" ]; + "UI_WindowManagement" = [ "UI" ]; + "UI_WindowManagement_Preview" = [ "UI_WindowManagement" ]; + "UI_Xaml" = [ "UI" ]; + "UI_Xaml_Automation" = [ "UI_Xaml" ]; + "UI_Xaml_Automation_Peers" = [ "UI_Xaml_Automation" ]; + "UI_Xaml_Automation_Provider" = [ "UI_Xaml_Automation" ]; + "UI_Xaml_Automation_Text" = [ "UI_Xaml_Automation" ]; + "UI_Xaml_Controls" = [ "UI_Xaml" ]; + "UI_Xaml_Controls_Maps" = [ "UI_Xaml_Controls" ]; + "UI_Xaml_Controls_Primitives" = [ "UI_Xaml_Controls" ]; + "UI_Xaml_Core" = [ "UI_Xaml" ]; + "UI_Xaml_Core_Direct" = [ "UI_Xaml_Core" ]; + "UI_Xaml_Data" = [ "UI_Xaml" ]; + "UI_Xaml_Documents" = [ "UI_Xaml" ]; + "UI_Xaml_Hosting" = [ "UI_Xaml" ]; + "UI_Xaml_Input" = [ "UI_Xaml" ]; + "UI_Xaml_Interop" = [ "UI_Xaml" ]; + "UI_Xaml_Markup" = [ "UI_Xaml" ]; + "UI_Xaml_Media" = [ "UI_Xaml" ]; + "UI_Xaml_Media_Animation" = [ "UI_Xaml_Media" ]; + "UI_Xaml_Media_Imaging" = [ "UI_Xaml_Media" ]; + "UI_Xaml_Media_Media3D" = [ "UI_Xaml_Media" ]; + "UI_Xaml_Navigation" = [ "UI_Xaml" ]; + "UI_Xaml_Printing" = [ "UI_Xaml" ]; + "UI_Xaml_Resources" = [ "UI_Xaml" ]; + "UI_Xaml_Shapes" = [ "UI_Xaml" ]; + "Web_AtomPub" = [ "Web" ]; + "Web_Http" = [ "Web" ]; + "Web_Http_Diagnostics" = [ "Web_Http" ]; + "Web_Http_Filters" = [ "Web_Http" ]; + "Web_Http_Headers" = [ "Web_Http" ]; + "Web_Syndication" = [ "Web" ]; + "Web_UI" = [ "Web" ]; + "Web_UI_Interop" = [ "Web_UI" ]; + "Win32_AI" = [ "Win32" ]; + "Win32_AI_MachineLearning" = [ "Win32_AI" ]; + "Win32_AI_MachineLearning_DirectML" = [ "Win32_AI_MachineLearning" ]; + "Win32_AI_MachineLearning_WinML" = [ "Win32_AI_MachineLearning" ]; + "Win32_Data" = [ "Win32" ]; + "Win32_Data_HtmlHelp" = [ "Win32_Data" ]; + "Win32_Data_RightsManagement" = [ "Win32_Data" ]; + "Win32_Data_Xml" = [ "Win32_Data" ]; + "Win32_Data_Xml_MsXml" = [ "Win32_Data_Xml" ]; + "Win32_Data_Xml_XmlLite" = [ "Win32_Data_Xml" ]; + "Win32_Devices" = [ "Win32" ]; + "Win32_Devices_AllJoyn" = [ "Win32_Devices" ]; + "Win32_Devices_BiometricFramework" = [ "Win32_Devices" ]; + "Win32_Devices_Bluetooth" = [ "Win32_Devices" ]; + "Win32_Devices_Communication" = [ "Win32_Devices" ]; + "Win32_Devices_DeviceAccess" = [ "Win32_Devices" ]; + "Win32_Devices_DeviceAndDriverInstallation" = [ "Win32_Devices" ]; + "Win32_Devices_DeviceQuery" = [ "Win32_Devices" ]; + "Win32_Devices_Display" = [ "Win32_Devices" ]; + "Win32_Devices_Enumeration" = [ "Win32_Devices" ]; + "Win32_Devices_Enumeration_Pnp" = [ "Win32_Devices_Enumeration" ]; + "Win32_Devices_Fax" = [ "Win32_Devices" ]; + "Win32_Devices_FunctionDiscovery" = [ "Win32_Devices" ]; + "Win32_Devices_Geolocation" = [ "Win32_Devices" ]; + "Win32_Devices_HumanInterfaceDevice" = [ "Win32_Devices" ]; + "Win32_Devices_ImageAcquisition" = [ "Win32_Devices" ]; + "Win32_Devices_PortableDevices" = [ "Win32_Devices" ]; + "Win32_Devices_Properties" = [ "Win32_Devices" ]; + "Win32_Devices_Pwm" = [ "Win32_Devices" ]; + "Win32_Devices_Sensors" = [ "Win32_Devices" ]; + "Win32_Devices_SerialCommunication" = [ "Win32_Devices" ]; + "Win32_Devices_Tapi" = [ "Win32_Devices" ]; + "Win32_Devices_Usb" = [ "Win32_Devices" ]; + "Win32_Devices_WebServicesOnDevices" = [ "Win32_Devices" ]; + "Win32_Foundation" = [ "Win32" ]; + "Win32_Gaming" = [ "Win32" ]; + "Win32_Globalization" = [ "Win32" ]; + "Win32_Graphics" = [ "Win32" ]; + "Win32_Graphics_CompositionSwapchain" = [ "Win32_Graphics" ]; + "Win32_Graphics_DXCore" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct2D" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct2D_Common" = [ "Win32_Graphics_Direct2D" ]; + "Win32_Graphics_Direct3D" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D10" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D11" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D11on12" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D12" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D9" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D9on12" = [ "Win32_Graphics" ]; + "Win32_Graphics_Direct3D_Dxc" = [ "Win32_Graphics_Direct3D" ]; + "Win32_Graphics_Direct3D_Fxc" = [ "Win32_Graphics_Direct3D" ]; + "Win32_Graphics_DirectComposition" = [ "Win32_Graphics" ]; + "Win32_Graphics_DirectDraw" = [ "Win32_Graphics" ]; + "Win32_Graphics_DirectManipulation" = [ "Win32_Graphics" ]; + "Win32_Graphics_DirectWrite" = [ "Win32_Graphics" ]; + "Win32_Graphics_Dwm" = [ "Win32_Graphics" ]; + "Win32_Graphics_Dxgi" = [ "Win32_Graphics" ]; + "Win32_Graphics_Dxgi_Common" = [ "Win32_Graphics_Dxgi" ]; + "Win32_Graphics_Gdi" = [ "Win32_Graphics" ]; + "Win32_Graphics_Hlsl" = [ "Win32_Graphics" ]; + "Win32_Graphics_Imaging" = [ "Win32_Graphics" ]; + "Win32_Graphics_Imaging_D2D" = [ "Win32_Graphics_Imaging" ]; + "Win32_Graphics_OpenGL" = [ "Win32_Graphics" ]; + "Win32_Graphics_Printing" = [ "Win32_Graphics" ]; + "Win32_Graphics_Printing_PrintTicket" = [ "Win32_Graphics_Printing" ]; + "Win32_Management" = [ "Win32" ]; + "Win32_Management_MobileDeviceManagementRegistration" = [ "Win32_Management" ]; + "Win32_Media" = [ "Win32" ]; + "Win32_Media_Audio" = [ "Win32_Media" ]; + "Win32_Media_Audio_Apo" = [ "Win32_Media_Audio" ]; + "Win32_Media_Audio_DirectMusic" = [ "Win32_Media_Audio" ]; + "Win32_Media_Audio_DirectSound" = [ "Win32_Media_Audio" ]; + "Win32_Media_Audio_Endpoints" = [ "Win32_Media_Audio" ]; + "Win32_Media_Audio_XAudio2" = [ "Win32_Media_Audio" ]; + "Win32_Media_DeviceManager" = [ "Win32_Media" ]; + "Win32_Media_DirectShow" = [ "Win32_Media" ]; + "Win32_Media_DirectShow_Xml" = [ "Win32_Media_DirectShow" ]; + "Win32_Media_DxMediaObjects" = [ "Win32_Media" ]; + "Win32_Media_KernelStreaming" = [ "Win32_Media" ]; + "Win32_Media_LibrarySharingServices" = [ "Win32_Media" ]; + "Win32_Media_MediaFoundation" = [ "Win32_Media" ]; + "Win32_Media_MediaPlayer" = [ "Win32_Media" ]; + "Win32_Media_Multimedia" = [ "Win32_Media" ]; + "Win32_Media_PictureAcquisition" = [ "Win32_Media" ]; + "Win32_Media_Speech" = [ "Win32_Media" ]; + "Win32_Media_Streaming" = [ "Win32_Media" ]; + "Win32_Media_WindowsMediaFormat" = [ "Win32_Media" ]; + "Win32_NetworkManagement" = [ "Win32" ]; + "Win32_NetworkManagement_Dhcp" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_Dns" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_InternetConnectionWizard" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_IpHelper" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_MobileBroadband" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_Multicast" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_Ndis" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_NetBios" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_NetManagement" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_NetShell" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_NetworkDiagnosticsFramework" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_NetworkPolicyServer" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_P2P" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_QoS" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_Rras" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_Snmp" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WNet" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WebDav" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WiFi" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WindowsConnectNow" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WindowsConnectionManager" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WindowsFilteringPlatform" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WindowsFirewall" = [ "Win32_NetworkManagement" ]; + "Win32_NetworkManagement_WindowsNetworkVirtualization" = [ "Win32_NetworkManagement" ]; + "Win32_Networking" = [ "Win32" ]; + "Win32_Networking_ActiveDirectory" = [ "Win32_Networking" ]; + "Win32_Networking_BackgroundIntelligentTransferService" = [ "Win32_Networking" ]; + "Win32_Networking_Clustering" = [ "Win32_Networking" ]; + "Win32_Networking_HttpServer" = [ "Win32_Networking" ]; + "Win32_Networking_Ldap" = [ "Win32_Networking" ]; + "Win32_Networking_NetworkListManager" = [ "Win32_Networking" ]; + "Win32_Networking_RemoteDifferentialCompression" = [ "Win32_Networking" ]; + "Win32_Networking_WebSocket" = [ "Win32_Networking" ]; + "Win32_Networking_WinHttp" = [ "Win32_Networking" ]; + "Win32_Networking_WinInet" = [ "Win32_Networking" ]; + "Win32_Networking_WinSock" = [ "Win32_Networking" ]; + "Win32_Networking_WindowsWebServices" = [ "Win32_Networking" ]; + "Win32_Security" = [ "Win32" ]; + "Win32_Security_AppLocker" = [ "Win32_Security" ]; + "Win32_Security_Authentication" = [ "Win32_Security" ]; + "Win32_Security_Authentication_Identity" = [ "Win32_Security_Authentication" ]; + "Win32_Security_Authentication_Identity_Provider" = [ "Win32_Security_Authentication_Identity" ]; + "Win32_Security_Authorization" = [ "Win32_Security" ]; + "Win32_Security_Authorization_UI" = [ "Win32_Security_Authorization" ]; + "Win32_Security_ConfigurationSnapin" = [ "Win32_Security" ]; + "Win32_Security_Credentials" = [ "Win32_Security" ]; + "Win32_Security_Cryptography" = [ "Win32_Security" ]; + "Win32_Security_Cryptography_Catalog" = [ "Win32_Security_Cryptography" ]; + "Win32_Security_Cryptography_Certificates" = [ "Win32_Security_Cryptography" ]; + "Win32_Security_Cryptography_Sip" = [ "Win32_Security_Cryptography" ]; + "Win32_Security_Cryptography_UI" = [ "Win32_Security_Cryptography" ]; + "Win32_Security_DiagnosticDataQuery" = [ "Win32_Security" ]; + "Win32_Security_DirectoryServices" = [ "Win32_Security" ]; + "Win32_Security_EnterpriseData" = [ "Win32_Security" ]; + "Win32_Security_ExtensibleAuthenticationProtocol" = [ "Win32_Security" ]; + "Win32_Security_Isolation" = [ "Win32_Security" ]; + "Win32_Security_LicenseProtection" = [ "Win32_Security" ]; + "Win32_Security_NetworkAccessProtection" = [ "Win32_Security" ]; + "Win32_Security_Tpm" = [ "Win32_Security" ]; + "Win32_Security_WinTrust" = [ "Win32_Security" ]; + "Win32_Security_WinWlx" = [ "Win32_Security" ]; + "Win32_Storage" = [ "Win32" ]; + "Win32_Storage_Cabinets" = [ "Win32_Storage" ]; + "Win32_Storage_CloudFilters" = [ "Win32_Storage" ]; + "Win32_Storage_Compression" = [ "Win32_Storage" ]; + "Win32_Storage_DataDeduplication" = [ "Win32_Storage" ]; + "Win32_Storage_DistributedFileSystem" = [ "Win32_Storage" ]; + "Win32_Storage_EnhancedStorage" = [ "Win32_Storage" ]; + "Win32_Storage_FileHistory" = [ "Win32_Storage" ]; + "Win32_Storage_FileServerResourceManager" = [ "Win32_Storage" ]; + "Win32_Storage_FileSystem" = [ "Win32_Storage" ]; + "Win32_Storage_Imapi" = [ "Win32_Storage" ]; + "Win32_Storage_IndexServer" = [ "Win32_Storage" ]; + "Win32_Storage_InstallableFileSystems" = [ "Win32_Storage" ]; + "Win32_Storage_IscsiDisc" = [ "Win32_Storage" ]; + "Win32_Storage_Jet" = [ "Win32_Storage" ]; + "Win32_Storage_OfflineFiles" = [ "Win32_Storage" ]; + "Win32_Storage_OperationRecorder" = [ "Win32_Storage" ]; + "Win32_Storage_Packaging" = [ "Win32_Storage" ]; + "Win32_Storage_Packaging_Appx" = [ "Win32_Storage_Packaging" ]; + "Win32_Storage_Packaging_Opc" = [ "Win32_Storage_Packaging" ]; + "Win32_Storage_ProjectedFileSystem" = [ "Win32_Storage" ]; + "Win32_Storage_StructuredStorage" = [ "Win32_Storage" ]; + "Win32_Storage_Vhd" = [ "Win32_Storage" ]; + "Win32_Storage_VirtualDiskService" = [ "Win32_Storage" ]; + "Win32_Storage_Vss" = [ "Win32_Storage" ]; + "Win32_Storage_Xps" = [ "Win32_Storage" ]; + "Win32_Storage_Xps_Printing" = [ "Win32_Storage_Xps" ]; + "Win32_System" = [ "Win32" ]; + "Win32_System_AddressBook" = [ "Win32_System" ]; + "Win32_System_Antimalware" = [ "Win32_System" ]; + "Win32_System_ApplicationInstallationAndServicing" = [ "Win32_System" ]; + "Win32_System_ApplicationVerifier" = [ "Win32_System" ]; + "Win32_System_AssessmentTool" = [ "Win32_System" ]; + "Win32_System_Com" = [ "Win32_System" ]; + "Win32_System_Com_CallObj" = [ "Win32_System_Com" ]; + "Win32_System_Com_ChannelCredentials" = [ "Win32_System_Com" ]; + "Win32_System_Com_Events" = [ "Win32_System_Com" ]; + "Win32_System_Com_Marshal" = [ "Win32_System_Com" ]; + "Win32_System_Com_StructuredStorage" = [ "Win32_System_Com" ]; + "Win32_System_Com_UI" = [ "Win32_System_Com" ]; + "Win32_System_Com_Urlmon" = [ "Win32_System_Com" ]; + "Win32_System_ComponentServices" = [ "Win32_System" ]; + "Win32_System_Console" = [ "Win32_System" ]; + "Win32_System_Contacts" = [ "Win32_System" ]; + "Win32_System_CorrelationVector" = [ "Win32_System" ]; + "Win32_System_DataExchange" = [ "Win32_System" ]; + "Win32_System_DeploymentServices" = [ "Win32_System" ]; + "Win32_System_DesktopSharing" = [ "Win32_System" ]; + "Win32_System_DeveloperLicensing" = [ "Win32_System" ]; + "Win32_System_Diagnostics" = [ "Win32_System" ]; + "Win32_System_Diagnostics_Ceip" = [ "Win32_System_Diagnostics" ]; + "Win32_System_Diagnostics_Debug" = [ "Win32_System_Diagnostics" ]; + "Win32_System_Diagnostics_Debug_WebApp" = [ "Win32_System_Diagnostics_Debug" ]; + "Win32_System_Diagnostics_Etw" = [ "Win32_System_Diagnostics" ]; + "Win32_System_Diagnostics_ProcessSnapshotting" = [ "Win32_System_Diagnostics" ]; + "Win32_System_Diagnostics_ToolHelp" = [ "Win32_System_Diagnostics" ]; + "Win32_System_DistributedTransactionCoordinator" = [ "Win32_System" ]; + "Win32_System_Environment" = [ "Win32_System" ]; + "Win32_System_ErrorReporting" = [ "Win32_System" ]; + "Win32_System_EventCollector" = [ "Win32_System" ]; + "Win32_System_EventLog" = [ "Win32_System" ]; + "Win32_System_EventNotificationService" = [ "Win32_System" ]; + "Win32_System_GroupPolicy" = [ "Win32_System" ]; + "Win32_System_HostCompute" = [ "Win32_System" ]; + "Win32_System_HostComputeNetwork" = [ "Win32_System" ]; + "Win32_System_HostComputeSystem" = [ "Win32_System" ]; + "Win32_System_Hypervisor" = [ "Win32_System" ]; + "Win32_System_IO" = [ "Win32_System" ]; + "Win32_System_Iis" = [ "Win32_System" ]; + "Win32_System_Ioctl" = [ "Win32_System" ]; + "Win32_System_JobObjects" = [ "Win32_System" ]; + "Win32_System_Js" = [ "Win32_System" ]; + "Win32_System_Kernel" = [ "Win32_System" ]; + "Win32_System_LibraryLoader" = [ "Win32_System" ]; + "Win32_System_Mailslots" = [ "Win32_System" ]; + "Win32_System_Mapi" = [ "Win32_System" ]; + "Win32_System_Memory" = [ "Win32_System" ]; + "Win32_System_Memory_NonVolatile" = [ "Win32_System_Memory" ]; + "Win32_System_MessageQueuing" = [ "Win32_System" ]; + "Win32_System_MixedReality" = [ "Win32_System" ]; + "Win32_System_Mmc" = [ "Win32_System" ]; + "Win32_System_Ole" = [ "Win32_System" ]; + "Win32_System_ParentalControls" = [ "Win32_System" ]; + "Win32_System_PasswordManagement" = [ "Win32_System" ]; + "Win32_System_Performance" = [ "Win32_System" ]; + "Win32_System_Performance_HardwareCounterProfiling" = [ "Win32_System_Performance" ]; + "Win32_System_Pipes" = [ "Win32_System" ]; + "Win32_System_Power" = [ "Win32_System" ]; + "Win32_System_ProcessStatus" = [ "Win32_System" ]; + "Win32_System_RealTimeCommunications" = [ "Win32_System" ]; + "Win32_System_Recovery" = [ "Win32_System" ]; + "Win32_System_Registry" = [ "Win32_System" ]; + "Win32_System_RemoteAssistance" = [ "Win32_System" ]; + "Win32_System_RemoteDesktop" = [ "Win32_System" ]; + "Win32_System_RemoteManagement" = [ "Win32_System" ]; + "Win32_System_RestartManager" = [ "Win32_System" ]; + "Win32_System_Restore" = [ "Win32_System" ]; + "Win32_System_Rpc" = [ "Win32_System" ]; + "Win32_System_Search" = [ "Win32_System" ]; + "Win32_System_Search_Common" = [ "Win32_System_Search" ]; + "Win32_System_SecurityCenter" = [ "Win32_System" ]; + "Win32_System_ServerBackup" = [ "Win32_System" ]; + "Win32_System_Services" = [ "Win32_System" ]; + "Win32_System_SettingsManagementInfrastructure" = [ "Win32_System" ]; + "Win32_System_SetupAndMigration" = [ "Win32_System" ]; + "Win32_System_Shutdown" = [ "Win32_System" ]; + "Win32_System_SideShow" = [ "Win32_System" ]; + "Win32_System_StationsAndDesktops" = [ "Win32_System" ]; + "Win32_System_SubsystemForLinux" = [ "Win32_System" ]; + "Win32_System_SystemInformation" = [ "Win32_System" ]; + "Win32_System_SystemServices" = [ "Win32_System" ]; + "Win32_System_TaskScheduler" = [ "Win32_System" ]; + "Win32_System_Threading" = [ "Win32_System" ]; + "Win32_System_Time" = [ "Win32_System" ]; + "Win32_System_TpmBaseServices" = [ "Win32_System" ]; + "Win32_System_TransactionServer" = [ "Win32_System" ]; + "Win32_System_UpdateAgent" = [ "Win32_System" ]; + "Win32_System_UpdateAssessment" = [ "Win32_System" ]; + "Win32_System_UserAccessLogging" = [ "Win32_System" ]; + "Win32_System_VirtualDosMachines" = [ "Win32_System" ]; + "Win32_System_WinRT" = [ "Win32_System" ]; + "Win32_System_WinRT_AllJoyn" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Composition" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_CoreInputView" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Direct3D11" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Display" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Graphics" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Graphics_Capture" = [ "Win32_System_WinRT_Graphics" ]; + "Win32_System_WinRT_Graphics_Direct2D" = [ "Win32_System_WinRT_Graphics" ]; + "Win32_System_WinRT_Graphics_Imaging" = [ "Win32_System_WinRT_Graphics" ]; + "Win32_System_WinRT_Holographic" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Isolation" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_ML" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Media" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Pdf" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Printing" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Shell" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Storage" = [ "Win32_System_WinRT" ]; + "Win32_System_WinRT_Xaml" = [ "Win32_System_WinRT" ]; + "Win32_System_WindowsProgramming" = [ "Win32_System" ]; + "Win32_System_WindowsSync" = [ "Win32_System" ]; + "Win32_System_Wmi" = [ "Win32_System" ]; + "Win32_UI" = [ "Win32" ]; + "Win32_UI_Accessibility" = [ "Win32_UI" ]; + "Win32_UI_Animation" = [ "Win32_UI" ]; + "Win32_UI_ColorSystem" = [ "Win32_UI" ]; + "Win32_UI_Controls" = [ "Win32_UI" ]; + "Win32_UI_Controls_Dialogs" = [ "Win32_UI_Controls" ]; + "Win32_UI_Controls_RichEdit" = [ "Win32_UI_Controls" ]; + "Win32_UI_HiDpi" = [ "Win32_UI" ]; + "Win32_UI_Input" = [ "Win32_UI" ]; + "Win32_UI_Input_Ime" = [ "Win32_UI_Input" ]; + "Win32_UI_Input_Ink" = [ "Win32_UI_Input" ]; + "Win32_UI_Input_KeyboardAndMouse" = [ "Win32_UI_Input" ]; + "Win32_UI_Input_Pointer" = [ "Win32_UI_Input" ]; + "Win32_UI_Input_Radial" = [ "Win32_UI_Input" ]; + "Win32_UI_Input_Touch" = [ "Win32_UI_Input" ]; + "Win32_UI_Input_XboxController" = [ "Win32_UI_Input" ]; + "Win32_UI_InteractionContext" = [ "Win32_UI" ]; + "Win32_UI_LegacyWindowsEnvironmentFeatures" = [ "Win32_UI" ]; + "Win32_UI_Magnification" = [ "Win32_UI" ]; + "Win32_UI_Notifications" = [ "Win32_UI" ]; + "Win32_UI_Ribbon" = [ "Win32_UI" ]; + "Win32_UI_Shell" = [ "Win32_UI" ]; + "Win32_UI_Shell_Common" = [ "Win32_UI_Shell" ]; + "Win32_UI_Shell_PropertiesSystem" = [ "Win32_UI_Shell" ]; + "Win32_UI_TabletPC" = [ "Win32_UI" ]; + "Win32_UI_TextServices" = [ "Win32_UI" ]; + "Win32_UI_WindowsAndMessaging" = [ "Win32_UI" ]; + "Win32_UI_Wpf" = [ "Win32_UI" ]; + "Win32_UI_Xaml" = [ "Win32_UI" ]; + "Win32_UI_Xaml_Diagnostics" = [ "Win32_UI_Xaml" ]; + "Win32_Web" = [ "Win32" ]; + "Win32_Web_MsHtml" = [ "Win32_Web" ]; + }; + resolvedDefaultFeatures = [ "Win32" "Win32_Foundation" "Win32_Networking" "Win32_Networking_WinSock" "Win32_Security" "Win32_Security_Authentication" "Win32_Security_Authentication_Identity" "Win32_Security_Credentials" "Win32_Security_Cryptography" "Win32_Storage" "Win32_Storage_FileSystem" "Win32_System" "Win32_System_IO" "Win32_System_Memory" "Win32_System_Pipes" "Win32_System_WindowsProgramming" "default" ]; + }; + "windows_aarch64_msvc" = rec { + crateName = "windows_aarch64_msvc"; + version = "0.36.1"; + edition = "2018"; + sha256 = "0ixaxs2c37ll2smprzh0xq5p238zn8ylzb3lk1zddqmd77yw7f4v"; + authors = [ + "Microsoft" + ]; + + }; + "windows_i686_gnu" = rec { + crateName = "windows_i686_gnu"; + version = "0.36.1"; + edition = "2018"; + sha256 = "1dm3svxfzamrv6kklyda9c3qylgwn5nwdps6p0kc9x6s077nq3hq"; + authors = [ + "Microsoft" + ]; + + }; + "windows_i686_msvc" = rec { + crateName = "windows_i686_msvc"; + version = "0.36.1"; + edition = "2018"; + sha256 = "097h2a7wig04wbmpi3rz1akdy4s8gslj5szsx8g2v0dj91qr3rz2"; + authors = [ + "Microsoft" + ]; + + }; + "windows_x86_64_gnu" = rec { + crateName = "windows_x86_64_gnu"; + version = "0.36.1"; + edition = "2018"; + sha256 = "1qfrck3jnihymfrd01s8260d4snql8ks2p8yaabipi3nhwdigkad"; + authors = [ + "Microsoft" + ]; + + }; + "windows_x86_64_msvc" = rec { + crateName = "windows_x86_64_msvc"; + version = "0.36.1"; + edition = "2018"; + sha256 = "103n3xijm5vr7qxr1dps202ckfnv7njjnnfqmchg8gl5ii5cl4f8"; + authors = [ + "Microsoft" + ]; + }; "winreg" = rec { crateName = "winreg"; - version = "0.7.0"; + version = "0.10.1"; edition = "2015"; - sha256 = "0sdxcyvda4v1v6a0k1j2v1400z3ng323k9a56gxvkq51x21dn801"; + sha256 = "17c6h02z88ijjba02bnxi5k94q5cz490nf3njh9yypf8fbig9l40"; authors = [ "Igor Shaula " ]; @@ -8631,15 +9999,17 @@ rec { } ]; features = { + "chrono" = [ "dep:chrono" ]; + "serde" = [ "dep:serde" ]; "serialization-serde" = [ "transactions" "serde" ]; "transactions" = [ "winapi/ktmw32" ]; }; }; "xdg" = rec { crateName = "xdg"; - version = "2.4.0"; + version = "2.4.1"; edition = "2015"; - sha256 = "00sqvl6v0sjdrrmyk2671sshnjlbjdwgb1lw0f3jchbhijazw8rs"; + sha256 = "1xl81zfx5fsc5n06h77s0fvrslzhh2piabfz0c1lqk5xbkdq6i8c"; authors = [ "Ben Longbons " "whitequark " @@ -8647,7 +10017,7 @@ rec { dependencies = [ { name = "dirs"; - packageId = "dirs 3.0.2"; + packageId = "dirs 4.0.0"; } ]; From e6de178df662a399a44454cb72263ffc22653759 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Wed, 7 Sep 2022 08:28:58 +0200 Subject: [PATCH 105/111] fix(hdk): don't mark as default unreleasable now that this feature is actually implemented, this would prevent the HDK from being releasable after the next release. --- crates/hdk/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/hdk/CHANGELOG.md b/crates/hdk/CHANGELOG.md index ded0d0479d..5cd5c39b24 100644 --- a/crates/hdk/CHANGELOG.md +++ b/crates/hdk/CHANGELOG.md @@ -1,6 +1,5 @@ --- unreleasable: false -default_unreleasable: true --- # Changelog From cc3aa8ac395591930f9ef05e1c4cdc8bfebfe9d3 Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 7 Sep 2022 10:09:11 +0000 Subject: [PATCH 106/111] apply develop versions to changed crates the following crates changed since their most recent release and are therefore increased to a develop version: - hdk-0.0.150-dev.0 - holochain-0.0.160-dev.0 - holochain_test_wasm_common-0.0.51-dev.0 - holochain_cascade-0.0.59-dev.0 - hdi-0.0.22-dev.0 --- crates/hdi/Cargo.toml | 2 +- crates/hdk/Cargo.toml | 4 ++-- crates/holochain/Cargo.toml | 14 +++++++------- crates/holochain_cascade/Cargo.toml | 4 ++-- crates/test_utils/wasm_common/Cargo.toml | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index b2c97c6499..b4bf947dc8 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.0.21" +version = "0.0.22-dev.0" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index c8f66341aa..daff09fab1 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.149" +version = "0.0.150-dev.0" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,7 +27,7 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.0.21", path = "../hdi", features = ["trace"] } +hdi = { version = "0.0.22-dev.0", path = "../hdi", features = ["trace"] } hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index ee22d74e49..b1138b3f1e 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.159" +version = "0.0.160-dev.0" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,7 +24,7 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.58", path = "../holochain_cascade" } +holochain_cascade = { version = "0.0.59-dev.0", path = "../holochain_cascade" } holochain_conductor_api = { version = "0.0.57", path = "../holochain_conductor_api" } holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } @@ -80,9 +80,9 @@ async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.149", path = "../hdk", optional = true } +hdk = { version = "0.0.150-dev.0", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.50", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.51-dev.0", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -104,14 +104,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.149", path = "../hdk", optional = false } +hdk = { version = "0.0.150-dev.0", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.50", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.51-dev.0", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.149", path = "../hdk"} +hdk = { version = "0.0.150-dev.0", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index d240919c94..59dbb3c091 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.58" +version = "0.0.59-dev.0" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,7 +15,7 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.149", path = "../hdk" } +hdk = { version = "0.0.150-dev.0", path = "../hdk" } hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index 327dc84099..9b7fdebee7 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.50" +version = "0.0.51-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.149"} +hdk = { path = "../../hdk", version = "0.0.150-dev.0"} serde = "1.0" From 1a291fb210f5e9e506339721f3a8a9d5760f3af6 Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Wed, 7 Sep 2022 10:11:19 +0000 Subject: [PATCH 107/111] create a release from branch release-20220907.100911 the following crates are part of this release: - hdi-0.1.0 - hdk-0.0.150 - holochain_cascade-0.0.59 - holochain_test_wasm_common-0.0.51 - holochain-0.0.160 --- CHANGELOG.md | 14 ++++++++++++++ Cargo.lock | 10 +++++----- crates/hdi/CHANGELOG.md | 9 ++++----- crates/hdi/Cargo.toml | 2 +- crates/hdk/CHANGELOG.md | 5 ++--- crates/hdk/Cargo.toml | 4 ++-- crates/holochain/CHANGELOG.md | 2 ++ crates/holochain/Cargo.toml | 14 +++++++------- crates/holochain_cascade/CHANGELOG.md | 2 ++ crates/holochain_cascade/Cargo.toml | 4 ++-- crates/test_utils/wasm/wasm_workspace/Cargo.lock | 14 +++++++------- crates/test_utils/wasm_common/CHANGELOG.md | 2 ++ crates/test_utils/wasm_common/Cargo.toml | 4 ++-- 13 files changed, 52 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5c289dc40..c699d7bd83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # \[Unreleased\] +# 20220907.100911 + +## [holochain-0.0.160](crates/holochain/CHANGELOG.md#0.0.160) + +## [holochain\_test\_wasm\_common-0.0.51](crates/holochain_test_wasm_common/CHANGELOG.md#0.0.51) + +## [holochain\_cascade-0.0.59](crates/holochain_cascade/CHANGELOG.md#0.0.59) + +## [hdk-0.0.150](crates/hdk/CHANGELOG.md#0.0.150) + +## [hdi-0.1.0](crates/hdi/CHANGELOG.md#0.1.0) + +- Initial minor version bump. This indicates our impression that we have made significant progress towards stabilizing the detereministic integrity layer’s API. [\#1550](https://github.com/holochain/holochain/pull/1550) + # 20220907.014838 ## [holochain\_cli-0.0.55](crates/holochain_cli/CHANGELOG.md#0.0.55) diff --git a/Cargo.lock b/Cargo.lock index b0c5c332d3..85de86e4dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1852,7 +1852,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.21" +version = "0.1.0" dependencies = [ "arbitrary", "fixt", @@ -1871,7 +1871,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.149" +version = "0.0.150" dependencies = [ "fixt", "getrandom 0.2.7", @@ -1977,7 +1977,7 @@ dependencies = [ [[package]] name = "holochain" -version = "0.0.159" +version = "0.0.160" dependencies = [ "anyhow", "arbitrary", @@ -2070,7 +2070,7 @@ dependencies = [ [[package]] name = "holochain_cascade" -version = "0.0.58" +version = "0.0.59" dependencies = [ "async-trait", "derive_more", @@ -2388,7 +2388,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.50" +version = "0.0.51" dependencies = [ "hdk", "serde", diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index 482ccc678e..475626926e 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -1,13 +1,12 @@ ---- -semver_increment_mode: minor ---- - # Changelog The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased -- Initial minor version bump. This indicates our impression that we have made significant progress towards stabilizing the detereministic integrity layer's API. [\#1550](https://github.com/holochain/holochain/pull/1550) + +## 0.1.0 + +- Initial minor version bump. This indicates our impression that we have made significant progress towards stabilizing the detereministic integrity layer’s API. [\#1550](https://github.com/holochain/holochain/pull/1550) ## 0.0.21 diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index b4bf947dc8..7262cfbb3a 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.0.22-dev.0" +version = "0.1.0" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" diff --git a/crates/hdk/CHANGELOG.md b/crates/hdk/CHANGELOG.md index 5cd5c39b24..2cec8a3d2a 100644 --- a/crates/hdk/CHANGELOG.md +++ b/crates/hdk/CHANGELOG.md @@ -1,12 +1,11 @@ ---- -unreleasable: false ---- # Changelog The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +## 0.0.150 + ## 0.0.149 ## 0.0.148 diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index daff09fab1..bf8510664a 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.150-dev.0" +version = "0.0.150" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,7 +27,7 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.0.22-dev.0", path = "../hdi", features = ["trace"] } +hdi = { version = "0.1.0", path = "../hdi", features = ["trace"] } hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" diff --git a/crates/holochain/CHANGELOG.md b/crates/holochain/CHANGELOG.md index dc4b8a173f..4693dc1028 100644 --- a/crates/holochain/CHANGELOG.md +++ b/crates/holochain/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.160 + ## 0.0.159 - Updates TLS certificate handling so that multiple conductors can share the same lair, but use different TLS certificates by storing a “tag” in the conductor state database. This should not be a breaking change, but *will* result in a new TLS certificate being used per conductor. [\#1519](https://github.com/holochain/holochain/pull/1519) diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index b1138b3f1e..1e16fc8ff2 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.160-dev.0" +version = "0.0.160" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,7 +24,7 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.59-dev.0", path = "../holochain_cascade" } +holochain_cascade = { version = "0.0.59", path = "../holochain_cascade" } holochain_conductor_api = { version = "0.0.57", path = "../holochain_conductor_api" } holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } @@ -80,9 +80,9 @@ async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.150-dev.0", path = "../hdk", optional = true } +hdk = { version = "0.0.150", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.51-dev.0", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.51", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -104,14 +104,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.150-dev.0", path = "../hdk", optional = false } +hdk = { version = "0.0.150", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.51-dev.0", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.51", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.150-dev.0", path = "../hdk"} +hdk = { version = "0.0.150", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/CHANGELOG.md b/crates/holochain_cascade/CHANGELOG.md index ee79101f25..708a410e21 100644 --- a/crates/holochain_cascade/CHANGELOG.md +++ b/crates/holochain_cascade/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.59 + ## 0.0.58 ## 0.0.57 diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 59dbb3c091..178a163578 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.59-dev.0" +version = "0.0.59" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,7 +15,7 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.150-dev.0", path = "../hdk" } +hdk = { version = "0.0.150", path = "../hdk" } hdk_derive = { version = "0.0.47", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } diff --git a/crates/test_utils/wasm/wasm_workspace/Cargo.lock b/crates/test_utils/wasm/wasm_workspace/Cargo.lock index 60b63496c2..34cc3e9c57 100644 --- a/crates/test_utils/wasm/wasm_workspace/Cargo.lock +++ b/crates/test_utils/wasm/wasm_workspace/Cargo.lock @@ -684,7 +684,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.0.20" +version = "0.1.0" dependencies = [ "hdk_derive", "holo_hash", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.148" +version = "0.0.150" dependencies = [ "getrandom", "hdi", @@ -718,7 +718,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.46" +version = "0.0.47" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -775,7 +775,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.16" +version = "0.0.17" dependencies = [ "arbitrary", "holo_hash", @@ -823,7 +823,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.49" +version = "0.0.51" dependencies = [ "hdk", "serde", @@ -858,7 +858,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.45" +version = "0.0.46" dependencies = [ "fixt", "holo_hash", @@ -966,7 +966,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.0.12" +version = "0.0.13" dependencies = [ "arbitrary", "chrono", diff --git a/crates/test_utils/wasm_common/CHANGELOG.md b/crates/test_utils/wasm_common/CHANGELOG.md index 1e450d78fd..a1bce5f3b0 100644 --- a/crates/test_utils/wasm_common/CHANGELOG.md +++ b/crates/test_utils/wasm_common/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.51 + ## 0.0.50 ## 0.0.49 diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index 9b7fdebee7..0f5abb3fbc 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.51-dev.0" +version = "0.0.51" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.150-dev.0"} +hdk = { path = "../../hdk", version = "0.0.150"} serde = "1.0" From fc343207e28dbbd77d50ccb9e5696ab7d2042515 Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 7 Sep 2022 10:20:05 -0700 Subject: [PATCH 108/111] Minor adjustments --- crates/holochain_integrity_types/src/entry/app_entry_bytes.rs | 2 +- crates/kitsune_p2p/types/src/bin_types.rs | 2 +- crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs b/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs index 679658e716..683bbfb7b8 100644 --- a/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs +++ b/crates/holochain_integrity_types/src/entry/app_entry_bytes.rs @@ -60,7 +60,7 @@ impl From for SerializedBytes { } /// Helpful pattern for debug formatting many bytes. -/// If the size is > 32 bytes, only the first 10 and last 10 bytes will be displayed. +/// If the size is > 32 bytes, only the first 8 and last 8 bytes will be displayed. pub fn fmt_many_bytes( name: &str, f: &mut std::fmt::Formatter<'_>, diff --git a/crates/kitsune_p2p/types/src/bin_types.rs b/crates/kitsune_p2p/types/src/bin_types.rs index d9457b579f..fdecd91155 100644 --- a/crates/kitsune_p2p/types/src/bin_types.rs +++ b/crates/kitsune_p2p/types/src/bin_types.rs @@ -161,7 +161,7 @@ impl KitsuneOpData { } /// Helpful pattern for debug formatting many bytes. -/// If the size is > 32 bytes, only the first 10 and last 10 bytes will be displayed. +/// If the size is > 32 bytes, only the first 8 and last 8 bytes will be displayed. pub fn fmt_many_bytes( name: &str, f: &mut std::fmt::Formatter<'_>, diff --git a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs index fe9714aba1..8100e499be 100644 --- a/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs +++ b/crates/kitsune_p2p/types/src/tx2/tx2_pool_promote.rs @@ -318,7 +318,7 @@ impl AsConHnd for ConItem { if let Err(e) = logic().await { let reason = format!("{:?}", e); - tracing::error!(?e, "Closing writer"); + tracing::warn!(?e, "Closing writer"); this.close(INTERNAL_ERR, &reason).await; return Err(e); } From be0cbed08bb442780d3846d875b61cc6cf2cb1ce Mon Sep 17 00:00:00 2001 From: Michael Dougherty Date: Wed, 7 Sep 2022 10:21:29 -0700 Subject: [PATCH 109/111] Update crates/holochain_sqlite/src/db.rs --- crates/holochain_sqlite/src/db.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/holochain_sqlite/src/db.rs b/crates/holochain_sqlite/src/db.rs index b836f09fe1..961c905e5a 100644 --- a/crates/holochain_sqlite/src/db.rs +++ b/crates/holochain_sqlite/src/db.rs @@ -132,7 +132,6 @@ impl PermittedConn for DbWrite { impl DbRead { pub fn conn(&self) -> DatabaseResult { - // TODO: track why so many connections are being opened. self.connection_pooled() } From afc024bcadc202cfcdd1f595045996d2ef874cab Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Thu, 8 Sep 2022 15:50:08 +0000 Subject: [PATCH 110/111] apply develop versions to changed crates the following crates changed since their most recent release and are therefore increased to a develop version: - kitsune_p2p-0.0.44-dev.0 - holochain_cli-0.0.56-dev.0 - holochain_cli_sandbox-0.0.52-dev.0 - holochain_cli_bundle-0.0.51-dev.0 - holochain_conductor_api-0.0.58-dev.0 - holochain_cascade-0.0.60-dev.0 - holochain_p2p-0.0.55-dev.0 - holochain_types-0.0.55-dev.0 - holochain_keystore-0.0.54-dev.0 - holochain_sqlite-0.0.53-dev.0 - holochain_state-0.0.58-dev.0 - kitsune_p2p_types-0.0.32-dev.0 - kitsune_p2p_dht-0.0.5-dev.0 - holochain_test_wasm_common-0.0.52-dev.0 - hdk-0.0.151-dev.0 - holochain_zome_types-0.0.47-dev.0 - holochain_wasm_test_utils-0.0.57-dev.0 - kitsune_p2p_proxy-0.0.32-dev.0 - holochain_integrity_types-0.0.18-dev.0 - hdi-0.1.1-dev.0 - hdk_derive-0.0.48-dev.0 - kitsune_p2p_transport_quic-0.0.32-dev.0 - holochain-0.0.161-dev.0 --- crates/hc/Cargo.toml | 6 ++-- crates/hc_bundle/Cargo.toml | 4 +-- crates/hc_sandbox/Cargo.toml | 8 ++--- crates/hdi/Cargo.toml | 6 ++-- crates/hdk/Cargo.toml | 8 ++--- crates/hdk_derive/Cargo.toml | 4 +-- crates/holochain/Cargo.toml | 34 ++++++++++---------- crates/holochain_cascade/Cargo.toml | 18 +++++------ crates/holochain_conductor_api/Cargo.toml | 12 +++---- crates/holochain_integrity_types/Cargo.toml | 2 +- crates/holochain_keystore/Cargo.toml | 8 ++--- crates/holochain_p2p/Cargo.toml | 12 +++---- crates/holochain_sqlite/Cargo.toml | 6 ++-- crates/holochain_state/Cargo.toml | 14 ++++---- crates/holochain_types/Cargo.toml | 10 +++--- crates/holochain_zome_types/Cargo.toml | 6 ++-- crates/kitsune_p2p/bootstrap/Cargo.toml | 2 +- crates/kitsune_p2p/dht/Cargo.toml | 2 +- crates/kitsune_p2p/direct/Cargo.toml | 8 ++--- crates/kitsune_p2p/direct_test/Cargo.toml | 4 +-- crates/kitsune_p2p/kitsune_p2p/Cargo.toml | 8 ++--- crates/kitsune_p2p/proxy/Cargo.toml | 6 ++-- crates/kitsune_p2p/transport_quic/Cargo.toml | 4 +-- crates/kitsune_p2p/types/Cargo.toml | 4 +-- crates/test_utils/wasm/Cargo.toml | 4 +-- crates/test_utils/wasm_common/Cargo.toml | 4 +-- 26 files changed, 102 insertions(+), 102 deletions(-) diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index b2b25ee3f4..9a64557b43 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.55" +version = "0.0.56-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -21,8 +21,8 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0" futures = "0.3" -holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.50"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.51"} +holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.51-dev.0"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.52-dev.0"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_bundle/Cargo.toml b/crates/hc_bundle/Cargo.toml index f3d69fbee7..eda11ab2f5 100644 --- a/crates/hc_bundle/Cargo.toml +++ b/crates/hc_bundle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_bundle" -version = "0.0.50" +version = "0.0.51-dev.0" description = "DNA and hApp bundling functionality for the `hc` Holochain CLI utility" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ path = "src/bin/hc-dna.rs" anyhow = "1.0" holochain_util = { path = "../holochain_util", features = ["backtrace"], version = "0.0.11"} holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.54", path = "../holochain_types" } +holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } mr_bundle = {version = "0.0.15", path = "../mr_bundle"} serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index 3503520f43..74aaaff713 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.51" +version = "0.0.52-dev.0" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,10 +19,10 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.57"} -holochain_types = { path = "../holochain_types", version = "0.0.54"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.58-dev.0"} +holochain_types = { path = "../holochain_types", version = "0.0.55-dev.0"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} -holochain_p2p = { path = "../holochain_p2p", version = "0.0.54"} +holochain_p2p = { path = "../holochain_p2p", version = "0.0.55-dev.0"} holochain_util = { version = "0.0.11", path = "../holochain_util", features = [ "pw" ] } nanoid = "0.3" observability = "0.1.3" diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index 7262cfbb3a..45c2a58d25 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.1.0" +version = "0.1.1-dev.0" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" @@ -23,12 +23,12 @@ test_utils = [ ] [dependencies] -hdk_derive = { version = "0.0.47", path = "../hdk_derive" } +hdk_derive = { version = "0.0.48-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_integrity_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_integrity_types = { version = "0.0.17", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.18-dev.0", path = "../holochain_integrity_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index bf8510664a..b25cbf6382 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.150" +version = "0.0.151-dev.0" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,13 +27,13 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.1.0", path = "../hdi", features = ["trace"] } -hdk_derive = { version = "0.0.47", path = "../hdk_derive" } +hdi = { version = "0.1.1-dev.0", path = "../hdi", features = ["trace"] } +hdk_derive = { version = "0.0.48-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types", default-features = false } +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk_derive/Cargo.toml b/crates/hdk_derive/Cargo.toml index 735d1b58bd..b6ab5f5365 100644 --- a/crates/hdk_derive/Cargo.toml +++ b/crates/hdk_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk_derive" -version = "0.0.47" +version = "0.0.48-dev.0" description = "derive macros for the holochain hdk" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ darling = "0.14.1" heck = "0.4" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdi, to reduce code bloat -holochain_integrity_types = { version = "0.0.17", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.18-dev.0", path = "../holochain_integrity_types", default-features = false } proc-macro-error = "1.0.4" [features] diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 1e16fc8ff2..2b81225062 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.160" +version = "0.0.161-dev.0" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,20 +24,20 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.59", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.57", path = "../holochain_conductor_api" } -holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } -holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } -holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } +holochain_cascade = { version = "0.0.60-dev.0", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.58-dev.0", path = "../holochain_conductor_api" } +holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } +holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.57", path = "../holochain_state" } -holochain_types = { version = "0.0.54", path = "../holochain_types" } +holochain_state = { version = "0.0.58-dev.0", path = "../holochain_state" } +holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types", features = ["full"] } +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types", features = ["full"] } human-panic = "1.0.3" -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.31", path = "../kitsune_p2p/types" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../kitsune_p2p/types" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { version = "0.0.15", path = "../mr_bundle" } @@ -74,15 +74,15 @@ url = "1.7.2" url2 = "0.0.6" url_serde = "0.2.0" uuid = { version = "0.7", features = [ "serde", "v4" ] } -holochain_wasm_test_utils = { version = "0.0.56", path = "../test_utils/wasm" } +holochain_wasm_test_utils = { version = "0.0.57-dev.0", path = "../test_utils/wasm" } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.150", path = "../hdk", optional = true } +hdk = { version = "0.0.151-dev.0", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.51", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.52-dev.0", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -104,14 +104,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.150", path = "../hdk", optional = false } +hdk = { version = "0.0.151-dev.0", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.51", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.52-dev.0", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.150", path = "../hdk"} +hdk = { version = "0.0.151-dev.0", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 178a163578..2f30763c05 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.59" +version = "0.0.60-dev.0" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,17 +15,17 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.150", path = "../hdk" } -hdk_derive = { version = "0.0.47", path = "../hdk_derive" } +hdk = { version = "0.0.151-dev.0", path = "../hdk" } +hdk_derive = { version = "0.0.48-dev.0", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } -holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } +holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.57", path = "../holochain_state" } -holochain_types = { version = "0.0.54", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } +holochain_state = { version = "0.0.58-dev.0", path = "../holochain_state" } +holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } observability = "0.1.3" -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index 1a6452963f..4dca67db5b 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.57" +version = "0.0.58-dev.0" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -11,13 +11,13 @@ edition = "2021" [dependencies] directories = "2.0.2" derive_more = "0.99.3" -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } -holochain_state = { version = "0.0.57", path = "../holochain_state" } +holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } +holochain_state = { version = "0.0.58-dev.0", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.54", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_yaml = "0.8" diff --git a/crates/holochain_integrity_types/Cargo.toml b/crates/holochain_integrity_types/Cargo.toml index 0c1cbd10b6..1bbb2552b4 100644 --- a/crates/holochain_integrity_types/Cargo.toml +++ b/crates/holochain_integrity_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_integrity_types" -version = "0.0.17" +version = "0.0.18-dev.0" description = "Holochain integrity types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 69b88126ad..8b28f9a417 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_keystore" -version = "0.0.53" +version = "0.0.54-dev.0" description = "keystore for libsodium keypairs" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13.0" futures = "0.3.23" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46"} -kitsune_p2p_types = { version = "0.0.31", path = "../kitsune_p2p/types" } +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.47-dev.0"} +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../kitsune_p2p/types" } must_future = "0.1.2" nanoid = "0.4.0" one_err = "0.0.5" @@ -30,7 +30,7 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. -holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } [dev-dependencies] assert_cmd = "2.0.4" diff --git a/crates/holochain_p2p/Cargo.toml b/crates/holochain_p2p/Cargo.toml index 9a799dae8e..7f07794845 100644 --- a/crates/holochain_p2p/Cargo.toml +++ b/crates/holochain_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_p2p" -version = "0.0.54" +version = "0.0.55-dev.0" description = "holochain specific wrapper around more generic p2p module" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -17,12 +17,12 @@ fixt = { path = "../fixt", version = "0.0.14"} futures = "0.3" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash" } -holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.54", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.31", path = "../kitsune_p2p/types" } +holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../kitsune_p2p/types" } mockall = "0.10.2" observability = "0.1.3" rand = "0.8.5" diff --git a/crates/holochain_sqlite/Cargo.toml b/crates/holochain_sqlite/Cargo.toml index a8b7a1c493..e1ecaeb0cd 100644 --- a/crates/holochain_sqlite/Cargo.toml +++ b/crates/holochain_sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_sqlite" -version = "0.0.52" +version = "0.0.53-dev.0" description = "Abstractions for persistence of Holochain state via SQLite" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -25,8 +25,8 @@ fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3.1" holo_hash = { path = "../holo_hash", features = ["rusqlite"], version = "0.0.31"} holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } lazy_static = "1.4.0" once_cell = "1.4.1" must_future = "0.1.1" diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index 6d82fcd09a..85cf1857ec 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.57" +version = "0.0.58-dev.0" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -13,19 +13,19 @@ byteorder = "1.3.4" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } derive_more = "0.99.3" either = "1.5" -holochain_sqlite = { version = "0.0.52", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } fallible-iterator = "0.2.0" futures = "0.3" -holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_p2p = { version = "0.0.54", path = "../holochain_p2p" } -holochain_types = { version = "0.0.54", path = "../holochain_types" } +holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } +holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } holochain_util = { version = "0.0.11", path = "../holochain_util" } -holochain_zome_types = { version = "0.0.46", path = "../holochain_zome_types", features = [ +holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types", features = [ "full", ] } -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } mockall = "0.10.2" one_err = "0.0.5" parking_lot = "0.10" diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index 2f5f4670bf..37aca70250 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_types" -version = "0.0.54" +version = "0.0.55-dev.0" description = "Holochain common types" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -25,12 +25,12 @@ fixt = { path = "../fixt", version = "0.0.14"} flate2 = "1.0.14" futures = "0.3" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["encoding"] } -holochain_keystore = { version = "0.0.53", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.52"} -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.46", features = ["full"] } +holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.53-dev.0"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.47-dev.0", features = ["full"] } itertools = { version = "0.10" } -kitsune_p2p_dht = { version = "0.0.4", path = "../kitsune_p2p/dht" } +kitsune_p2p_dht = { version = "0.0.5-dev.0", path = "../kitsune_p2p/dht" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { path = "../mr_bundle", features = ["packing"], version = "0.0.15"} diff --git a/crates/holochain_zome_types/Cargo.toml b/crates/holochain_zome_types/Cargo.toml index 6ffd850e3d..7db4a6e880 100644 --- a/crates/holochain_zome_types/Cargo.toml +++ b/crates/holochain_zome_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_zome_types" -version = "0.0.46" +version = "0.0.47-dev.0" description = "Holochain zome types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -13,7 +13,7 @@ edition = "2021" [dependencies] kitsune_p2p_timestamp = { version = "0.0.13", path = "../kitsune_p2p/timestamp" } -holochain_integrity_types = { version = "0.0.17", path = "../holochain_integrity_types", features = ["tracing"] } +holochain_integrity_types = { version = "0.0.18-dev.0", path = "../holochain_integrity_types", features = ["tracing"] } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_serialized_bytes = "=0.0.51" paste = "=1.0.5" @@ -36,7 +36,7 @@ num_enum = { version = "0.5", optional = true } # full-dna-def dependencies derive_builder = { version = "0.9", optional = true } -kitsune_p2p_dht = { version = "0.0.4", path = "../kitsune_p2p/dht", optional = true } +kitsune_p2p_dht = { version = "0.0.5-dev.0", path = "../kitsune_p2p/dht", optional = true } nanoid = { version = "0.3", optional = true } shrinkwraprs = { version = "0.3", optional = true } diff --git a/crates/kitsune_p2p/bootstrap/Cargo.toml b/crates/kitsune_p2p/bootstrap/Cargo.toml index 979725f54b..467b86ae8f 100644 --- a/crates/kitsune_p2p/bootstrap/Cargo.toml +++ b/crates/kitsune_p2p/bootstrap/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" [dependencies] clap = "=3.1.18" futures = "0.3.15" -kitsune_p2p_types = { version = "0.0.31", path = "../types" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } once_cell = "1.7.2" parking_lot = "0.11" rand = "0.8.5" diff --git a/crates/kitsune_p2p/dht/Cargo.toml b/crates/kitsune_p2p/dht/Cargo.toml index 3a7a66d598..8cd5e62796 100644 --- a/crates/kitsune_p2p/dht/Cargo.toml +++ b/crates/kitsune_p2p/dht/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_dht" -version = "0.0.4" +version = "0.0.5-dev.0" description = "Kitsune P2p DHT definition" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/kitsune_p2p/direct/Cargo.toml b/crates/kitsune_p2p/direct/Cargo.toml index c4c5fb4cc0..5ffd1bec52 100644 --- a/crates/kitsune_p2p/direct/Cargo.toml +++ b/crates/kitsune_p2p/direct/Cargo.toml @@ -19,10 +19,10 @@ hyper = { version = "0.14", features = ["server","http1","http2","tcp"] } if-addrs = "0.6" kitsune_p2p_bootstrap = { version = "0.0.12-dev.0", path = "../bootstrap" } kitsune_p2p_direct_api = { version = "0.0.1", path = "../direct_api" } -kitsune_p2p_types = { version = "0.0.31", path = "../types" } -kitsune_p2p = { version = "0.0.43", path = "../kitsune_p2p", features = ["test_utils"] } -kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.31", path = "../proxy" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } +kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p", features = ["test_utils"] } +kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.32-dev.0", path = "../proxy" } rand = "0.8.5" serde = { version = "1", features = ["derive", "rc"] } serde_json = { version = "1", features = ["preserve_order"] } diff --git a/crates/kitsune_p2p/direct_test/Cargo.toml b/crates/kitsune_p2p/direct_test/Cargo.toml index 36aad9fbf7..00a4599a08 100644 --- a/crates/kitsune_p2p/direct_test/Cargo.toml +++ b/crates/kitsune_p2p/direct_test/Cargo.toml @@ -12,8 +12,8 @@ edition = "2021" [dependencies] kitsune_p2p_direct = { version = "0.0.1", path = "../direct" } -kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.31", path = "../proxy" } +kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.32-dev.0", path = "../proxy" } rand = "0.8.5" structopt = "0.3.21" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml index 3ef6776b9c..554a9c5177 100644 --- a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml +++ b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p" -version = "0.0.43" +version = "0.0.44-dev.0" description = "p2p / dht communication framework" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -20,10 +20,10 @@ ghost_actor = "=0.3.0-alpha.4" governor = "0.3.2" itertools = "0.10" kitsune_p2p_mdns = { version = "0.0.3", path = "../mdns" } -kitsune_p2p_proxy = { version = "0.0.31", path = "../proxy" } +kitsune_p2p_proxy = { version = "0.0.32-dev.0", path = "../proxy" } kitsune_p2p_timestamp = { version = "0.0.13", path = "../timestamp", features = ["now"] } -kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } -kitsune_p2p_types = { version = "0.0.31", path = "../types" } +kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } must_future = "0.1.1" num-traits = "0.2" observability = "0.1.3" diff --git a/crates/kitsune_p2p/proxy/Cargo.toml b/crates/kitsune_p2p/proxy/Cargo.toml index 2119849c70..61dff157d8 100644 --- a/crates/kitsune_p2p/proxy/Cargo.toml +++ b/crates/kitsune_p2p/proxy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_proxy" -version = "0.0.31" +version = "0.0.32-dev.0" description = "Proxy transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13" blake2b_simd = "0.5.10" derive_more = "0.99.7" futures = "0.3" -kitsune_p2p_types = { version = "0.0.31", path = "../types" } -kitsune_p2p_transport_quic = { version = "0.0.31", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } +kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } nanoid = "0.3" observability = "0.1.3" parking_lot = "0.11" diff --git a/crates/kitsune_p2p/transport_quic/Cargo.toml b/crates/kitsune_p2p/transport_quic/Cargo.toml index 391a4ab2dc..116a2ca5c8 100644 --- a/crates/kitsune_p2p/transport_quic/Cargo.toml +++ b/crates/kitsune_p2p/transport_quic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_transport_quic" -version = "0.0.31" +version = "0.0.32-dev.0" description = "QUIC transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -14,7 +14,7 @@ edition = "2021" blake2b_simd = "1.0.0" futures = "0.3.21" if-addrs = "0.7.0" -kitsune_p2p_types = { version = "0.0.31", path = "../types" } +kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } nanoid = "0.4.0" once_cell = "1.9.0" quinn = "0.8.1" diff --git a/crates/kitsune_p2p/types/Cargo.toml b/crates/kitsune_p2p/types/Cargo.toml index dd0731de65..75f03af559 100644 --- a/crates/kitsune_p2p/types/Cargo.toml +++ b/crates/kitsune_p2p/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_types" -version = "0.0.31" +version = "0.0.32-dev.0" description = "types subcrate for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -16,7 +16,7 @@ base64 = "0.13" derive_more = "0.99.7" futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -kitsune_p2p_dht = { version = "0.0.4", path = "../dht" } +kitsune_p2p_dht = { version = "0.0.5-dev.0", path = "../dht" } kitsune_p2p_dht_arc = { version = "0.0.14", path = "../dht_arc" } lru = "0.6.5" mockall = { version = "0.10.2", optional = true } diff --git a/crates/test_utils/wasm/Cargo.toml b/crates/test_utils/wasm/Cargo.toml index efd64306eb..cf2aeef342 100644 --- a/crates/test_utils/wasm/Cargo.toml +++ b/crates/test_utils/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wasm_test_utils" -version = "0.0.56" +version = "0.0.57-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Utilities for Wasm testing for Holochain" @@ -19,7 +19,7 @@ only_check = [] [dependencies] -holochain_types = { path = "../../holochain_types", version = "0.0.54"} +holochain_types = { path = "../../holochain_types", version = "0.0.55-dev.0"} strum = "0.18.0" strum_macros = "0.18.0" holochain_util = { version = "0.0.11", path = "../../holochain_util" } diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index 0f5abb3fbc..b11ffd8da7 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.51" +version = "0.0.52-dev.0" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.150"} +hdk = { path = "../../hdk", version = "0.0.151-dev.0"} serde = "1.0" From cf8adc073596f4f5fc3dcf31c30bc8ade47a6f93 Mon Sep 17 00:00:00 2001 From: Holochain Core Dev Team Date: Thu, 8 Sep 2022 15:59:30 +0000 Subject: [PATCH 111/111] create a release from branch release-20220908.155008 the following crates are part of this release: - holochain_integrity_types-0.0.18 - hdk_derive-0.0.48 - hdi-0.1.1 - kitsune_p2p_dht-0.0.5 - holochain_zome_types-0.0.47 - hdk-0.0.151 - kitsune_p2p_types-0.0.32 - kitsune_p2p_transport_quic-0.0.32 - kitsune_p2p_proxy-0.0.32 - kitsune_p2p-0.0.44 - holochain_sqlite-0.0.53 - holochain_keystore-0.0.54 - holochain_types-0.0.55 - holochain_p2p-0.0.55 - holochain_state-0.0.58 - holochain_cascade-0.0.60 - holochain_wasm_test_utils-0.0.57 - holochain_conductor_api-0.0.58 - holochain_test_wasm_common-0.0.52 - holochain-0.0.161 - holochain_cli_bundle-0.0.51 - holochain_cli_sandbox-0.0.52 - holochain_cli-0.0.56 --- CHANGELOG.md | 50 +++++++++++++++++++ Cargo.lock | 46 ++++++++--------- crates/hc/CHANGELOG.md | 2 + crates/hc/Cargo.toml | 6 +-- crates/hc_bundle/CHANGELOG.md | 2 + crates/hc_bundle/Cargo.toml | 4 +- crates/hc_sandbox/CHANGELOG.md | 2 + crates/hc_sandbox/Cargo.toml | 8 +-- crates/hdi/CHANGELOG.md | 2 + crates/hdi/Cargo.toml | 6 +-- crates/hdk/CHANGELOG.md | 2 + crates/hdk/Cargo.toml | 8 +-- crates/hdk_derive/CHANGELOG.md | 2 + crates/hdk_derive/Cargo.toml | 4 +- crates/holochain/CHANGELOG.md | 2 + crates/holochain/Cargo.toml | 34 ++++++------- crates/holochain_cascade/CHANGELOG.md | 2 + crates/holochain_cascade/Cargo.toml | 18 +++---- crates/holochain_conductor_api/CHANGELOG.md | 2 + crates/holochain_conductor_api/Cargo.toml | 12 ++--- crates/holochain_integrity_types/CHANGELOG.md | 2 + crates/holochain_integrity_types/Cargo.toml | 2 +- crates/holochain_keystore/CHANGELOG.md | 2 + crates/holochain_keystore/Cargo.toml | 8 +-- crates/holochain_p2p/CHANGELOG.md | 2 + crates/holochain_p2p/Cargo.toml | 12 ++--- crates/holochain_sqlite/CHANGELOG.md | 2 + crates/holochain_sqlite/Cargo.toml | 6 +-- crates/holochain_state/CHANGELOG.md | 2 + crates/holochain_state/Cargo.toml | 14 +++--- crates/holochain_types/CHANGELOG.md | 2 + crates/holochain_types/Cargo.toml | 10 ++-- crates/holochain_zome_types/CHANGELOG.md | 2 + crates/holochain_zome_types/Cargo.toml | 6 +-- crates/kitsune_p2p/bootstrap/Cargo.toml | 2 +- crates/kitsune_p2p/dht/CHANGELOG.md | 2 + crates/kitsune_p2p/dht/Cargo.toml | 2 +- crates/kitsune_p2p/direct/Cargo.toml | 8 +-- crates/kitsune_p2p/direct_test/Cargo.toml | 4 +- crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md | 2 + crates/kitsune_p2p/kitsune_p2p/Cargo.toml | 8 +-- crates/kitsune_p2p/proxy/CHANGELOG.md | 2 + crates/kitsune_p2p/proxy/Cargo.toml | 6 +-- .../kitsune_p2p/transport_quic/CHANGELOG.md | 2 + crates/kitsune_p2p/transport_quic/Cargo.toml | 4 +- crates/kitsune_p2p/types/CHANGELOG.md | 2 + crates/kitsune_p2p/types/Cargo.toml | 4 +- crates/test_utils/wasm/CHANGELOG.md | 2 + crates/test_utils/wasm/Cargo.toml | 4 +- .../test_utils/wasm/wasm_workspace/Cargo.lock | 12 ++--- crates/test_utils/wasm_common/CHANGELOG.md | 2 + crates/test_utils/wasm_common/Cargo.toml | 4 +- 52 files changed, 227 insertions(+), 131 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c699d7bd83..6b15a4daa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,56 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). # \[Unreleased\] +# 20220908.155008 + +## [holochain\_cli-0.0.56](crates/holochain_cli/CHANGELOG.md#0.0.56) + +## [holochain\_cli\_sandbox-0.0.52](crates/holochain_cli_sandbox/CHANGELOG.md#0.0.52) + +## [holochain\_cli\_bundle-0.0.51](crates/holochain_cli_bundle/CHANGELOG.md#0.0.51) + +## [holochain-0.0.161](crates/holochain/CHANGELOG.md#0.0.161) + +## [holochain\_test\_wasm\_common-0.0.52](crates/holochain_test_wasm_common/CHANGELOG.md#0.0.52) + +## [holochain\_conductor\_api-0.0.58](crates/holochain_conductor_api/CHANGELOG.md#0.0.58) + +## [holochain\_wasm\_test\_utils-0.0.57](crates/holochain_wasm_test_utils/CHANGELOG.md#0.0.57) + +## [holochain\_cascade-0.0.60](crates/holochain_cascade/CHANGELOG.md#0.0.60) + +## [holochain\_state-0.0.58](crates/holochain_state/CHANGELOG.md#0.0.58) + +## [holochain\_p2p-0.0.55](crates/holochain_p2p/CHANGELOG.md#0.0.55) + +## [holochain\_types-0.0.55](crates/holochain_types/CHANGELOG.md#0.0.55) + +## [holochain\_keystore-0.0.54](crates/holochain_keystore/CHANGELOG.md#0.0.54) + +## [holochain\_sqlite-0.0.53](crates/holochain_sqlite/CHANGELOG.md#0.0.53) + +## [kitsune\_p2p-0.0.44](crates/kitsune_p2p/CHANGELOG.md#0.0.44) + +- Fixes a regression where a node can prematurely end a gossip round if their partner signals that they are done sending data, even if the node itself still has more data to send, which can lead to persistent timeouts between the two nodes. [\#1553](https://github.com/holochain/holochain/pull/1553) + +## [kitsune\_p2p\_proxy-0.0.32](crates/kitsune_p2p_proxy/CHANGELOG.md#0.0.32) + +## [kitsune\_p2p\_transport\_quic-0.0.32](crates/kitsune_p2p_transport_quic/CHANGELOG.md#0.0.32) + +## [kitsune\_p2p\_types-0.0.32](crates/kitsune_p2p_types/CHANGELOG.md#0.0.32) + +## [hdk-0.0.151](crates/hdk/CHANGELOG.md#0.0.151) + +## [holochain\_zome\_types-0.0.47](crates/holochain_zome_types/CHANGELOG.md#0.0.47) + +## [kitsune\_p2p\_dht-0.0.5](crates/kitsune_p2p_dht/CHANGELOG.md#0.0.5) + +## [hdi-0.1.1](crates/hdi/CHANGELOG.md#0.1.1) + +## [hdk\_derive-0.0.48](crates/hdk_derive/CHANGELOG.md#0.0.48) + +## [holochain\_integrity\_types-0.0.18](crates/holochain_integrity_types/CHANGELOG.md#0.0.18) + # 20220907.100911 ## [holochain-0.0.160](crates/holochain/CHANGELOG.md#0.0.160) diff --git a/Cargo.lock b/Cargo.lock index 85de86e4dd..c7b006e9e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1852,7 +1852,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.1.0" +version = "0.1.1" dependencies = [ "arbitrary", "fixt", @@ -1871,7 +1871,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.150" +version = "0.0.151" dependencies = [ "fixt", "getrandom 0.2.7", @@ -1892,7 +1892,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.47" +version = "0.0.48" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -1977,7 +1977,7 @@ dependencies = [ [[package]] name = "holochain" -version = "0.0.160" +version = "0.0.161" dependencies = [ "anyhow", "arbitrary", @@ -2070,7 +2070,7 @@ dependencies = [ [[package]] name = "holochain_cascade" -version = "0.0.59" +version = "0.0.60" dependencies = [ "async-trait", "derive_more", @@ -2105,7 +2105,7 @@ dependencies = [ [[package]] name = "holochain_cli" -version = "0.0.55" +version = "0.0.56" dependencies = [ "anyhow", "futures", @@ -2118,7 +2118,7 @@ dependencies = [ [[package]] name = "holochain_cli_bundle" -version = "0.0.50" +version = "0.0.51" dependencies = [ "anyhow", "assert_cmd 1.0.8", @@ -2139,7 +2139,7 @@ dependencies = [ [[package]] name = "holochain_cli_sandbox" -version = "0.0.51" +version = "0.0.52" dependencies = [ "ansi_term 0.12.1", "anyhow", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "holochain_conductor_api" -version = "0.0.57" +version = "0.0.58" dependencies = [ "derive_more", "directories", @@ -2192,7 +2192,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.17" +version = "0.0.18" dependencies = [ "arbitrary", "holo_hash", @@ -2206,7 +2206,7 @@ dependencies = [ [[package]] name = "holochain_keystore" -version = "0.0.53" +version = "0.0.54" dependencies = [ "assert_cmd 2.0.4", "base64", @@ -2240,7 +2240,7 @@ dependencies = [ [[package]] name = "holochain_p2p" -version = "0.0.54" +version = "0.0.55" dependencies = [ "async-trait", "derive_more", @@ -2294,7 +2294,7 @@ dependencies = [ [[package]] name = "holochain_sqlite" -version = "0.0.52" +version = "0.0.53" dependencies = [ "anyhow", "async-trait", @@ -2343,7 +2343,7 @@ dependencies = [ [[package]] name = "holochain_state" -version = "0.0.57" +version = "0.0.58" dependencies = [ "anyhow", "arbitrary", @@ -2388,7 +2388,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.51" +version = "0.0.52" dependencies = [ "hdk", "serde", @@ -2396,7 +2396,7 @@ dependencies = [ [[package]] name = "holochain_types" -version = "0.0.54" +version = "0.0.55" dependencies = [ "anyhow", "arbitrary", @@ -2470,7 +2470,7 @@ dependencies = [ [[package]] name = "holochain_wasm_test_utils" -version = "0.0.56" +version = "0.0.57" dependencies = [ "holochain_types", "holochain_util", @@ -2562,7 +2562,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.46" +version = "0.0.47" dependencies = [ "arbitrary", "contrafact", @@ -2885,7 +2885,7 @@ dependencies = [ [[package]] name = "kitsune_p2p" -version = "0.0.43" +version = "0.0.44" dependencies = [ "arbitrary", "arrayref", @@ -2953,7 +2953,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht" -version = "0.0.4" +version = "0.0.5" dependencies = [ "colored", "derivative", @@ -3066,7 +3066,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_proxy" -version = "0.0.31" +version = "0.0.32" dependencies = [ "base64", "blake2b_simd 0.5.11", @@ -3104,7 +3104,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_transport_quic" -version = "0.0.31" +version = "0.0.32" dependencies = [ "blake2b_simd 1.0.0", "futures", @@ -3122,7 +3122,7 @@ dependencies = [ [[package]] name = "kitsune_p2p_types" -version = "0.0.31" +version = "0.0.32" dependencies = [ "arbitrary", "base64", diff --git a/crates/hc/CHANGELOG.md b/crates/hc/CHANGELOG.md index ec070067d2..7086f91cde 100644 --- a/crates/hc/CHANGELOG.md +++ b/crates/hc/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.56 + ## 0.0.55 ## 0.0.54 diff --git a/crates/hc/Cargo.toml b/crates/hc/Cargo.toml index 9a64557b43..e3c8a7348f 100644 --- a/crates/hc/Cargo.toml +++ b/crates/hc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli" -version = "0.0.56-dev.0" +version = "0.0.56" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli" authors = [ "Holochain Core Dev Team " ] @@ -21,8 +21,8 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0" futures = "0.3" -holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.51-dev.0"} -holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.52-dev.0"} +holochain_cli_bundle = { path = "../hc_bundle", version = "0.0.51"} +holochain_cli_sandbox = { path = "../hc_sandbox", version = "0.0.52"} observability = "0.1.3" structopt = "0.3" tokio = { version = "1.11", features = [ "full" ] } diff --git a/crates/hc_bundle/CHANGELOG.md b/crates/hc_bundle/CHANGELOG.md index 673a745b19..7354cbf693 100644 --- a/crates/hc_bundle/CHANGELOG.md +++ b/crates/hc_bundle/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.51 + ## 0.0.50 ## 0.0.49 diff --git a/crates/hc_bundle/Cargo.toml b/crates/hc_bundle/Cargo.toml index eda11ab2f5..278602acb5 100644 --- a/crates/hc_bundle/Cargo.toml +++ b/crates/hc_bundle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_bundle" -version = "0.0.51-dev.0" +version = "0.0.51" description = "DNA and hApp bundling functionality for the `hc` Holochain CLI utility" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ path = "src/bin/hc-dna.rs" anyhow = "1.0" holochain_util = { path = "../holochain_util", features = ["backtrace"], version = "0.0.11"} holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } +holochain_types = { version = "0.0.55", path = "../holochain_types" } mr_bundle = {version = "0.0.15", path = "../mr_bundle"} serde = { version = "1.0", features = [ "derive" ] } serde_bytes = "0.11" diff --git a/crates/hc_sandbox/CHANGELOG.md b/crates/hc_sandbox/CHANGELOG.md index 32ef5f9d02..67ba905499 100644 --- a/crates/hc_sandbox/CHANGELOG.md +++ b/crates/hc_sandbox/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.52 + ## 0.0.51 ## 0.0.50 diff --git a/crates/hc_sandbox/Cargo.toml b/crates/hc_sandbox/Cargo.toml index 74aaaff713..145d6ef5a2 100644 --- a/crates/hc_sandbox/Cargo.toml +++ b/crates/hc_sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cli_sandbox" -version = "0.0.52-dev.0" +version = "0.0.52" homepage = "https://github.com/holochain/holochain" documentation = "https://docs.rs/holochain_cli_sandbox" authors = [ "Holochain Core Dev Team " ] @@ -19,10 +19,10 @@ anyhow = "1.0" ansi_term = "0.12" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } futures = "0.3" -holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.58-dev.0"} -holochain_types = { path = "../holochain_types", version = "0.0.55-dev.0"} +holochain_conductor_api = { path = "../holochain_conductor_api", version = "0.0.58"} +holochain_types = { path = "../holochain_types", version = "0.0.55"} holochain_websocket = { path = "../holochain_websocket", version = "0.0.39"} -holochain_p2p = { path = "../holochain_p2p", version = "0.0.55-dev.0"} +holochain_p2p = { path = "../holochain_p2p", version = "0.0.55"} holochain_util = { version = "0.0.11", path = "../holochain_util", features = [ "pw" ] } nanoid = "0.3" observability = "0.1.3" diff --git a/crates/hdi/CHANGELOG.md b/crates/hdi/CHANGELOG.md index 475626926e..c63bc60b73 100644 --- a/crates/hdi/CHANGELOG.md +++ b/crates/hdi/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.1.1 + ## 0.1.0 - Initial minor version bump. This indicates our impression that we have made significant progress towards stabilizing the detereministic integrity layer’s API. [\#1550](https://github.com/holochain/holochain/pull/1550) diff --git a/crates/hdi/Cargo.toml b/crates/hdi/Cargo.toml index 45c2a58d25..fdfd946bf8 100644 --- a/crates/hdi/Cargo.toml +++ b/crates/hdi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdi" -version = "0.1.1-dev.0" +version = "0.1.1" description = "The HDI" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdi" @@ -23,12 +23,12 @@ test_utils = [ ] [dependencies] -hdk_derive = { version = "0.0.48-dev.0", path = "../hdk_derive" } +hdk_derive = { version = "0.0.48", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_integrity_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_integrity_types = { version = "0.0.18-dev.0", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.18", path = "../holochain_integrity_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk/CHANGELOG.md b/crates/hdk/CHANGELOG.md index 2cec8a3d2a..d24a2b5615 100644 --- a/crates/hdk/CHANGELOG.md +++ b/crates/hdk/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.151 + ## 0.0.150 ## 0.0.149 diff --git a/crates/hdk/Cargo.toml b/crates/hdk/Cargo.toml index b25cbf6382..08501d9165 100644 --- a/crates/hdk/Cargo.toml +++ b/crates/hdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk" -version = "0.0.151-dev.0" +version = "0.0.151" description = "The Holochain HDK" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain/tree/develop/crates/hdk" @@ -27,13 +27,13 @@ test_utils = [ properties = ["holochain_zome_types/properties"] [dependencies] -hdi = { version = "0.1.1-dev.0", path = "../hdi", features = ["trace"] } -hdk_derive = { version = "0.0.48-dev.0", path = "../hdk_derive" } +hdi = { version = "0.1.1", path = "../hdi", features = ["trace"] } +hdk_derive = { version = "0.0.48", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_wasmer_guest = "=0.0.80" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdk_derive, to reduce code bloat -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types", default-features = false } +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types", default-features = false } paste = "=1.0.5" serde = "1.0" serde_bytes = "0.11" diff --git a/crates/hdk_derive/CHANGELOG.md b/crates/hdk_derive/CHANGELOG.md index 925da82f4f..c8b204f8e6 100644 --- a/crates/hdk_derive/CHANGELOG.md +++ b/crates/hdk_derive/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.48 + ## 0.0.47 ## 0.0.46 diff --git a/crates/hdk_derive/Cargo.toml b/crates/hdk_derive/Cargo.toml index b6ab5f5365..451bdc262d 100644 --- a/crates/hdk_derive/Cargo.toml +++ b/crates/hdk_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hdk_derive" -version = "0.0.48-dev.0" +version = "0.0.48" description = "derive macros for the holochain hdk" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -22,7 +22,7 @@ darling = "0.14.1" heck = "0.4" # it's important that we depend on holochain_zome_types with no default # features, both here AND in hdi, to reduce code bloat -holochain_integrity_types = { version = "0.0.18-dev.0", path = "../holochain_integrity_types", default-features = false } +holochain_integrity_types = { version = "0.0.18", path = "../holochain_integrity_types", default-features = false } proc-macro-error = "1.0.4" [features] diff --git a/crates/holochain/CHANGELOG.md b/crates/holochain/CHANGELOG.md index 4693dc1028..8da62fbf9a 100644 --- a/crates/holochain/CHANGELOG.md +++ b/crates/holochain/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.161 + ## 0.0.160 ## 0.0.159 diff --git a/crates/holochain/Cargo.toml b/crates/holochain/Cargo.toml index 2b81225062..a0337cfaa8 100644 --- a/crates/holochain/Cargo.toml +++ b/crates/holochain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain" -version = "0.0.161-dev.0" +version = "0.0.161" description = "Holochain, a framework for distributed applications" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -24,20 +24,20 @@ futures = "0.3.1" getrandom = "0.2.7" ghost_actor = "0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_cascade = { version = "0.0.60-dev.0", path = "../holochain_cascade" } -holochain_conductor_api = { version = "0.0.58-dev.0", path = "../holochain_conductor_api" } -holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } -holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } -holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } +holochain_cascade = { version = "0.0.60", path = "../holochain_cascade" } +holochain_conductor_api = { version = "0.0.58", path = "../holochain_conductor_api" } +holochain_keystore = { version = "0.0.54", path = "../holochain_keystore" } +holochain_p2p = { version = "0.0.55", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.53", path = "../holochain_sqlite" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.58-dev.0", path = "../holochain_state" } -holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } +holochain_state = { version = "0.0.58", path = "../holochain_state" } +holochain_types = { version = "0.0.55", path = "../holochain_types" } holochain_wasmer_host = "=0.0.80" holochain_websocket = { version = "0.0.39", path = "../holochain_websocket" } -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types", features = ["full"] } +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types", features = ["full"] } human-panic = "1.0.3" -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../kitsune_p2p/types" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.32", path = "../kitsune_p2p/types" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { version = "0.0.15", path = "../mr_bundle" } @@ -74,15 +74,15 @@ url = "1.7.2" url2 = "0.0.6" url_serde = "0.2.0" uuid = { version = "0.7", features = [ "serde", "v4" ] } -holochain_wasm_test_utils = { version = "0.0.57-dev.0", path = "../test_utils/wasm" } +holochain_wasm_test_utils = { version = "0.0.57", path = "../test_utils/wasm" } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } async-recursion = "0.3" wasmer-middlewares = "=2.2.0" # Dependencies for test_utils: keep in sync with below -hdk = { version = "0.0.151-dev.0", path = "../hdk", optional = true } +hdk = { version = "0.0.151", path = "../hdk", optional = true } matches = {version = "0.1.8", optional = true } -holochain_test_wasm_common = { version = "0.0.52-dev.0", path = "../test_utils/wasm_common", optional = true } +holochain_test_wasm_common = { version = "0.0.52", path = "../test_utils/wasm_common", optional = true } unwrap_to = { version = "0.1.0", optional = true } itertools = { version = "0.10", optional = false } @@ -104,14 +104,14 @@ serial_test = "0.4.0" test-case = "1.2.1" # Dependencies for test_utils: keep in sync with above -hdk = { version = "0.0.151-dev.0", path = "../hdk", optional = false } +hdk = { version = "0.0.151", path = "../hdk", optional = false } matches = {version = "0.1.8", optional = false } -holochain_test_wasm_common = { version = "0.0.52-dev.0", path = "../test_utils/wasm_common", optional = false } +holochain_test_wasm_common = { version = "0.0.52", path = "../test_utils/wasm_common", optional = false } unwrap_to = { version = "0.1.0", optional = false } arbitrary = { version = "1.0", features = ["derive"] } [build-dependencies] -hdk = { version = "0.0.151-dev.0", path = "../hdk"} +hdk = { version = "0.0.151", path = "../hdk"} serde = { version = "1.0", features = [ "derive" ] } serde_json = { version = "1.0.51" } toml = "0.5.6" diff --git a/crates/holochain_cascade/CHANGELOG.md b/crates/holochain_cascade/CHANGELOG.md index 708a410e21..31f9a414be 100644 --- a/crates/holochain_cascade/CHANGELOG.md +++ b/crates/holochain_cascade/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.60 + ## 0.0.59 ## 0.0.58 diff --git a/crates/holochain_cascade/Cargo.toml b/crates/holochain_cascade/Cargo.toml index 2f30763c05..f8943c8fa9 100644 --- a/crates/holochain_cascade/Cargo.toml +++ b/crates/holochain_cascade/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_cascade" -version = "0.0.60-dev.0" +version = "0.0.60" description = "Logic for cascading updates to Holochain state and network interaction" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,17 +15,17 @@ fallible-iterator = "0.2" fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -hdk = { version = "0.0.151-dev.0", path = "../hdk" } -hdk_derive = { version = "0.0.48-dev.0", path = "../hdk_derive" } +hdk = { version = "0.0.151", path = "../hdk" } +hdk_derive = { version = "0.0.48", path = "../hdk_derive" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } -holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } +holochain_sqlite = { version = "0.0.53", path = "../holochain_sqlite" } +holochain_p2p = { version = "0.0.55", path = "../holochain_p2p" } holochain_serialized_bytes = "=0.0.51" -holochain_state = { version = "0.0.58-dev.0", path = "../holochain_state" } -holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } +holochain_state = { version = "0.0.58", path = "../holochain_state" } +holochain_types = { version = "0.0.55", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types" } observability = "0.1.3" -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p/kitsune_p2p" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/holochain_conductor_api/CHANGELOG.md b/crates/holochain_conductor_api/CHANGELOG.md index 4b4a7ae408..4257dd8b04 100644 --- a/crates/holochain_conductor_api/CHANGELOG.md +++ b/crates/holochain_conductor_api/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.58 + ## 0.0.57 ## 0.0.56 diff --git a/crates/holochain_conductor_api/Cargo.toml b/crates/holochain_conductor_api/Cargo.toml index 4dca67db5b..e0b7ef8bb6 100644 --- a/crates/holochain_conductor_api/Cargo.toml +++ b/crates/holochain_conductor_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_conductor_api" -version = "0.0.58-dev.0" +version = "0.0.58" description = "Message types for Holochain admin and app interface protocols" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -11,13 +11,13 @@ edition = "2021" [dependencies] directories = "2.0.2" derive_more = "0.99.3" -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p/kitsune_p2p" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } -holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } -holochain_state = { version = "0.0.58-dev.0", path = "../holochain_state" } +holochain_p2p = { version = "0.0.55", path = "../holochain_p2p" } +holochain_state = { version = "0.0.58", path = "../holochain_state" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } +holochain_types = { version = "0.0.55", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types" } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_yaml = "0.8" diff --git a/crates/holochain_integrity_types/CHANGELOG.md b/crates/holochain_integrity_types/CHANGELOG.md index bebc1b0a44..d8464369a7 100644 --- a/crates/holochain_integrity_types/CHANGELOG.md +++ b/crates/holochain_integrity_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +## 0.0.18 + ## 0.0.17 ## 0.0.16 diff --git a/crates/holochain_integrity_types/Cargo.toml b/crates/holochain_integrity_types/Cargo.toml index 1bbb2552b4..fcc35ba600 100644 --- a/crates/holochain_integrity_types/Cargo.toml +++ b/crates/holochain_integrity_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_integrity_types" -version = "0.0.18-dev.0" +version = "0.0.18" description = "Holochain integrity types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/holochain_keystore/CHANGELOG.md b/crates/holochain_keystore/CHANGELOG.md index 71efb47143..0b3e3cbdf7 100644 --- a/crates/holochain_keystore/CHANGELOG.md +++ b/crates/holochain_keystore/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.54 + ## 0.0.53 - Add lair disconnect detection / reconnect loop with backoff for keystore resiliency. [\#1529](https://github.com/holochain/holochain/pull/1529) diff --git a/crates/holochain_keystore/Cargo.toml b/crates/holochain_keystore/Cargo.toml index 8b28f9a417..c3676b8de5 100644 --- a/crates/holochain_keystore/Cargo.toml +++ b/crates/holochain_keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_keystore" -version = "0.0.54-dev.0" +version = "0.0.54" description = "keystore for libsodium keypairs" license = "CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13.0" futures = "0.3.23" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.47-dev.0"} -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../kitsune_p2p/types" } +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.47"} +kitsune_p2p_types = { version = "0.0.32", path = "../kitsune_p2p/types" } must_future = "0.1.2" nanoid = "0.4.0" one_err = "0.0.5" @@ -30,7 +30,7 @@ tracing = "0.1" # This is a redundant dependency. # It's included only to set the proper feature flag for database encryption. -holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.53", path = "../holochain_sqlite" } [dev-dependencies] assert_cmd = "2.0.4" diff --git a/crates/holochain_p2p/CHANGELOG.md b/crates/holochain_p2p/CHANGELOG.md index 579fee2888..11b0cb8885 100644 --- a/crates/holochain_p2p/CHANGELOG.md +++ b/crates/holochain_p2p/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.55 + ## 0.0.54 ## 0.0.53 diff --git a/crates/holochain_p2p/Cargo.toml b/crates/holochain_p2p/Cargo.toml index 7f07794845..ee370b68ea 100644 --- a/crates/holochain_p2p/Cargo.toml +++ b/crates/holochain_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_p2p" -version = "0.0.55-dev.0" +version = "0.0.55" description = "holochain specific wrapper around more generic p2p module" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -17,12 +17,12 @@ fixt = { path = "../fixt", version = "0.0.14"} futures = "0.3" ghost_actor = "=0.3.0-alpha.4" holo_hash = { version = "0.0.31", path = "../holo_hash" } -holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.54", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../kitsune_p2p/types" } +holochain_types = { version = "0.0.55", path = "../holochain_types" } +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p_types = { version = "0.0.32", path = "../kitsune_p2p/types" } mockall = "0.10.2" observability = "0.1.3" rand = "0.8.5" diff --git a/crates/holochain_sqlite/CHANGELOG.md b/crates/holochain_sqlite/CHANGELOG.md index dc8033c480..85610f298f 100644 --- a/crates/holochain_sqlite/CHANGELOG.md +++ b/crates/holochain_sqlite/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.53 + ## 0.0.52 ## 0.0.51 diff --git a/crates/holochain_sqlite/Cargo.toml b/crates/holochain_sqlite/Cargo.toml index e1ecaeb0cd..46883b9677 100644 --- a/crates/holochain_sqlite/Cargo.toml +++ b/crates/holochain_sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_sqlite" -version = "0.0.53-dev.0" +version = "0.0.53" description = "Abstractions for persistence of Holochain state via SQLite" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -25,8 +25,8 @@ fixt = { version = "0.0.14", path = "../fixt" } futures = "0.3.1" holo_hash = { path = "../holo_hash", features = ["rusqlite"], version = "0.0.31"} holochain_serialized_bytes = "=0.0.51" -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types" } -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p/kitsune_p2p" } lazy_static = "1.4.0" once_cell = "1.4.1" must_future = "0.1.1" diff --git a/crates/holochain_state/CHANGELOG.md b/crates/holochain_state/CHANGELOG.md index 9614b62bcf..e2b2518318 100644 --- a/crates/holochain_state/CHANGELOG.md +++ b/crates/holochain_state/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.58 + ## 0.0.57 ## 0.0.56 diff --git a/crates/holochain_state/Cargo.toml b/crates/holochain_state/Cargo.toml index 85cf1857ec..05d3f2a584 100644 --- a/crates/holochain_state/Cargo.toml +++ b/crates/holochain_state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_state" -version = "0.0.58-dev.0" +version = "0.0.58" description = "TODO minimize deps" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -13,19 +13,19 @@ byteorder = "1.3.4" chrono = { version = "0.4.22", default-features = false, features = ["clock", "std", "oldtime", "serde"] } derive_more = "0.99.3" either = "1.5" -holochain_sqlite = { version = "0.0.53-dev.0", path = "../holochain_sqlite" } +holochain_sqlite = { version = "0.0.53", path = "../holochain_sqlite" } holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["full"] } fallible-iterator = "0.2.0" futures = "0.3" -holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.54", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_p2p = { version = "0.0.55-dev.0", path = "../holochain_p2p" } -holochain_types = { version = "0.0.55-dev.0", path = "../holochain_types" } +holochain_p2p = { version = "0.0.55", path = "../holochain_p2p" } +holochain_types = { version = "0.0.55", path = "../holochain_types" } holochain_util = { version = "0.0.11", path = "../holochain_util" } -holochain_zome_types = { version = "0.0.47-dev.0", path = "../holochain_zome_types", features = [ +holochain_zome_types = { version = "0.0.47", path = "../holochain_zome_types", features = [ "full", ] } -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p/kitsune_p2p" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p/kitsune_p2p" } mockall = "0.10.2" one_err = "0.0.5" parking_lot = "0.10" diff --git a/crates/holochain_types/CHANGELOG.md b/crates/holochain_types/CHANGELOG.md index 65f07d93dd..ba3f5a58b9 100644 --- a/crates/holochain_types/CHANGELOG.md +++ b/crates/holochain_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.55 + ## 0.0.54 ## 0.0.53 diff --git a/crates/holochain_types/Cargo.toml b/crates/holochain_types/Cargo.toml index 37aca70250..f2c088bdf0 100644 --- a/crates/holochain_types/Cargo.toml +++ b/crates/holochain_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_types" -version = "0.0.55-dev.0" +version = "0.0.55" description = "Holochain common types" license-file = "LICENSE_CAL-1.0" homepage = "https://github.com/holochain/holochain" @@ -25,12 +25,12 @@ fixt = { path = "../fixt", version = "0.0.14"} flate2 = "1.0.14" futures = "0.3" holo_hash = { version = "0.0.31", path = "../holo_hash", features = ["encoding"] } -holochain_keystore = { version = "0.0.54-dev.0", path = "../holochain_keystore" } +holochain_keystore = { version = "0.0.54", path = "../holochain_keystore" } holochain_serialized_bytes = "=0.0.51" -holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.53-dev.0"} -holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.47-dev.0", features = ["full"] } +holochain_sqlite = { path = "../holochain_sqlite", version = "0.0.53"} +holochain_zome_types = { path = "../holochain_zome_types", version = "0.0.47", features = ["full"] } itertools = { version = "0.10" } -kitsune_p2p_dht = { version = "0.0.5-dev.0", path = "../kitsune_p2p/dht" } +kitsune_p2p_dht = { version = "0.0.5", path = "../kitsune_p2p/dht" } lazy_static = "1.4.0" mockall = "0.10.2" mr_bundle = { path = "../mr_bundle", features = ["packing"], version = "0.0.15"} diff --git a/crates/holochain_zome_types/CHANGELOG.md b/crates/holochain_zome_types/CHANGELOG.md index e9d6f643e6..900f4d02d8 100644 --- a/crates/holochain_zome_types/CHANGELOG.md +++ b/crates/holochain_zome_types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased](https://github.com/holochain/holochain/holochain_zome_types-v0.0.2-alpha.1...HEAD) +## 0.0.47 + ## 0.0.46 ## 0.0.45 diff --git a/crates/holochain_zome_types/Cargo.toml b/crates/holochain_zome_types/Cargo.toml index 7db4a6e880..b23598e02b 100644 --- a/crates/holochain_zome_types/Cargo.toml +++ b/crates/holochain_zome_types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_zome_types" -version = "0.0.47-dev.0" +version = "0.0.47" description = "Holochain zome types" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -13,7 +13,7 @@ edition = "2021" [dependencies] kitsune_p2p_timestamp = { version = "0.0.13", path = "../kitsune_p2p/timestamp" } -holochain_integrity_types = { version = "0.0.18-dev.0", path = "../holochain_integrity_types", features = ["tracing"] } +holochain_integrity_types = { version = "0.0.18", path = "../holochain_integrity_types", features = ["tracing"] } holo_hash = { version = "0.0.31", path = "../holo_hash" } holochain_serialized_bytes = "=0.0.51" paste = "=1.0.5" @@ -36,7 +36,7 @@ num_enum = { version = "0.5", optional = true } # full-dna-def dependencies derive_builder = { version = "0.9", optional = true } -kitsune_p2p_dht = { version = "0.0.5-dev.0", path = "../kitsune_p2p/dht", optional = true } +kitsune_p2p_dht = { version = "0.0.5", path = "../kitsune_p2p/dht", optional = true } nanoid = { version = "0.3", optional = true } shrinkwraprs = { version = "0.3", optional = true } diff --git a/crates/kitsune_p2p/bootstrap/Cargo.toml b/crates/kitsune_p2p/bootstrap/Cargo.toml index 467b86ae8f..b17a2f7a4d 100644 --- a/crates/kitsune_p2p/bootstrap/Cargo.toml +++ b/crates/kitsune_p2p/bootstrap/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" [dependencies] clap = "=3.1.18" futures = "0.3.15" -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } +kitsune_p2p_types = { version = "0.0.32", path = "../types" } once_cell = "1.7.2" parking_lot = "0.11" rand = "0.8.5" diff --git a/crates/kitsune_p2p/dht/CHANGELOG.md b/crates/kitsune_p2p/dht/CHANGELOG.md index d8005dbe49..5e9cf83afd 100644 --- a/crates/kitsune_p2p/dht/CHANGELOG.md +++ b/crates/kitsune_p2p/dht/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.5 + ## 0.0.4 ## 0.0.3 diff --git a/crates/kitsune_p2p/dht/Cargo.toml b/crates/kitsune_p2p/dht/Cargo.toml index 8cd5e62796..2032f02227 100644 --- a/crates/kitsune_p2p/dht/Cargo.toml +++ b/crates/kitsune_p2p/dht/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_dht" -version = "0.0.5-dev.0" +version = "0.0.5" description = "Kitsune P2p DHT definition" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" diff --git a/crates/kitsune_p2p/direct/Cargo.toml b/crates/kitsune_p2p/direct/Cargo.toml index 5ffd1bec52..0f0cba6516 100644 --- a/crates/kitsune_p2p/direct/Cargo.toml +++ b/crates/kitsune_p2p/direct/Cargo.toml @@ -19,10 +19,10 @@ hyper = { version = "0.14", features = ["server","http1","http2","tcp"] } if-addrs = "0.6" kitsune_p2p_bootstrap = { version = "0.0.12-dev.0", path = "../bootstrap" } kitsune_p2p_direct_api = { version = "0.0.1", path = "../direct_api" } -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } -kitsune_p2p = { version = "0.0.44-dev.0", path = "../kitsune_p2p", features = ["test_utils"] } -kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.32-dev.0", path = "../proxy" } +kitsune_p2p_types = { version = "0.0.32", path = "../types" } +kitsune_p2p = { version = "0.0.44", path = "../kitsune_p2p", features = ["test_utils"] } +kitsune_p2p_transport_quic = { version = "0.0.32", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.32", path = "../proxy" } rand = "0.8.5" serde = { version = "1", features = ["derive", "rc"] } serde_json = { version = "1", features = ["preserve_order"] } diff --git a/crates/kitsune_p2p/direct_test/Cargo.toml b/crates/kitsune_p2p/direct_test/Cargo.toml index 00a4599a08..8b84c68694 100644 --- a/crates/kitsune_p2p/direct_test/Cargo.toml +++ b/crates/kitsune_p2p/direct_test/Cargo.toml @@ -12,8 +12,8 @@ edition = "2021" [dependencies] kitsune_p2p_direct = { version = "0.0.1", path = "../direct" } -kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } -kitsune_p2p_proxy = { version = "0.0.32-dev.0", path = "../proxy" } +kitsune_p2p_transport_quic = { version = "0.0.32", path = "../transport_quic" } +kitsune_p2p_proxy = { version = "0.0.32", path = "../proxy" } rand = "0.8.5" structopt = "0.3.21" tokio = { version = "1.11", features = ["full"] } diff --git a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md index 73f0714fb4..c7153ca205 100644 --- a/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md +++ b/crates/kitsune_p2p/kitsune_p2p/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.44 + - Fixes a regression where a node can prematurely end a gossip round if their partner signals that they are done sending data, even if the node itself still has more data to send, which can lead to persistent timeouts between the two nodes. [\#1553](https://github.com/holochain/holochain/pull/1553) ## 0.0.43 diff --git a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml index 554a9c5177..e1ceafe819 100644 --- a/crates/kitsune_p2p/kitsune_p2p/Cargo.toml +++ b/crates/kitsune_p2p/kitsune_p2p/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p" -version = "0.0.44-dev.0" +version = "0.0.44" description = "p2p / dht communication framework" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -20,10 +20,10 @@ ghost_actor = "=0.3.0-alpha.4" governor = "0.3.2" itertools = "0.10" kitsune_p2p_mdns = { version = "0.0.3", path = "../mdns" } -kitsune_p2p_proxy = { version = "0.0.32-dev.0", path = "../proxy" } +kitsune_p2p_proxy = { version = "0.0.32", path = "../proxy" } kitsune_p2p_timestamp = { version = "0.0.13", path = "../timestamp", features = ["now"] } -kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } +kitsune_p2p_transport_quic = { version = "0.0.32", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.32", path = "../types" } must_future = "0.1.1" num-traits = "0.2" observability = "0.1.3" diff --git a/crates/kitsune_p2p/proxy/CHANGELOG.md b/crates/kitsune_p2p/proxy/CHANGELOG.md index 2cbaac4419..32fc4c34ed 100644 --- a/crates/kitsune_p2p/proxy/CHANGELOG.md +++ b/crates/kitsune_p2p/proxy/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.32 + ## 0.0.31 ## 0.0.30 diff --git a/crates/kitsune_p2p/proxy/Cargo.toml b/crates/kitsune_p2p/proxy/Cargo.toml index 61dff157d8..64eb127fa9 100644 --- a/crates/kitsune_p2p/proxy/Cargo.toml +++ b/crates/kitsune_p2p/proxy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_proxy" -version = "0.0.32-dev.0" +version = "0.0.32" description = "Proxy transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -15,8 +15,8 @@ base64 = "0.13" blake2b_simd = "0.5.10" derive_more = "0.99.7" futures = "0.3" -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } -kitsune_p2p_transport_quic = { version = "0.0.32-dev.0", path = "../transport_quic" } +kitsune_p2p_types = { version = "0.0.32", path = "../types" } +kitsune_p2p_transport_quic = { version = "0.0.32", path = "../transport_quic" } nanoid = "0.3" observability = "0.1.3" parking_lot = "0.11" diff --git a/crates/kitsune_p2p/transport_quic/CHANGELOG.md b/crates/kitsune_p2p/transport_quic/CHANGELOG.md index 2cbaac4419..32fc4c34ed 100644 --- a/crates/kitsune_p2p/transport_quic/CHANGELOG.md +++ b/crates/kitsune_p2p/transport_quic/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.32 + ## 0.0.31 ## 0.0.30 diff --git a/crates/kitsune_p2p/transport_quic/Cargo.toml b/crates/kitsune_p2p/transport_quic/Cargo.toml index 116a2ca5c8..8360ff664f 100644 --- a/crates/kitsune_p2p/transport_quic/Cargo.toml +++ b/crates/kitsune_p2p/transport_quic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_transport_quic" -version = "0.0.32-dev.0" +version = "0.0.32" description = "QUIC transport module for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -14,7 +14,7 @@ edition = "2021" blake2b_simd = "1.0.0" futures = "0.3.21" if-addrs = "0.7.0" -kitsune_p2p_types = { version = "0.0.32-dev.0", path = "../types" } +kitsune_p2p_types = { version = "0.0.32", path = "../types" } nanoid = "0.4.0" once_cell = "1.9.0" quinn = "0.8.1" diff --git a/crates/kitsune_p2p/types/CHANGELOG.md b/crates/kitsune_p2p/types/CHANGELOG.md index 413009e17a..5ce5365cdd 100644 --- a/crates/kitsune_p2p/types/CHANGELOG.md +++ b/crates/kitsune_p2p/types/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.32 + ## 0.0.31 ## 0.0.30 diff --git a/crates/kitsune_p2p/types/Cargo.toml b/crates/kitsune_p2p/types/Cargo.toml index 75f03af559..efac8058fd 100644 --- a/crates/kitsune_p2p/types/Cargo.toml +++ b/crates/kitsune_p2p/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitsune_p2p_types" -version = "0.0.32-dev.0" +version = "0.0.32" description = "types subcrate for kitsune-p2p" license = "Apache-2.0" homepage = "https://github.com/holochain/holochain" @@ -16,7 +16,7 @@ base64 = "0.13" derive_more = "0.99.7" futures = "0.3" ghost_actor = "=0.3.0-alpha.4" -kitsune_p2p_dht = { version = "0.0.5-dev.0", path = "../dht" } +kitsune_p2p_dht = { version = "0.0.5", path = "../dht" } kitsune_p2p_dht_arc = { version = "0.0.14", path = "../dht_arc" } lru = "0.6.5" mockall = { version = "0.10.2", optional = true } diff --git a/crates/test_utils/wasm/CHANGELOG.md b/crates/test_utils/wasm/CHANGELOG.md index c5138dbadd..eb9c876158 100644 --- a/crates/test_utils/wasm/CHANGELOG.md +++ b/crates/test_utils/wasm/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.57 + ## 0.0.56 ## 0.0.55 diff --git a/crates/test_utils/wasm/Cargo.toml b/crates/test_utils/wasm/Cargo.toml index cf2aeef342..4d88b52de8 100644 --- a/crates/test_utils/wasm/Cargo.toml +++ b/crates/test_utils/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wasm_test_utils" -version = "0.0.57-dev.0" +version = "0.0.57" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Utilities for Wasm testing for Holochain" @@ -19,7 +19,7 @@ only_check = [] [dependencies] -holochain_types = { path = "../../holochain_types", version = "0.0.55-dev.0"} +holochain_types = { path = "../../holochain_types", version = "0.0.55"} strum = "0.18.0" strum_macros = "0.18.0" holochain_util = { version = "0.0.11", path = "../../holochain_util" } diff --git a/crates/test_utils/wasm/wasm_workspace/Cargo.lock b/crates/test_utils/wasm/wasm_workspace/Cargo.lock index 34cc3e9c57..2c173ce33e 100644 --- a/crates/test_utils/wasm/wasm_workspace/Cargo.lock +++ b/crates/test_utils/wasm/wasm_workspace/Cargo.lock @@ -684,7 +684,7 @@ dependencies = [ [[package]] name = "hdi" -version = "0.1.0" +version = "0.1.1" dependencies = [ "hdk_derive", "holo_hash", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "hdk" -version = "0.0.150" +version = "0.0.151" dependencies = [ "getrandom", "hdi", @@ -718,7 +718,7 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.0.47" +version = "0.0.48" dependencies = [ "darling 0.14.1", "heck 0.4.0", @@ -775,7 +775,7 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.0.17" +version = "0.0.18" dependencies = [ "arbitrary", "holo_hash", @@ -823,7 +823,7 @@ dependencies = [ [[package]] name = "holochain_test_wasm_common" -version = "0.0.51" +version = "0.0.52" dependencies = [ "hdk", "serde", @@ -858,7 +858,7 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.0.46" +version = "0.0.47" dependencies = [ "fixt", "holo_hash", diff --git a/crates/test_utils/wasm_common/CHANGELOG.md b/crates/test_utils/wasm_common/CHANGELOG.md index a1bce5f3b0..66c20354c7 100644 --- a/crates/test_utils/wasm_common/CHANGELOG.md +++ b/crates/test_utils/wasm_common/CHANGELOG.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## \[Unreleased\] +## 0.0.52 + ## 0.0.51 ## 0.0.50 diff --git a/crates/test_utils/wasm_common/Cargo.toml b/crates/test_utils/wasm_common/Cargo.toml index b11ffd8da7..3c2d07d0f5 100644 --- a/crates/test_utils/wasm_common/Cargo.toml +++ b/crates/test_utils/wasm_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_test_wasm_common" -version = "0.0.52-dev.0" +version = "0.0.52" authors = [ "thedavidmeister", "thedavidmeister@gmail.com" ] edition = "2021" description = "Common code for Wasm testing for Holochain" @@ -13,5 +13,5 @@ crate-type = [ "cdylib", "rlib" ] path = "src/lib.rs" [dependencies] -hdk = { path = "../../hdk", version = "0.0.151-dev.0"} +hdk = { path = "../../hdk", version = "0.0.151"} serde = "1.0"