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

Demonstrate How To Verify Signers With Accounts #40

Open
opticyclic opened this issue May 9, 2021 · 0 comments
Open

Demonstrate How To Verify Signers With Accounts #40

opticyclic opened this issue May 9, 2021 · 0 comments

Comments

@opticyclic
Copy link

The tictacthor sample has a commented out section where the signer verification should be
https://github.com/corda/samples-kotlin/blob/master/Accounts/tictacthor/contracts/src/main/kotlin/net/corda/samples/tictacthor/contracts/BoardContract.kt#L54-L56

            // Signatures
            // TODO: Should only the initiating party sign?
            //"Both participants must sign a SubmitTurn transaction." using (command.signers == outputBoardState.participants.map { it.owningKey })

You need to take into consideration that there could be multiple accounts on multiple nodes and any of the accounts could be transacting with each other so checking the host.owningKey isn't a valid check as that could allow an account to transact with itself.

The other issue is that the AccountSDK keys change all the time.
corda/accounts#50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant