-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CCIP Load Test connected to crib (not yet working) #15404
base: develop
Are you sure you want to change the base?
Conversation
AER Report: CI Coreaer_workflow , commit , Detect Changes , Scheduled Run Frequency , Clean Go Tidy & Generate , Flakeguard Root Project / Get Tests To Run , lint , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_race_tests) , Core Tests (go_core_fuzz) , Flakeguard Deployment Project / Get Tests To Run , Flakeguard Root Project / Run Tests , Flakeguard Root Project / Report , Flakeguard Deployment Project / Run Tests , Flakeguard Deployment Project / Report , Flakey Test Detection , SonarQube Scan 1. Go module update needed:[make generate]Source of Error:
Why: The error indicates that the Go modules require updates, and the Suggested fix: Run AER Report: Operator UI CI ran successfully ✅ |
deployment/environment.go
Outdated
@@ -35,6 +35,7 @@ type OnchainClient interface { | |||
bind.DeployBackend | |||
BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) | |||
NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) | |||
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use HeaderByNumber(context, nil)
to get the latest block. Can you use that instead?
SequenceNumber uint64 `json:"sequence_number"` | ||
} | ||
|
||
func GetAddressFromTypeAndVersion(ab deployment.AddressBook, cs uint64, tv string) (common.Address, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it being used anywhere?
"sourceSelector": fmt.Sprintf("%d", src), | ||
"destinationSelector": fmt.Sprintf("%d", dst), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be easier to use names/chain id instead? Labelling by selector can create confusion as selector is a large number
|
||
func SendMetricsToLoki(l zerolog.Logger, lc *wasp.LokiClient, updatedLabels map[string]string, metrics *LokiMetric) { | ||
if err := lc.HandleStruct(wasp.LabelsMapToModel(updatedLabels), time.Now(), metrics); err != nil { | ||
l.Error().Err(err).Msg(ErrLokiPush) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you not want the test to fail if it fails to push?
|
||
return router.ClientEVM2AnyMessage{ | ||
Receiver: rcv, | ||
Data: common.Hex2Bytes("hello world"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using some identifier here like msg with id to distinguish.
m.env.Chains[src].DeployerKey.Value = fee | ||
defer func() { m.env.Chains[src].DeployerKey.Value = nil }() | ||
} | ||
_, err = r.CcipSend( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you approving router to spend fee tokens in the beginning?
m.chainSelector, | ||
msg) | ||
if err != nil { | ||
return &wasp.Response{Error: err.Error(), Group: waspGroup, Failed: true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment about using deployment.MayBeDataError(err)
} | ||
|
||
lokiLabels := setLokiLabels(src, m.chainSelector) | ||
SendMetricsToLoki(m.l, m.loki, lokiLabels, &LokiMetric{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a blocking call?
// Parse all events from the simulated chains, send to Loki | ||
// step 4: teardown | ||
// Stop the chains, cleanup the environment | ||
func TestCCIPLoad_RPS(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of code in this can be extracted to common functions. You might need more than one load test in future
1eee96f
to
2b94462
Compare
2b94462
to
4f21404
Compare
https://smartcontract-it.atlassian.net/browse/CCIP-4107