dkg-substrate
dkg-substrate copied to clipboard
[BUG] Chain Nonces never gets updated after a Proposal Succeed
Bug Description
ChainNonces which is a Map between ChainId to ProposalNonces is used in two cases:
- To check if
chain_idis whitelisted or not, by checking thatchain_idexists in this map. - To track how many transactions are executed for this chain.
Right now, the first one is good, but the second one is not implemented anywhere when the proposal gets executed here: https://github.com/webb-tools/dkg-substrate/blob/16ea8dca3bda90ba8f448754aac8c89651df05a5/pallets/dkg-proposals/src/lib.rs#L642-L655
Suggested Solution Before Emitting the final event here:
+ ChainNonces::<T>::insert(&src_id, nonce);
Motivation and use-cases
Right now the Relayer needs this to check if we shall send this proposal to the DKG System or not by checking the proposal nonce on the DKG side and the new proposal we have in hand right now and compare the nonces.