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

Are genesis transaction signatures checked? #4162

Closed
0x009922 opened this issue Dec 21, 2023 · 1 comment
Closed

Are genesis transaction signatures checked? #4162

0x009922 opened this issue Dec 21, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST question Further information is requested

Comments

@0x009922
Copy link
Contributor

BTW, I am confused by both tests patching constructed GenesisNetwork. They are inserting plain instructions into the payload of a signed transaction. By doing so, AFAIK, they invalidate the signature of the transaction being computed using the previous payload. One test checks that Iroha validates genesis by providing an invalid permission token, but Iroha should not accept genesis because of its signatures I guess. Another test checks whether base64 triggers are handled fine. I don't why the second test passes.

Originally posted by @0x009922 in #4153 (comment)

@0x009922 0x009922 added Bug Something isn't working question Further information is requested iroha2-dev The re-implementation of a BFT hyperledger in RUST labels Dec 21, 2023
@DCNick3
Copy link
Contributor

DCNick3 commented Dec 21, 2023

What I think happens there: test_network starts the network with only a single peer and this single peer does not validate the genesis transactions, because they are a SignedTransaction and there should be no need to. However the payload_mut on SignedTransaction (and a public payload field of SignedTransactionV1, for that matter) circumvent this invariant.

I think that if the test network would have more than one peer, than these tests would not have worked, as to deserializa a SignedTransaction the signatures would have to be checked (at least I would hope so)

@Erigara Erigara self-assigned this Jan 11, 2024
Erigara added a commit to Erigara/iroha that referenced this issue Jan 12, 2024
mversic pushed a commit to Erigara/iroha that referenced this issue Jan 13, 2024
mversic pushed a commit to Erigara/iroha that referenced this issue Jan 15, 2024
Erigara added a commit to Erigara/iroha that referenced this issue Jan 15, 2024
mversic pushed a commit to Erigara/iroha that referenced this issue Jan 15, 2024
Erigara added a commit to Erigara/iroha that referenced this issue Jan 15, 2024
Erigara added a commit to Erigara/iroha that referenced this issue Jan 15, 2024
Erigara added a commit that referenced this issue Jan 15, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 18, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 18, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 18, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 22, 2024
Signed-off-by: Shanin Roman <[email protected]>
Signed-off-by: Asem-Abdelhady <[email protected]>
@Erigara Erigara closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants