hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

refactor: Use `ConstVec` for instructions in `Executable` #5096

Closed dima74 closed 1 month ago

dima74 commented 1 month ago

Context

Meta: #5083 Fixes #5092

Solution

Use Box<[InstructionBox]> instead of Vec to ensure we don't waste any memory on a buffer. See https://github.com/hyperledger/iroha/issues/5083#issuecomment-2363844455, https://github.com/hyperledger/iroha/issues/5083#issuecomment-2364089885, and https://github.com/hyperledger/iroha/issues/5083#issuecomment-2364144603 for details

Checklist