Skip to content

fix: support peerDevMode with TLS enabled#731

Open
Abhishek9639 wants to merge 1 commit into
hyperledger-labs:mainfrom
Abhishek9639:fix/dev-mode-tls-support
Open

fix: support peerDevMode with TLS enabled#731
Abhishek9639 wants to merge 1 commit into
hyperledger-labs:mainfrom
Abhishek9639:fix/dev-mode-tls-support

Conversation

@Abhishek9639
Copy link
Copy Markdown

Fixes #573

Previously, using peerDevMode: true and tls: true together in the config would throw a validation error and block network generation. But this combination is actually valid Hyperledger Fabric supports it as long as the peer has the right chaincode TLS environment variables set.

What changed:

  • Removed the validation error that was blocking peerDevMode + tls combination
  • Added CORE_CHAINCODE_TLS_CERT_FILE and CORE_CHAINCODE_TLS_KEY_FILE env vars to the peer container in the docker-compose template (only injected when both peerDevMode and tls are enabled)
  • Added a sample config demonstrating the working combination
  • Added an E2E test for the new sample

Testing:

  • All existing unit tests pass (34/34)
  • All E2E snapshot/schema tests pass including the new one (50/50)
  • New sample config passes schema validation

Signed-off-by: Abhishek <abhishekup082@gmail.com>
@Abhishek9639 Abhishek9639 force-pushed the fix/dev-mode-tls-support branch from a031f20 to 8498cb5 Compare April 22, 2026 10:49
@Abhishek9639
Copy link
Copy Markdown
Author

Abhishek9639 commented Apr 22, 2026

Hi @dzikowski,
could you please take a look at this when you get a chance?

This fixes #573 the validation was blocking peerDevMode and TLS from being used together, even though Fabric actually supports it. The fix is pretty minimal just removed the validation error and added the two required chaincode TLS env vars to the peer container in the docker-compose template.

All existing tests still pass. Let me know if you'd like any changes.
Thanks

@dzikowski
Copy link
Copy Markdown
Contributor

Please run locally a test with peer dev mode enabled, and TLS enabled. I believe it wont work, because the fundamental issue seems not resolved. See #573

@dzikowski
Copy link
Copy Markdown
Contributor

it seems tests are failing, because snapshots are not updated. Take a look at: https://github.com/hyperledger-labs/fablo/blob/main/CONTRIBUTING.md

@Abhishek9639
Copy link
Copy Markdown
Author

Ok, I’ll check it.

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.

Support dev mode with TLS

2 participants