Skip to content

Commit

Permalink
Put / get now round trips, additional relations to add
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan <[email protected]>
  • Loading branch information
ryan-s-roberts committed Apr 9, 2024
1 parent e58e985 commit 79a30cf
Show file tree
Hide file tree
Showing 25 changed files with 2,704 additions and 950 deletions.
935 changes: 589 additions & 346 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ members = [
"crates/pallet-chronicle",
"crates/pallet-opa",
"crates/opactl",
"crates/chronicle-data",
"node/runtime-chronicle",
"node/node-chronicle",
"crates/embedded-substrate",
Expand All @@ -28,17 +29,13 @@ members = [
"crates/protocol-substrate-chronicle",
"crates/protocol-substrate-opa",
"crates/chronicle-test-infrastructure",
"crates/chronicle-arrow",
"crates/chronicle-persistence",
"crates/chronicle-data",
]

[workspace.dependencies]
Inflector = "0.11.4"
anyhow = { version = "^1", features = ["backtrace"] }
arrow-array = { versipn = "^0.50" }
arrow-flight = { versipn = "^0.50" }
arrow-ipc = { versipn = "^0.50" }
arrow-schema = { versipn = "^0.50" }
assert_fs = "1.0"
async-graphql = "^7"
async-graphql-poem = "^7"
Expand All @@ -56,7 +53,7 @@ clap_complete = "3.2.3"
clap_generate = "3.0.3"
collecting-hashmap = { version = "0.2" }
colored_json = "^3"
console-subscriber = "0.1"
console-subscriber = "0.2"
const_format = "0.2"
criterion = { version = "0.5.1", features = ["async_futures", "async_tokio"] }
crossbeam = "^0.8"
Expand Down
10 changes: 4 additions & 6 deletions crates/api/src/chronicle_graphql/mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ async fn transaction_context<'a>(
_ctx: &Context<'a>,
) -> async_graphql::Result<Submission> {
match res {
ApiResponse::Submission { subject, tx_id, .. } => {
Ok(Submission::from_submission(&subject, &tx_id))
},
ApiResponse::AlreadyRecorded { subject, .. } => {
Ok(Submission::from_already_recorded(&subject))
},
ApiResponse::Submission { subject, tx_id, .. } =>
Ok(Submission::from_submission(&subject, &tx_id)),
ApiResponse::AlreadyRecorded { subject, .. } =>
Ok(Submission::from_already_recorded(&subject)),
_ => unreachable!(),
}
}
Expand Down
5 changes: 1 addition & 4 deletions crates/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,7 @@ where
Ok(dispatch)
}

/// Notify after a successful submission, for now this makes little
/// difference, but with the future introduction of a submission queue,
/// submission notifications will be decoupled from api invocation.
/// This is a measure to keep the api interface stable once this is introduced
/// Notify after a successful submission, depending on the consistency requirement TODO: set in the transaction
fn submit_blocking(
&mut self,
tx: ChronicleTransaction,
Expand Down
15 changes: 10 additions & 5 deletions crates/chronicle-arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow-array = { workspace = true }
arrow-flight = { workspace = true }
arrow-ipc = { workspace = true }
arrow-schema = { workspace = true }
arrow = { version = "50", features = ["json", "prettyprint", "chrono-tz"] }
arrow-array = { version = "50" }
arrow-buffer = { version = "50" }
arrow-data = { version = "50" }
arrow-flight = { version = "50" }
arrow-ipc = { version = "50" }
arrow-schema = { version = "50" }
chrono = { workspace = true }
diesel = { workspace = true }
futures = { workspace = true }
lazy_static = { workspace = true }
Expand All @@ -23,7 +27,7 @@ tokio = { version = "^1", default-features = false, features = [
"rt",
"rt-multi-thread",
] }
tonic = { version = "^0.10.0", default-features = false, features = [
tonic = { version = "0.10.2", default-features = false, features = [
"transport",
"codegen",
"prost",
Expand All @@ -39,6 +43,7 @@ common = { path = "../common", features = ["std"] }


[dev-dependencies]
arrow-json = { version = "50" }
chronicle-telemetry = { path = "../chronicle-telemetry" }
chronicle-test-infrastructure = { path = "../chronicle-test-infrastructure" }
insta = { workspace = true, features = ["toml"] }
Expand Down
Loading

0 comments on commit 79a30cf

Please sign in to comment.