Skip to content

Commit

Permalink
feat(cat-voices): Merge main into mve3 (#1334)
Browse files Browse the repository at this point in the history
* Feat: update testplan template (#1243)

* chore: update testplan

* fix

* fix

* fix

* fix

* fix: testplan template (#1245)

* feat(cat-gateway): Finliaze CIP36 Endpoint Cleanup (#1241)

* fix: api endpoint draft

Signed-off-by: bkioshn <[email protected]>

* fix: api health endpoint v1

Signed-off-by: bkioshn <[email protected]>

* fix: remove bad request from errorResponses

Signed-off-by: bkioshn <[email protected]>

* fix: add bad req to get /registration

Signed-off-by: bkioshn <[email protected]>

* fix: error logging

Signed-off-by: bkioshn <[email protected]>

* fix: remove validation error

Signed-off-by: bkioshn <[email protected]>

* fix: registration get error name

Signed-off-by: bkioshn <[email protected]>

* chore:format

Signed-off-by: bkioshn <[email protected]>

* fix: get json schema from openapi spec

Signed-off-by: bkioshn <[email protected]>

* fix: move schema utils

Signed-off-by: bkioshn <[email protected]>

* fix: optional field

Signed-off-by: bkioshn <[email protected]>

* fix: config key

Signed-off-by: bkioshn <[email protected]>

* fix: cat-gateway code gen

Signed-off-by: bkioshn <[email protected]>

* fix: api name in cat-voice

Signed-off-by: bkioshn <[email protected]>

* fix: cat-voice format

Signed-off-by: bkioshn <[email protected]>

* chore: fix spacing

Signed-off-by: bkioshn <[email protected]>

* chore: fix spacing

Signed-off-by: bkioshn <[email protected]>

* chore: change tag config description

* test: add test for default validator

* fix: add spectral ruleset

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): Sort the spelling words, and use latest deny.toml

* fix(cat-gateway): Fix broken pre-push justfile target

* docs(cat-gateway): cleanup

* docs(cat-gateway): Fix API Groups and document them better

* docs(cat-gateway): Add documentation to the health/inspection endpoint

* docs(cat-gateway): Add descriptions for cardano/cip36/latest_registration/stake_addr

* docs(cat-gateway): Document stake key hash and vote key endpoints for cardano

* docs(cat-gateway): add documentation to config/frontend

* docs(cat-gateway): Add api docs for frontend schema

* docs(cat-gateway): Move legacy registration endpoints into the Legacy TAG.

* docs(cat-gateway): Remaining documentable entities documented

* fix: update openapi linter

Signed-off-by: bkioshn <[email protected]>

* docs(cat-gateway): Add more constraints to parameters and json bodies

* fix: openapi lint FUNCTION name

Signed-off-by: bkioshn <[email protected]>

* fix: CIP36 example and description

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): cleanup error handling, and add a global 429 response to all endpoints.

* fix: config endpoint example, desc, and return

Signed-off-by: bkioshn <[email protected]>

* chore: remove todo

Signed-off-by: bkioshn <[email protected]>

* fix: move config object

Signed-off-by: bkioshn <[email protected]>

* fix: move cip36 object

Signed-off-by: bkioshn <[email protected]>

* docs(cat-gateway): Add missing headers to responses

* docs(cat-gateway): Cleanup the rest of the documentation in the api

* fix(cat-gateway): Fix OpenAPI linting and add autogenerated api file for dart.

* refactor(cat-gateway): Better generalize the OpenAPI simple string type creation macro.

* fix(cat-gateway): Add APIKey and CatToken auth to some endpoints.  Add 401 and 403 common responses.

* fix(cat-gateway): Add universal 422 response to all endpoints, and try and make all endpoint validation use it.

* fix: add cardano stake address type

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): stake address type

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): Refactor the RBAC Token auth, so it's easier to maintain.

* fix(cat-gateway): stake address name

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): Add no auth and no-auth+rbac auth schemes

* fix(cat-gateway): format + stake addr example

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): code format

* fix(cat-gateway): openapi spectral example rules

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): Move legacy registration endpoint under Legacy Tag

* fix(cat-gateway): Add Auth to all endpoints

* fix(docs): Remove obsolete lint config file

* fix(cat-gateway): Make config.toml match upstream

* docs(docs): update project dictionary

* feat(cat-gateway): add target to make it quick to check openapi lints locally

* fix(cat-gateway): Remove reference to hermes

* fix(cat-gateway): Add auth to rbac endpoints

* docs(cat-gateway): Add full docs for v1/votes/plan/account-votes

* docs(cat-gateway): Add example for ip address query argument

* fix(cat-gateway): Define and abstract Ed25519 Public Keys as hex encoded parameters

* fix(cat-gateway): Make sure string api types do not directly expose the internal string

* fix(cat-gateway): Make conversion from a Ed25519 pub key hex value to a Verifyingkey infallible

* fix(cat-gateway): Fix native asset response types

* docs(cat-gateway): fix comments

* fix(cat-gateway): Autogenerate flutter files

* fix(cat-gateway): Exclude legacy endpoints from needing api examples

* fix(cat-gateway): WIP improving cip36 endpoint docs

* fix(docs): Make targets to re-check the generated schema easy.

* fix: spectral ruleset for linting query params description

* feat: parameter rule

* fix: debug function

* docs(cat-gateway): Make schema lint accept description inside a schema in a query parameter

* fix(cat-gateway): remove debug logic from api docs lint

* fix(cat-gateway): Don't put expanded program into git

* Make error response comments consistent

* test(cat-gateway): Add local operation to easily expand macros in the service code

* fix(cat-gateway): CIP36 Structured endpoint

* fix: speling

* fix(rust): cleanup/normalize nonce validation

* fix(rust): code format

* Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs

Co-authored-by: bkioshn <[email protected]>

* Update catalyst-gateway/bin/src/service/common/types/cardano/cip19_shelley_address.rs

Co-authored-by: bkioshn <[email protected]>

---------

Signed-off-by: bkioshn <[email protected]>
Co-authored-by: bkioshn <[email protected]>
Co-authored-by: bkioshn <[email protected]>
Co-authored-by: Dominik Toton <[email protected]>
Co-authored-by: Apisit Ritreungroj <[email protected]>

* Revert "Merge branch 'mve3' into main"

This reverts commit 01db066, reversing
changes made to 3bf0ccf.

* fix(cat-voices): equatable lint issue fix (#1280)

* fix: resolve equatable lint issue

* fix: missing override

* fix(flutter/catalyst_key_derivation): Accept non extended public key for rbac (#1288)

* fix(flutter/catalyst_key_derivation): Accept non extended public key for rbac

* fix: unit tests

* chore: rename

* fix(dart/catalyst_cardano_serialization): remove key reference from RBAC, use local key ref instead (#1292)

* fix(dart/catalyst_cardano_serialization): remove key reference from RBAC, use local key ref

* fix: update RBAC issuer properties, catalyst users don't have any of these identifiable

* fix: payment key should refer to the first transaction output which is the change address

* chore: rename keyOffset to offset

* chore: bump version (#1297)

* fix(cat-gateway): Fix native asset indexing to be more flexible (#1150)

* refactor: rename schema to asset

* refactor: vector asset

* chore: rename asset fields

* refactor: object mapping structs

* chore: minor rename

* fix: update operation cql

* fix: schema version

* chore: change asset_id back to policy_id

* chore: find rename

* fix: schema version

* fix: i128

* feat: asset value from i128

* refactor: change &[u8] for asset name

* refactor: try from asset value

* fix: import

* chore: fmtfix

* Update catalyst-gateway/bin/src/db/index/block/txo/insert_txo_asset.rs

Co-authored-by: Steven Johnson <[email protected]>

* revert: i128 to bigint

* fix: unused import

* feat: api test

* chore: cspell fix

* chore: cspell fix

* chore: fmtfix

---------

Co-authored-by: Oleksandr Prokhorenko <[email protected]>
Co-authored-by: Steven Johnson <[email protected]>

* feat(docs): Document the key derivation path for Project Catalyst ED25519 Keys (#1300)

* feat(docs): Document the key derivation path for Project Catalyst ED25519 keys

* fix(docs): Fix and reference historical dates for accuracy

* fix(dart/catalyst_cardano_serialization): x509 distinguished name structure (#1290)

* fix: x509 distinguished name structure

Signed-off-by: bkioshn <[email protected]>

* fix: format

Signed-off-by: bkioshn <[email protected]>

* feat: make it possible to override ASN1 tag for subject alt name in the x509 cert

* fix: static analysis issue

---------

Signed-off-by: bkioshn <[email protected]>
Co-authored-by: Dominik Toton <[email protected]>
Co-authored-by: Dominik Toton <[email protected]>

* feat: additional just functions for faster startup (#1310)

* fix(cat-voices): update key derivation path (#1301)

* fix(cat-voices): update key derivation path

* docs: add source

* chore: code cleanup

* docs: move relevant docs

* chore: extract account constant

Co-authored-by: Steven Johnson <[email protected]>

* chore: reformat

---------

Co-authored-by: Steven Johnson <[email protected]>

* fix: frb unexpected cfg (#1320)

Signed-off-by: bkioshn <[email protected]>

* fix(cat-gateway): bump `scylla` to v0.15.0 (#1316)

* refactor: initial

* fix: arc type

* fix: query iter

* fix: functions

* fix: final

* chore: fmtfix

* chore: remove lints

* chore: remove lint from database object

* chore: remove result wrapper

* feat(cat-gateway): Add a signed documents repository storage table in the Event DB (#1322)

* refactor(cat-gateway): Move unused schemas out of the main schema directory

* feat(cat-gateway): Add signed documents repository table to the postgresql DB.

* feat(cat-gateway): Add author, and more indexes to the signed docs repository table

* fix(cat-gateway): BYTEA not BLOB

* fix(cat-gateway): move unused migrations out of the migrations folder

* fix(cat-gateway): Fix comment annotations to refer to correct table

* fix(cat-gateway): fix index names in the comments

* feat(docs): Define signed document metadata fields (#1315)

* feat(docs): Define signed document metadata fields

* docs(docs): Fix spelling

* feat(cat-voices): Integration tests using flutter_driver (#1304)

* custom driver for integration tests

* feat: working voices test driver

* feat: creating internal lib for voices driver

* fix: remove unused import

* fix: check-spelling

* fix: static analysis

* fix: test file

* refactor: skiping test for know

* fix: adding packages to melos

* fix: whitespacing

* Update catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/example/test_driver/app_test.dart

Co-authored-by: Dominik Toton <[email protected]>

* feat: add extension to driver

* fix: remove unused function

* fix: add files to gitignore

---------

Co-authored-by: Dominik Toton <[email protected]>
Co-authored-by: bkioshn <[email protected]>

* fix: importing proper menuitem

* fix: missing comma in cspell.json

---------

Signed-off-by: bkioshn <[email protected]>
Co-authored-by: Stefano Cunego <[email protected]>
Co-authored-by: Steven Johnson <[email protected]>
Co-authored-by: bkioshn <[email protected]>
Co-authored-by: bkioshn <[email protected]>
Co-authored-by: Dominik Toton <[email protected]>
Co-authored-by: Apisit Ritreungroj <[email protected]>
Co-authored-by: Oleksandr Prokhorenko <[email protected]>
Co-authored-by: Apisit Ritruengroj <[email protected]>
Co-authored-by: Dominik Toton <[email protected]>
Co-authored-by: Damian Moliński <[email protected]>
  • Loading branch information
11 people authored Dec 5, 2024
1 parent 4ef4b77 commit f93dae6
Show file tree
Hide file tree
Showing 89 changed files with 1,395 additions and 668 deletions.
2 changes: 2 additions & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ autorecalculates
autoresizing
autovalidate
backendpython
backgrounding
bech
bimap
bindgen
Expand Down Expand Up @@ -54,6 +55,7 @@ CIPs
COCOAPODS
codegen
codepoints
collabs
commitlog
concatcp
coti
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,6 @@ test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
extensions/
extensions/
browser_extensions/
!catalyst_voices/packages/internal/catalyst_voices_driver/lib/src/extensions/
4 changes: 2 additions & 2 deletions catalyst-gateway/bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repository.workspace = true
workspace = true

[dependencies]
cardano-chain-follower = { version = "0.0.4", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "2024-10-15-01" }
cardano-chain-follower = { version = "0.0.5", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "cardano-chain-follower-v0.0.5" }
c509-certificate = { version = "0.0.3", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.3" }

pallas = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
Expand Down Expand Up @@ -53,7 +53,7 @@ anyhow = "1.0.92"
duration-string = "0.4.0"
build-info = "0.0.39"
ed25519-dalek = "2.1.1"
scylla = { version = "0.14.0", features = ["cloud", "full-serialization"] }
scylla = { version = "0.15.0", features = ["cloud", "full-serialization"] }
strum = { version = "0.26.3", features = ["derive"] }
strum_macros = "0.26.4"
openssl = { version = "0.10.66", features = ["vendored"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ INSERT INTO txo_assets_by_stake (
txn,
txo,
policy_id,
policy_name,
asset_name,
value
) VALUES (
:stake_address,
:slot_no,
:txn,
:txo,
:policy_id,
:policy_name,
:asset_name,
:value
);
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ INSERT INTO unstaked_txo_assets_by_txn_hash (
txn_hash,
txo,
policy_id,
policy_name,
asset_name,
slot_no,
txn,
value
) VALUES (
:txn_hash,
:txo,
:policy_id,
:policy_name,
:asset_name,
:slot_no,
:txn,
:value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pub(super) struct Params {
txo: i16,
/// Policy hash of the asset
policy_id: Vec<u8>,
/// Policy name of the asset
policy_name: String,
/// Name of the asset, within the Policy.
asset_name: Vec<u8>,
/// Value of the asset
value: num_bigint::BigInt,
}
Expand All @@ -41,15 +41,15 @@ impl Params {
#[allow(clippy::too_many_arguments)]
pub(super) fn new(
stake_address: &[u8], slot_no: u64, txn: i16, txo: i16, policy_id: &[u8],
policy_name: &str, value: i128,
asset_name: &[u8], value: i128,
) -> Self {
Self {
stake_address: stake_address.to_vec(),
slot_no: slot_no.into(),
txn,
txo,
policy_id: policy_id.to_vec(),
policy_name: policy_name.to_owned(),
asset_name: asset_name.to_vec(),
value: value.into(),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(super) struct Params {
/// Policy hash of the asset
policy_id: Vec<u8>,
/// Policy name of the asset
policy_name: String,
asset_name: Vec<u8>,
/// Block Slot Number
slot_no: num_bigint::BigInt,
/// Transaction Offset inside the block.
Expand All @@ -40,14 +40,14 @@ impl Params {
/// values.
#[allow(clippy::too_many_arguments)]
pub(super) fn new(
txn_hash: &[u8], txo: i16, policy_id: &[u8], policy_name: &str, slot_no: u64, txn: i16,
txn_hash: &[u8], txo: i16, policy_id: &[u8], asset_name: &[u8], slot_no: u64, txn: i16,
value: i128,
) -> Self {
Self {
txn_hash: txn_hash.to_vec(),
txo,
policy_id: policy_id.to_vec(),
policy_name: policy_name.to_owned(),
asset_name: asset_name.to_vec(),
slot_no: slot_no.into(),
txn,
value: value.into(),
Expand Down
12 changes: 3 additions & 9 deletions catalyst-gateway/bin/src/db/index/block/txo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl TxoInsertQuery {
let policy_id = asset.policy().to_vec();
for policy_asset in asset.assets() {
if policy_asset.is_output() {
let policy_name = policy_asset.to_ascii_name().unwrap_or_default();
let asset_name = policy_asset.name();
let value = policy_asset.any_coin();

if staked {
Expand All @@ -191,19 +191,13 @@ impl TxoInsertQuery {
txn,
txo_index,
&policy_id,
&policy_name,
asset_name,
value,
);
self.staked_txo_asset.push(params);
} else {
let params = insert_unstaked_txo_asset::Params::new(
txn_hash,
txo_index,
&policy_id,
&policy_name,
slot_no,
txn,
value,
txn_hash, txo_index, &policy_id, asset_name, slot_no, txn, value,
);
self.unstaked_txo_asset.push(params);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT
txo,
slot_no,
policy_id,
policy_name,
asset_name,
value
FROM txo_assets_by_stake
WHERE stake_address = :stake_address
Expand Down
4 changes: 2 additions & 2 deletions catalyst-gateway/bin/src/db/index/queries/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use registrations::{
};
use scylla::{
batch::Batch, prepared_statement::PreparedStatement, serialize::row::SerializeRow,
transport::iterator::RowIterator, QueryResult, Session,
transport::iterator::QueryPager, QueryResult, Session,
};
use staked_ada::{
get_assets_by_stake_address::GetAssetsByStakeAddressQuery,
Expand Down Expand Up @@ -311,7 +311,7 @@ impl PreparedQueries {
/// returns.
pub(crate) async fn execute_iter<P>(
&self, session: Arc<Session>, select_query: PreparedSelectQuery, params: P,
) -> anyhow::Result<RowIterator>
) -> anyhow::Result<QueryPager>
where P: SerializeRow {
let prepared_stmt = match select_query {
PreparedSelectQuery::TxoByStakeAddress => &self.txo_by_stake_address_query,
Expand Down
29 changes: 9 additions & 20 deletions catalyst-gateway/bin/src/db/index/queries/rbac/get_chain_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use std::sync::Arc;

use scylla::{
prepared_statement::PreparedStatement, transport::iterator::TypedRowIterator, SerializeRow,
Session,
prepared_statement::PreparedStatement, transport::iterator::TypedRowStream, DeserializeRow,
SerializeRow, Session,
};
use tracing::error;

Expand All @@ -22,23 +22,12 @@ pub(crate) struct GetChainRootQueryParams {
pub(crate) stake_address: Vec<u8>,
}

/// Get chain root by stake address query row result
// TODO: https://github.com/input-output-hk/catalyst-voices/issues/828
// The macro uses expect to signal an error in deserializing values.
#[allow(clippy::expect_used)]
mod result {
use scylla::FromRow;

/// Get chain root query result.
#[derive(FromRow)]
pub(crate) struct GetChainRootQuery {
/// Chain root for the queries stake address.
pub(crate) chain_root: Vec<u8>,
}
}

/// Get chain root by stake address query.
pub(crate) struct GetChainRootQuery;
#[derive(DeserializeRow)]
pub(crate) struct GetChainRootQuery {
/// Chain root for the queries stake address.
pub(crate) chain_root: Vec<u8>,
}

impl GetChainRootQuery {
/// Prepares a get chain root by stake address query.
Expand All @@ -61,11 +50,11 @@ impl GetChainRootQuery {
/// Executes a get chain root by stake address query.
pub(crate) async fn execute(
session: &CassandraSession, params: GetChainRootQueryParams,
) -> anyhow::Result<TypedRowIterator<result::GetChainRootQuery>> {
) -> anyhow::Result<TypedRowStream<GetChainRootQuery>> {
let iter = session
.execute_iter(PreparedSelectQuery::ChainRootByStakeAddress, params)
.await?
.into_typed::<result::GetChainRootQuery>();
.rows_stream::<GetChainRootQuery>()?;

Ok(iter)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use std::sync::Arc;

use scylla::{
prepared_statement::PreparedStatement, transport::iterator::TypedRowIterator, SerializeRow,
Session,
prepared_statement::PreparedStatement, transport::iterator::TypedRowStream, DeserializeRow,
SerializeRow, Session,
};
use tracing::error;

Expand All @@ -23,23 +23,12 @@ pub(crate) struct GetRegistrationsByChainRootQueryParams {
pub(crate) chain_root: Vec<u8>,
}

/// Get registrations by chain root query row result
// TODO: https://github.com/input-output-hk/catalyst-voices/issues/828
// The macro uses expect to signal an error in deserializing values.
#[allow(clippy::expect_used)]
mod result {
use scylla::FromRow;

/// Get chain root query result.
#[derive(FromRow)]
pub(crate) struct GetRegistrationsByChainRootQuery {
/// Registration transaction id.
pub(crate) transaction_id: Vec<u8>,
}
}

/// Get chain root by stake address query.
pub(crate) struct GetRegistrationsByChainRootQuery;
#[derive(DeserializeRow)]
pub(crate) struct GetRegistrationsByChainRootQuery {
/// Registration transaction id.
pub(crate) transaction_id: Vec<u8>,
}

impl GetRegistrationsByChainRootQuery {
/// Prepares a get registrations by chain root query.
Expand All @@ -62,11 +51,11 @@ impl GetRegistrationsByChainRootQuery {
/// Executes a get registrations by chain root query.
pub(crate) async fn execute(
session: &CassandraSession, params: GetRegistrationsByChainRootQueryParams,
) -> anyhow::Result<TypedRowIterator<result::GetRegistrationsByChainRootQuery>> {
) -> anyhow::Result<TypedRowStream<GetRegistrationsByChainRootQuery>> {
let iter = session
.execute_iter(PreparedSelectQuery::RegistrationsByChainRoot, params)
.await?
.into_typed::<result::GetRegistrationsByChainRootQuery>();
.rows_stream::<GetRegistrationsByChainRootQuery>()?;

Ok(iter)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use std::sync::Arc;

use scylla::{
prepared_statement::PreparedStatement, transport::iterator::TypedRowIterator, SerializeRow,
Session,
prepared_statement::PreparedStatement, transport::iterator::TypedRowStream, DeserializeRow,
SerializeRow, Session,
};
use tracing::error;

Expand All @@ -22,23 +22,12 @@ pub(crate) struct GetRole0ChainRootQueryParams {
pub(crate) role0_key: Vec<u8>,
}

/// Get chain root by role0 key query row result
// TODO: https://github.com/input-output-hk/catalyst-voices/issues/828
// The macro uses expect to signal an error in deserializing values.
#[allow(clippy::expect_used)]
mod result {
use scylla::FromRow;

/// Get role0 key chain root query result.
#[derive(FromRow)]
pub(crate) struct GetRole0ChainRootQuery {
/// Chain root.
pub(crate) chain_root: Vec<u8>,
}
}

/// Get chain root by role0 key query.
pub(crate) struct GetRole0ChainRootQuery;
#[derive(DeserializeRow)]
pub(crate) struct GetRole0ChainRootQuery {
/// Chain root.
pub(crate) chain_root: Vec<u8>,
}

impl GetRole0ChainRootQuery {
/// Prepares a get chain root by role0 key query.
Expand All @@ -61,11 +50,11 @@ impl GetRole0ChainRootQuery {
/// Executes a get chain root role0 key query.
pub(crate) async fn execute(
session: &CassandraSession, params: GetRole0ChainRootQueryParams,
) -> anyhow::Result<TypedRowIterator<result::GetRole0ChainRootQuery>> {
) -> anyhow::Result<TypedRowStream<GetRole0ChainRootQuery>> {
let iter = session
.execute_iter(PreparedSelectQuery::ChainRootByRole0Key, params)
.await?
.into_typed::<result::GetRole0ChainRootQuery>();
.rows_stream::<GetRole0ChainRootQuery>()?;

Ok(iter)
}
Expand Down
Loading

0 comments on commit f93dae6

Please sign in to comment.