Canton - support Docker-internal networking (NONEVM-3773)#2456
Canton - support Docker-internal networking (NONEVM-3773)#2456friedemannf merged 4 commits intomainfrom
Conversation
84e8db2 to
a29bdac
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds Docker-internal networking support to the Canton Nginx container by changing Nginx server_name directives to wildcard patterns and explicitly registering all internal hostnames as Docker network aliases. It also restructures the Canton output to expose both internal (Docker-network-only) and external (Docker-host-reachable) endpoints, and bumps the Splice/Canton image versions from 0.5.11 to 0.5.13.
Changes:
- Split
CantonEndpointsoutput into a newCantonDatatype containing separateInternalEndpointsandExternalEndpointsfields - Changed Nginx
server_namedirectives from*.localhostto wildcards (*.*) and added all internal hostnames as Docker network aliases - Bumped Canton/Splice images to v0.5.13 and updated smoke tests and documentation accordingly
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
framework/components/blockchain/canton/nginx.go |
Extended getNginxTemplate to return internal hostnames; changed server_name to wildcards; added all internal hostnames as network aliases; updated NginxContainerRequest return signature |
framework/components/blockchain/canton/canton.go |
Bumped SpliceVersion to 0.5.13 |
framework/components/blockchain/canton.go |
Added new CantonData struct; split endpoint construction into internal/external; updated output to use CantonData |
framework/components/blockchain/blockchain.go |
Renamed CantonEndpoints *CantonEndpoints to CantonData *CantonData in NetworkSpecificData |
framework/examples/myproject/smoke_canton_test.go |
Updated all endpoint references to use the new CantonData.ExternalEndpoints path |
book/src/framework/components/blockchains/canton.md |
Updated code example to use new CantonData.ExternalEndpoints API and endpoint JWT tokens |
framework/.changeset/v0.15.0.md |
New changelog entry documenting this version's changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This:
server_names to wildcardsBelow is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes streamline the use of endpoints within the Canton testing framework and update the Canton and Splice images to newer versions. This includes a structural change to how network-specific data for Canton is organized and accessed, improving clarity and maintainability of the codebase. Additionally, the update supports Docker-internal networking, enhancing the setup's flexibility and alignment with containerized environments.
What
time,github.com/golang-jwt/jwt/v5, andgithub.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain/canton.CantonEndpointstoCantonDatawithinNetworkSpecificDatastructure, reflecting the updated organization of network-specific information.CantonDatastruct to differentiate between internal and external endpoints.newCantonfunction to utilizeCantonDatastruct, adapting to the new internal/external endpoint structure.CantonDatastruct.