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

Setting up ZKBridge repo and adding spiral KV abstractions. #1

Closed
wants to merge 9 commits into from

Conversation

rahulrane50
Copy link
Collaborator

@rahulrane50 rahulrane50 commented Apr 29, 2024

Description

This PR sets up basic scaffolding for zkbridge repo. It also adds KV store abstractions for integrating spiral to zkbridge. For an overview following things are added in this PR :

  1. Setting up correct snapshot and pom.xml for zkbridge development.
  2. Adding spiral client bindings to zkbridge.
  3. Adding kvstore abstractions and spiral implementation for it. In subsequent PR we will add more abstractions for "shared log" on the top of these kvstore abstractions.
  4. Setting up separate CI for ZKBridge. The exising CI is failing with some not related checkstyle errors. Hence until we fix this we can focus on just tests. Also for end-to-end tests we have to make modifications to actually download zkbridge server instead of apache/zookeeper. until we fix it, disabled it for PR GHA

Tests

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:24 min
[INFO] Finished at: 2024-04-29T10:50:56-07:00
[INFO] ------------------------------------------------------------------------

The following is the result of the "mvn test" command on the appropriate module:
(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)

Changes that Break Backward Compatibility (Optional)

My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

Documentation (Optional)

In case of new functionality, my PR adds documentation in the following wiki page:
(Link the GitHub wiki you added)

Copy link

@parakhnr parakhnr left a comment

Choose a reason for hiding this comment

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

nit: Can you use li-formatting.

}
}

public static class SpiralStoreClientBuilder {

Choose a reason for hiding this comment

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

You can take a look at [Immutables] to reduce some of this boiler plate.


private final SpiralApiGrpc.SpiralApiBlockingStub _blockingStub;

private SpiralStoreClient(String spiralEndpoint, boolean useSsl, String caBundle, String identityCert, String identityKey, String overrideAuthority) {

Choose a reason for hiding this comment

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

Can you wrap ssl related arguments in SslConfig ?

.build();
GetResponse response = _blockingStub.get(request);
return response.getValue().getMessage().toByteArray();
} catch (Exception e) {

Choose a reason for hiding this comment

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

Can you catch specific exception?

* This KV-store client is used to interact with the KV-store server.
*/

public interface KVStoreClient<K, V, C> {

Choose a reason for hiding this comment

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

nit: KvStore?

@rahulrane50 rahulrane50 closed this May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants