timewave-computer / covenants

Apache License 2.0
17 stars 4 forks source link

Allow IBC Forwarder to be ticked directly #217

Closed stiiifff closed 3 months ago

stiiifff commented 4 months ago

It should be possible to tick the IBC Forwarder directly, not just from the Clock contract.

stiiifff commented 4 months ago

@uditvira We were discussing with @bekauz about various options, and the following idea came up: replace the CLOCK_ADDRESS by a ADMIN_ALLOW_LIST as an array of address. We would modify the covenant contract(s) to pass both the Clock & the top-level covenant's admin adresses, to allow either to tick the forwarder. Ben also suggested to make that field an Option so that when it's None, it basically means ticking is a permissionless operation (anyone allowed to tick). We could also apply the same principles to other contracts .. as it doesn't seem too much work. wdyt ?

uditvira commented 4 months ago

What does having a permissioned clock give us? It gives us some marginal UX improvements and pause functionality:

I think we want at least two properties:

  1. The option to tick the clock directly, i.e., validating the tick caller address where there is Some address present, and removing this validation when the address is None
  2. Having some mechanism to pause each of the contracts, i.e., each of the contract has a "Pause" function which disables ticking. The pause function can only called by the admin. We could then expose an admin "Pause" function at the top level covenant which can Pause all or specific underlying contracts

Can you say more about why you want the clock address to be a vector rather than a single address? I'm okay with it being a vector so it gives us more flexibility, but I can't see the usecase clearly

Yes, I agree that we want to have a uniform clocking/pausing logic across all contracts

stiiifff commented 4 months ago

@uditvira I went a bit further with the idea, see draft PR #240