strawberry

module
v0.0.0-...-f00fe5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: MIT

README

🍓 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 latest specification outlined in the graypaper which itself is still maturing.

Features

  • Written in Go for performance and reliability
  • Milestones one "IMPORTER: State-transitioning conformance tests pass and can import blocks." has been implemented and sent for review on Nov 20th 2024
  • Working on Milestone 2 and beyond.
  • 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 hello@eiger.co

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL