zigbee-alliance / distributed-compliance-ledger

DCL is a public permissioned ledger framework for certification of device models. The ledger is based on Cosmos SDK and CometBFT (Tendermint).
Apache License 2.0
90 stars 44 forks source link

SystemTime changed to BlockTime when verifying certificate #506

Closed DenisRybas closed 1 year ago

DenisRybas commented 1 year ago

Now when verifying a certificate, BlockTime is used, not SystemTime. It fixes the bug with the flow:

  1. Add not yet issued certificate (got Invalid Certificate error)
  2. Run the fast sync process (when executing txns from genesis)
  3. The certificate from point 1 can now become issued (and there will be no Invalid Certificate error locally because of SystemTime)
  4. local.AppHash != state.AppHash