EVM Playbooks¶
The evm playbooks operate the Fabric-X EVM gateway: the Ethereum JSON-RPC container that embeds an EVM and its own endorser, submitting transactions to the Fabric-X orderers and synchronizing with the committer sidecar.
Playbooks flow¶
flowchart LR
subgraph SETUP[Setup]
direction LR
CRYPTO[generate_crypto] --> CONFIGS[configs]
end
subgraph RUN[Run and cleanup]
direction LR
START[start] --> PING[ping]
PING --> STOP[stop]
STOP --> TEARDOWN[teardown]
TEARDOWN --> WIPE[wipe]
end
CONFIGS --> START
generate_crypto.yaml¶
generate_crypto.yaml enrolls the peer identity backing the embedded endorser, each declared user identity, and (when evm_use_tls is true) a shared client TLS key pair.
ansible-playbook hyperledger.fabricx.evm.generate_crypto --extra-vars '{"target_hosts": "fabric_x_evm"}'
Properties:
- Target hosts:
fabric_x_evmby default. - Nuance:
organization.rolemust bepeer, andorganization.usermust be declared; it becomes the gateway's transaction-signing identity.
configs.yaml¶
configs.yaml renders the EVM gateway configuration. The committer sidecar is discovered automatically from fabric_x_committers, preferring hosts that share organization.domain with the EVM host, and falling back to the whole group; the sidecar is the entry whose committer_component_type is sidecar. Orderer routers are discovered from every host in fabric_x_orderers whose orderer_component_type is router, across all organizations.
Properties:
- Target hosts:
fabric_x_evmby default.
start.yaml¶
start.yaml starts the EVM gateway and its embedded endorser.
Properties:
- Target hosts:
fabric_x_evmby default. - Nuance: opt-in per host through
evm_port. The gateway does not open its JSON-RPC listener until the embedded endorser has synchronized with the committer sidecar, so a slow or unreachable sidecar delays (or fails) container startup.
stop.yaml¶
stop.yaml stops the EVM gateway, leaving generated files and persisted state in place.
Properties:
- Target hosts:
fabric_x_evmby default.
teardown.yaml¶
teardown.yaml removes the EVM gateway runtime resources while leaving configuration, crypto material, and persisted state intact.
Properties:
- Target hosts:
fabric_x_evmby default.
wipe.yaml¶
wipe.yaml removes the EVM gateway artifacts from targeted hosts, including generated configuration, crypto material, and persisted state.
Properties:
- Target hosts:
fabric_x_evmby default.
ping.yaml¶
ping.yaml checks the EVM gateway's JSON-RPC endpoint declared by targeted hosts.
Properties:
- Target hosts:
fabric_x_evmby default. - Nuance: asserts
eth_chainIdmatchesevm_chain_idand thateth_blockNumbersucceeds, not just that the port is open.
fetch_crypto.yaml¶
fetch_crypto.yaml fetches EVM peer and user sign certificates, and (when evm_use_tls is true) the client TLS CA certificate, into the configured artifacts directory.
ansible-playbook hyperledger.fabricx.evm.fetch_crypto --extra-vars '{"target_hosts": "fabric_x_evm"}'
Properties:
- Target hosts:
fabric_x_evmby default.
fetch_logs.yaml¶
fetch_logs.yaml fetches EVM gateway logs from targeted hosts into the configured output directory.
Properties:
- Target hosts:
fabric_x_evmby default. - Nuance: intended for troubleshooting gateway startup and Fabric-X connectivity failures from the control node.