Skip to content

eigerco/strawberry

Repository files navigation

🍓 Strawberry: A JAM Client Implementation in Go

Welcome to Strawberry, our implementation of the JAM client for Polkadot, written in Go. This project is part of Eiger's effort to contribute to the Polkadot ecosystem by providing a robust and efficient client implementation.

Eiger account 131MpMXeuKG6L27Ye23uzWr739KFbbrCBdiv39XZtnTCPwQB

Table of Contents

Introduction

Strawberry is an implementation of the JAM (JOIN-ACCUMULATE MACHINE) client for Polkadot, developed in Go. This implementation aims to provide a lightweight, performant, and secure JAM client.

For more information about JAM, read the graypaper. Strawberry follows the specifications outlined in version 0.4.5.

Features

  • Written in Go for performance and reliability
  • Currently implementing M1 IMPORTER: State-transitioning conformance tests pass and can import blocks.
  • Easy to configure and extend.

Getting started

Prerequisites

  • Make
  • Go 1.22.5 or higher
  • Rust 1.81.1 or higher

Installation

Follow the steps below to get started:

  1. Clone the repository:

    git clone https://github.com/eigerco/strawberry.git
    cd strawberry
  2. Build the project:

    make build 
  3. Run the demo executable:

    ./strawberry

Usage

This demo app starts up a simple http server with one endpoint. The import block endpoint can be accessed at POST /block/import

Usage example:

curl -i -X POST localhost:8080/block/import -H "Content-Type: application/json" --data-binary "@demo-block-sample.json"

This returns:

{"message":"extrinsic guarantees validation failed, err: anchor block not present within recent blocks","status":"error"}

Meaning that the block is being validated.

Run tests

Unit tests

make test

Integration tests

Integration tests validate our code using the test vectors provided by this repository. All integration tests are grouped within the tests/integrations folder, and the test cases/vectors (JSON and BIN files) are located in the tests/integration/vectors directory. To execute these tests, use the following command:

make integration

Contributing

We welcome contributions to Strawberry. Before contributing please read the CONTRIBUTING file for details.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

We would like to thank the Web3 Foundation for their support and the Polkadot community for their continuous contributions and feedback.


If you have any questions contact us at [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages