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

test(test-tooling): fix FabricTestLedger INVALID_ENDORSER_TRANSACTION #3031

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

AndreAugusto11
Copy link
Contributor

@AndreAugusto11 AndreAugusto11 commented Feb 27, 2024

  • reverts changes of commit 3371772,
    which seems to be breaking the Fabric Test Ledger

Results of further investigation into the root cause done by Peter:

  1. The URLs we specify have the grpcs:// protocol specified meaning that
    TLS is used for securing the connection.
  2. Certificates that are generated by the Fabric-provided boostrap scripts
    when setting up crypto materials for the ledger are generated with localhost
    as the hostname instead of the IP address of localhost.
  3. The C++ gRPC implementation does not support mixing IP addresses and
    hostnames when it comes to connections that are using TLS, e.g. if the
    certificate we are using was made out for localhost then it won't work
    for 127.0.0.1 even though technically from our perspective they meaning
    the same thing (do note however that technically localhost could be set
    up to resolve to something other than 127.0.0.1 in a DNS server so the
    difference is meaningful).

Source: grpc/grpc#2691

closes #3009

Co-authored-by: Peter Somogyvari [email protected]

Signed-off-by: André Augusto [email protected]
Signed-off-by: Peter Somogyvari [email protected]

* reverts changes of commit 3371772,
which seems to be breaking the Fabric Test Ledger

Results of further investigation into the root cause done by Peter:
1. The URLs we specify have the `grpcs://` protocol specified meaning that
TLS is used for securing the connection.
2. Certificates that are generated by the Fabric-provided boostrap scripts
when setting up crypto materials for the ledger are generated with `localhost`
as the hostname instead of the IP address of localhost.
3. The C++ gRPC implementation does not support mixing IP addresses and
hostnames when it comes to connections that are using TLS, e.g. if the
certificate we are using was made out for `localhost` then it won't work
for `127.0.0.1` even though technically from our perspective they meaning
the same thing (do note however that technically localhost could be set
up to resolve to something other than 127.0.0.1 in a DNS server so the
difference is meaningful).

Source: grpc/grpc#2691

closes hyperledger-cacti#3009

Co-authored-by: Peter Somogyvari <[email protected]>

Signed-off-by: André Augusto <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
@petermetz petermetz changed the title fix(fabric-test-ledger): fix INVALID_ENDORSER_TRANSACTION error test(test-tooling): fix FabricTestLedger INVALID_ENDORSER_TRANSACTION Feb 28, 2024
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndreAugusto11 Thank you! LGTM

Copy link
Contributor

@outSH outSH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great investigation, thank you!

@outSH outSH merged commit f57ab70 into hyperledger-cacti:main Feb 28, 2024
123 of 151 checks passed
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

Successfully merging this pull request may close these issues.

test(test-tooling): fix FabricTestLedger INVALID_ENDORSER_TRANSACTION when issuing transaction
3 participants