Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICS28: Remove existing pending spawn/stop proposals when adding new ones for a given consumer chain ID #767

Closed
danwt opened this issue Jun 16, 2022 · 0 comments
Assignees
Labels
app Application layer.

Comments

@danwt
Copy link
Contributor

danwt commented Jun 16, 2022

_ See implementation mirror issue cosmos/interchain-security#155 _

When a proposal gets handled it will be added to a pending list if spawnTime has not yet passed.

// PCF: Provider Chain Function
// implements governance proposal Handler
function SpawnConsumerChainProposalHandler(p: SpawnConsumerChainProposal) {
if currentTimestamp() > p.spawnTime {
CreateConsumerClient(p)
}
else {
// store the proposal as a pending spawn proposal
pendingSpawnProposals.Append(p)
}
}

I'm suspicious of what might happen if we allow multiple entries in pending for a given chain. I cannot think of any situation where this would be beneficial. It could only lead to strange behavior.

I think we should ensure that SetPendingClientInfo only has at most one entry per chainID and updates the existing entry if it already exists instead of creating a new entry.

@danwt danwt moved this to Todo in Replicated Security Jun 16, 2022
@mpoke mpoke added the app Application layer. label Jun 20, 2022
@mpoke mpoke self-assigned this Jun 20, 2022
@mpoke mpoke moved this from Todo to Next in Replicated Security Jun 20, 2022
@mpoke mpoke moved this from Next to Waiting for review in Replicated Security Jun 23, 2022
@mpoke mpoke closed this as completed Jun 27, 2022
Repository owner moved this from Waiting for review to Done in Replicated Security Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Application layer.
Projects
Status: Backlog
Status: Done
Development

No branches or pull requests

2 participants