Skip to content

Fix for removed owners confirmations being accounted - #35

Merged
udityadav-supraoracles merged 4 commits into
feature/evm_automationfrom
fix/removed_owner_confirmations
Aug 3, 2026
Merged

Fix for removed owners confirmations being accounted#35
udityadav-supraoracles merged 4 commits into
feature/evm_automationfrom
fix/removed_owner_confirmations

Conversation

@udityadav-supraoracles

Copy link
Copy Markdown

This PR resolves the issue which takes into account confirmations from removed owners also.

@aregng

aregng commented Jul 17, 2026

Copy link
Copy Markdown

@udityadav-supraoracles , can you please check the following PR: #33
it addresses this issue with different approach and confirmation clearing was not done as it will affect the performance/gas-usage.
Can we do the Benchmarking to have more realistic data to understand the actual need of clearing confirmation.

@udityadav-supraoracles

Copy link
Copy Markdown
Author

@udityadav-supraoracles , can you please check the following PR: #33 it addresses this issue with different approach and confirmation clearing was not done as it will affect the performance/gas-usage. Can we do the Benchmarking to have more realistic data to understand the actual need of clearing confirmation.

Actually I cleared the confirmations in order to return correct data and not stale data for following view functions:

    function isConfirmed(uint256 _txIndex, address _owner)
    function getTransaction(uint256 _txIndex)

@aregng

aregng commented Jul 29, 2026

Copy link
Copy Markdown

@udityadav-supraoracles , can you please check the following PR: #33 it addresses this issue with different approach and confirmation clearing was not done as it will affect the performance/gas-usage. Can we do the Benchmarking to have more realistic data to understand the actual need of clearing confirmation.

Actually I cleared the confirmations in order to return correct data and not stale data for following view functions:

    function isConfirmed(uint256 _txIndex, address _owner)
    function getTransaction(uint256 _txIndex)

I think performance comes first. These 2 functions can be updated to make sure that input _owner is still part of the valid owners before running the check, and return false if not. and the second one can be updated to filter out confirmations by owners which have been removed and return only the valid count.

    function validNumberOfConfirmations(uint256 _txIndex)  returns (uint64) {
        txExists(_txIndex);
        EnumerableSet.AddressSet storage confirmation = confirmations[_txIndex];
        uint64 valid_number_of_confirmations = 0;
        for (uint64 i = 0; i < confirmation.length(); i++) {
            address owner = confirmation.at(i);
            if (owners.contains(owner)) {
                valid_number_of_confirmations++;
            }
        }
        return valid_number_of_confirmations;
    }

@aregng aregng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good, only small suggestion if it is acceptable.

Comment thread solidity/supra_contracts/src/MultiSignatureWallet.sol Outdated
@udityadav-supraoracles
udityadav-supraoracles merged commit d94658a into feature/evm_automation Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants