Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: reimplement multisignature transactions #4788

Merged
merged 7 commits into from
Jul 5, 2024

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Jun 28, 2024

Description

This PR provide an example how multisignature transactions could be implemented using iroha triggers.
In this PR i've tried to make as small invasive changes into the core as possible.

How this work?

There is 2 triggers (thanks @s8sato for inspiration in account activation feature):

  1. multisig_register - responsible for registering new multisig user and trigger multisig
  2. multisig - responsible for executing instructions on behalf of multisig user when enough votes are collected

Assumptions:

  • user have to come up with they own public key for multisig account:
    • it might be ok to have primary private key in case of emergency or smt
    • it could be generated at random or obtained through key aggregation
    • it's currently not possible to generate public key inside wasm smart-contracts
  • multisig_register should be registered either as part of genesis or by domain owner to have enough permissions for it's actions
    • currently in default executor there is no way to allow certain trigger to be executable by anyone (workaround would be to have trigger which would grant this permission on account registration)

Linked issue

Closes #4373

Benefits

Get back multisig functionality without too much changes on iroha side.

Downsides

Executing multisig instructions through tirgger probably slower that backed in solution.

@Erigara Erigara self-assigned this Jun 28, 2024
@github-actions github-actions bot added the api-changes Changes in the API for client libraries label Jun 28, 2024
@s8sato s8sato self-assigned this Jun 28, 2024
@mversic mversic self-assigned this Jul 1, 2024
s8sato
s8sato previously approved these changes Jul 1, 2024
@Erigara Erigara force-pushed the multisig branch 2 times, most recently from c31cbc1 to b2b0601 Compare July 2, 2024 15:10
@Erigara Erigara force-pushed the multisig branch 2 times, most recently from d86071b to 2148c02 Compare July 3, 2024 08:41
@Erigara Erigara force-pushed the multisig branch 2 times, most recently from 3c6f11b to 1f2407c Compare July 3, 2024 09:27
s8sato
s8sato previously approved these changes Jul 4, 2024
@mversic
Copy link
Contributor

mversic commented Jul 4, 2024

great piece of work. It would be interesting to explore whether we can make a custom instruction for MultiSigRegister, might be even simpler to use

@Erigara
Copy link
Contributor Author

Erigara commented Jul 4, 2024

great piece of work. It would be interesting to explore whether we can make a custom instruction for MultiSigRegister, might be even simpler to use

i think it should be possible, in this case we would move logic of multisig register trigger into the executor which would be triggered on custom instruction

mversic
mversic previously approved these changes Jul 4, 2024
@Erigara Erigara requested a review from s8sato July 4, 2024 14:02
@Erigara Erigara merged commit ebe738c into hyperledger-iroha:main Jul 5, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reimplement multi-signature
3 participants