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

Release-candidate v0.63.0-rc.1 #1143

Merged
merged 66 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
b955005
Merge pull request #1048 from HathorNetwork/master
jansegre Jun 3, 2024
dcb876c
fix: fix timestamps on gen-genesis CLI (#1094)
glevco Jul 30, 2024
aec93bc
Merge pull request #1102 from HathorNetwork/release-candidate
jansegre Aug 2, 2024
f3481ab
feat: add sync-v2 benchmark to CI (#1083)
glevco Aug 6, 2024
f1a56b7
Merge pull request #1104 from HathorNetwork/release
jansegre Aug 6, 2024
5e99959
feat(event-queue): add tx data to VERTEX_REMOVED (#1106)
glevco Aug 12, 2024
47473dd
feat(mergedmining): support dummy mining on coordinator
jansegre Mar 4, 2024
5972abc
Merge pull request #966 from HathorNetwork/feat/mm-coordinator-dummy
jansegre Aug 14, 2024
445be1c
feat(metadata): create basic static metadata structures (#1013)
glevco Aug 14, 2024
79c03e9
feat(cli): early protection for invalid prometheus prefix
jansegre Aug 7, 2024
3681579
Merge pull request #1107 from HathorNetwork/feat/invalid-prometheus-p…
jansegre Aug 15, 2024
78dcca1
chore(benchmark): improve benchmark CI (#1112)
glevco Aug 19, 2024
7f03142
chore: update dependencies (#998)
glevco Aug 20, 2024
25a8abd
chore(ci): update default Python version used on docker images
jansegre Apr 26, 2024
411fb65
Merge pull request #1010 from HathorNetwork/chore/update-default-python
jansegre Aug 20, 2024
7ccc846
fix(benchmark): fix CI on master (#1117)
glevco Aug 21, 2024
7d3e1ec
fix(benchmark): fix CI on master (#1121)
glevco Aug 21, 2024
72ab590
chore: added a flake.nix creating a devshell with all dependencies ne…
andreabadesso Aug 21, 2024
e85e4be
chore: upgrade actions to a version that use node20 (LTS) (#1123)
r4mmer Aug 22, 2024
f2c436f
refactor(p2p): rename peer_id.PeerId to peer.Peer
jansegre Aug 15, 2024
2c817fd
Merge pull request #1113 from HathorNetwork/refactor/p2p-rename-peer-id
jansegre Aug 22, 2024
ada19b8
refactor(p2p): use PeerId type instead of str
jansegre Aug 16, 2024
9bce2fa
Merge pull request #1114 from HathorNetwork/refactor/p2p-peer-use-pee…
jansegre Aug 22, 2024
f6ddf3c
refactor(metadata): move metadata attributes to static metadata (#1014)
glevco Aug 22, 2024
da32f80
fix: Healthcheck content-type (#1110)
luislhl Aug 22, 2024
5bb5dba
refactor(metadata): pre-refactors for migrating feature states to sta…
glevco Aug 27, 2024
4f80786
refactor(metadata): pre-refactors for migrating feature states to sta…
glevco Aug 27, 2024
f3e3ab5
feat(ws): Add flow control to the tx history streamer
msbrogli Aug 29, 2024
50ae3b2
feat: enable cache by default (#1125)
glevco Sep 4, 2024
ec2563e
feat: improve load-from-logs CLI command (#1132)
glevco Sep 5, 2024
22fc4b9
fix(ws): Add a graceful close mechanism to handle late messages and p…
msbrogli Sep 4, 2024
7d49535
fix(api): status regression after p2p refactor
jansegre Sep 9, 2024
e26a841
Merge pull request #1134 from HathorNetwork/fix/p2p-refactor-regression
jansegre Sep 9, 2024
9fddd7a
fix(ws): Fix tx history streamer wrong logging when pauseProducing() …
msbrogli Sep 10, 2024
7f53032
fix: event handling of txs with custom scripts (#1140)
glevco Oct 3, 2024
115569a
refactor(benchmark): change benchmark CI to download data from logs i…
glevco Oct 3, 2024
e3b73dd
fix: removed txs from test wallet (#1139)
glevco Oct 4, 2024
6aa6438
chore: bump version to v0.63.0
jansegre Sep 30, 2024
335d050
Merge pull request #1141 from HathorNetwork/chore/v0.63.0
jansegre Oct 4, 2024
646878b
refactor(p2p): add PublicPeer and PrivatePeer to simplify Peer
jansegre Aug 19, 2024
8da62a1
Merge pull request #1115 from HathorNetwork/refactor/p2p-peer-types
jansegre Oct 7, 2024
22f478c
chore: collect garbage collector metrics (#1137)
luislhl Oct 7, 2024
d85f88c
chore[websocket]: improve websocket factory start (#1145)
luislhl Oct 8, 2024
4c13fdd
fix(cli): subcommand quick_test not stopping after #1115
jansegre Oct 8, 2024
daf12e7
Merge pull request #1147 from HathorNetwork/fix/quick_test-regression
jansegre Oct 11, 2024
6a4c562
refactor(static-metadata): undo migration of feature_states to static…
glevco Oct 14, 2024
9c1fe88
refactor(p2p): simplify factory (#1151)
glevco Oct 14, 2024
349555f
fix(benchmark): fix benchmark CI after bencher update (#1157)
glevco Oct 16, 2024
026cb7b
refactor(settings): change wallets and reward lock to use injected se…
glevco Oct 17, 2024
d569b9a
refactor: move can_validate_full method (#1153)
glevco Oct 18, 2024
26a36c0
feat(consensus): Change meta.score and meta.accumulated_weight to int…
msbrogli Apr 26, 2023
5586f8d
Merge pull request #572 from HathorNetwork/feat/score-acc-weight-types
jansegre Oct 24, 2024
2536592
chore: remove all migrations (#1149)
glevco Oct 24, 2024
123166e
refactor(vertex-handler): remove p2p_manager dependency (#1154)
glevco Oct 25, 2024
550767b
chore: remove all unused features (#1150)
glevco Oct 29, 2024
4200cc2
chore: remove the limited support there was for Windows
jansegre Oct 25, 2024
127c7fe
Merge pull request #1169 from HathorNetwork/chore/remove-windows-support
jansegre Oct 31, 2024
487e731
refactor(p2p): refactor peer address handling (#1173)
glevco Nov 7, 2024
bfeacb5
feat(feature-activation): implement closest_block metadata and Featur…
glevco Nov 7, 2024
6ad7089
chore(feature-activation): config NOP feature to test FA for transact…
glevco Nov 8, 2024
759c1d7
chore: improve p2p protocol error logging (#1179)
glevco Nov 8, 2024
bff1fac
feat(dag-builder): Add a tool to generate vertices from a DAG descrip…
msbrogli Nov 11, 2024
3a38194
test(events): Improve comparison between response and expected response
msbrogli Nov 14, 2024
9822bdb
feat(consensus): Use DAG of funds to set first_block
msbrogli Nov 7, 2023
dc3c7ca
ci: use macos-13 on Github Actions as macos-12 will be dropped (#1185)
luislhl Nov 18, 2024
d91513e
feat(p2p): Change sync-v2 main loop interval to one second
msbrogli Nov 13, 2024
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
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if [[ $(type -t use_flake) != function ]]; then
echo "ERROR: use_flake function missing."
echo "Please update direnv to v2.30.0 or later."
exit 1
fi

use flake
38 changes: 38 additions & 0 deletions .github/actions/setup-hathor-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: setup-hathor-env
description: Setup Hathor node environment
inputs:
python:
description: The python version
os:
description: The OS name
runs:
using: composite
steps:
- name: Install Poetry
shell: bash
run: pipx install poetry

- name: Set up Python ${{ inputs.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
cache: 'poetry'

- name: Install Ubuntu dependencies
if: startsWith(inputs.os, 'ubuntu')
run: |
sudo apt-get -qy update
sudo apt-get -qy install graphviz librocksdb-dev libsnappy-dev liblz4-dev
shell: bash

- name: Install macOS dependencies
if: startsWith(inputs.os, 'macos')
run: |
brew cleanup -q
# brew update -q
brew install -q graphviz rocksdb pkg-config
shell: bash

- name: Install Poetry dependencies
run: poetry install -n --no-root
shell: bash
61 changes: 61 additions & 0 deletions .github/workflows/base_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# yamllint disable rule:line-length
name: benchmarking
on: # yamllint disable-line rule:truthy
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
benchmark_base_branch:
name: Continuous Benchmarking base branch
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Install hyperfine
run: |
wget https://github.com/sharkdp/hyperfine/releases/download/v1.12.0/hyperfine_1.12.0_amd64.deb
sudo dpkg -i hyperfine_1.12.0_amd64.deb
- uses: ./.github/actions/setup-hathor-env
name: Setup Hathor node environment
with:
python: 3.11
os: ubuntu-22.04
- name: Set env vars
run: cat ./extras/benchmarking/sync_v2/.env >> $GITHUB_ENV
- name: Download benchmark data
run: |
wget $BENCH_DATA_URL
tar -xzf $BENCH_DATA_FILE_NAME.tar.gz
mkdir $SERVER_DATA_DIR
poetry run hathor-cli load-from-logs \
--testnet \
--data $SERVER_DATA_DIR \
--cache \
--cache-size $CACHE_SIZE \
--x-localhost-only \
--log-dump $BENCH_DATA_FILE_NAME
- name: Run server node
run: |
poetry run hathor-cli run_node \
--testnet \
--data $SERVER_DATA_DIR \
--cache \
--cache-size $CACHE_SIZE \
--x-localhost-only \
--listen tcp:$TCP_PORT \
&
- name: Track base branch benchmarks with Bencher
run: |
bencher run \
--project hathor-core \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch master \
--testbed ubuntu-22.04 \
--adapter shell_hyperfine \
--err \
--file $BENCH_FILE \
'./extras/benchmarking/sync_v2/benchmark_sync_v2.sh'
16 changes: 8 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- '3.12'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare base version
id: prep
run: |
Expand All @@ -49,28 +49,28 @@ jobs:
VERSION: ${{ steps.prep.outputs.check-version }}
run: make check-custom
- name: Set up QEMU # arm64 is not available natively
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: latest
install: true
driver-opts: network=host
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
if: steps.prep.outputs.login-dockerhub == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
if: steps.prep.outputs.login-ghcr == 'true'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
if: steps.prep_base_version.outputs.is-nightly == 'false'
with:
path: /tmp/.buildx-cache
Expand All @@ -79,7 +79,7 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.python-impl }}${{ matrix.python-version }}-refs/heads/master-
- name: Build and export to Docker
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: ${{ steps.prep.outputs.dockerfile }}
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Test image
run: docker run --rm ${{ env.TEST_TAG }} quick_test --data / --testnet
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
if: ${{ !env.ACT }} # Skip this step when testing locally with https://github.com/nektos/act
with:
context: .
Expand Down
29 changes: 7 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
full_matrix = {
'python': ['3.10', '3.11', '3.12'],
# available OS's: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
'os': ['ubuntu-22.04', 'macos-12', 'windows-2022'],
'os': ['ubuntu-22.04', 'macos-13'],
}
# this is the fastest one:
reduced_matrix = {
Expand Down Expand Up @@ -62,29 +62,14 @@ jobs:
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/checkout@v4
- uses: ./.github/actions/setup-hathor-env
name: Setup Hathor node environment
with:
python-version: ${{ matrix.python }}
cache: 'poetry'
- name: Install Ubuntu dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -qy update
sudo apt-get -qy install graphviz librocksdb-dev libsnappy-dev liblz4-dev
- name: Install macOS dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew cleanup -q
# brew update -q
brew install -q graphviz rocksdb pkg-config
- name: Install Poetry dependencies
run: poetry install -n --no-root
python: ${{ matrix.python }}
os: ${{ matrix.os }}
- name: Cache mypy
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .mypy_cache
# this key is setup such that every branch has its cache and new branches can reuse dev's cache, but not the other way around
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/pr_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# yamllint disable rule:line-length
name: benchmarking
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
benchmark_pr_branch:
name: Continuous Benchmarking PRs
# DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Install hyperfine
run: |
wget https://github.com/sharkdp/hyperfine/releases/download/v1.12.0/hyperfine_1.12.0_amd64.deb
sudo dpkg -i hyperfine_1.12.0_amd64.deb
- uses: ./.github/actions/setup-hathor-env
name: Setup Hathor node environment
with:
python: 3.11
os: ubuntu-22.04
- name: Set env vars
run: cat ./extras/benchmarking/sync_v2/.env >> $GITHUB_ENV
- name: Download benchmark data
run: |
wget $BENCH_DATA_URL
tar -xzf $BENCH_DATA_FILE_NAME.tar.gz
mkdir $SERVER_DATA_DIR
poetry run hathor-cli load-from-logs \
--testnet \
--data $SERVER_DATA_DIR \
--cache \
--cache-size $CACHE_SIZE \
--x-localhost-only \
--log-dump $BENCH_DATA_FILE_NAME
- name: Run server node
run: |
poetry run hathor-cli run_node \
--testnet \
--data $SERVER_DATA_DIR \
--cache \
--cache-size $CACHE_SIZE \
--x-localhost-only \
--listen tcp:$TCP_PORT \
&
- name: Track PR Benchmarks with Bencher
run: |
bencher run \
--project hathor-core \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch '${{ github.head_ref }}' \
--start-point '${{ github.base_ref }}' \
--start-point-hash '${{ github.event.pull_request.base.sha }}' \
--start-point-clone-thresholds \
--testbed ubuntu-22.04 \
--adapter shell_hyperfine \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--file $BENCH_FILE \
'./extras/benchmarking/sync_v2/benchmark_sync_v2.sh'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ extras/docker/envvars
/dist/
/requirements.txt
*.egg-info

# Nix
.direnv/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# before changing these variables, make sure the tag $PYTHON-alpine$ALPINE exists first
# list of valid tags hese: https://hub.docker.com/_/python
ARG PYTHON=3.10
ARG PYTHON=3.11
ARG DEBIAN=bullseye

# stage-0: copy pyproject.toml/poetry.lock and install the production set of dependencies
FROM python:$PYTHON-slim-$DEBIAN as stage-0

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG PYTHON
# install runtime first deps to speedup the dev deps and because layers will be reused on stage-1
RUN apt-get -qy update
Expand Down
2 changes: 1 addition & 1 deletion docs/legacy/ref/p2p.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The :py:mod:`hathor.p2p.states` has all states and messages of the p2p network.
to send new messages and handle the new incoming ones.


The :py:class:`hathor.p2p.peer_id.PeerId` stores the peer's identity, entrypoint, reputation and history.
The :py:class:`hathor.p2p.peer.Peer` stores the peer's identity, entrypoint, reputation and history.



Expand Down
9 changes: 9 additions & 0 deletions extras/benchmarking/sync_v2/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BENCH_DATA_FILE_NAME=ci_testnet_upto_20k
BENCH_DATA_URL=https://hathor-public-files.s3.amazonaws.com/hathor-core-ci/ci_testnet_upto_20k.tar.gz
N_BLOCKS=20000
CACHE_SIZE=100000
SERVER_DATA_DIR=server-data
TCP_PORT=40403
N_RUNS=2
BENCH_FILE=testnet_upto_20k_results.json
BENCH_DATA_DIR=bench-data
16 changes: 16 additions & 0 deletions extras/benchmarking/sync_v2/benchmark_sync_v2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
hyperfine \
--warmup 1 \
--runs $N_RUNS \
--export-json $BENCH_FILE \
--command-name "sync-v2 (up to $N_BLOCKS blocks)" \
--prepare "rm -rf $BENCH_DATA_DIR && mkdir $BENCH_DATA_DIR" \
"
poetry run hathor-cli quick_test \
--testnet \
--data $BENCH_DATA_DIR \
--cache \
--cache-size $CACHE_SIZE \
--x-localhost-only \
--bootstrap tcp://localhost:$TCP_PORT \
--quit-after-n-blocks $N_BLOCKS
"
Loading
Loading