Skip to content

Conversation

@r4mmer
Copy link
Member

@r4mmer r4mmer commented Jul 7, 2025

@r4mmer r4mmer self-assigned this Jul 7, 2025
@r4mmer r4mmer moved this from Todo to In Progress (Done) in Hathor Network Jul 7, 2025
@r4mmer r4mmer moved this from In Progress (Done) to In Progress (WIP) in Hathor Network Jul 7, 2025
@r4mmer r4mmer moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jul 18, 2025

We could make it work with sparse keys with a common prefix but a better alternative is to use a JSON key, where each key will be the address and the value will be the seqnum.

- Clearing the cache can be done with [JSON.CLEAR](https://redis.io/docs/latest/commands/json.clear/)
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of using redis since we already have it in the stack

But can you describe better how this is going to work?

I mean, when are we going to clear cache? Or is the number only going up for all addresses?

5. Forward any contract-specific API calls to the fullnode

This means that if address is the caller in a contract call that moves tokens from X to Y (e.g. a deposit action), all three addresses will see this transaction in their history:
This means that if address Z is the caller in a contract call that moves tokens from X to Y (e.g. a deposit action), all three addresses will see this transaction in their history:
Copy link
Member

Choose a reason for hiding this comment

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

This is not a problem bug "contract call that moves tokens from X to Y (e.g. a deposit action)" a deposit action moves tokens from X to the contract, not to an address Y. Maybe this address Y could be the change address.


### Seqnum tracking

The `seqnum` should be easily searched by address and listed (for clearing when a block arrives).
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking about this tracking. We will set the current seqnum every time a new nano transaction arrives from the reliable integrations event. When building a new nano tx in the wallet lib, we need to know the next seqnum to use, so (i) we must have a way to fetch this seqnum from the wallet service, and (ii) how long does it take for the new event to be processed and the seqnum updated? Should we have a way to update this seqnum as soon as the transaction is pushed to the network (if done using the wallet service APIs)?

@r4mmer r4mmer moved this from In Progress (Done) to Todo in Hathor Network Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants