P2Pool consensus v3.0.2
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

Updated README / LICENSE file
This commit is contained in:
DataHoarder 2024-04-05 08:33:31 +02:00
parent fe75cf259c
commit dff632d9c2
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
2 changed files with 6 additions and 76 deletions

View file

@ -1,4 +1,4 @@
Copyright (c) 2022 WeebDataHoarder, p2pool-observer Contributors
Copyright (c) 2024 WeebDataHoarder, P2Pool consensus Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,24 +1,16 @@
# P2Pool Observer
# P2Pool Consensus
This repository contains several libraries and utilities to produce statistics and historical archives of [Monero P2Pool](https://github.com/SChernykh/p2pool) decentralized pool, including consensus-compatible reimplementation of a P2Pool server instance.
This repository contains a consensus-compatible reimplementation of a P2Pool internals for [Monero P2Pool](https://github.com/SChernykh/p2pool) decentralized pool.
Other general tools to work with Monero cryptography are also included.
You may be looking for [P2Pool Observer](https://git.gammaspectra.live/P2Pool/observer) instead.
## Reporting issues
You can give feedback or report / discuss issues on:
* [The issue tracker on git.gammaspectra.live/P2Pool/consensus](https://git.gammaspectra.live/P2Pool/consensus/issues?state=open)
* Via IRC on [#p2pool-observer@libera.chat](ircs://irc.libera.chat/#p2pool-observer), or via [Matrix](https://matrix.to/#/#p2pool-observer:monero.social)
* Any of the relevant rooms for the specific observer instances listed below.
## Maintainer-run Observer Instances
| Host | Onion Address | IRC Channel | Notes |
|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
| [P2Pool.Observer](https://p2pool.observer/) | [p2pool2giz2r5cpqicajwoazjcxkfujxswtk3jolfk2ubilhrkqam2id.onion](http://p2pool2giz2r5cpqicajwoazjcxkfujxswtk3jolfk2ubilhrkqam2id.onion/) | [#p2pool-log](ircs://irc.libera.chat/#p2pool-log) or [Matrix](https://matrix.to/#/#p2pool-log:monero.social) | Tracking up-to-date [Main P2Pool](https://p2pool.io/) on Mainnet |
| [MINI.P2Pool.Observer](https://mini.p2pool.observer/) | [p2pmin25k4ei5bp3l6bpyoap6ogevrc35c3hcfue7zfetjpbhhshxdqd.onion](http://p2pmin25k4ei5bp3l6bpyoap6ogevrc35c3hcfue7zfetjpbhhshxdqd.onion/) | [#p2pool-mini](ircs://irc.libera.chat/#p2pool-mini) or [Matrix](https://matrix.to/#/#p2pool-mini:libera.chat) [[2]](https://matrix.to/#/#p2pool-mini:monero.social) | Tracking up-to-date [Mini P2Pool](https://p2pool.io/mini/) on Mainnet |
| [OLD.P2Pool.Observer](https://old.p2pool.observer/) | [temp2p7m2ddclcsqx2mrbqrmo7ccixpiu5s2cz2c6erxi2lppptdvxqd.onion](http://temp2p7m2ddclcsqx2mrbqrmo7ccixpiu5s2cz2c6erxi2lppptdvxqd.onion/) | [#p2pool-log](ircs://irc.libera.chat/#p2pool-log) or [Matrix](https://matrix.to/#/#p2pool-log:monero.social) | Tracking old fork pre-v3.0 [Main P2Pool](https://p2pool.io/) on Mainnet |
| [OLD-MINI.P2Pool.Observer](https://old-mini.p2pool.observer/) | [temp2pbud6av2jx3lh3yovrj4mjjy2k4p5rxydviosp356ndzs4nd6yd.onion](http://temp2pbud6av2jx3lh3yovrj4mjjy2k4p5rxydviosp356ndzs4nd6yd.onion/) | [#p2pool-mini](ircs://irc.libera.chat/#p2pool-mini) or [Matrix](https://matrix.to/#/#p2pool-mini:libera.chat) [[2]](https://matrix.to/#/#p2pool-mini:monero.social) | Tracking old fork pre-v3.0 [Mini P2Pool](https://p2pool.io/mini/) on Mainnet |
* Via IRC on [#p2pool-log@libera.chat](ircs://irc.libera.chat/#p2pool-log), or via [Matrix](https://matrix.to/#/#p2pool-log:monero.social)
## Donations
This project is provided for everyone to use, for free, as a hobby project. Any support is appreciated.
@ -27,55 +19,6 @@ Donate to support this project, its development, and running the Observer Instan
You can also use the OpenAlias `p2pool.observer` directly on the GUI.
## Operational instructions
A docker-compose setup is provided and documented.
If desired each tool can be run individually, but that is left to the user to configure, refer to Docker setup as reference.
### Requirements
* `docker-compose` or similar
* `git` installed
* Disk space for new incoming historic data. Assume a few tens of MiB per day
* A monerod non-pruned node running in unrestricted mode preferably, but can work with restricted mode.
* Enough RAM to fit state and incoming queries. It can run with lower with adjustment of settings, but 8 GiB per instance should be fine.
### Initial setup
```bash
$ git clone https://git.gammaspectra.live/P2Pool/consensus.git test-instance
$ cd test-instance
$ cp .env.example .env
```
Edit `.env` via your preferred editor, specifically around the monerod host options and generate keys for the Tor hidden service.
If you want to make changes to additional docker-compose settings, do not edit `docker-compose.yml`. Instead create `docker-compose.override.yml` and place new settings there. See [Multiple Compose files documentation](https://docs.docker.com/compose/extends/#multiple-compose-files).
### Update / Apply new settings
Within the instance folder, run this command
```bash
$ git checkout -- '*/default.pgo'; \
git pull && \
docker-compose build --pull && \
docker-compose up -d && \
docker-compose restart tor site pgo-p2pool pgo-daemon pgo-web pgo-api
```
`docker-compose restart tor` is necessary due to the tor server not refreshing DNS of the containers.
It is recommended to run `docker system prune` regularly or after update to cleanup no longer used images.
### Backfill likely sweep transactions
When a new instance starts with previously imported archives you might want to backfill sweep transactions. For new instances this is not necessary, and you can also skip this step and just rely on future data.
```bash
$ docker-compose exec --workdir /usr/src/p2pool daemon \
go run -v git.gammaspectra.live/P2Pool/consensus/cmd/scansweeps \
-host MONEROD_HOST -rpc-port MONEROD_RPC_PORT \
-api-host "http://p2pool:3131" \
-db="host=db port=5432 dbname=p2pool user=p2pool password=p2pool sslmode=disable"
```
Can also specify `-e TRANSACTION_LOOKUP_OTHER=https://OTHER_INSTANCE` just before `daemon` to query other instances additionally with alternate or longer history.
### Development notes
Requires using CGO when running the main modes where RandomX hashes are used, but can be used with `CGO_ENABLED=0` specifically as a library.
@ -89,17 +32,4 @@ $ git clone --depth 1 --branch master https://github.com/tevador/RandomX.git /tm
sudo make install && \
cd ../ && \
rm -rf /tmp/RandomX
```
To generate web templates, run this command:
```bash
$ go run github.com/valyala/quicktemplate/qtc@v1.7.0
```
To update module dependencies, use these commands:
```bash
$ for f in $(find . -name go.mod); do (cd $(dirname $f); GOPROXY=direct go get -u ./...); done
$ for f in $(find . -name go.mod); do (cd $(dirname $f); GOPROXY=direct go mod tidy); done
$ go work sync
```