hyperledger-iroha / iroha-dco

Iroha - A simple, decentralized ledger
http://iroha.tech
Apache License 2.0
988 stars 297 forks source link

Add configurable validators and max batch size validation #2196

Closed igor-egorov closed 5 years ago

igor-egorov commented 5 years ago

Signed-off-by: Igor Egorov igor@soramitsu.co.jp

Description of the Change

Make all validators configurable by ValidatorsConfig Add batch validation against its max size clang-format

Benefits

No way to submit a batch that exceeds max_proposal_size.

Possible Drawbacks

Ordering Service still can accept a batch which is less than max_proposal_size and produce a proposal that overruns transactions limit.

e.g. max_proposal_size = 3 Two batches of two transactions arrive. Both will be processed. The resulting proposal will have 4 transactions inside.

This is going to be fixed in the following changes.

Usage Examples or Tests

All the tests

lebdron commented 5 years ago

Please add a task and TODO to remove unused configs.