Skip to content

Commit

Permalink
Boreas update
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanAllaire committed Jul 9, 2024
2 parents ea791f8 + 83eb7ed commit a6956e6
Show file tree
Hide file tree
Showing 33 changed files with 412 additions and 500 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@ on:

jobs:
golangci:
name: Run linter
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/checkout@v3
go-version: '1.22.3'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
args: --timeout=3m
version: v1.57.2
args: --timeout=5m
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.20.x
go-version: 1.22.x
- name: checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/tests_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@ on:

jobs:
golangci:
name: Run linter
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/checkout@v3
go-version: '1.22.3'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
args: --timeout=3m
version: v1.57.2
args: --timeout=5m
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.20.x
go-version: 1.22.x
- name: checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
Expand Down
9 changes: 8 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ linters:
- mirror
- tagalign
- zerologlint
- copyloopvar
- gosec
- misspell
- noctx
- prealloc
- protogetter
- makezero

run:
go: '1.21'
go: '1.22'
timeout: 3m
2 changes: 1 addition & 1 deletion build/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---------------------------------------------------------------------
# The first stage container, for building the application
# ---------------------------------------------------------------------
FROM golang:1.21-alpine as builder
FROM golang:1.22-alpine as builder

ENV CGO_ENABLED=0
ENV GO111MODULE=on
Expand Down
3 changes: 1 addition & 2 deletions build/api/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

curl https://teztnets.xyz/teztnets.json > /teztnets.json
mondaynet_rpc=$(cat /teztnets.json | jq '. | to_entries | map(select(.key | startswith("monday"))) | map(.value.rpc_url)[0]')
dailynet_rpc=$(cat /teztnets.json | jq '. | to_entries | map(select(.key | startswith("daily"))) | map(.value.rpc_url)[0]')

DAILYNET_RPC=$dailynet_rpc MONDAYNET_RPC=$mondaynet_rpc /go/bin/api
MONDAYNET_RPC=$mondaynet_rpc /go/bin/api
2 changes: 1 addition & 1 deletion build/indexer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---------------------------------------------------------------------
# The first stage container, for building the application
# ---------------------------------------------------------------------
FROM golang:1.21-alpine as builder
FROM golang:1.22-alpine as builder

ENV CGO_ENABLED=0
ENV GO111MODULE=on
Expand Down
3 changes: 1 addition & 2 deletions build/indexer/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

curl https://teztnets.xyz/teztnets.json > /teztnets.json
mondaynet_rpc=$(cat /teztnets.json | jq '. | to_entries | map(select(.key | startswith("monday"))) | map(.value.rpc_url)[0]')
dailynet_rpc=$(cat /teztnets.json | jq '. | to_entries | map(select(.key | startswith("daily"))) | map(.value.rpc_url)[0]')

DAILYNET_RPC=$dailynet_rpc MONDAYNET_RPC=$mondaynet_rpc /go/bin/indexer
MONDAYNET_RPC=$mondaynet_rpc /go/bin/indexer
3 changes: 0 additions & 3 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ func newApp() *app {
DSN: cfg.Sentry.URI,
Debug: cfg.Sentry.Debug,
Env: cfg.Sentry.Environment,
Tags: map[string]string{
"project": cfg.API.ProjectName,
},
})
}

Expand Down
3 changes: 0 additions & 3 deletions cmd/indexer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ func main() {
DSN: cfg.Sentry.URI,
Debug: cfg.Sentry.Debug,
Env: cfg.Sentry.Environment,
Tags: map[string]string{
"project": cfg.Indexer.ProjectName,
},
})
defer helpers.CatchPanicSentry()
}
Expand Down
14 changes: 7 additions & 7 deletions configs/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ rpc:
# uri: https://rpc.tzkt.io/ghostnet
# timeout: 20
# requests_per_second: 15
atlasnet:
uri: https://atlasnet.rpc.mavryk.network
boreasnet:
uri: https://boreasnet.rpc.mavryk.network
timeout: 20
requests_per_second: 20

Expand All @@ -19,7 +19,7 @@ services:
# mempool: https://mempool.dipdup.net/v1/graphql
# ghostnet:
# mempool: https://mempool.test.dipdup.net/v1/graphql
atlasnet:
boreasnet:
mempool: https://mempool.test.dipdup.net/v1/graphql

storage:
Expand Down Expand Up @@ -57,11 +57,11 @@ api:
rpc:
# mainnet: https://rpc.tzkt.io/mainnet
# ghostnet: https://rpc.tzkt.io/ghostnet
atlasnet: https://atlasnet.rpc.mavryk.network
boreasnet: https://boreasnet.rpc.mavryk.network
networks:
# - mainnet
# - ghostnet
- atlasnet
- boreasnet

indexer:
project_name: indexer
Expand All @@ -71,11 +71,11 @@ indexer:
# receiver_threads: 5
# ghostnet:
# receiver_threads: 5
atlasnet:
boreasnet:
receiver_threads: 10

scripts:
networks:
# - mainnet
# - ghostnet
- atlasnet
- boreasnet
14 changes: 7 additions & 7 deletions configs/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ rpc:
# uri: https://rpc.tzkt.io/ghostnet
# timeout: 20
# requests_per_second: 10
atlasnet:
uri: https://atlasnet.rpc.mavryk.network
boreasnet:
uri: https://boreasnet.rpc.mavryk.network
timeout: 20
requests_per_second: 20

Expand All @@ -19,7 +19,7 @@ services:
# mempool: https://mempool.dipdup.net/v1/graphql
# ghostnet:
# mempool: https://mempool.test.dipdup.net/v1/graphql
atlasnet:
boreasnet:
mempool: https://mempool.test.dipdup.net/v1/graphql

storage:
Expand Down Expand Up @@ -57,11 +57,11 @@ api:
rpc:
# mainnet: https://rpc.tzkt.io/mainnet
# ghostnet: https://rpc.tzkt.io/ghostnet
atlasnet: https://atlasnet.rpc.mavryk.network
boreasnet: https://boreasnet.rpc.mavryk.network
networks:
# - mainnet
# - ghostnet
- atlasnet
- boreasnet

indexer:
project_name: indexer
Expand All @@ -71,7 +71,7 @@ indexer:
# receiver_threads: ${MAINNET_THREADS:-10}
# ghostnet:
# receiver_threads: ${TESTNET_THREADS:-10}
atlasnet:
boreasnet:
receiver_threads: ${TESTNET_THREADS:-10}

scripts:
Expand All @@ -83,4 +83,4 @@ scripts:
networks:
# - mainnet
# - ghostnet
- atlasnet
- boreasnet
12 changes: 0 additions & 12 deletions configs/testnets.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
rpc:
dailynet:
uri: ${DAILYNET_RPC}
timeout: 20
requests_per_second: 15
weeklynet:
uri: ${WEEKLYNET_RPC}
timeout: 20
Expand Down Expand Up @@ -47,21 +43,14 @@ api:
mempool_enabled: false
sandbox_mode: false
rpc:
dailynet: ${DAILYNET_RPC}
weeklynet: ${WEEKLYNET_RPC}
networks:
- dailynet
- weeklynet

indexer:
project_name: indexer
sentry_enabled: false
networks:
dailynet:
receiver_threads: 5
periodic:
info_base_url: https://teztnets.xyz
schedule: "0 5 0 * * *" # at 00:05:00 every day
weeklynet:
receiver_threads: 10
periodic:
Expand All @@ -70,5 +59,4 @@ indexer:

scripts:
networks:
- dailynet
- weeklynet
Loading

0 comments on commit a6956e6

Please sign in to comment.