Skip to content

Commit

Permalink
added tesseracts
Browse files Browse the repository at this point in the history
  • Loading branch information
vOROn200 committed Jun 18, 2019
1 parent 8a4aee9 commit ed02bbb
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export PROVER_DOCKER_IMAGE ?=gluk64/franklin:prover
export GETH_DOCKER_IMAGE ?= gluk64/franklin:geth
export FLATTENER_DOCKER_IMAGE ?= gluk64/franklin:flattener
export NGINX_DOCKER_IMAGE ?= gluk64/franklin-nginx:$(FRANKLIN_ENV)
export TESSERACTS_DOCKER_IMAGE ?= gluk64/franklin-tesseracts

# Getting started

Expand Down Expand Up @@ -292,3 +293,16 @@ dev-push-flattener:

make-keys:
@cargo run -p key_generator --release --bin key_generator

# Tesseracts

tesseracts-build:
@docker build -t "${TESSERACTS_DOCKER_IMAGE}" ./docker/tesseracts

tesseracts-up:
@rm -rf build
@mkdir build
@docker-compose up "${TESSERACTS_DOCKER_IMAGE}"

tesseracts-down:
@docker-compose stop "${TESSERACTS_DOCKER_IMAGE}"
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ services:
- ETHEREUM_JSONRPC_VARIANT=geth
- ETHEREUM_JSONRPC_HTTP_URL=http://geth:8545
- COIN=DAI
tesseracts:
image: "gluk64/franklin-tesseracts"
build: ./build
ports:
- "8000:8000"
volumes:
- type: bind
source: ./volumes/tesseracts
target: /var/lib/tesseracts/data

27 changes: 27 additions & 0 deletions docker/tesseracts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM alpine:edge AS builder

RUN apk add build-base \
cmake \
linux-headers \
openssl-dev \
cargo \
clang \
clang-libs \
git

RUN git clone https://github.com/adriamb/tesseracts.git
WORKDIR /
COPY . .
WORKDIR /tesseracts
RUN cargo build --release

FROM alpine:edge
WORKDIR /
COPY --from=builder /tesseracts.toml .
COPY --from=builder /tesseracts/target/release/tesseracts .

EXPOSE 8000

RUN apk add clang clang-libs ca-certificates

ENTRYPOINT ["./tesseracts","--cfg","tesseracts.toml","-vvv"]
58 changes: 58 additions & 0 deletions docker/tesseracts/tesseracts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# user iterface -----------------------------------

# title of the page, e.g. "tesseracts"
ui_title = "Franklin"

# database ----------------------------------------

# where the database is located
db_path = "/tmp/db"

# true|false if we want to scan blocks and save it into db
scan = false

# the starting block to start to retrieve blocks (only iff scan==true)
scan_start_block = 1

# store with tx are contained in addr? (bool)
db_store_addr = false

# store the transactions and receipts? (bool)
db_store_tx = false

# store internal transactions? (bool)
db_store_itx = false

# store list of last non empty blocks? (bool)
db_store_neb = false

# web3 ----------------------------------------------

# web3 json-rpc port, e.g. http://localhost:8545
web3_url = "http://geth:8545"

# client type
# "geth_clique" for geth PoS
# "geth_pow" for geth PoW
# "geth" to autodetect geth_clique and geth_pow
web3_client = "geth"

# process internal txs, true or false
# in geth requieres:
# --syncmode=full
# --gcmode=archive
# --rpcapi debug
web3_itx = false

# compiler ------------------------------------------

# the path where solc binaries are stored (optional)
#solc_path =

# solidity compiler can be bypassedi, by specifing the abi
solc_bypass = true

# server --------------------------------------------

# http server binding (e.g. "0.0.0.0:8000")
bind = "0.0.0.0:8000"

0 comments on commit ed02bbb

Please sign in to comment.