Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Close keep when seizing signer bonds #259

Merged
merged 7 commits into from
Mar 2, 2020
Merged

Close keep when seizing signer bonds #259

merged 7 commits into from
Mar 2, 2020

Conversation

pdyraga
Copy link
Member

@pdyraga pdyraga commented Feb 28, 2020

Closes: #236
Refs: #237

When signer bonds are seized, keep is automatically closed and it will no longer respond to signing requests. close function has been exposed on IBondedECDSAKeep interface. I have also changed isActive flag from internal to public - it may be helpful to evaluate if the client should unsubscribe from keep events in case it lost keep closed event because of a temporary network/subscription glitch.

We can use this flag to inspect keeps the client is attached to in case
the client did not receive an event - temporary network glitch etc
Seizing signer bonds closes keep so that it does no longer respond to
sign requests. This implicates another change - seizing bonds is not
possible when signing is still in progress and it hasn't timed out yet.
We call markAsClosed from other keep contract functions, not closeKeep
Comment on lines 382 to 383
freeMembersBonds();
markAsClosed();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should change the order of these two? markAsClosed has current status verification.

        markAsClosed();
        freeMembersBonds();

Copy link
Member Author

Choose a reason for hiding this comment

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

I was switching them back and forward, could not decide on which order is better 😆

solidity/test/BondedECDSAKeepTest.js Show resolved Hide resolved
There is no difference in terms of functionality but this order can be
clearer from the code perspective - markAsClose contains the
verifications that no signing is currently in progress; also, we have
the same order when we seize member bonds.
@pdyraga
Copy link
Member Author

pdyraga commented Feb 28, 2020

@nkuba Ready!

@nkuba nkuba merged commit 76b939b into master Mar 2, 2020
@nkuba nkuba deleted the close-it branch March 2, 2020 11:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closing keep when seizing signer bonds
3 participants