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

CCTP: use chain listener instead of scribe #2592

Merged
merged 10 commits into from
May 8, 2024
Merged

Conversation

dwasse
Copy link
Collaborator

@dwasse dwasse commented May 7, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced system interactions by updating contract address configurations.
  • Bug Fixes

    • Corrected function calls to match the updated contract address references.
  • Refactor

    • Simplified configuration structures by removing outdated fields and references.
    • Improved database and relayer functionalities for enhanced performance and integration.
  • Chores

    • Streamlined code dependencies by removing unnecessary imports in various services.

Copy link
Contributor

coderabbitai bot commented May 7, 2024

Walkthrough

The recent updates refine the cctp-relayer service by renaming configurations, removing obsolete fields, enhancing database integration, and streamlining relayer functionality. Changes include adjustments in method names, imports, and method signatures to simplify and improve efficiency.

Changes

Files Changes
.../config/chain.go, .../config/config.go Renamed fields, removed obsolete configurations.
.../db/relayer_db.go, .../db/sql/base/base.go, .../db/sql/mysql/store.go Enhanced database integration with new imports and interfaces.
.../relayer/circle.go, .../relayer/synapse.go Updated method calls and signatures for improved functionality.
.../relayer/relayer.go, .../relayer/relayer_test.go, .../relayer/synapse_test.go Streamlined relayer functionality, updated imports, and method signatures.
.../rfq/relayer/service/relayer.go, .../cmd/commands.go, .../config/config_test.go Removed unnecessary imports and parameters for cleaner code.

🐇💻
Code hops through fields of change,
Refactoring with each arrange.
From fields removed to paths now clear,
A rabbit's work, never to fear.
🌟🚀🌟


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration 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.

@github-actions github-actions bot added go Pull requests that update Go code size/m labels May 7, 2024
Copy link

cloudflare-workers-and-pages bot commented May 7, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: d72be31
Status: ✅  Deploy successful!
Preview URL: https://788c7970.sanguine-fe.pages.dev
Branch Preview URL: https://feat-listener-cctp.sanguine-fe.pages.dev

View logs

@github-actions github-actions bot added size/s and removed size/m labels May 7, 2024
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

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 540cd3a and d2bb44d.
Files selected for processing (12)
  • services/cctp-relayer/config/chain.go (3 hunks)
  • services/cctp-relayer/config/config.go (1 hunks)
  • services/cctp-relayer/db/relayer_db.go (2 hunks)
  • services/cctp-relayer/db/sql/base/base.go (4 hunks)
  • services/cctp-relayer/db/sql/mysql/store.go (2 hunks)
  • services/cctp-relayer/relayer/circle.go (2 hunks)
  • services/cctp-relayer/relayer/relayer.go (6 hunks)
  • services/cctp-relayer/relayer/relayer_test.go (1 hunks)
  • services/cctp-relayer/relayer/suite_test.go (6 hunks)
  • services/cctp-relayer/relayer/synapse.go (1 hunks)
  • services/cctp-relayer/relayer/synapse_test.go (4 hunks)
  • services/rfq/relayer/service/relayer.go (2 hunks)
Files skipped from review due to trivial changes (3)
  • services/cctp-relayer/config/config.go
  • services/cctp-relayer/db/sql/mysql/store.go
  • services/cctp-relayer/relayer/suite_test.go
Additional comments not posted (18)
services/cctp-relayer/db/sql/base/base.go (3)

15-15: Integration of ChainListenerDB into Store struct.

This change aligns with the PR's objective to transition from the scribe system to a chain listener system. The integration of ChainListenerDB directly into the Store struct facilitates operations related to the new chain listener.


24-24: Updated constructor for Store.

The constructor now initializes ChainListenerDB alongside other database components. This is a necessary change to support the new chain listener functionalities.


41-41: Addition of ChainListenerDB models to the migration list.

This ensures that the database schema includes the necessary tables and fields for the chain listener, which is crucial for the new system's operation.

services/cctp-relayer/db/relayer_db.go (1)

38-38: Integration of ChainListenerDB into CCTPRelayerDB.

This change is consistent with the PR's goal of transitioning to a chain listener system. By integrating ChainListenerDB into the CCTPRelayerDB interface, it ensures that the database interface supports the new functionalities required by the chain listener.

services/cctp-relayer/config/chain.go (4)

14-18: Updated ChainConfig struct to support chain listener.

The changes to the ChainConfig struct, including the addition of CCTPAddress and CCTPStartBlock, are crucial for configuring the chain listener correctly. This aligns with the PR's objectives to transition to a chain listener system.


21-23: Updated GetCCTPAddress function.

This update is necessary to retrieve the CCTPAddress from the configuration, which is now used instead of the previous SynapseCCTPAddress. This change is consistent with the updated ChainConfig structure.


39-40: Validation for CCTPAddress.

Adding validation for the CCTPAddress to ensure it is a valid hexadecimal Ethereum address is a good practice. This prevents configuration errors that could lead to runtime issues.


53-54: Validation to ensure CCTPAddress is not empty.

This validation is important to ensure that the CCTPAddress is provided, as it is critical for the operation of the chain listener. This prevents potential issues where the address is mistakenly left unset.

services/cctp-relayer/relayer/relayer_test.go (1)

36-36: Updated test to reflect changes in NewCCTPRelayer function signature.

The test has been updated to call NewCCTPRelayer without the previously required scribe-related parameter. This change is necessary to align the tests with the updated function signature, which is part of the transition to using a chain listener.

services/cctp-relayer/relayer/synapse_test.go (4)

26-26: Updated test to reflect changes in NewCCTPRelayer function signature.

The test has been updated to call NewCCTPRelayer without the previously required scribe-related parameter. This change is necessary to align the tests with the updated function signature, which is part of the transition to using a chain listener.


67-67: Updated test to reflect changes in NewCCTPRelayer function signature.

The test has been updated to call NewCCTPRelayer without the previously required scribe-related parameter. This change is necessary to align the tests with the updated function signature, which is part of the transition to using a chain listener.


124-124: Updated test to reflect changes in NewCCTPRelayer function signature.

The test has been updated to call NewCCTPRelayer without the previously required scribe-related parameter. This change is necessary to align the tests with the updated function signature, which is part of the transition to using a chain listener.


161-161: Updated test to reflect changes in NewCCTPRelayer function signature.

The test has been updated to call NewCCTPRelayer without the previously required scribe-related parameter. This change is necessary to align the tests with the updated function signature, which is part of the transition to using a chain listener.

services/rfq/relayer/service/relayer.go (1)

275-275: Updated initialization of cctpRelayer to reflect changes in NewCCTPRelayer function signature.

The initialization of cctpRelayer has been updated to call NewCCTPRelayer without the previously required scribe-related parameter. This change is necessary to align with the updated function signature and is part of the transition to using a chain listener.

services/cctp-relayer/relayer/synapse.go (1)

44-44: Updated NewSynapseCCTPHandler to use GetCCTPAddress.

The NewSynapseCCTPHandler function has been updated to use GetCCTPAddress instead of GetSynapseCCTPAddress. This change is consistent with the updated configuration and is necessary for the transition to using a chain listener.

services/cctp-relayer/relayer/relayer.go (3)

29-35: Introduced new enum cctpContractType to differentiate between contract types.

This change supports the new architecture by allowing differentiation between various contract types, which is crucial for handling different blockchain events.


292-300: Updated Run method to handle contract events using the new chain listeners.

This change aligns with the new architecture by utilizing the chain listeners for handling blockchain events, which is a core functionality of the CCTPRelayer.


340-348: Updated handleLog method to process logs based on the new chain listener logic.

The method now correctly integrates with the new chain listener system, ensuring that logs are processed appropriately based on the new architecture.

Comment on lines 69 to 103
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
opts := makeOptions(rawOpts)

conn, err := grpc.DialContext(ctx, fmt.Sprintf("%s:%d", scribeClient.URL, scribeClient.Port),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor(otelgrpc.WithTracerProvider(handler.GetTracerProvider()))),
grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor(otelgrpc.WithTracerProvider(handler.GetTracerProvider()))),
)
if err != nil {
return nil, fmt.Errorf("could not dial grpc: %w", err)
}

grpcClient := pbscribe.NewScribeServiceClient(conn)
omniClient := omniClient.NewOmnirpcClient(cfg.BaseOmnirpcURL, handler, omniClient.WithCaptureReqRes())

// Ensure that gRPC is up and running.
healthCheck, err := grpcClient.Check(ctx, &pbscribe.HealthCheckRequest{}, grpc.WaitForReady(true))
if err != nil {
return nil, fmt.Errorf("could not check: %w", err)
}
if healthCheck.Status != pbscribe.HealthCheckResponse_SERVING {
return nil, fmt.Errorf("not serving: %s", healthCheck.Status)
}

// Build chainListeners.
chainListeners := make(map[uint32]*chainListener)
for _, chain := range cfg.Chains {
chainListeners[chain.ChainID] = &chainListener{
chainID: chain.ChainID,
closeConnection: make(chan bool, 1),
stopListenChan: make(chan bool, 1),
// processChan is buffered to prevent blocking.
// setup chain listeners
chainListeners := make(map[uint32][]listener.ContractListener)
for _, chainCfg := range cfg.Chains {
chainID := chainCfg.ChainID
chainClient, err := omniClient.GetChainClient(ctx, int(chainID))
if err != nil {
return nil, fmt.Errorf("could not get chain client: %w", err)
}
chainListener, err := listener.NewChainListener(chainClient, store, chainCfg.GetCCTPAddress(), chainCfg.CCTPStartBlock, handler)
if err != nil {
return nil, fmt.Errorf("could not get chain listener: %w", err)
}
cctpType, err := cfg.GetCCTPType()
if err != nil {
return nil, fmt.Errorf("could not get cctp type: %w", err)
}
listeners := []listener.ContractListener{chainListener}
if cctpType == relayTypes.CircleMessageType {
// fetch the MessageTransmitter address from TokenMessenger contract and create a new listener
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetCCTPAddress(), chainClient)
if err != nil {
return nil, fmt.Errorf("could not get message transmitter address: %w", err)
}
transmitterListener, err := listener.NewChainListener(chainClient, store, transmitterAddr, chainCfg.CCTPStartBlock, handler)
if err != nil {
return nil, fmt.Errorf("could not get chain listener: %w", err)
}
listeners = append(listeners, transmitterListener)
}
chainListeners[chainID] = listeners
Copy link
Contributor

Choose a reason for hiding this comment

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

Updated NewCCTPRelayer function to support chain listener setup.

- func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
+ func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...Option) (*CCTPRelayer, error) {

The function signature has been updated to remove scribe-related parameters and to initialize chain listeners. However, there is a typo in the type of the variadic parameter rawOpts. It should be Option instead of OptionsArgsOption.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
opts := makeOptions(rawOpts)
conn, err := grpc.DialContext(ctx, fmt.Sprintf("%s:%d", scribeClient.URL, scribeClient.Port),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor(otelgrpc.WithTracerProvider(handler.GetTracerProvider()))),
grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor(otelgrpc.WithTracerProvider(handler.GetTracerProvider()))),
)
if err != nil {
return nil, fmt.Errorf("could not dial grpc: %w", err)
}
grpcClient := pbscribe.NewScribeServiceClient(conn)
omniClient := omniClient.NewOmnirpcClient(cfg.BaseOmnirpcURL, handler, omniClient.WithCaptureReqRes())
// Ensure that gRPC is up and running.
healthCheck, err := grpcClient.Check(ctx, &pbscribe.HealthCheckRequest{}, grpc.WaitForReady(true))
if err != nil {
return nil, fmt.Errorf("could not check: %w", err)
}
if healthCheck.Status != pbscribe.HealthCheckResponse_SERVING {
return nil, fmt.Errorf("not serving: %s", healthCheck.Status)
}
// Build chainListeners.
chainListeners := make(map[uint32]*chainListener)
for _, chain := range cfg.Chains {
chainListeners[chain.ChainID] = &chainListener{
chainID: chain.ChainID,
closeConnection: make(chan bool, 1),
stopListenChan: make(chan bool, 1),
// processChan is buffered to prevent blocking.
// setup chain listeners
chainListeners := make(map[uint32][]listener.ContractListener)
for _, chainCfg := range cfg.Chains {
chainID := chainCfg.ChainID
chainClient, err := omniClient.GetChainClient(ctx, int(chainID))
if err != nil {
return nil, fmt.Errorf("could not get chain client: %w", err)
}
chainListener, err := listener.NewChainListener(chainClient, store, chainCfg.GetCCTPAddress(), chainCfg.CCTPStartBlock, handler)
if err != nil {
return nil, fmt.Errorf("could not get chain listener: %w", err)
}
cctpType, err := cfg.GetCCTPType()
if err != nil {
return nil, fmt.Errorf("could not get cctp type: %w", err)
}
listeners := []listener.ContractListener{chainListener}
if cctpType == relayTypes.CircleMessageType {
// fetch the MessageTransmitter address from TokenMessenger contract and create a new listener
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetCCTPAddress(), chainClient)
if err != nil {
return nil, fmt.Errorf("could not get message transmitter address: %w", err)
}
transmitterListener, err := listener.NewChainListener(chainClient, store, transmitterAddr, chainCfg.CCTPStartBlock, handler)
if err != nil {
return nil, fmt.Errorf("could not get chain listener: %w", err)
}
listeners = append(listeners, transmitterListener)
}
chainListeners[chainID] = listeners
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...Option) (*CCTPRelayer, error) {
opts := makeOptions(rawOpts)
omniClient := omniClient.NewOmnirpcClient(cfg.BaseOmnirpcURL, handler, omniClient.WithCaptureReqRes())
// setup chain listeners
chainListeners := make(map[uint32][]listener.ContractListener)
for _, chainCfg := range cfg.Chains {
chainID := chainCfg.ChainID
chainClient, err := omniClient.GetChainClient(ctx, int(chainID))
if err != nil {
return nil, fmt.Errorf("could not get chain client: %w", err)
}
chainListener, err := listener.NewChainListener(chainClient, store, chainCfg.GetCCTPAddress(), chainCfg.CCTPStartBlock, handler)
if err != nil {
return nil, fmt.Errorf("could not get chain listener: %w", err)
}
cctpType, err := cfg.GetCCTPType()
if err != nil {
return nil, fmt.Errorf("could not get cctp type: %w", err)
}
listeners := []listener.ContractListener{chainListener}
if cctpType == relayTypes.CircleMessageType {
// fetch the MessageTransmitter address from TokenMessenger contract and create a new listener
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetCCTPAddress(), chainClient)
if err != nil {
return nil, fmt.Errorf("could not get message transmitter address: %w", err)
}
transmitterListener, err := listener.NewChainListener(chainClient, store, transmitterAddr, chainCfg.CCTPStartBlock, handler)
if err != nil {
return nil, fmt.Errorf("could not get chain listener: %w", err)
}
listeners = append(listeners, transmitterListener)
}
chainListeners[chainID] = listeners

@@ -43,7 +43,7 @@ func NewCircleCCTPHandler(ctx context.Context, cfg config.Config, db db2.CCTPRel
if err != nil {
return nil, fmt.Errorf("could not get client: %w", err)
}
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chain.GetTokenMessengerAddress(), cl)
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chain.GetCCTPAddress(), cl)
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider handling errors for each iteration separately in the loop setting up boundMessageTransmitters.

-		boundMessageTransmitters[chain.ChainID], err = messagetransmitter.NewMessageTransmitter(transmitterAddr, cl)
-		if err != nil {
-			return nil, fmt.Errorf("could not build bound contract: %w", err)
-		}
+		boundMessageTransmitter, err := messagetransmitter.NewMessageTransmitter(transmitterAddr, cl)
+		if err != nil {
+			return nil, fmt.Errorf("could not build bound contract for chain ID %d: %w", chain.ChainID, err)
+		}
+		boundMessageTransmitters[chain.ChainID] = boundMessageTransmitter

This change ensures that the error message includes the specific chain ID that caused the failure, improving the debuggability of the system.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chain.GetCCTPAddress(), cl)
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chain.GetCCTPAddress(), cl)
boundMessageTransmitter, err := messagetransmitter.NewMessageTransmitter(transmitterAddr, cl)
if err != nil {
return nil, fmt.Errorf("could not build bound contract for chain ID %d: %w", chain.ChainID, err)
}
boundMessageTransmitters[chain.ChainID] = boundMessageTransmitter

@@ -333,7 +333,7 @@
if err != nil {
return nil, fmt.Errorf("could not get chain config: %w", err)
}
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetTokenMessengerAddress(), ethClient)
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetCCTPAddress(), ethClient)
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the error message to correctly reflect the operation being performed.

-		return nil, fmt.Errorf("could not create depositForBurn event parser: %w", err)
+		return nil, fmt.Errorf("could not create message transmitter event parser: %w", err)

This change corrects the error message to accurately describe the operation, enhancing code clarity and maintainability.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetCCTPAddress(), ethClient)
transmitterAddr, err := GetMessageTransmitterAddress(ctx, chainCfg.GetCCTPAddress(), ethClient)

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

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between d2bb44d and e0e85d9.
Files selected for processing (2)
  • services/cctp-relayer/relayer/relayer.go (6 hunks)
  • services/cctp-relayer/relayer/synapse_test.go (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • services/cctp-relayer/relayer/synapse_test.go
Additional Context Used
GitHub Check Runs (1)
Lint (services/cctp-relayer) failure (5)

services/cctp-relayer/relayer/relayer.go: [failure] 292-292:
unnecessary conversion (unconvert)


services/cctp-relayer/relayer/relayer.go: [failure] 291-291:
error returned from interface method should be wrapped: sig: func (github.com/synapsecns/sanguine/ethergo/listener.ContractListener).Listen(ctx context.Context, handler github.com/synapsecns/sanguine/ethergo/listener.HandleLog) error (wrapcheck)

Additional comments not posted (1)
services/cctp-relayer/relayer/relayer.go (1)

285-293: The changes in the Run function align well with the new chain listener architecture.

@@ -75,38 +59,41 @@

// NewCCTPRelayer creates a new CCTPRelayer.
// nolint: cyclop
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, scribeClient client.ScribeClient, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the typo in the function signature.

- func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
+ func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...Option) (*CCTPRelayer, error) {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...Option) (*CCTPRelayer, error) {

return fmt.Errorf("could not get message transmitter address: %w", err)
}
return c.streamLogs(ctx, c.grpcClient, c.grpcConn, chain.ChainID, transmitterAddr.Hex(), nil)
return listener.Listen(ctx, func(ctx context.Context, log types.Log) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrap the error returned from the Listen method to provide more context.

- return listener.Listen(ctx, func(ctx context.Context, log types.Log) error {
+ return fmt.Errorf("listener error: %w", listener.Listen(ctx, func(ctx context.Context, log types.Log) error {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
return listener.Listen(ctx, func(ctx context.Context, log types.Log) error {
return fmt.Errorf("listener error: %w", listener.Listen(ctx, func(ctx context.Context, log types.Log) error {

}
return c.streamLogs(ctx, c.grpcClient, c.grpcConn, chain.ChainID, transmitterAddr.Hex(), nil)
return listener.Listen(ctx, func(ctx context.Context, log types.Log) error {
return c.handleLog(ctx, log, uint32(chainID))
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unnecessary type conversion.

- return c.handleLog(ctx, log, uint32(chainID))
+ return c.handleLog(ctx, log, chainID)

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
return c.handleLog(ctx, log, uint32(chainID))
return c.handleLog(ctx, log, chainID)

Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 46.42857% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 37.37656%. Comparing base (6a7c6a5) to head (d72be31).
Report is 4 commits behind head on master.

Files Patch % Lines
services/cctp-relayer/relayer/relayer.go 54.34783% 17 Missing and 4 partials ⚠️
services/cctp-relayer/config/chain.go 0.00000% 5 Missing and 1 partial ⚠️
services/cctp-relayer/relayer/circle.go 0.00000% 2 Missing ⚠️
services/rfq/relayer/service/relayer.go 0.00000% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #2592         +/-   ##
===================================================
+ Coverage   36.49294%   37.37656%   +0.88362%     
===================================================
  Files            131         144         +13     
  Lines          10265       11443       +1178     
  Branches          83          83                 
===================================================
+ Hits            3746        4277        +531     
- Misses          6016        6599        +583     
- Partials         503         567         +64     
Flag Coverage Δ
cctp-relayer 45.03817% <47.27273%> (?)
rfq 30.74101% <0.00000%> (+0.00750%) ⬆️
stiprelayer 3.33333% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added size/m and removed size/s labels May 7, 2024
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: 0

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between e0e85d9 and d72be31.
Files selected for processing (3)
  • services/cctp-relayer/cmd/commands.go (2 hunks)
  • services/cctp-relayer/config/config_test.go (1 hunks)
  • services/cctp-relayer/relayer/relayer.go (6 hunks)
Additional comments not posted (5)
services/cctp-relayer/config/config_test.go (1)

21-26: Changes correctly reflect the new CCTPAddress configuration for chain listeners.

services/cctp-relayer/cmd/commands.go (1)

83-83: Correctly initializes the CCTPRelayer with the new chain listener system, removing deprecated scribe components.

services/cctp-relayer/relayer/relayer.go (3)

62-96: Successfully updated to support the chain listener setup, removing scribe-related parameters and initializing chain listeners correctly.


285-297: Correctly implements the event listening mechanism using the new chain listeners, aligning with the architectural shift.


337-345: Effectively handles logs using the new chain listener system, ensuring proper processing of events.

@dwasse dwasse merged commit 9367858 into master May 8, 2024
50 checks passed
@dwasse dwasse deleted the feat/listener-cctp branch May 8, 2024 16:52
Defi-Moses added a commit that referenced this pull request May 31, 2024
* Update bl

* chore: lint bl

* RFQ: support multiple rebalance methods (#2556)

* WIP: refactor GetRebalanceMethod()

* Feat: implement more robust rebalance method handling

* Feat: move method validation to getRebalance() func

* Feat: manual impl for String() on RebalanceMethod

* Fix: tests

* Feat: add rebalance method clauses to TestGetRebalance

* Feat: use rebalance.Method to choose executor

* Cleanup: lint

* [goreleaser]

* [goreleaser]

* RFQ: drop requests for unsupported chains (#2563)

* Feat: check for unsupported chain in inventory manager

* Cleanup: lint

* [goreleaser]

* Fix: check for nil base fee

* [goreleaser]

* Feat: fee pricer gets gas price from SuggestGasPrice()

* [goreleaser]

* Fix: tests

* lint, add err around clientSuggestGasPrice

* Fix: tests

---------

Co-authored-by: aureliusbtc <[email protected]>

* RFQ: add decimals cache (#2502)

* Feat: add decimalsCache, refactor decimal fetching

* Cleanup: comments

* Fix: build

* Fix: use concurrent map

* CCTP: use chain listener instead of scribe (#2592)

* WIP: replace scribe with chain listener

* Fix: build

* Fix: tests

* Fix: rfq build

* Cleanup: remove unused enum

* Cleanup: revert test change

* Cleanup: comments

* Cleanup: lint

* Fix: build

* Fix: test

* docs(contracts-communication): move natspec from interfaces (#2595)

* docs: SynapseExecutionServiceV1

* docs: SynapseGasOracleV1

* docs: Interchain app templates

* docs: InterchainClientV1

* docs: InterchainDB

* docs: interchain modules

* docs: MessageBus

* style: make interfaces easier to read

* chore: fix linter warnings

* Publish

 - [email protected]

* fix(sdk-rouder): remove cache hydration (#2597)

* fix: disable hydration

* chore: don't log quotes in the integration test

* Publish

 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]

* update bl

* Revert "update bl"

This reverts commit ab56c7a.

* update bl

* feat(webhook): add webhook  (#2538)

* add models and endpoint, lacking logic

* just stuff

* just stuff

* made general db interface

* cleanup

* trying to test

* trying to test

* trying ot fix test

* remove interface{} from gorm models, start tests, rework db interface

* add signature

* secret

* look away for now

* finish db test

* finish tests

* add auth

* remove debugging log

* comments and nits

* lint

* appsecret and appid

* resolve comments

* swagger, lint

* feat(synapse-interface): maintenance aggregator using PAUSED_CHAINS (#2345)

* Aggregate maintenance events for banners and warning message

* Dynamically render countdown progress bars based on PAUSED_CHAIN

* Dynamically rendering banners

* Slightly organize

* ChainPause type applied to enforce maintenance event structure, pass in component messages as a prop

* Working with multiple events

* Add dev comments to MaintenanceBanner; refactor

* Add dev comments for MaintenanceWarningMessage; refactor

* Dev comments

* Organize components

* isChainIncluded util

* Clean

* Add ability to specify paused chains by from/to side (#2346)

* Allow indefinite maintenance components by setting end date to null

* Banners to show indefinitely as well

* Add props to disable banner / warning / countdown

* Implement disable warning

* Implement disable countdown, bridge pause still working

* Example

* Clean

* Update naming on Bridge page

* Update comment for isChainIncluded

* Create maintenance events reading from pausedChains.json

* Remove custom margins to allow Bridge parent gap styling to handle spacing

* Require all props to be defined

* Add Swap to maintenance warning messages

* Update useMaintenanceCountdownProgresses to allow distinction between Swap and Bridge pauses

* Move MaintenanceBanners into LandingPageWrapper so banner appears on all pages

* Add ability to specify whether to pause bridge / swap with maintenance event in json

* Clean

* Unused code

* Update dev comments

* Update pause start/end time name for legibility

* Create type guard to check for paused bridge module

* usePausedBridgeModules

* usePausedBridgeModules to filter out SDK quotes

* Initialize paused routes to handle specific route pauses instead of grouping with chain pauses

* Update paused route structure

* Filter for valid quotes based on paused routes

* Create a Set with paused bridge module names to improve time complexity

* Allow for all bridge modules to be paused with ALL

* Add ability to pause bridge modules for all chains, if chainId is left undefined

* Move json files to /v1/ version control folder

* Compare quotes against paused bridge modules more cleanly

* Paused bridge modules json control working

* Fix pausedChains json

* Create examples folder for pause jsons

* Retrigger build

* Fix banner flashing after clearing

* Add padding to banner Close button

* Update text sizing on progress bar

* Update prop naming to prevent confusion on start/end

* Clear chain pauses to ready PR

* Change json file naming to be more readable

* Use inputWarningMessage prop name to indicate warning placement

* Pause Doge activity using Maintenance, to replace prior Chain pause mechanism

* Doge chain paused chain prop values

* Remove paused from/to chainId constants

* Publish

 - @synapsecns/[email protected]

* Exempt gh pages (#2541)

Co-authored-by: Trajan0x <[email protected]>

* Deploy: `FastBridge` to Scroll (#2525)

* chore: add Base to `.env.example`

* chore: add Scroll config

* chore: bump devops dependency

* chore: yarn

* feat: deploy `FastBridge` on scroll

* Publish

 - [email protected]

* fix: update `forge-std` to 1.8.1, remove `ds-test`, use `solhint` for linting (#2545)

* chore: forge-std  v1.8.1, remove ds-test dep

* chore: remove ds-test from remappings

* refactor: state mutability

* chore: add solhint

* chore: yarn

* fix: unused imports

* fix: max line length

* Publish

 - [email protected]
 - [email protected]
 - @synapsecns/[email protected]

* chore: remove submodules from `contracts-rfq` (#2547)

* build: install OZ as npm module

* chore: update remappings

* refactor: fix compiler warnings in test contract

* chore: remove forge-std submodule

* chore: remove `openzeppelin-contracts` submodule

* fix: restore padding in `.gitmodules`

* Publish

 - [email protected]

* gogenerate

* Revert "gogenerate"

This reverts commit b40e602.

* im dumb

* generate

* tidy

* update swagger doc

* [goreleaser]

* [goreleaser]

---------

Co-authored-by: shampoobera <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
Co-authored-by: trajan0x <[email protected]>
Co-authored-by: Trajan0x <[email protected]>
Co-authored-by: χ² <[email protected]>
Co-authored-by: ChiTimesChi <[email protected]>

* rfq api cache (#2562)

* cache api result [goreleaser]

* clean up

* clean up 2

---------

Co-authored-by: Trajan0x <[email protected]>

* add trace to sync (#2601)

* trace more

* cleanup

* allow use of mustache templates

---------

Co-authored-by: Trajan0x <[email protected]>

* remove iconfig file (#2602)

Co-authored-by: Trajan0x <[email protected]>

* feat(contracts-communication): remove batching (#2599)

* feat: scaffold InterchainDB interface changes

* feat: scaffold Module interface changes

* feat: update InterchainEntry

* test: update DB tests

* test: update Client tests

* refactor: ModuleBatch -> ModuleEntry

* feat: remove `entryIndex` from InterchainTx

* feat: scaffold Client interface changes

* feat: start updating the Module

* test: update integration tests

* cleanup: remove BatchingV1

* feat: update InterchainDB

* cleanup: remove entryIndex from apps

* cleanup: remove entryIndex from Client events

* feat: update ClientV1

* cleanup: remove entryIndex from DB

* test: update SynapseModule tests

* cleanup: ClientV1

* cleanup: DB

* cleanup: Module

* cleanup: remove batch lib

* docs: smol fixes

* Publish

 - [email protected]

* optional screener for cctp relayer (#2600)

Co-authored-by: Trajan0x <[email protected]>

* Sin/testnet 9 (#2567)

* fix: remove `ExecutionFees` references

* New set of deployments

* Adjust config files to the latest changes

* adding spectral coingecko ids for pricing (#2596)

* feat(widget): suppress console errors (#2594)

* Allow widget to suppress Synapse console errors

* feat(sdk-router): router cache error log (#2591)

* Improve RouterCache error logging

* Add common error string to target at Consumer level

* Add common string to all console errors

* feat(widget): error logs (#2593)

* Add common base string to allow hiding Widget related errors outputted in Consumer app

* Convert logs into errors if firing in catch statement

* Update README

* Optional prop

* Switch catch log to error

* Re-trigger action

* Remove line

* Publish

 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]
 - @synapsecns/[email protected]

* fix(contracts-communication): interchain module ignore nonces (#2604)

* feat: remove dbNonce from Module interface

* cleanup: update Module interface references

* refactor: lint

* Publish

 - [email protected]

* feat(synapse-interface): bridge gas handler (#2437)

* Initial gas data slice state

* Async thunk fetchGasData

* Add gas data reducers

* useFetchGasDataOnInterval added to Bridge Listener

* Explicitly declare fetching gas data in gwei

* Calculate max bridgeable amount

* On max balance factoring in gas cost

* Add comment

* Differentiate max balance vs max bridgeable balance

* Add error toaster for when max balance less than bridge fee

* refactor; calculateGasFeeInGwei()

* Move to util

* Fix lint error

* Fetch gas when fromChainId on bridge card changes

* Use exact token balance when calculate max bridgeable amount

* Conditions for showing max button

* showMaxOption to determine display

* Disable max button if gas fees more than gas balance

* Clean jsx

* AvailableBalance component to track subscript detail in bridge origin input

* Return raw and formatted gas cost in calculateGasCost

* Update comments

* Fix imports based on name cange

* Use parsed

* calculateMaxBridgeableGas

* Clean

* refactor: clean InputContainer

* Replace onMaxBalance() with onMaxBridgeableBalance()`

* Allow undefined object when destructuring

* Display when token balance is trace balance

* Typing

* showGasReserved

* Update avail balance text and color when gas cost greater than balance

* Detect when input value is less than required estimated gas

* onAvailableBalance applied

* Make opacity greater when Max button disabled

* Fix calculations for when gas input is enough to cover gas

* Clean

* Add hover tooltip for warning gas states

* Use tooltip to describe gas status

* Update tooltip text

* Add buffer to calculate gas cost, use 1.5x

* AvailableBalance component to replace label in AmountInput

* Display trace balances in AvailableBalance

* Fix naming

* Add HoverTooltip to Available Balance

* Add conditions for displaying gas error based on input

* Use full parsed balance when making comparisons for gas checks

* Show gas reserved in Available Balance

* hasOnlyZeroes to return true if string contains only zeroes and periods

* Display estimated gas cost in tool tip

* Remove Available Balance elements from AmountInput, migrated to AvailableBalance

* Display trace amount for input when displaying how much is reserved for gas

* Fetch estimated gas limit based on real bridge quote using max gas balance

* Fetching accurate gasLimit

* Fix Trace balance

* Set gasLimit to 0 if not valid bridge data avail

* ...

* Fix when gas covered msg appears

* Available Balance

* Clean available balance flow

* useGasEstimator hook to encapsulate logic to clean InputContainer

* Fix prop issue

* Remove duplicate HoverTooltip

* Move HoverTooltip to shared component folder

* Update gas fetch for wagmi v2, up limit to 1.7

* Estimated gas bridge quote fetched on load

* Update var naming

* Improve Available Balance flow

* Display estimated bridgeable balance on hover

* Show gas estimate when estimated gas cost available

* Do not show negative bridgable balance

* Separate out bridge gas limit calculations into smaller functions

* Wrap async functions with try catch

* Implement updated gas estimation flow

* Move gas estimate logic to useGasEstimator

* Move async sdk fetch functions to useGasEstimator file

* Remove unused vars

* Shorten est gas cost

* Improve code legibility in AvailableBalance

* Assign conditions to vars to reduce clutter

* Reset gas price data when fromChainId changes

* Reset fetched gas limit when fromChainId changes

* Clean

* Fix old import

* Fix max button placement

* Add loading state for useGasEstimator

* Remove available balance states for gas est

* Remove unused props

* Clean gas token detection in PortfolioTokenAsset

* Simplify onMaxBalance()

* Clean constants in InputContainer

* Clean token detail destructuring

* Include gas estimate when updating input from Portfolio token selection

* Fire error toaster if gas fees exceed balance

* Render error toaster when firing onMaxBalance callback instead of a side effect

* Clean useGasEstimator

* Ensure available balance does not show if wallet not connected, set default value if balances not loaded

* Replicate onMax behavior in Portfolio

* Use fetched gas

* Improve error handling in gas estimator

* ...

* Remove tooltip on AvailableBalance

* Remove balance prefill from Portfolio Token selection

* Update available balance in input based on max bridgeable gas toke

* Destructure estimateGasLimit callback from useGasEstimator to retrigger fetching gas estimate

* Refetch gas ata in estimateGasLimit callback

* Display total vs bridgeable balance on hover in Portfolio gas token when gas data available

* Update balance shown on hover

* Clean

* Simplify useFetchGasDataOnInterval

* Prevent unnecessary fetches, fix chain update old gas issue

* Fetch estimated bridgeable max gas amount onClick token max input, fill input once amount fetched

* Clean

* onMaxBalance will use default balanceif fetched bridgeable balance estimate returns null

* Show dust gas amounts on hover in Portfolio

* Clean

* Available balance including gas estimates moved to within Input to synchronize data

* Move gasLimit to global store to share data between Bridge components

* Display max bridgeable balance on hover in Portfolio, add onMaxBalance onClick Portfolio asset

* Portfolio and Input available balance onClick behave the same

* Fetch gas prices to provide most accurate gas cost

* Remove hover on AvailableBalance

* Fix Token Selector width

* Remove onClick Portfolio Token Balance, allow Token selection from Portfolio only without Balance input update

* Cursor default on Portfolio Token Balance

* Show available/max buttons when bridge valid selections

* Swap input to have available balance

* Clean

* Basic MaxButton onClick and hidden when loading gas data

* Show MaxButton when input is not full balance or bridgeable balance

* Implement Max button and placement in Bridge/Swap

* Hide MaxButton until connected

* Hide MaxButton conditions

* Show Max when all input selections are made

* Remove click states for AvailableBalance on Bridge/Swap

* Style Input / Max

* Max mobile size

* Fe/format amount (#2598)

* formatAmount util function, use rounded shortened values in Bridge/Swap Input

* Update Bridge/Swap page with parsed / formatted balances

* Clean imports

* Clean imports

* Swap Max spacing

* Improve html element composition

* Prevent layout shift in Swap UI

* Publish

 - @synapsecns/[email protected]

* add "and" (#2608)

* fix(contracts-communication): default settings for Guard service (#2605)

* test: should ignore optimistic period w/o guard

* test: app should have empty config be default

* test: should allow setting zero optimistic period

* fix: ignore optimistic period without a guard

* fix: use GUARD_DISABLED flag by default

* fix: don't revert on zero optimistic period

* test: different optimistic periods for integration tests

* fix: use default guard for PingPongApp

* refactor: fix linter warnings

* Publish

 - [email protected]
 - @synapsecns/[email protected]

* Fix: put blocking call to Start() in new goroutine (#2614)

* feat(contracts-communication): default values for modules/required respones (#2612)

* feat: scaffold defaultModule in Client

* test: expected behavior for setting default module

* feat: setting default Module in Client

* refactor: Client views test

* test: appConfig with zero modules/responses

* feat: module config defaults

* cleanup: remove `ZeroRequiredResponses` error

* refactor: prep for 0 and 1 module tests

* test: ClientV1 + app with 1 module

* test: ClientV1 + app with 0 modules

* Publish

 - [email protected]

* RFQ: rebalance edge cases & refactoring (#2613)

* Fix: filter rebalance origin / dest on rebalance method

* Cleanup: move getRebalance() into rebalance.go

* Cleanup: add helpers to getRebalance()

* Cleanup: comments

* Feat: remove Rebalance() call upon deposit claimed

* Feat: getRebalance() takes in dest chain id

* Cleanup: comments

* Feat: extra check that we don't exceed origin maintenance

* Feat: add new test case for mismatched methods but existing rebalance

* Feat: break down TestGetRebalance into sub tests

* Cleanup: lint

* [goreleaser]

* [goreleaser]

* refactor: move opinionated stuff into SynapseModule (#2617)

* Publish

 - [email protected]

* Document Modules (#2611)



Co-authored-by: Trajan0x <[email protected]>

* cleanup (#2618)

Co-authored-by: Trajan0x <[email protected]>

* fix tests (#2620)

Co-authored-by: Trajan0x <[email protected]>

* RFQ API: replace `otelresty` with `otelhhtp` package (#2606)

* Feat: replace otelresty usage with otelhttp pkg

* [goreleaser]

* make coverage aggregator public (#2621)

Co-authored-by: Trajan0x <[email protected]>

* Publish

 - @synapsecns/[email protected]

* publish aggregator fix (#2622)

Co-authored-by: Trajan0x <[email protected]>

* Publish

 - @synapsecns/[email protected]

* fix(solidity-devops): update forge-std to 1.8.2 (#2619)

* build: update `forge-std` to 1.8.2

* chore: yarn

* Publish

 - [email protected]
 - [email protected]
 - @synapsecns/[email protected]

* feat(docs): auto deploy vercel to prod (only vercel) (#2627)

Co-authored-by: Trajan0x <[email protected]>

* fix(ci): fixes bug in #2627, deploys go to prod (#2628)

Co-authored-by: Trajan0x <[email protected]>

* docs(contributing) add a guide on adding js packages (#2629)

* docs(contributing) add a guide on adding js packages

* Update CONTRIBUTING.md

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

---------

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

* revert coderabbit fix (#2630)

Co-authored-by: Trajan0x <[email protected]>

* prod release fix (#2631)

Co-authored-by: Trajan0x <[email protected]>

* Publish

 - @synapsecns/[email protected]

* add grafana dashboard and fix broken link (#2634)

Co-authored-by: Trajan0x <[email protected]>

* add scroll (#2635)

Co-authored-by: Trajan0x <[email protected]>

* Submitter: bump MaxResultsPerChain (#2633)

* Feat: bump MaxResultsPerChain

* [goreleaser]

* fast bridge regen (#2636)

Co-authored-by: Trajan0x <[email protected]>

* omnirpc doc fixes (#2637)

* swagger

* embed swagger ui

* generic lint fixer

---------

Co-authored-by: Trajan0x <[email protected]>

* fix typo (#2638)

Co-authored-by: Trajan0x <[email protected]>

* Update bl

* Add SPECTRAL token support (#2640)

* Publish

 - @synapsecns/[email protected]
 - @synapsecns/[email protected]

* feat(synapse-interface): Adds Scroll via RFQ (#2526)

* Adds Scroll via RFQ

* Adds NewTag

* Adds RFQ logic into the generateMaps script

* Adds announcement banner

* Linting

* Adjusts order

* API call for quotes

* Updates bridgeMap for live Scroll quotes

* For reusing NewTag

* Adjust dates

* Publish

 - @synapsecns/[email protected]

* feat(widget): maintenance (#2616)

* Fetch pause data and store JSON object in client browser

* Refetch only if last fetch was more than 24 hours ago

* Read chain + module pause from local storage

* Maintenance components rendering based off of fetched pause data

* Pause Bridge button based on Maintenance status

* Filter quotes based on paused modules

* Use user defined styling or defaults

* Style Progress Bar

* Refactor getSynapsePauseData

* Clean

* Fix bridge quote filter

* Adjust text size for maintenance

* Add comments + clean

* Update comment

* Refresh data every hour

* Clean

* Add key to warning messages

* Fix render issues, start move event countdown component directly to Widget to resolve hooks issue

* Resolve hooks render issue with localized component

* Progress bar renders when not isabled

* Clean and simplify Maintenance components

* getMaintenanceData

* Organize back into useMaintenance hook

* Clean / organize

* Use prod urls

* Organizational updates

* Fetch pause data every render, set fetching status flag

* Rm timestamp key

---------

Co-authored-by: abtestingalpha <[email protected]>

* Publish

 - @synapsecns/[email protected]

* RFQ API: add GET /ack endpoint (#2643)

* WIP: add relay ack cache and GetRelayAck endpoint

* Feat: register AckRoute

* Feat: add ackMux

* Feat: add GetRelayAck test

* Feat: add GetRelayAck to UnauthenticatedClient

* Feat: relayer fetches ack before updating to CommittedPending

* [goreleaser]

* Feat: move GET /ack to PUT /ack

* WIP: generalize AuthMiddleware()

* Fix: working refactor for auth

* Feat: add PutAckRequest and parse in auth middleware

* Feat: impl PUT /ack request with json req body

* Feat: bump default timeout from 5 to 10

* Feat: add swagger comments

* Cleanup: pass API client into quoter

* Feat: return RelayerAddress in PutRelayAckResponse

* Cleanup: add clarifying comment

* [goreleaser]

* Cleanup: lint

* [goreleaser]

* Cleanup: add tracing

* [goreleaser]

* Config: bump relay ack timeout to 30 seconds

* [goreleaser]

* Feat: lower submitter retry interval (#2645)

* update bl

* Adjusts banner date (#2647)

* Publish

 - @synapsecns/[email protected]

* Add SPEC token pricing to the manual cache (#2646)

* adding spectral coingecko ids for pricing

* adding spec token to cache

* Update bl

* fix(screener): fix screener http 502 (#2650)


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

* update bl

* update bl

---------

Co-authored-by: aureliusbtc <[email protected]>
Co-authored-by: ChiTimesChi <[email protected]>
Co-authored-by: dwasse <[email protected]>
Co-authored-by: ChiTimesChi <[email protected]>
Co-authored-by: Trajan0x <[email protected]>
Co-authored-by: vro <[email protected]>
Co-authored-by: shampoobera <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
Co-authored-by: trajan0x <[email protected]>
Co-authored-by: Moses <[email protected]>
Co-authored-by: Simon <[email protected]>
Co-authored-by: aureliusbtc <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: abtestingalpha <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code needs-go-generate-services/rfq size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants