At present, Godwoken’s transaction signature verification is done through account_lock, which is similar to Layer1’s lock script, and backend can be used to change the state.
However, can account_lock have the ability to read the current state? Rather than just stateless verification of signatures.
In this case, a state read_only account_lock with a specific backend can implement a more flexible account model.
The backend is used to change the state, and the account lock can view the state. In this way, some more flexible account_lock can be made.
For example, the same account_id can have multiple different keys (bls, secp256k1) at the same time, and these keys can be dynamically added or deleted through a special backend.
For another example, only if a certain account_id has a certain number of sUDTs, the transaction can pass, otherwise it cannot be unlocked.