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

add TLS ignore in order to connect to CRIB, add debug #1088

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

skudasov
Copy link
Collaborator

@skudasov skudasov commented Aug 23, 2024

This is a temporary solution to unblock testing CRIBs with RPC chaos (Geth, Anvil)


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes enhance the RPC client and miner functionalities within a blockchain testing framework, introducing HTTP header support for RPC client requests and adjusting the miner to accept HTTP headers. These modifications aim to improve flexibility in interacting with blockchain nodes for testing purposes, allowing for more precise control over the test environment setup, including security and debug configurations.

What

  • client/miner.go

    • Added http import to support HTTP operations.
    • Modified the NewRemoteAnvilMiner function to accept http.Header as a parameter, enabling the passing of custom HTTP headers during miner initialization.
  • client/rpc.go

    • Introduced imports for crypto/tls, net/http, and os to support new features.
    • Adjusted NewRPCClient to accept http.Header and isDebug flag from environment variable RESTY_DEBUG, enhancing the client with HTTP headers and debug mode based on environment settings.
    • Added TLS configuration with InsecureSkipVerify: true to bypass certificate validation, noted with a TODO to implement proper certificate handling in the future.
  • client/rpc_suite_test.go & client/rpc_test.go

    • Updated calls to NewRPCClient and NewRemoteAnvilMiner to comply with the new signature that includes the http.Header parameter, passing nil for tests that do not require custom headers. This change ensures that the test suite remains compatible with the updated functions.

@cl-sonarqube-production
Copy link

@skudasov skudasov merged commit 4a0c9a0 into main Aug 23, 2024
34 of 35 checks passed
@skudasov skudasov deleted the rpc-chaos-connect-crib branch August 23, 2024 12:47
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