0 votes
1 view
in Blockchain by (11.4k points)

I need to update some field every day. I came up with 2 possible solutions:

  1. Update it via REST API - for example, a program that runs on some server, updates the field via REST API and then sleeps 1 day. Problem: if the program stops it does not update the ledger, thus the network does not work correctly anymore.

  2. Make a smart contract that sleeps 1 day and then updates the fields. Problem: as far as I know how the internals are working, isn't that going to make problems with reaching the consensus?

1 Answer

0 votes
by (27.7k points)

I think 2 is correct.you likely won't get a deterministic result and the update will fail. its best to manage the update based on a field value from the client side. You need some high availability solution and/or checks for your client-side issue that the update takes place. The ledger is not really the place to rely on applying your operational, schedule-based update.

...