Skip to content

[FIX] - Multi signature offchain flow #1348

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

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

astaphobia
Copy link
Contributor

@astaphobia astaphobia commented Nov 12, 2020

Description

In this PR include enhancement on multi signature transaction stuff, allowing post a multi signature transaction in offchain flow.

In OffChain case if one of SignatureInfo.Signatures is a multisignature address and the Key format would be like:

MultiSignature Key

  • [4] AccountType
  • [4] MultiSignatureInfoLength
  • [N] MultiSignatureInfo pure in bytes format.

If One of MultiSignature Key participant is a MultiSignatureAddress again, it should repeat the MultiSignature Key format again.

And otherwise Key should account address bytes format.

MultiSignature Value

  • [N] Signature

OffChain flow can contains 3 nested MultiSignature Key

if len(*multiSignaturesInfo) == int(constant.MaxAllowedMultiSignatureTransactions) {
	return fmt.Errorf("MaxAllowedNestedMultiSignatureOffChainExceeded")
}

method ParseSignatureInfoBytesAsCandidates will called in recursively to parsing Key of SignatureInfo.Signatures`

Breakdown

  • ParseMultiSignatureInfoBytes , it use to parse bytes from one of signature info as MultiSignatureInfo
  • ParseSignatureInfoBytesAsCandidates, it use to parse bytes from SignatureInfo.Signatures and the result is []model.PendingSignature and [].model.MultiSignatureInfo
  • ParseBodyBytes for offchain flow
  • GetBodyBytes for offchain flow
  • CMD multisignatureinfo transaction in offchain flow
  • Check multi signature completed or not

Reference Issue

Close #1337
Refer also on: zoobc/zoobc-schema#173

@astaphobia astaphobia added CORE core functionalities CMD command line tool feature LOW_PRIORITY can be postponed labels Nov 12, 2020
@astaphobia astaphobia added this to the V.0.0.2.W.20.47 milestone Nov 12, 2020
@astaphobia astaphobia self-assigned this Nov 12, 2020
@astaphobia astaphobia mentioned this pull request Nov 12, 2020
5 tasks
@astaphobia astaphobia changed the base branch from experimental to develop November 23, 2020 11:36
@astaphobia astaphobia marked this pull request as ready for review November 25, 2020 01:04
@astaphobia astaphobia force-pushed the multisignature-can-offchain-flow branch from 720da89 to 0587003 Compare December 3, 2020 08:07
@astaphobia astaphobia force-pushed the multisignature-can-offchain-flow branch from a197196 to 6ae6c51 Compare December 4, 2020 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMD command line tool feature CORE core functionalities important LOW_PRIORITY can be postponed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance: Multi Signature Transaction Next Iteration
4 participants