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

feat(zetaclient): add generic rpc metrics #2597

Merged
merged 4 commits into from
Aug 6, 2024
Merged

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Jul 30, 2024

Description

Add generic rpc metrics to zetaclient. BTC metrics are not possible because our BTC RPC client will not currently accept a custom http.Client. I will work on that upstream.

Closes #2588
Closes #1524

root@zetaclient0:/usr/local/bin# curl -s http://localhost:8886 | grep zetaclient_rpc
# HELP zetaclient_rpc_count A counter for number of total RPC requests
# TYPE zetaclient_rpc_count counter
zetaclient_rpc_count{code="200",host="eth:8545"} 243
zetaclient_rpc_count{code="200",host="solana:8899"} 48
# HELP zetaclient_rpc_duration_seconds A histogram of the RPC duration in seconds
# TYPE zetaclient_rpc_duration_seconds histogram
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.005"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.01"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.025"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.05"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.1"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.25"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="0.5"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="1"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="2.5"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="5"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="10"} 243
zetaclient_rpc_duration_seconds_bucket{host="eth:8545",le="+Inf"} 243
zetaclient_rpc_duration_seconds_sum{host="eth:8545"} 0.16580842899999995
zetaclient_rpc_duration_seconds_count{host="eth:8545"} 243
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.005"} 46
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.01"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.025"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.05"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.1"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.25"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="0.5"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="1"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="2.5"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="5"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="10"} 48
zetaclient_rpc_duration_seconds_bucket{host="solana:8899",le="+Inf"} 48
zetaclient_rpc_duration_seconds_sum{host="solana:8899"} 0.05135230499999999
zetaclient_rpc_duration_seconds_count{host="solana:8899"} 48
# HELP zetaclient_rpc_getBlockByNumber_count Count of getLogs per chain
# TYPE zetaclient_rpc_getBlockByNumber_count counter
zetaclient_rpc_getBlockByNumber_count{chain="goerli_localnet"} 53
# HELP zetaclient_rpc_getFilterLogs_count Count of getLogs per chain
# TYPE zetaclient_rpc_getFilterLogs_count counter
zetaclient_rpc_getFilterLogs_count{chain="goerli_localnet"} 104
# HELP zetaclient_rpc_in_progress Number of RPC requests in progress
# TYPE zetaclient_rpc_in_progress gauge
zetaclient_rpc_in_progress{host="eth:8545"} 0
zetaclient_rpc_in_progress{host="solana:8899"} 0

Summary by CodeRabbit

  • New Features

    • Introduced enhanced monitoring capabilities with new Prometheus metrics for RPC requests, including RPCInProgress, RPCCount, and RPCLatency.
    • Added an instrumented HTTP client for improved RPC request monitoring.
  • Bug Fixes

    • Improved error handling and logging for RPC client connections.
  • Tests

    • Enhanced testing suite with new assertions for metric accuracy and reliability using the instrumented HTTP client.

Copy link
Contributor

coderabbitai bot commented Jul 30, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Walkthrough

The recent changes enhance the ZetaClient's functionality by integrating Prometheus metrics to monitor Ethereum and Solana RPC calls. This update introduces an instrumented HTTP client for better observability, error handling, and logging in RPC interactions. Additionally, tests have been updated to ensure accurate metric tracking and provide better insights into system performance.

Changes

Files Change Summary
zetaclient/chains/evm/signer/signer.go, zetaclient/orchestrator/bootstrap.go Enhanced the getEVMRPC and syncObserverMap functions to utilize a new instrumented HTTP client for better error handling and logging.
zetaclient/metrics/metrics.go, zetaclient/metrics/metrics_test.go Introduced new Prometheus metrics for tracking RPC requests, including success/failure counts and latency. Updated tests to validate metrics accurately.

Assessment against linked issues

Objective Addressed Explanation
Add Observation RPC call metrics to ZetaClientd (#2588)
Add metrics for external RPC calls (success / error) (#1524)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@gartnera gartnera force-pushed the zetaclient-rpc-metrics branch from 29bb317 to 6677db8 Compare July 30, 2024 19:23
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 70.55%. Comparing base (eb61f2d) to head (06db90a).

Files Patch % Lines
zetaclient/metrics/metrics.go 78.94% 2 Missing and 2 partials ⚠️
zetaclient/orchestrator/bootstrap.go 50.00% 2 Missing and 1 partial ⚠️
zetaclient/chains/evm/signer/signer.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2597   +/-   ##
========================================
  Coverage    70.55%   70.55%           
========================================
  Files          335      335           
  Lines        18345    18373   +28     
========================================
+ Hits         12943    12963   +20     
- Misses        4821     4824    +3     
- Partials       581      586    +5     
Files Coverage Δ
zetaclient/chains/evm/signer/signer.go 51.17% <60.00%> (+0.18%) ⬆️
zetaclient/orchestrator/bootstrap.go 56.95% <50.00%> (-0.39%) ⬇️
zetaclient/metrics/metrics.go 76.74% <78.94%> (+1.74%) ⬆️

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (4)
zetaclient/metrics/metrics_test.go (1)

41-78: Consider adding comments for better readability.

The TestMetrics function has been enhanced to use an instrumented HTTP client and includes additional assertions. Consider adding comments to explain the purpose of each assertion for better readability.

+	// Increment metrics for different chains
	GetFilterLogsPerChain.WithLabelValues("chain1").Inc()
	GetFilterLogsPerChain.WithLabelValues("chain2").Inc()
	GetFilterLogsPerChain.WithLabelValues("chain2").Inc()
	time.Sleep(1 * time.Second)

	chain1Ctr := testutil.ToFloat64(GetFilterLogsPerChain.WithLabelValues("chain1"))
	c.Assert(chain1Ctr, Equals, 1.0)

	// Create an instrumented HTTP client
	httpClient, err := GetInstrumentedHTTPClient("http://127.0.0.1:8886")
	c.Assert(err, IsNil)

	// Perform HTTP GET requests and check responses
	res, err := httpClient.Get("http://127.0.0.1:8886")
	c.Assert(err, IsNil)
	defer res.Body.Close()
	c.Assert(res.StatusCode, Equals, http.StatusOK)

	res, err = httpClient.Get("http://127.0.0.1:8886/metrics")
	c.Assert(err, IsNil)
	defer res.Body.Close()
	c.Assert(res.StatusCode, Equals, http.StatusOK)
	body, err := io.ReadAll(res.Body)
	c.Assert(err, IsNil)
	metricsBody := string(body)
	c.Assert(strings.Contains(metricsBody, fmt.Sprintf("%s_%s", ZetaClientNamespace, "rpc_count")), Equals, true)

	// Assert that rpc count is being incremented at all
	rpcCount := testutil.ToFloat64(RPCCount)
	c.Assert(rpcCount, Equals, 2.0)

	// Assert that rpc count is being incremented correctly
	rpcCount = testutil.ToFloat64(RPCCount.With(prometheus.Labels{"host": "127.0.0.1:8886", "code": "200"}))
	c.Assert(rpcCount, Equals, 2.0)

	// Assert that rpc count is not being incremented incorrectly
	rpcCount = testutil.ToFloat64(RPCCount.With(prometheus.Labels{"host": "127.0.0.1:8886", "code": "502"}))
	c.Assert(rpcCount, Equals, 0.0)
zetaclient/metrics/metrics.go (1)

184-210: Improve error handling for curried metrics.

The GetInstrumentedHTTPClient function is well-implemented, but consider providing more context in the error messages for curried metrics.

	rpcCounterMetric, err := RPCCount.CurryWith(labels)
	if err != nil {
-		return nil, err
+		return nil, fmt.Errorf("failed to curry RPCCount metric: %w", err)
	}

	rpcLatencyMetric, err := RPCLatency.CurryWith(labels)
	if err != nil {
-		return nil, err
+		return nil, fmt.Errorf("failed to curry RPCLatency metric: %w", err)
	}
Tools
GitHub Check: codecov/patch

[warning] 195-195: zetaclient/metrics/metrics.go#L195
Added line #L195 was not covered by tests


[warning] 199-199: zetaclient/metrics/metrics.go#L199
Added line #L199 was not covered by tests

zetaclient/orchestrator/bootstrap.go (2)

258-261: Improve error message for HTTP client creation.

The error message for the HTTP client creation could be more descriptive.

	if err != nil {
-		logger.Std.Error().Err(err).Str("rpc.endpoint", evmConfig.Endpoint).Msgf("Unable to create HTTP client")
+		logger.Std.Error().Err(err).Str("rpc.endpoint", evmConfig.Endpoint).Msgf("Unable to create instrumented HTTP client for Ethereum")
		continue
	}
Tools
GitHub Check: codecov/patch

[warning] 260-261: zetaclient/orchestrator/bootstrap.go#L260-L261
Added lines #L260 - L261 were not covered by tests


388-391: Improve error message for HTTP client creation.

The error message for the HTTP client creation could be more descriptive.

	if err != nil {
-		logger.Std.Error().Err(err).Str("rpc.endpoint", solConfig.Endpoint).Msgf("Unable to create HTTP client")
+		logger.Std.Error().Err(err).Str("rpc.endpoint", solConfig.Endpoint).Msgf("Unable to create instrumented HTTP client for Solana")
		continue
	}
Tools
GitHub Check: codecov/patch

[warning] 390-391: zetaclient/orchestrator/bootstrap.go#L390-L391
Added lines #L390 - L391 were not covered by tests

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5771df3 and 6677db8.

Files selected for processing (4)
  • zetaclient/chains/evm/signer/signer.go (2 hunks)
  • zetaclient/metrics/metrics.go (3 hunks)
  • zetaclient/metrics/metrics_test.go (2 hunks)
  • zetaclient/orchestrator/bootstrap.go (3 hunks)
Additional context used
Path-based instructions (4)
zetaclient/metrics/metrics_test.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/metrics/metrics.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/orchestrator/bootstrap.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/evm/signer/signer.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

GitHub Check: codecov/patch
zetaclient/metrics/metrics.go

[warning] 195-195: zetaclient/metrics/metrics.go#L195
Added line #L195 was not covered by tests


[warning] 199-199: zetaclient/metrics/metrics.go#L199
Added line #L199 was not covered by tests

zetaclient/orchestrator/bootstrap.go

[warning] 260-261: zetaclient/orchestrator/bootstrap.go#L260-L261
Added lines #L260 - L261 were not covered by tests


[warning] 390-391: zetaclient/orchestrator/bootstrap.go#L390-L391
Added lines #L390 - L391 were not covered by tests

zetaclient/chains/evm/signer/signer.go

[warning] 869-869: zetaclient/chains/evm/signer/signer.go#L869
Added line #L869 was not covered by tests

Additional comments not posted (6)
zetaclient/metrics/metrics_test.go (1)

31-40: LGTM!

The TestCurryWith function correctly validates the behavior of the MustCurryWith method from the RPCCount metric.

zetaclient/metrics/metrics.go (1)

117-143: LGTM!

The new Prometheus metrics RPCInProgress, RPCCount, and RPCLatency are well-defined and will provide valuable insights into the performance and success rates of RPC calls.

zetaclient/chains/evm/signer/signer.go (4)

867-867: Integrate the instrumented HTTP client correctly.

The introduction of the instrumented HTTP client aligns with best practices for monitoring and observability.


868-870: Ensure proper error handling for HTTP client instrumentation.

The error handling for the GetInstrumentedHTTPClient function is appropriate, but ensure that the error messages are logged for better debugging.

Do you want to log the error message for better debugging?

if err != nil {
	log.Error().Err(err).Msg("failed to get instrumented HTTP client")
	return nil, nil, err
}
Tools
GitHub Check: codecov/patch

[warning] 869-869: zetaclient/chains/evm/signer/signer.go#L869
Added line #L869 was not covered by tests


872-872: Utilize the instrumented HTTP client for RPC client creation.

The use of ethrpc.DialHTTPWithClient with the instrumented HTTP client is a good practice for enhancing observability.


876-876: Create the Ethereum client correctly using the RPC client.

The creation of the Ethereum client using the RPC client is correctly implemented.

zetaclient/chains/evm/signer/signer.go Outdated Show resolved Hide resolved
zetaclient/metrics/metrics.go Show resolved Hide resolved
zetaclient/orchestrator/bootstrap.go Outdated Show resolved Hide resolved
zetaclient/chains/evm/signer/signer.go Outdated Show resolved Hide resolved
zetaclient/metrics/metrics_test.go Outdated Show resolved Hide resolved
@gartnera gartnera force-pushed the zetaclient-rpc-metrics branch from 6677db8 to 2b4e2fb Compare August 6, 2024 15:47
@gartnera gartnera enabled auto-merge August 6, 2024 15:47
@gartnera gartnera added this pull request to the merge queue Aug 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 6, 2024
@gartnera gartnera added this pull request to the merge queue Aug 6, 2024
Merged via the queue into develop with commit c3a5428 Aug 6, 2024
27 of 28 checks passed
@gartnera gartnera deleted the zetaclient-rpc-metrics branch August 6, 2024 16:56
@gartnera gartnera added the zetaclient Issues related to ZetaClient label Aug 6, 2024
gartnera added a commit that referenced this pull request Aug 15, 2024
* feat(zetaclient): add generic rpc metrics

* feedback

* changelog

* fmt
gartnera added a commit that referenced this pull request Aug 15, 2024
* feat(zetaclient): add generic rpc metrics

* feedback

* changelog

* fmt
gartnera added a commit that referenced this pull request Aug 15, 2024
* feat(zetaclient): add generic rpc metrics

* feedback

* changelog

* fmt
gartnera added a commit that referenced this pull request Aug 16, 2024
* feat: parse inscription like witness data (#2524)

* parse inscription like witness data

* more comment

* remove unused code

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* pull origin

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <[email protected]>

* review feedbacks

* update review feedbacks

* update make generate

* fix linter

* remove over flow

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* update review feedback

* update code commnet

* update comment

* more comments

* Update changelog.md

---------

Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

fix version

* feat: detect memo in btc txn from OP_RETURN and inscription (#2533)

* parse inscription like witness data

* more comment

* remove unused code

* parse inscription

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* pull origin

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <[email protected]>

* review feedbacks

* update review feedbacks

* add mainnet txn

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* parse inscription like witness data

* more comment

* remove unused code

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: Dmitry S <[email protected]>

* Update zetaclient/chains/bitcoin/tx_script.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* pull origin

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Dmitry S <[email protected]>

* review feedbacks

* update review feedbacks

* update make generate

* fix linter

* remove over flow

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/tokenizer.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* update review feedback

* update code commnet

* update comment

* more comments

* Update changelog.md

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* Update zetaclient/chains/bitcoin/observer/inbound.go

Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* clean up

* format code

---------

Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>

* refactor(zetaclient)!: improve AppContext (#2568)

* Implement chain registry

* Rewrite test-cases for AppContext

* Drop `supplychecker`

* Refactor app ctx Update worker

* Refactor orchestrator

* Refactor observer&signer; DROP postBlockHeaders

* Fix test cases [1]

* Update changelog

* Allow Zeta Chain in appContext; address PR comments [1]

* Fix app context update

* Check for `chain.IsZeta()`

* Add AppContext.FilterChains

* Fix test cases [2]

* Fix test cases [3]

* Address PR comments [1]

* Address PR comments [2]

* Add tests for `slices`

* Fix e2e tests [1]

* Fix e2e tests [2]

* Resolve conflicts, converge codebase between PRs

* Add lodash; remove slices pkg

* Address PR comments

* Minor logging fix

* Address PR comments

tmp

* feat(zetaclient): add generic rpc metrics (#2597)

* feat(zetaclient): add generic rpc metrics

* feedback

* changelog

* fmt

* fix(zetaclient): use name in pending tx metric (#2642)

* feat(pkg): add `ticker` package (#2617)

* Add `pkg/ticker`

* Sample ticker usage in evm observer

* Change naming

* Address PR comments

* Address PR comments

* feat(zetaclient)!: Add support for EIP-1559 gas fees (#2634)

* Add Gas struct

* Add EIP-1559 fees

* Update changelog

* Add test cases for legacy vs dynamicFee txs

* Fix typo; Add E2E coverage

* Address PR comments

* Address PR comments

* Use gasFeeCap formula

* Revert "Use gasFeeCap formula"

This reverts commit 2260925.

* Address PR comments

* Fix e2e upgrade tests

* fix: adjust evm outbound tracker reporter to avoid submitting invalid hashes (#2628)

* refactor and fix evm outbound tracker reporter to avoid invalid hashes; print log when outbound tracker is full of invalid hashes

* add changelog entry

* used predefined log fields

* remove repeated fields information from log message; Devops team would configure Datadog to show the fields

* remove redundant fields in log message; unified logs

* remove pending transaction map from observer; the outbound tracker reporter will no longer report pending hash

* use bg.Work() to launch outbound tracker reporter goroutines

* bring the checking EnsureNoTrackers() back

* add more rationale to EVM outbound tracker submission

* sync observer and signers without wait on startup

* try fixing tss migration E2E failure by increase timeout

* feat: Solana relayer (fee payer) key importer, encryption and decryption (#2673)

* configure observer relayer key for Solana; remove hardcoded solana test key from zetaclient code

* implementation of relayer key importer, encryption and decryption

* integrate relayer key into E2E and Solana signer

* add relayer_key_balance metrics and unit tests

* use TrimSpace to trim password

* add changelog entry

* use relayer account array in E2E config; a few renaming; add private key validation when importing

* fix linter

* remove GetNetworkName method for simplification

* added PromptPassword method to prompt single password

* use network name as map index to store relayer key passwords

* moved relayer passwords to chain registry

* airdrop SOL token only if solana local node is available

---------

Co-authored-by: Lucas Bertrand <[email protected]>

* ci: Set Docker Workflow to use Go 1.22 (#2722)

* Set go 1.22.2

* Set go 1.22.2

* Set go 1.22

* Set go 1.22

* Refactor contrib/rpc and contrib/docker-scripts to use snapshots API (#2724)

Co-authored-by: Julian Rubino <[email protected]>

---------

Co-authored-by: dev-bitSmiley <[email protected]>
Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
Co-authored-by: Charlie Chen <[email protected]>
Co-authored-by: Lucas Bertrand <[email protected]>
Co-authored-by: Charlie <[email protected]>
Co-authored-by: Julian Rubino <[email protected]>
Co-authored-by: Julian Rubino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zetaclient Issues related to ZetaClient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Observation RPC call metrics to ZetaClientd Add metrics for external RPC calls (success / error)
4 participants