duniter merge requestshttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests2023-06-12T13:30:32+02:00https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1427fix(sync): don't lose nodes on single download err2023-06-12T13:30:32+02:00pinifix(sync): don't lose nodes on single download errThis is a cherry-pick of commit 7a59f46 from branch `dev`. This should help
with synchronizing.
`P2pCandidate.dlPromise` promise doesn't resolve on download errors
such as socket timeouts. Each time such an error occurs, the node is los...This is a cherry-pick of commit 7a59f46 from branch `dev`. This should help
with synchronizing.
`P2pCandidate.dlPromise` promise doesn't resolve on download errors
such as socket timeouts. Each time such an error occurs, the node is lost
for the sync because the 'this.dlPromise.isResolved()' check used for
testing the node's availability never succeeds anymore for this node.
This patch hardens the blocks downloading in two ways:
* Retrying the download up to 5 times when the number of returned blocks is
different from what was requested
* On failure returns an empty block array so that the dlPromise is resolved
and the node failure could be handled as expected at the P2PSyncDownloader
level triggering the `P2pCandidate.addFailure()` function.https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1425fix(1442): Improve BMA '/tx/history'2023-06-06T18:10:07+02:00Benoit Lavenierfix(1442): Improve BMA '/tx/history'See issue #1442See issue #1442Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1434fix(1447): Reverting a block should update LevelDBSindex.indexForTrimming (an...2023-06-06T18:09:18+02:00Benoit Lavenierfix(1447): Reverting a block should update LevelDBSindex.indexForTrimming (and...fix(1447): Reverting a block should update LevelDBSindex.indexForTrimming (and not indexForConditions) - close #1447fix(1447): Reverting a block should update LevelDBSindex.indexForTrimming (and not indexForConditions) - close #1447https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1432fix(1445): When synchronize, use BMA/BMAS peers having a path (e.g. /bma):...2023-06-06T18:08:54+02:00Benoit Lavenierfix(1445): When synchronize, use BMA/BMAS peers having a path (e.g. /bma):...fix(1445): When synchronize, use BMA/BMAS peers having a path (e.g. /bma): PeerDTP.getURL() was not using the path - close #1445fix(1445): When synchronize, use BMA/BMAS peers having a path (e.g. /bma): PeerDTP.getURL() was not using the path - close #1445https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1433fix(1446): When reverting a block, delete source condition index only if no c...2023-06-06T18:08:09+02:00Benoit Lavenierfix(1446): When reverting a block, delete source condition index only if no create record exists - close #1446fix(1446): When reverting a block, delete source condition index only if no create record exists - close #1446fix(1446): When reverting a block, delete source condition index only if no create record exists - close #1446https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1412chore: ignore cargo-deny advisories2023-03-20T00:49:14+01:00pinichore: ignore cargo-deny advisoriesWe won't fix them because Duniter v1 will soon be deprecated.We won't fix them because Duniter v1 will soon be deprecated.https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1407Update README.md - commands to install dependencies2022-12-02T20:58:35+01:00pokaUpdate README.md - commands to install dependenciesCmake have to be installed to avoid this error:
```
failed to run custom build command for `libz-sys v1.1.3`
```Cmake have to be installed to avoid this error:
```
failed to run custom build command for `libz-sys v1.1.3`
```https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1396#1427: Introduce rust and gitlab-ci-linter pre-commit hooks2021-05-17T23:20:37+02:00Moul#1427: Introduce rust and gitlab-ci-linter pre-commit hooks- Introduce Rust and `gitlab-ci-linter` `pre-commit` hooks
- Document `pre-commit` usage
- Remove `rusty-hook`
Close #1427.- Introduce Rust and `gitlab-ci-linter` `pre-commit` hooks
- Document `pre-commit` usage
- Remove `rusty-hook`
Close #1427.2.0ÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1393#1426: Allow a wider range of Node.js versions and document dependencies to b...2021-05-17T12:25:28+02:00Moul#1426: Allow a wider range of Node.js versions and document dependencies to build- Introduce https://crates.io/crates/version-compare
- Allow Node.js version between 10.18.0 and 11.0.0
- https://nodejs.org/en/download/releases/
---
- Doc: Add precision to install `gcc-c++` for Fedora
Close #1426.- Introduce https://crates.io/crates/version-compare
- Allow Node.js version between 10.18.0 and 11.0.0
- https://nodejs.org/en/download/releases/
---
- Doc: Add precision to install `gcc-c++` for Fedora
Close #1426.2.0ÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1390#1426: Allow a wider range of Node.js versions and document dependencies to b...2021-05-17T08:15:41+02:00Moul#1426: Allow a wider range of Node.js versions and document dependencies to build- Introduce https://crates.io/crates/version-compare
- Allow Node.js version between 10.18.0 and 11.0.0
- https://nodejs.org/en/download/releases/
---
- Doc: Add precision to install `gcc-c++` for Fedora
Close #1426.- Introduce https://crates.io/crates/version-compare
- Allow Node.js version between 10.18.0 and 11.0.0
- https://nodejs.org/en/download/releases/
---
- Doc: Add precision to install `gcc-c++` for Fedora
Close #1426.2.0ÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1389fix(sync): don't lose nodes on single download err2021-05-16T14:36:49+02:00pinifix(sync): don't lose nodes on single download err`P2pCandidate.dlPromise` promise doesn't resolve on download errors
such as socket timeouts. Each time such an error occurs, the node is lost
for the sync because the 'this.dlPromise.isResolved()' check used for
testing the node's availa...`P2pCandidate.dlPromise` promise doesn't resolve on download errors
such as socket timeouts. Each time such an error occurs, the node is lost
for the sync because the 'this.dlPromise.isResolved()' check used for
testing the node's availability never succeeds anymore for this node.
This patch hardens the blocks downloading in two ways:
* Retrying the download up to 5 times when the number of returned blocks is
different from what was requested
* On failure returns an empty block array so that the dlPromise is resolved
and the node failure could be handled as expected at the P2PSyncDownloader
level triggering the `P2pCandidate.addFailure()` function.ÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1383feat(bma): add field received to pending tx & writtenTime to tx2021-05-12T14:44:30+02:00Éloïsfeat(bma): add field received to pending tx & writtenTime to txhttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1384fix(sync): when called with --only-peers2021-05-11T13:13:13+02:00pinifix(sync): when called with --only-peersWhen 'sync' is called with option '--only-peers', the path to function
'RemoteSynchronizer.getPeers()' is not the same as the default.
In this case we need to ensure that 'init()' was properly called and
proceed without a watcher.When 'sync' is called with option '--only-peers', the path to function
'RemoteSynchronizer.getPeers()' is not the same as the default.
In this case we need to ensure that 'init()' was properly called and
proceed without a watcher.https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1378Docker entrypoint: rework2021-05-07T11:58:13+02:00piniDocker entrypoint: reworkImprove entrypoint to handle the case where '/etc/duniter' is not a persistent volume.
And fix a few stupid errors.
And add a `DEBUG_ENTRYPOINT` boolean variable to enable `set -x` in the entrypoint.Improve entrypoint to handle the case where '/etc/duniter' is not a persistent volume.
And fix a few stupid errors.
And add a `DEBUG_ENTRYPOINT` boolean variable to enable `set -x` in the entrypoint.https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1377Fix titles in docker.md2021-05-05T13:54:43+02:00Vincent TexierFix titles in docker.mdÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1300Draft: Feature/oxyde pow2021-05-01T11:40:31+02:00ÉloïsDraft: Feature/oxyde pow2.0https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1376split in several repos2021-04-25T16:50:46+02:00Éloïssplit in several reposhttps://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1373Docker image: add entrypoint script2021-04-18T15:04:37+02:00piniDocker image: add entrypoint scriptFirst of all, this script moves the duniter configuration file 'conf.json'
into the '/etc/duniter' volume, so that one could delete the '/var/lib/duniter'
volume without losing the configuration.
A symbolic link is set up into /var/lib/...First of all, this script moves the duniter configuration file 'conf.json'
into the '/etc/duniter' volume, so that one could delete the '/var/lib/duniter'
volume without losing the configuration.
A symbolic link is set up into /var/lib/duniter/duniter_default to point to
the new path:
/var/lib/duniter/duniter_default/conf.json -> /etc/duniter/conf.json
Then, this script enables the folowing environment variables:
* DUNITER_MANUAL_CONFIG (boolean, default = false)
When set to 'true' (or 'yes', or '1'), the script waits until the file
'/etc/duniter/conf.json.orig' is present before starting the duniter
service. Here is the workflow when enabled:
1. wait for '/etc/duniter/conf.json.orig'
2. if this file was changed since the previous startup:
2.1. Save 'conf.json' to 'conf.json.old'
2.2. Replace 'conf.json' with 'conf.json.orig'
2.3. Save the new file's checksum to compare with at next startup
3. continue the startup sequence
When set to false, the startup sequence continues.
* DUNITER_AUTO_SYNC (boolean, default = false)
Requires 'DUNITER_SYNC_HOST'.
When set to 'true' (or 'yes', or '1') and the folder
'/var/lib/duniter/duniter_default/data' doesn't exist, a 'duniter sync'
command will be issued before starting the service.
When set to false, the service is started directly.
* DUNITER_SYNC_HOST (hostname, default = "")
This is the 'host:port' parameter to use with 'duniter sync' when
'DUNITER_AUTO_SYNC' is enabled.
The synchronization won't be launched when the wariable is not defined
or empty.https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1360[feat] gva: BlocksByCommonTime DB, TxsByBlock DB2021-03-15T02:33:17+01:00Pascal Engélibert[feat] gva: BlocksByCommonTime DB, TxsByBlock DBAdd BlocksByCommonTime and TxsByBlock indexes to gva-db.Add BlocksByCommonTime and TxsByBlock indexes to gva-db.https://git.duniter.org/nodes/typescript/duniter/-/merge_requests/1353[feat] gva: blocks2021-03-14T22:08:46+01:00Pascal Engélibert[feat] gva: blocksAdd paginated request `blocks` to GVA.
@librelois Ça marche ! Par contre :
* En mode DESC, faut-il que le cursor soit inclus ou exclus ?
* Je ne sais pas comment obtenir proprement le nombre de blocs dans la db. J'en aurais besoin...Add paginated request `blocks` to GVA.
@librelois Ça marche ! Par contre :
* En mode DESC, faut-il que le cursor soit inclus ou exclus ?
* Je ne sais pas comment obtenir proprement le nombre de blocs dans la db. J'en aurais besoin pour définir `first_cursor_opt` dans un certain cas. (d'où le `todo!`)
* (lignes 92-172) Pour éviter d'écrire 4 fois la même chose en fonction du type du range, peut-être qu'il vaut mieux utiliser `first_cursor_opt.unwrap_or_default(0)..last_cursor_opt.unwrap_or_default(last_block_number)` ?
* Est-ce que j'utilise le bon type pour le numéro du bloc ?
* Faut-il écrire un test de la requête GVA ?