You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we can assume that the entire available unbond amount is withdrawn. This can be determined by the following:
SELECT sum(raw_amount)
FROM unbonds
WHERE
address = {{withdraw.source}}
AND validator_id = (SELECT id FROM validators WHERE namada_address = {{withdraw.validator}})
AND withdraw_epoch <= {{epoch of block containing withdraw transaction}}
sounds good, feel free to open a PR, I can review it! we will probably make some changes to the protocol to make this kind of query easier (not in the short future)
we will probably make some changes to the protocol to make this kind of query easier (not in the short future)
Yes, I was thinking longer term having something like a transaction receipt and/or event logs that can be queried for any transaction would be helpful.
Yes, I was thinking longer term having something like a transaction receipt and/or event logs that can be queried for any transaction would be helpful.
Problem
When there is a
withdraw
transaction, we cannot see the amount withdrawn by looking at the transaction data.Example raw
data
for awithdraw
:Proposed Solution
I think we can assume that the entire available
unbond
amount is withdrawn. This can be determined by the following:or, in other words, by summing the
raw_amount
from all theunbonds
that would be deleted byrepository::pos::remove_withdraws
.I would propose introducing a new table
withdraws
that records these amounts:This way, an application that wishes to understand
inner_transactions
can look up anywithdraw
amount.@Fraccaman @mateuszjasiuk what do you think of this approach? I'll probably work on it next week & send a PR.
The text was updated successfully, but these errors were encountered: