Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class Flow chain support to the relayer by introducing a Flow chain provider/client, Flow remote-signing wallet integration, FKMS protobuf RPCs for Flow signing, and database/config updates needed to track Flow transactions.
Changes:
- Introduce
relayer/chains/flow(provider, client, config, Cadence script) plus unit tests and mocks. - Add Flow wallet adapter + remote signer wiring and register Flow wallet creation in the filesystem store.
- Extend DB schema/model to include
packet_timestamp, add Flow chain type, and update config parsing/tests + FKMS proto definitions.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| relayer/wallet/flow/wallet.go | Flow wallet constructor using BaseWallet + Flow adapter |
| relayer/wallet/flow/types.go | Defines JSON payload used for remote Flow signing |
| relayer/wallet/flow/remote_signer.go | Implements FKMS-backed signer calling SignFlow RPC |
| relayer/wallet/flow/adapter.go | WalletAdapter implementation for Flow (remote-only) |
| relayer/store/filesystem.go | Registers Flow wallet creation by chain type |
| relayer/db/types.go | Adds PacketTimestamp to Transaction + constructor param |
| relayer/db/sql.go | Renames DB handle field and adds packet_timestamp upsert + new “latest success sequence” query |
| relayer/db/migrations/postgres/00005_add_packet_timestamp.sql | Postgres migration adding packet_timestamp column |
| relayer/db/migrations/postgres/00004_add_flow_chain_type.sql | Postgres migration adding flow to chain_type enum |
| relayer/db/db.go | Database interface now returns latest successful sequence |
| relayer/config/config_test.go | Adds Flow config parsing/loading tests |
| relayer/config/config.go | Adds Flow chain config decoding support |
| relayer/chains/xrpl/provider.go | Persists packet_timestamp when creating DB transactions |
| relayer/chains/types/chain_type.go | Adds ChainTypeFlow and string mapping |
| relayer/chains/flow/script.go | Adds Cadence transaction template used for relaying |
| relayer/chains/flow/provider_test.go | Adds Flow provider unit tests |
| relayer/chains/flow/provider.go | Implements FlowChainProvider relay/query logic + DB persistence + metrics |
| relayer/chains/flow/config.go | Flow chain provider configuration + factory |
| relayer/chains/flow/client.go | Flow HTTP client pool + blockchain interactions |
| relayer/chains/evm/provider.go | Persists packet_timestamp when creating DB transactions |
| relayer/alert/alert.go | Adds alert topic for Flow script execution failure |
| proto/fkms/v1/signer_grpc.pb.go | Adds gRPC stubs for SignFlow |
| proto/fkms/v1/signer.proto | Adds SignFlow RPC, Flow payload types, and FLOW enum |
| proto/fkms/v1/signer.pb.go | Generated protobuf updates for Flow support |
| internal/relayertest/testdata/flow_chain_config.toml | Adds Flow chain TOML fixture |
| internal/relayertest/mocks/signer_grpc.go | Updates FKMS mocks to include SignFlow |
| internal/relayertest/mocks/chain_flow_client.go | Adds Flow client mock (generated) |
| internal/relayertest/constants.go | Embeds Flow chain config fixture |
| go.mod | Adds indirect deps for Flow SDK and transitive requirements |
| go.sum | Lockfile updates for added dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8e7612d to
af7469f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 30 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
relayer/db/sql.go:26
- The
NewSQLdoc/comment andsplitDbPathexamples still reference the driver namepostgresql, but the implementation only acceptspostgres(and the README now documentspostgres). As written, a user following thepostgresql:...example would hitErrUnsupportedDriver. Please update the comment/examples to match the actual accepted driver names.
Db *gorm.DB
}
// NewSQL opens a new Gorm connection using the given driverName and dbPath.
// Supported drivers: "postgresql", "sqlite".
func NewSQL(dbPath string) (SQL, error) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c62cee2 to
dd1b01b
Compare
Fixed: #XXXX
Implementation details
Please ensure the following requirements are met before submitting a pull request:
CHANGELOG_UNRELEASED.mdFiles changedtab in the Github PR explorer)