tendermint / spn

A blockchain to launch blockchains.
Other
112 stars 43 forks source link

Trigger Launch: set absolute time instead of relative remaining time #830

Closed lumtis closed 2 years ago

lumtis commented 2 years ago

Is your feature request related to a problem? Please describe. When launching, most coordinators would want to set a clean and easy-to-remember date for the launch of the blockchain. Like: June 1st 12:00 CET Our current message MsgTriggerLaunch takes a value RemainingTime, the number of seconds from the current block time for the chain launch. This makes it harder to determine an absolute date for the coordinator

Describe the solution you'd like Change MsgTriggerLaunch, RemainingTime => LaunchTime: UNIX timestamp for the launch/genesis time

Change the message logic for

chain.LaunchTimestamp = msg.LaunchTime

The message fails if msg.LaunchTime - block.Time > params.LaunchTimeRange.MaxLaunchTime or msg.LaunchTime - block.Time < params.LaunchTimeRange.MinLaunchTime