Skip to content

Conversation

@tscrond
Copy link
Contributor

@tscrond tscrond commented Apr 4, 2025

This is a fix for native validator kit that adds a flag for ethereum sidecar to support different ethereum networks.

Note

Right now the change is in the testing phase.

@tscrond tscrond changed the base branch from main to mainnet-prep April 4, 2025 08:49
@tscrond
Copy link
Contributor Author

tscrond commented Apr 4, 2025

Testing

Tested with latest mezod v1.0.0-rc0 binary.

testnet

Command:

/var/mezod/bin/mezod-v1.0.0-rc0/mezod ethereum-sidecar --log_format=json --ethereum-sidecar.server.ethereum-node-address="<redacted>" --ethereum-sidecar.server.network="sepolia"

Output:

{"level":"info","module":"server","module":"ethereum-sidecar","address":"0.0.0.0:7500","time":"2025-04-04T11:36:52+02:00","message":"gRPC server started"}
{"level":"info","module":"server","module":"ethereum-sidecar","startBlock":7828023,"endBlock":8048023,"time":"2025-04-04T11:36:52+02:00","message":"fetching AssetsLocked events from range"}
{"level":"info","module":"server","module":"ethereum-sidecar","time":"2025-04-04T11:36:53+02:00","message":"no new events to process"}

mainnet

Command:

/var/mezod/bin/mezod-v1.0.0-rc0/mezod ethereum-sidecar --log_format=json --ethereum-sidecar.server.ethereum-node-address="<redacted>" --ethereum-sidecar.server.network="mainnet"

Output:

{"level":"info","module":"server","module":"ethereum-sidecar","address":"0.0.0.0:7500","time":"2025-04-04T11:41:33+02:00","message":"gRPC server started"}
{"level":"info","module":"server","module":"ethereum-sidecar","startBlock":21974652,"endBlock":22194652,"time":"2025-04-04T11:41:33+02:00","message":"fetching AssetsLocked events from range"}
{"level":"info","module":"server","module":"ethereum-sidecar","time":"2025-04-04T11:41:33+02:00","message":"no new events to process"}

@tscrond tscrond self-assigned this Apr 4, 2025
@tscrond tscrond marked this pull request as ready for review April 4, 2025 09:47
MEZOD_HOME="/var/mezod"
MEZOD_MONIKER="<change me>"
MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS="<change me>" # Ethereum Mainnet WS RPC
MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK="<change me>" # Ethereum network (mainnet)
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is for mainnet, so what about hardcording mainnet value here?
As it is hardcoded for native

MEZOD_HOME="/var/mezod"
MEZOD_MONIKER="<change me>"
MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS="<change me>"
MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK="<change_me>" # Ethereum network (testnet - Sepolia)
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is for testnet, so what about hardcording sepolia value here?
As it is hardcoded for native

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that the network name does not be placed in secret. It's not confidential information.
Actually, we don't need to define any new parametr in values.yaml.
We can add condition to the StatefulSet, as follows:

            - --ethereum-sidecar.server.ethereum-node-address=$(ETHEREUM_ENDPOINT)
            {{- if eq .Values.env.NETWORK "mainnet" }}
            - --ethereum-sidecar.server.network=mainnet
            {{- else if eq .Values.env.NETWORK "testnet" }}
            - --ethereum-sidecar.server.network=sepolia
            {{- end }}

Copy link
Contributor

@thevops thevops Apr 4, 2025

Choose a reason for hiding this comment

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

Or we can add env.MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK to the values.yaml and use it:

- --ethereum-sidecar.server.network={{ .Values.env.MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that sounds good, i will adjust it ;)

@tscrond tscrond requested a review from thevops April 4, 2025 10:17
@tscrond tscrond merged commit 0d75061 into mainnet-prep Apr 4, 2025
1 check passed
@tscrond tscrond deleted the patch/mainnet-prep branch April 4, 2025 10:30
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.

2 participants