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

Fixes to make it build #3

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
## Requiriements

A recent version of [Crystal](https://crystal-lang.org/install) and [Rust](https://www.rust-lang.org/tools/install).

## Building

Instruction for building crystal project and rust library
Instruction for building crystal project and the `verke_crypto` rust library it depends on.

```sh
$ (cd verkle_crypto; cargo build)
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH CRYSTAL_OPTS="--link-flags=-Wl,-ld_classic" GC_DONT_GC=1 crystal build src/main.cr -o pampero
$ (cd verkle_crypto; cargo build --release)
$ shards install
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH crystal build src/main.cr -o pampero
```

## Show block details

Block at latest slot

```sh
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH CRYSTAL_OPTS="--link-flags=-Wl,-ld_classic" GC_DONT_GC=1 crystal run src/dump_block.cr
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH crystal run src/dump_block.cr
```

Block at slot 831627

```sh
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH CRYSTAL_OPTS="--link-flags=-Wl,-ld_classic" GC_DONT_GC=1 crystal run src/dump_block.cr -- 831627
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH crystal run src/dump_block.cr -- 831627
```

## Unit tests

To run all the tests

```sh
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH CRYSTAL_OPTS="--link-flags=-Wl,-ld_classic" GC_DONT_GC=1 crystal spec
$ LIBRARY_PATH=$(PWD)/verkle_crypto/target/debug:$LIBRARY_PATH crystal spec
```

3 changes: 1 addition & 2 deletions src/config.cr
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module Pampero

class Config
getter beacon_node : String

def initialize
@beacon_node = ENV["BEACON_NODE"] || ""
@beacon_node = ENV["BEACON_NODE"]? || ""
end
end
end
1 change: 1 addition & 0 deletions src/models/account.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "../common/types"
require "../common/constants"
require "json"

module Pampero
struct Account
Expand Down