Skip to content

[PERF] don't store node signers for deposit txs

akrokr requested to merge akh/drop_deposit_signers into develop

Native deposit transactions are stored in the keeper as ObservedTx objects. Before this patch, the deposit handler iterated over all nodes and added active node addresses as fake signers on the fake observation. These signer addresses are not used for any functional logic and are stored in the keeper twice.

This patch stops adding those signers, resulting in a space savings for the keeper and a speed-up during processing as we no longer need to iterate and deserialize all nodes for each deposit.

NOTE: nodes are slashed if they do not sign any inbound which generated an outbound. There is already a condition in this function to not slash if signers is empty: https://gitlab.com/thorchain/thornode/-/blob/develop/x/thorchain/manager_slasher_current.go#L161

Edited by akrokr

Merge request reports