Skip to content

feat: finality gadget server#13

Merged
parketh merged 97 commits intomainfrom
feat/verifier-daemon
Aug 8, 2024
Merged

feat: finality gadget server#13
parketh merged 97 commits intomainfrom
feat/verifier-daemon

Conversation

@parketh
Copy link
Copy Markdown
Contributor

@parketh parketh commented Aug 5, 2024

Summary

This PR implements the finality gadget server, a stateful program used to track consecutive quorum and query the latest BTC-finalized block.

Integration tests are seperately added in the finality-provider repo (see below)

Test plan

To run tests:

make test

To run the finality gadget daemon:

make install
opfgd start --cfg config.toml

Note that running the daemon with the default configs will throw a block %d be finalized according to client but is not error, because there aren't any FPs signing blocks, i.e. blocks are not registered as finalized. For testing purposes, we can override queryIsBlockBabylonFinalized in finalitygadget.go to return true, nil for now.

one the daemon is running, we can use Postman to test gRPC (need to import the finalitygadget.proto file) with localhost:8080 as the URL:

image

then you can invoke queries like:
image

@parketh parketh force-pushed the feat/verifier-daemon branch from 6fe90ea to cfad1d3 Compare August 6, 2024 15:09
Copy link
Copy Markdown
Contributor

@SebastianElvis SebastianElvis left a comment

Choose a reason for hiding this comment

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

That's a lot. Great work!

Comment thread cwclient/cwclient.go
Comment thread server/server.go Outdated
Comment thread proto/finalitygadget.proto Outdated
Copy link
Copy Markdown
Contributor

@bap2pecs bap2pecs left a comment

Choose a reason for hiding this comment

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

love this PR! great work

Vibing Silver Fox - WOT9tRmLbjw7M6m2R1

Comment thread config.toml
Comment thread cwclient/cwclient.go
Comment thread db/bbolt.go Outdated
Comment thread db/bbolt.go Outdated
Comment thread db/bbolt.go Outdated
Comment thread finalitygadget/interface.go
Comment thread proto/finalitygadget.proto Outdated
Comment thread server/rpcserver.go Outdated
Comment thread server/server.go Outdated
Comment thread server/server.go Outdated
@parketh
Copy link
Copy Markdown
Contributor Author

parketh commented Aug 8, 2024

thanks for latest round of comments @SebastianElvis @bap2pecs, have addressed these

Copy link
Copy Markdown
Contributor

@bap2pecs bap2pecs left a comment

Choose a reason for hiding this comment

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

thanks for the changes! look great. feel free to ship the code

Animation Boat - 3oz8xRQiRlaS1XwnPW

@parketh parketh merged commit 765db8b into main Aug 8, 2024
@parketh parketh deleted the feat/verifier-daemon branch August 8, 2024 14:37
@parketh parketh restored the feat/verifier-daemon branch August 8, 2024 14:55
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.

4 participants