Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Blockchain cache API in Nigel #712

zpalmtree opened this Issue Jan 29, 2019 · 2 comments


None yet
2 participants
Copy link

zpalmtree commented Jan 29, 2019

It would be nice to support the blockchain cache API ( transparently for wallets.

You can find the documentation here:

We would probably want to make an IDaemon interface, and then instantiate it with either a ConventionalDaemon or a BlockchainCacheAPI.

This is pretty easy to do, and I've done this exact same thing in TypeScript, so you can easily piggy back off the differences:

Typescript interface:
Typescript conventional daemon:
Typescript blockchain cache api:

You might have to slightly tweak the --remote-node support, but this should hopefully allow us to sync directly from a blockchain cache API instead of a conventional daemon.

Note that currently /get_transaction_status is unimplemented in the cache api, but it should be in there pretty soon. It's not essential to wallet operation anyway.


For bonus points, extend KeyOutput in WalletBlockInfo to take an optional globalIndex. The blockchain API returns this from /getWalletSyncData, whilst a standard daemon does not. If we pass this through to processTranasctionOutputs, we can then skip getting the global indexes from the daemon, which will speed up syncing when we have a wallet with a lot of transactions belonging to us.

Relevant code:


This comment has been minimized.

Copy link

brandonlehmann commented Jan 30, 2019

I'm told I need to add another api endpoing for this. Let me open an issue over there before I forget.


This comment has been minimized.

Copy link

brandonlehmann commented Jan 30, 2019

Added support in the cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.