No description
  • Go 98.6%
  • PLpgSQL 1.1%
  • Makefile 0.2%
Find a file
Eduard S a4886c99ef
Merge pull request #265 from hermeznetwork/feature/zkinputs1
StateDB group Fee txs and ZKInputs gen of Fee txs & Update tx bytes parsers methods
2020-11-09 10:58:49 +01:00
.github/workflows Feature/merge history l2 tables (#156) 2020-09-29 18:27:07 +02:00
api Merge pull request #263 from hermeznetwork/feature/wrapped-in-struct 2020-11-06 15:05:53 +01:00
apitypes Refactor api exits 2020-11-02 14:00:42 +01:00
batchbuilder Group ProcessTxs output 2020-10-27 13:48:07 +01:00
cli/node Add DebugAPI to Node, fix StateDB 2020-11-06 13:00:11 +01:00
common Merge pull request #265 from hermeznetwork/feature/zkinputs1 2020-11-09 10:58:49 +01:00
config Add DebugAPI to Node, fix StateDB 2020-11-06 13:00:11 +01:00
coordinator TxSelector include L1CoordinatorTxs in selections 2020-10-27 17:25:41 +01:00
db StateDB group Fee txs and ZKInputs gen of Fee txs 2020-11-06 16:41:03 +01:00
eth Update Synchronizer (node) implementation 2020-11-04 15:12:51 +01:00
log Add transakcio set type define, add set load [...] 2020-10-09 20:00:43 +02:00
node Add DebugAPI to Node, fix StateDB 2020-11-06 13:00:11 +01:00
priceupdater Insert ETH as HistoryDB token 2020-11-02 12:09:09 +01:00
synchronizer Move logic to extend til blocks to til 2020-11-05 18:09:12 +01:00
test Add DebugAPI to Node, fix StateDB 2020-11-06 13:00:11 +01:00
txselector Reorganize smart contract types, udate eth tests, etc. 2020-11-04 12:06:28 +01:00
.gitignore Implement first iteration of node 2020-09-10 11:36:58 +02:00
go.mod ZKInputs update: 2020-11-04 16:40:55 +01:00
go.sum ZKInputs update: 2020-11-04 16:40:55 +01:00
README.md Add the ability to run the API forever when testing 2020-10-23 11:51:53 +02:00

hermez-node Go Report Card Test Status Lint Status GoDoc

Go implementation of the Hermez node.

Test

  • First run a docker instance of the PostgresSQL (where yourpasswordhere should be your password)
POSTGRES_PASS=yourpasswordhere; sudo docker run --rm --name hermez-db-test -p 5432:5432 -e POSTGRES_DB=hermez -e POSTGRES_USER=hermez -e POSTGRES_PASSWORD="$POSTGRES_PASS" -d postgres
  • Then, run the tests with the password as env var
POSTGRES_PASS=yourpasswordhere ETHCLIENT_DIAL_URL=yourethereumurlhere go test -p 1 ./...

NOTE: -p 1 forces execution of package test in serial. Otherwise they may be executed in paralel and the test may find unexpected entries in the SQL databse because it's shared among all tests.

  • There is an extra temporal option that allows to run the API server through the Go tests. This should be removed once the API can be properly initialized, with data from the synchronizer and so on. To use this, run FAKE_SERVER=yes POSTGRES_PASS=yourpasswordhere ETHCLIENT_DIAL_URL=yourethereumurlhere go test -timeout 0 ./api -p 1 -count 1 -v

Lint

golangci-lint run --timeout=5m -E whitespace -E gosec -E gci -E misspell -E gomnd -E gofmt -E goimports -E golint --exclude-use-default=false --max-same-issues 0