Skip to content

Conversation

@idky137
Copy link
Contributor

@idky137 idky137 commented Oct 9, 2025

Updates StateService and FetchService to use ChainIndex, removes old local cache code.

Motivation

Solution

Tests

Specifications & References

Follow-up Work

PR Checklist

  • The PR name is suitable for the release notes.
  • The solution is tested.
  • The documentation is up to date.

This was referenced Oct 10, 2025
@idky137 idky137 self-assigned this Oct 10, 2025
@idky137
Copy link
Contributor Author

idky137 commented Oct 10, 2025

Current status: FetchService has been updated to use the ChainIndex instead of the LocalCache. StateService still uses LocalCache.

There are currently several test failures and hangs due to this switchover highlighting possible bugs in the new ChainIndex module.

@idky137 idky137 added the help wanted Extra attention is needed label Oct 13, 2025
@nachog00 nachog00 assigned nachog00 and unassigned idky137 Oct 16, 2025
/// changes (a new block is mined or a reorg occurs).
///
/// If the chain tip has changed from the given spanshot returns None.
/// If a snapshot is given and the chain tip has changed from the given spanshot, returns None.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

/// changes (a new block is mined or a reorg occurs).
///
/// Returns None if the chain tip has changed from the given snapshot.
/// If a snapshot is given and the chain tip has changed from the given spanshot, returns None.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

FinalisedStateError::JsonRpcConnectorError(transport_error)
}
RpcRequestError::JsonRpc(error) => {
FinalisedStateError::Custom(format!("argument failed to serialze: {error}"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

}
RpcRequestError::JsonRpc(error) => {
FinalisedStateError::Custom(format!("argument failed to serialze: {error}"))
NonFinalisedStateError::Custom(format!("argument failed to serialze: {error}"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

MempoolError::JsonRpcConnectorError(transport_error)
}
RpcRequestError::JsonRpc(error) => {
MempoolError::Critical(format!("argument failed to serialze: {error}"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

}
RpcRequestError::JsonRpc(error) => {
MempoolError::Critical(format!("argument failed to serialze: {error}"))
FetchServiceError::Critical(format!("argument failed to serialze: {error}"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

.ok()
}

/// Strips the ouputs and from all transactions, retains only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

}

/// Strips the ouputs and from all transactions, retains only
/// the nullifier from all orcard actions, and clears the chain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

let mempool = Mempool::spawn(mempool_source, None).await.map_err(|e| {
FetchServiceError::BlockCacheError(BlockCacheError::Custom(e.to_string()))
})?;
.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwrap

@@ -170,10 +160,8 @@ impl Drop for FetchService {
pub struct FetchServiceSubscriber {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc comment for this struct seems incomplete

@Oscar-Pepper
Copy link
Contributor

closed for #650

@github-project-automation github-project-automation bot moved this from In progress to Done in Zaino, The Zallet Release Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Update Zainod to use ChainIndex and remove legacy local cache code from codebase.

3 participants