feat: improve multisig utility and usability#5027
feat: improve multisig utility and usability#5027s8sato merged 1 commit intohyperledger-iroha:mainfrom
Conversation
|
Genesis needs to be updated |
Erigara
left a comment
There was a problem hiding this comment.
I think this change is great improvement to usability of multisigs.
|
Updates:
Notes:
|
44105ac to
35c6e2a
Compare
There was a problem hiding this comment.
Updates:
- re-export as
iroha::multisig_data_model - add multisig data model into schema
default_executorinwasm/libs- early panic with unexpected events
- rustdoc-compliant warning
- empty arg to build all wasms
- fix
genesis_block_builder_exampletest
All changes since the last update contained.
Notes:
-
genesis_block_builder_exampleis failing to compile for some reason. Left to another PRThanks to @mversic , fixed
e7ea539 to
4e534e8
Compare
|
Updates:
Notes:
|
8812567 to
20cba30
Compare
b2971f4 to
fddbee0
Compare
BREAKING CHANGES: - (api-changes) `CanRegisterAnyTrigger` `CanUnregisterAnyTrigger` permissions for system authority - (api-changes) `GenesisWasmTrigger` in `RawGenesisTransaction` for `genesis.json` readability - (api-changes) `Multisig*Args` for multi-signature operations - (config-changes) `genesis.json` assumes `wasm_triggers[*].action.executable` is prebuilt under `wasm_dir` - (config-changes) docker-compose service generates `genesis.json` by oneself instead of reading bind-mounted one Major commits: - feat: support multisig recursion - feat: introduce multisig quorum and weights - feat: add multisig subcommand to client CLI - feat: introduce multisig transaction time-to-live - feat: predefine multisig world-level trigger in genesis - feat: allow accounts in domain to register multisig accounts Signed-off-by: Shunkichi Sato <49983831+s8sato@users.noreply.github.com>
|
Afterword: I think it was not a good practice to keep a single commit during review, which was remnants of our |


BREAKING CHANGES:
CanRegisterAnyTriggerCanUnregisterAnyTriggerpermissions for system authorityGenesisWasmTriggerinRawGenesisTransactionforgenesis.jsonreadabilityMultisig*Argsfor multi-signature operationsgenesis.jsonassumeswasm_triggers[*].action.executableis prebuilt underwasm_dirgenesis.jsonby oneself instead of reading bind-mounted oneMajor commits:
Context
Opens:
genesis.json#5178Solution
Each commit is explained below, starting with the most recent. You can see the commit history here
feat: support multisig recursion
Allows multisig to function hierarchically, expected to be useful for e.g. automating organizational approval flows.
Tests:
cargo test -p iroha integration::multisig::multisig_recursion bash scripts/tests/multisig.recursion.shfeat: introduce multisig quorum and weights
Inspired by Sui's multisig. Allows for flexible, if not completely free, authentication policies beyond "m of n". For example, weight equivalent to quorum represents administrative privileges
feat: add multisig subcommand to client CLI
You can see more usage in the testing script
feat: introduce multisig transaction time-to-live
Considers the latest block timestamp as the current time and determines timeout, when the transactions registry is called
feat: predefine multisig world-level trigger in genesis
Defines a global trigger in genesis that exercises authority over all domains. There will be three types of triggers on the system side related to multisig:
feat: allow accounts in domain to register multisig accounts
Accounts registry has authority of the domain owner, so access was previously restricted. This commit allows anyone to organize any multisig account within the domain.
This may be too lenient. Discussion
Review notes
To get an overview,
cargo test -p iroha integration::multisig::multisig bash scripts/tests/multisig.shsequenceDiagram autonumber participant oo as etc. participant DI as Domains Initializer Note over DI: /world oo-->>DI: domain created create participant AR as Accounts Registry DI-->>AR: register Note over AR: /world/domain create actor s0 as signatory 0 oo->>s0: register create actor s1 as signatory 1 oo->>s1: register s0->>AR: request new ms account create actor 01 as ms account 01 AR-->>01: register create participant TR as Transactions Registry AR-->>TR: register AR-->>s0: grant ms role AR-->>s1: grant ms role Note over 01,TR: /world/domain/account s1->>TR: propose instructions create participant tx as pending ms transaction TR-->>tx: deploy ms transaction s0->>TR: approve instructions destroy tx TR-->>tx: execute instructionsThe dotted line indicates an automatic process
Checklist
CONTRIBUTING.md.