added smt description
- [Check for active validator](#check-for-active-validator)
- [Check that token id is valid](#check-that-token-id-is-valid)
- [Check that token address is valid](#check-that-token-address-is-valid)
+ * [Block state transition circuit](#block-state-transition-circuit)
* [Appendix I: Cryptographic primitives](#appendix-i--cryptographic-primitives)
+ [Pedersen signature](#pedersen-signature)
+ [Pedersen hash](#pedersen-hash)
@@ -1060,6 +1061,27 @@ validateTokenAddress(address _tokenAddr) returns (uint16)
Returns: token id.
+## Block state transition circuit
+
+Block circuit describes state transition function (STF) from previous state to the new one by applying a number of transactions.
+
+Public inputs:
+
+- pub_data_commitment: commitment to the state transition of the block; this is a hash that includes `old_root`, `new_root`, `block_number`, `validator_address`, `pub_data_rolling_hash` (see smart the contract code).
+
+Witness:
+
+- old_root,
+- new_root,
+- block_number,
+- validator_address,
+- pub_data,
+- pub_data_rolling_hash,
+- list of transactions,
+- state Merkle treees.
+
+If the proof is valid (the circuit is satisfied), it means that there exists a set of transactions which transitions the state from the previous one (cryptographically fingerprinted by the Merkle root `old_root`) into the new one (cryptographically fingerprinted by the Merkle root `new_root`) such that concatenated `pub_data` of this transactions in the order of application is cryptographically fingerprinted by `pub_data_commitment`.
+
## Appendix I: Cryptographic primitives
### Pedersen signature
