Monitor fallback transactions in WSClient #249

Open
opened 2025-12-28 17:18:53 +00:00 by sami · 1 comment
Owner

Originally created by @alexvanin on GitHub (Jul 9, 2021).

As an enhanced solution for https://github.com/nspcc-dev/neofs-node/issues/677, Inner Ring node can listen and track transactions with NotaryAssisted attribute. With this it will be able to resend failed notary transactions one day.

Originally created by @alexvanin on GitHub (Jul 9, 2021). As an enhanced solution for https://github.com/nspcc-dev/neofs-node/issues/677, Inner Ring node can listen and track transactions with `NotaryAssisted` attribute. With this it will be able to resend failed notary transactions one day.
Author
Owner

@AnnaShaleva commented on GitHub (Jul 9, 2021):

To filter out fallback transactions, the following things should be kept in mind:

  • ensure that NotaryAssisted attribute value = 0 (that's fallback's NKeys)
  • Conflicts attribute contains hash of the main transaction
  • Notary node will try to finalize fallback transaction starting from the height specified by the NotValidBefore attribute (it is equal to mainTx.ValidUntilBlock - c.notary.fallbackTime)

Moreover, you can use notary pool subscriptions to track notary requests being removed from the pool (mempoolevent.TransactionRemoved event type). You can filter events by request sender or main transaction signers. Remember, that notary request can be removed from the pool in a set of cases, here are the most important ones:

  1. Main transaction is finalized and added to the chain.
  2. Fallback transaction is finalized and added to the chain.
  3. Mempool capacity is reached, thus less prioritized request is kicked off.
  4. ValidUntilBlock height is reached.
  5. Notary deposit is not enough to pay for the fallback.
@AnnaShaleva commented on GitHub (Jul 9, 2021): To filter out fallback transactions, the following things should be kept in mind: - ensure that `NotaryAssisted` attribute value = 0 (that's fallback's `NKeys`) - `Conflicts` attribute contains hash of the main transaction - Notary node will try to finalize fallback transaction starting from the height specified by the `NotValidBefore` attribute (it is equal to mainTx.ValidUntilBlock - c.notary.fallbackTime) Moreover, you can use notary pool subscriptions to track notary requests being removed from the pool (`mempoolevent.TransactionRemoved` event type). You can filter events by request sender or main transaction signers. Remember, that notary request can be removed from the pool in a set of cases, here are the most important ones: 1. Main transaction is finalized and added to the chain. 2. Fallback transaction is finalized and added to the chain. 3. Mempool capacity is reached, thus less prioritized request is kicked off. 4. `ValidUntilBlock` height is reached. 5. Notary deposit is not enough to pay for the fallback.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#249
No description provided.