Giter Site home page Giter Site logo

beerus's People

Contributors

abdelstark avatar aragar199 avatar chirag-bgh avatar clementwalter avatar danilowhk avatar dependabot[bot] avatar dpinones avatar drspacemn avatar dubzn avatar enitrat avatar etherhood avatar fkrause98 avatar florian-bellotti avatar ftupas avatar glihm avatar godspower-eze avatar greged93 avatar icavlek avatar irisdv avatar joshualyguessennd avatar lkozlowski avatar lucaslvy avatar phklive avatar pierre-l avatar pscott avatar robinstraub avatar sergey-melnychuk avatar somthn0somthn avatar tonypony220 avatar zarboq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beerus's Issues

Add test coverage

Description

We should add test coverage measurement in the project and add it in the CI

Add Rest API wrapper

Description

Add a Rest API wrapper to interact with Beerus Light Client Features

Acceptance Criteria

  • Rest API exposes features of Beerus
  • Associated tests are created

dev: beerus-cli usage

Description

Beerus-cli usage is inaccessible without setting appropriate environment variables making it impossible to get usage like beerus-cli -v or beerus-cli -h. Things like tag checking to implement #6 will be easier with proper usage implementation.

Acceptance Criteria

  • beerus-cli -v available when environment variables aren't set
  • beerus-cli -h available when environment variables aren't set

Mock http server

Description

Mock ethereum full node and StarkNet full node for integration tests

Acceptance criteria

  • Pathfinder is mockable
  • Ethereum full node is mockable

Implement Beerus endpoint `get_contract_storage_value`

Description

This beerus endpoint will return the specified storage value after being verified with the contract state root + the starknet state root
Function:

pub fn get_contract_storage_value(contract_address: Felt, storage_var_key: Felt) -> Result<Felt, Error>

Acceptance criteria

  • User can call get_contract_storage_value
  • get_contract_storage_value has associated unit tests and integration tests
  • Function is tested on testnet

Refactor code to make it test / mock friendly

Description

Currently the project is not really test friendly since it has a lot of external dependencies.
We need to make it more flexible and suitable for proper testing architecture.

The plan is to be able to use mockall to mock external dependencies.

feat: `l2ToL1Messages`

Feature Request

Describe the Feature Request

As a user, I would like to query l2ToL1Messages of the StarkNetCore contract.

Describe Preferred Solution

l2ToL1Messages is accessible in the core library, and as a CLI command, and a REST API endpoint.

Describe Alternatives

Related Code

  • beerus_core

  • beerus_cli

  • beerus_rest_api

  • Yes

  • No

Implement `verify_storage_proofs`

Description

We need to implement the verification of the storage proof when we access StarkNet state.
To do that we must use pathfinder_getStorageProofs endpoint.

The PR in PathFinder is here: eqlabs/pathfinder#726
It has been merge.

Acceptance criteria

  • verify_storage_proofs is implemented in core library
  • associated unit tests are implemented
  • implementation is tested against a path finder node on a testnet

CLI and Rest API Wrapper will be done in follow up PRs.

feat: `l1ToL2Messages`

Feature Request

Describe the Feature Request

As a user, I would like to query l1ToL2Messages of the StarkNetCore contract.

Describe Preferred Solution

l1ToL2Messages is accessible in the core library, and as a CLI command, and a REST API endpoint.

Describe Alternatives

Related Code

  • beerus_core

  • beerus_cli

  • beerus_rest_api

  • Yes

  • No

bug: fresh install shows `sh: line 121: beerus_cli: command not found`

Bug Report

Beerus version: 0.1.0

Current behavior:

When doing a fresh install of beerusup using

curl -sL https://raw.githubusercontent.com/keep-starknet-strange/beerus/main/beerusup | sh

beerus_cli is added to path but line 121 throws an error because it's being called as if it has been added to $PATH but the $PROFILE hasn't been sourced yet.

image

Expected behavior:

No error and instead version is shown.
image

Steps to reproduce:

Do a fresh install of beerusup using

curl -sL https://raw.githubusercontent.com/keep-starknet-strange/beerus/main/beerusup | sh

Related code:

Other information:

Switch to using Rust workspace

Description

Use Rust workspace for the project.

Specifically the workspace must have the following members:

  • core
  • cli
  • rest-api

Initiate PathFinder endpoints client

Description

We need to implement a client to consume PathFinder endpoints

Acceptance Criteria

  • PathFinder client is implemented and enable to consume full node endpoints
    • for this ticket we consider the work done when one endpoint is fully implemented
  • Associated test should be created and pass

Increase Beerus core coverage to 90%

Description

Beerus needs to be fully tested so we need to increase the test coverage

Acceptance criteria

Beerus core coverage is at least at 90%

dev: add tests for storage proofs

Currently, only a single test is present for storage proof. It would be nice to add some more complicated tests (see #120 )

I imagine this can go hand-in-hand with #20

feat: `l1ToL2MessageCancellations`

Feature Request

Describe the Feature Request

As a user, I would like to query l1ToL2MessageCancellations of the StarkNetCore contract.

Describe Preferred Solution

l1ToL2MessageCancellations is accessible in the core library, and as a CLI command, and a REST API endpoint.

Describe Alternatives

Related Code

  • beerus_core

  • beerus_cli

  • beerus_rest_api

  • Yes

  • No

feat: `l1ToL2MessageNonce`

Feature Request

Describe the Feature Request

As a user, I would like to query l1ToL2MessageNonce of the StarkNetCore contract.

Describe Preferred Solution

l1ToL2MessageNonce is accessible in the core library, and as a CLI command, and a REST API endpoint.

Describe Alternatives

Related Code

  • beerus_core

  • beerus_cli

  • beerus_rest_api

  • Yes

  • No

Implement endpoint to retrieve StarkNet state root

Description

We should expose a library endpoint to retrieve StarkNet state root.

Things to consider:
- What is the value of the StarkNet contract address? (hardcoded, configurable, etc)

We decided to have the StarkNet contract address configurable, defaulted with a hardcoded value (likely a mapping of known networks to contract address).

Acceptance criteria

  • library endpoint is implemented
  • endpoint is properly tested

Test `starknet_state_root` in `BeerusLightClient`

Description

Now that we have a testable and mockable architecture, we can start to increase the test coverage of the project.

Let's start with the starknet_state_root of BeerusLightClient.

Acceptance criteria

  • Integrate mockall crate and setup test archi
  • Nominal case for starknet_state_root is tested
  • Error cases for starknet_state_root are tested

Create PathFinder full node instance

Description

The light client needs a connection to a full node in order to operate.
Note that this connection is trustless and can be insecure, since the light client verifies storage proofs.

Acceptance criteria

  • instance of PathFinder is created on AWS
  • instance is publicly accessible

Create empty `get_contract_storage_value` endpoint

Description

In order to prepare the get_contract_storage_value we need to have the structure of the endpoint in the library, cli and rest api.

Acceptance criteria

  • Create the beerus client empty shell endpoint get_contract_storage_value
  • Associated cli call command
  • Associated rest api wrapper
  • Test structure for each new function
  • Starknet.rs Felt type integration

Implement `get_contract_storage_proof`

Description

In order to verify the value sent by the full node we need the contract storage proof.

Acceptance criteria

  • Beerus can query a starknet full node to get the contract storage root
  • Associated cli command
  • Associated rest api wrapper
  • Starknet.rs full node integration
  • Units tests
  • Integration tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.