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

event loader with event watch and backfill #911

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

EasterTheBunny
Copy link
Contributor

@EasterTheBunny EasterTheBunny commented Oct 31, 2024

Description

This PR introduces a component that monitors solana slot production and loads program log messages looking for emitted events. This component also provides a backfill feature to look for events in past blocks by program address.

Included is an integration test to a local solana validator as a smoke test and a benchmark test for watching slot production.

goos: darwin
goarch: arm64
pkg: github.com/smartcontractkit/chainlink-solana/pkg/solana/logpoller
cpu: Apple M1 Pro
BenchmarkEncodedLogCollector-10          1770250              6545 ns/op              6910 events/sec            2.762 rcp_calls/sec         662 B/op          3 allocs/op
PASS
ok      github.com/smartcontractkit/chainlink-solana/pkg/solana/logpoller       18.798s

NONEVM-742

@EasterTheBunny EasterTheBunny requested review from a team as code owners October 31, 2024 13:40
@EasterTheBunny EasterTheBunny requested a review from a team as a code owner October 31, 2024 14:24
@reductionista
Copy link
Contributor

Looks like the CI failed to install postgresql-client-16? Hopefully someone knows what's going on there and can unblock us.

return err
}

sigs, err := c.client.GetSignaturesForAddressWithOpts(ctx, pubKey, &rpc.GetSignaturesForAddressOpts{
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this method only return 1,000 results at max? What if we need to backfill more transactions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made an update to this PR to address this concern

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

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.

3 participants