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

F3 Rust implementation tracking issue #4552

Open
18 tasks
ruseinov opened this issue Jul 17, 2024 · 4 comments
Open
18 tasks

F3 Rust implementation tracking issue #4552

ruseinov opened this issue Jul 17, 2024 · 4 comments
Assignees
Labels
Priority: 1 - Critical Requires immediate attention Type: Epic A feature or collection of issues that achieve a greater goal Type: Feature

Comments

@ruseinov
Copy link
Contributor

ruseinov commented Jul 17, 2024

Issue summary

This tracks our current progress on f3 integration.

Considerations for wrapping/re-write

Potential complications

Call Go code from Rust

  • We'll need a Go sidecar for that, we could then call it using rust2go, that should be easy enough.

Re-write

Roadmap

To minimize the timeline risk, we've decided to

  • 1. implement F3 in forest with the go-f3 sidecar approach
    assuming go-f3 sidecar is almost ready
  • 2. move go-f3 sidecar into Forest via FFI(rust2go)
    the number of go functions we need to make FFI for is small(less than 3).
    we've successfully made FFI for some go interop tests of p2p functionalities with rust2go
  • 3. (simultaneously) implement rust-f3 with proper testing
  • 4. switch from go-f3 to rust-f3

go-f3 integration with sidecar/FFI approach: #4644

rust-f3 implementation work items

  • Implement gp-bft primitives for other modules to use, as this package is depended upon by most others.
  • Implement blssig as it's unavoidable and pretty self-contained.
    the rest TBD

Fine-grained to-do for rust-f3

Implementation diagram, helpful to see what can be parallelized.

flowchart TD
 subgraph s1["signing"]
        n3["blssig"]
        n5["gnark"]
  end
 subgraph s2["cert exchange"]
        n6["server"]
        n7["client"]
        n8["store"]
  end
 subgraph s3["Internal tools"]
        n12["power store"]
        n13["caching"]
        n14["measurements"]
        n11["wal"]
  end
    A["GPBFT"] --> I["certs"] & s1 & s2 & n9["EC Backend Interface"] & n12 & n16["f3 node"] & n15["manifest"]
    n5 --> n3
    s1 --> I
    I --> s2 & n16
    n8 --> n6
    s3 --> n16
    n9 --> n16
    s2 --> n16
    n15 --> n16 & n12
    n17["merkle"] --> A

     A:::done
    classDef done fill:#008000
Loading

Other information and links

@LesnyRumcajs
Copy link
Member

@hanabi1224 @ruseinov Could you please update the issue to reflect the current plan?

@ansermino
Copy link
Member

@hanabi1224 Thanks a bunch for updating this! Please can you breakout the go-f3 and the rust-f3 into their own issues/epics 🙏

Am I correct in understanding that integrating the sidecar is blocked until we get more info from the go-f3 team?

@ruseinov
Copy link
Contributor Author

ruseinov commented Aug 14, 2024

@hanabi1224 Thanks a bunch for updating this! Please can you breakout the go-f3 and the rust-f3 into their own issues/epics 🙏

Am I correct in understanding that integrating the sidecar is blocked until we get more info from the go-f3 team?

We have some new info in that regard. It seems like there's not going to be much action in terms of participation, because that depends on mining capabilities. Those in our case depend on Curio. So we're starting with following (getting all the certs and verifying them). What this means for Forest is:

  1. Fast finality
  2. F3 snapshot data, which basically is the whole cert sequence, which according to Kuba are lightweight.

It turns out that in order to follow we don't actually need much, just the cert exchange, which is pretty self-contained. So we'll be focusing on that and the sidecar in parallel. To be continued.

@hanabi1224
Copy link
Contributor

@hanabi1224 Thanks a bunch for updating this! Please can you breakout the go-f3 and the rust-f3 into their own issues/epics 🙏

Am I correct in understanding that integrating the sidecar is blocked until we get more info from the go-f3 team?

@ansermino Done. #4644

As @ruseinov mentioned, we're now clear about what are missing in the current go-f3 sidecar and I will look into closing the gap in a quick and dirty way to get a working sidecar demo

@ansermino ansermino changed the title F3 integration tracking issue. F3 Rust implementation tracking issue Aug 19, 2024
@ansermino ansermino added the Type: Epic A feature or collection of issues that achieve a greater goal label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 1 - Critical Requires immediate attention Type: Epic A feature or collection of issues that achieve a greater goal Type: Feature
Projects
None yet
Development

No branches or pull requests

5 participants