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

Automate complete setup of a node with domains, registry & transports #295

Merged
merged 62 commits into from
Oct 14, 2024

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Oct 11, 2024

Work completed in this PR.

Not quite a fully working environment, as it's blocked on work on the DB persistent keymanager

  • Implement correct error handling for idempotencyKeys
  • Rename SmartContract CR to SmartContractDeployment (scd)
  • Implement idempotent submission in scd CR
  • Implement a build-time tool to generate CR samples for all our smart contracts
  • Make it so when running in VSCode, the operator uses the nodePort to connect to the Paladin JSON/RPC
    • Instead of using the internal k8s service networking as it would do when running in the cluster
    • Enabled viaUSE_NODEPORTS_IN_DEBUGGER env var (configured in launch.json)
  • Add PaladinDomain CR
  • Add PaladinRegistry CR
  • Fix a number of startup related issues around order of startup
    • Public TX manager starting before ethClient WebSocket connected
    • Event Streams starting before Block Indexer
  • Add Label selector and status based reload of Paladin CR to PaladinDomain CRs
  • Get noto (shared-c) domains loading E2E in the full Dockerized environment
  • Get pente (jar) domains loading E2E in the full Dockerized environment
  • Add Label selector and status based reload of Paladin CR to PaladinRegistry CRs
  • Add library builds for registries
  • Add library builds for transports
  • Get evm (shared-c) registries loading E2E in the full Dockerized environment
  • Do a bunch of optimization on the Docker build for faster iteration: see 57c7c01
  • Get grpc (shared-c) transports loading E2E in the full Dockerized environment
  • Build certificate issuance via CertManage without creating a CRD dep on the operator
    • Uses Go template engine and unstructured interface
  • Mount TLS secrets to the pod
  • Add extra k8s services for transports
  • Reconcile all the RPC functions of the block indexer
  • Add new GetLocalDetails call to transports plugin interface
  • Implement externalHostname in GRPC transport, and GetLocalDetails with certificate
  • Expose registry query APIs over JSON/RPC
  • Fix an issue with Limit() not working on JSONQuery
  • Change default fromBlock for block indexer to 0 (much safer default in retrospect than latest)
  • Fix issue with missing data encoding on public TXs submitted via Paladin front door
  • Create a PaladinRegistration CR to register a node via a registry
  • Reinstate use of gradle with our own download, as gradlew seems broken in github actions

dwertent and others added 3 commits October 10, 2024 16:03
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@peterbroadhurst peterbroadhurst self-assigned this Oct 11, 2024
peterbroadhurst and others added 23 commits October 10, 2024 22:00
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: David Wertenteil <david.wertenteil@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Enhance CRD Status Management
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@peterbroadhurst
Copy link
Contributor Author

This commit was an interesting one: 9025865

Caused by: java.lang.NullPointerException: Cannot invoke "io.kaleido.paladin.pente.domain.PenteConfiguration.initFromConfig(io.kaleido.paladin.toolkit.ToDomain$ConfigureDomainRequest)" because "this.config" is null
        at io.kaleido.paladin.pente.domain.PenteDomain.configureDomain(PenteDomain.java:55) ~[?:?]
        at io.kaleido.paladin.toolkit.DomainInstance.handleRequest(DomainInstance.java:101) ~[paladin.jar:?]
        at io.kaleido.paladin.toolkit.DomainInstance.handleRequest(DomainInstance.java:28) ~[paladin.jar:?]
        at io.kaleido.paladin.toolkit.PluginInstance$StreamHandler.lambda$onNext$1(PluginInstance.java:200) ~[paladin.jar:?]
        ... 7 more

... managed to get Java to kick off an async task so early in the super() call, that the new thread sees null from a private final variable that's initialized in the child class.

@peterbroadhurst
Copy link
Contributor Author

Next up more Gradle work to shadowJar or otherwise include deps in the pente.jar:

Caused by: java.lang.ClassNotFoundException: org.web3j.abi.datatypes.Type
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
        at io.kaleido.paladin.pente.domain.PenteDomain.<init>(PenteDomain.java:45) ~[?:?]
        at io.kaleido.paladin.pente.domain.PenteDomainFactory.newDomainInstance(PenteDomainFactory.java:24) ~[?:?]
        at io.kaleido.paladin.toolkit.DomainBase.newPluginInstance(DomainBase.java:33) ~[paladin.jar:?]
        at io.kaleido.paladin.toolkit.PluginBase.startInstance(PluginBase.java:33) ~[paladin.jar:?]
        at io.kaleido.paladin.toolkit.DomainBase.startInstance(DomainBase.java:25) ~[paladin.jar:?]
        ... 15 more

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
…n in github actions

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@peterbroadhurst peterbroadhurst changed the title Automate deployment of working 3-node environment Automate complete setup of a node with domains, registry & transports Oct 14, 2024
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Copy link
Contributor

@hosie hosie left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
.github/workflows/operator.yaml Outdated Show resolved Hide resolved
@dwertent dwertent merged commit 1a6b3d7 into main Oct 14, 2024
4 checks passed
@dwertent dwertent deleted the three-body-problem branch October 14, 2024 18:59
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.

4 participants