typescript issueshttps://git.duniter.org/groups/nodes/typescript/-/issues2023-06-16T12:41:50+02:00https://git.duniter.org/nodes/typescript/duniter/-/issues/1449Unit tests : SqlLite connection not well closed2023-06-16T12:41:50+02:00Benoit LavenierUnit tests : SqlLite connection not well closedWhen trying to upgrade `mocha`, i found that DB connection are not well closed, because of write queries, that are asynchronous (see `SqliteNodeIOManager.writePromise`).
Inside `SqliteNodeIOManager.close()`, we wait the end of writing q...When trying to upgrade `mocha`, i found that DB connection are not well closed, because of write queries, that are asynchronous (see `SqliteNodeIOManager.writePromise`).
Inside `SqliteNodeIOManager.close()`, we wait the end of writing queries (add an `await this.writePromise;`1.8.7https://git.duniter.org/nodes/typescript/duniter/-/issues/1447Reverting a block will never trim LevelDBSindex.indexForTrimming2023-06-11T10:45:07+02:00Benoit LavenierReverting a block will never trim LevelDBSindex.indexForTrimmingIn [`LevelDBSindex.removeBlock()`](https://git.duniter.org/nodes/typescript/duniter/-/blob/dev/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts#L313) the function `trimWrittenOn()` is supposed to clean entries of the index `indexForTrimming...In [`LevelDBSindex.removeBlock()`](https://git.duniter.org/nodes/typescript/duniter/-/blob/dev/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts#L313) the function `trimWrittenOn()` is supposed to clean entries of the index `indexForTrimming` but instead indexForConditions is used :
```
private async trimWrittenOn(writtenOn: number, id: string) {
const k = LevelDBSindex.trimWrittenOnKey(writtenOn);
const existing = await this.getWrittenOnSourceIds(writtenOn);
const trimmed = arrayPruneAllCopy(existing, id);
if (trimmed.length) {
await this.indexForConditionsput(k, trimmed); // <= SHOULD BE indexForTrimming
} else {
await this.indexForConditions.del(k); // <= SHOULD BE indexForTrimming
}
}
```Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1446Reverting a block that consumed a source can delete the source, in SINDEX sub...2023-06-12T12:56:27+02:00Benoit LavenierReverting a block that consumed a source can delete the source, in SINDEX sub-index (indexForConditions)This unit test failed "revert b#3-4 and re-commit block#3 should be ok"
Cause:
- In [`LevelDBSindex.removeBlock()`](https://git.duniter.org/nodes/typescript/duniter/-/blob/dev/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts#L313) (for re...This unit test failed "revert b#3-4 and re-commit block#3 should be ok"
Cause:
- In [`LevelDBSindex.removeBlock()`](https://git.duniter.org/nodes/typescript/duniter/-/blob/dev/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts#L313) (for reverting a block), we call `trimConditions()` when a consumption is undone (when the `UPDATE` record should be deleted) even if a source creation exists.
Solution:
- The correct approach would be to call `trimConditions()` only when no source creation exists anymore.Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1445Synchronize on BMAS enpoint with a path (e.g. `/bma`)2023-06-06T18:02:11+02:00Benoit LavenierSynchronize on BMAS enpoint with a path (e.g. `/bma`)Yunohost Duniter package deploy BMAS on path `/bma`. Such endpoints seems to be not used by `sync` commandYunohost Duniter package deploy BMAS on path `/bma`. Such endpoints seems to be not used by `sync` commandhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1444SqliteTable: all columns indexed ?2023-06-16T12:38:35+02:00Benoit LavenierSqliteTable: all columns indexed ?En regardant de plus près les index qui existent sur les tables, je m’aperçois que **toutes les colonnes sont indexées**. Par exemple dans le cas de la table des TX, cela fait beaucoup de monde ! :)
Voici [le code responsable](https://...En regardant de plus près les index qui existent sur les tables, je m’aperçois que **toutes les colonnes sont indexées**. Par exemple dans le cas de la table des TX, cela fait beaucoup de monde ! :)
Voici [le code responsable](https://git.duniter.org/nodes/typescript/duniter/-/blob/release/1.8/app/lib/dal/indexDAL/sqlite/SqliteTable.ts#L63) à mon avis :
```typescript
generateCreateIndexes() {
return this.keys()
.map((fieldName) => {
return `CREATE INDEX IF NOT EXISTS idx_${this.name}_${fieldName} ON ${this.name} (${fieldName});\n`;
})
.join("");
}
keys(): (keyof T)[] {
return Underscore.keys(this.fields);
}
```
Il s'agit d'un vieux code. Mais cela doit ralentir de beaucoup l'écriture dans la table, non ? D'autant que tout indexés semble inutile.
Par ailleurs je vois dans le constructeur que l'on a pour chaque colonne un `SqlFieldDefinition` avec un boolean `indexed`. Le but initial était sans doute d'utiliser cette valeur pour savoir quelle colonne indexées ou pas.
Je me trompes @cgeek ? Redis moi stp, si tu te penses que ca peut-être utile que j'optimise des choses de ce côté là aussi.
La correction semble toute simple, mais globalement il faudra retester une synchro pour voir si ca change quelque chose.1.8.7https://git.duniter.org/nodes/typescript/duniter/-/issues/1442Improve BMA `/tx/history/:pubkey/pending`, `/tx/history/:pubkey/blocks/:from/...2023-06-16T12:39:10+02:00Benoit LavenierImprove BMA `/tx/history/:pubkey/pending`, `/tx/history/:pubkey/blocks/:from/:to` and `/tx/history/:pubkey/times/:from/:to`I thhink we cn optimize the response time of BMA `/tx/history/:pubkey/pending`
In Duniter `dev` branch, i can see that:
- in `transactions.ts` the pubkey's full history is laoded (including sending and received), then filtered :
```ts...I thhink we cn optimize the response time of BMA `/tx/history/:pubkey/pending`
In Duniter `dev` branch, i can see that:
- in `transactions.ts` the pubkey's full history is laoded (including sending and received), then filtered :
```ts
async getPendingForPubkey(req: any): Promise<HttpTxHistory> {
const pubkey = await ParametersService.getPubkeyP(req);
return this.getFilteredHistory(pubkey, function (res: any) {
const histo = res.history;
Underscore.extend(histo, { sent: [], received: [] });
return res;
});
}
private async getFilteredHistory(
pubkey: string,
filter: any
): Promise<HttpTxHistory> {
let history = await this.server.dal.getTransactionsHistory(pubkey);
let result = {
currency: this.conf.currency,
pubkey: pubkey,
history: {
sending: history.sending.map(dbtx2HttpTxOfHistory),
received: history.received.map(dbtx2HttpTxOfHistory),
sent: history.sent.map(dbtx2HttpTxOfHistory),
pending: history.pending.map(dbtx2HttpTxOfHistory),
},
};
return filter(result);
}
}
```
- there is not DAL function to get only pending TX, by pubkey1.8.7https://git.duniter.org/nodes/typescript/duniter/-/issues/1441BMA /node/summary : dump config's storage2023-06-16T12:38:48+02:00Benoit LavenierBMA /node/summary : dump config's storageAdd storage infos into `/node/summary`.
New `/node/sumary` response should be :
```json
{
"duniter": {
"software": "duniter",
"version": "1.8.7",
"forkWindowSize": 100,
"storage": {
"transaction": true,
"w...Add storage infos into `/node/summary`.
New `/node/sumary` response should be :
```json
{
"duniter": {
"software": "duniter",
"version": "1.8.7",
"forkWindowSize": 100,
"storage": {
"transaction": true,
"wotwizard": false
}
}
}
```1.8.7Benoit LavenierBenoit Lavenierhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1437GVA: bug with some membres or past members balances2023-03-21T00:23:50+01:00pokaGVA: bug with some membres or past members balancesThis is the related thread: https://forum.duniter.org/t/bug-balance-db-gva/9805
Some membre wallets or past members have a negative balance..
We can see it easily on this page, when order by balance (Solde Ğ1 column): https://g1-stats....This is the related thread: https://forum.duniter.org/t/bug-balance-db-gva/9805
Some membre wallets or past members have a negative balance..
We can see it easily on this page, when order by balance (Solde Ğ1 column): https://g1-stats.axiom-team.fr/data/search.htmlhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1436[wiki] missing images in wiki on installation section2022-11-22T19:34:47+01:00Antonio Vanegas[wiki] missing images in wiki on installation section## Overview
Hi, I'm new, but I want try to contribute with Ğ1. Also I want improve my Rust skills or Android skills with this project, and of course try to expand this initiative. For now I found that the images on the server installati...## Overview
Hi, I'm new, but I want try to contribute with Ğ1. Also I want improve my Rust skills or Android skills with this project, and of course try to expand this initiative. For now I found that the images on the server installation guide are missing:
![screenshot20221122_192937](/uploads/b3423d57dfe5d417c6eb7b0247c45a79/screenshot20221122_192937.jpg)https://git.duniter.org/nodes/typescript/duniter/-/issues/1435En fonction du nœud la demande pour être membre visible ou pas2022-09-12T20:58:14+02:00L'AfricainEn fonction du nœud la demande pour être membre visible ou pasBonjour,
D'avance je m'excuse si je ne suis pas au bon endroit, mais vous me le signalerez.
j'aide une personne à devenir membre. On a passé son compte en demande pour être membre. 6 personnes l'ont certifié. Mais si je suis sur le nœud...Bonjour,
D'avance je m'excuse si je ne suis pas au bon endroit, mais vous me le signalerez.
j'aide une personne à devenir membre. On a passé son compte en demande pour être membre. 6 personnes l'ont certifié. Mais si je suis sur le nœud gi.duniter.org on me dit qu'aucune demande pour être membre n'a été faite. Si je change de nœud il est bien reconnu comme demandeur. Faut-il refaire une demande? Va-t-il perdre ses certifications?
![chezmoi](/uploads/4c7d8ef608141de106574503f558da83/chezmoi.png)
![pasdedemandes](/uploads/f489db45244fed4a1c1a47ed63651388/pasdedemandes.png)https://git.duniter.org/nodes/typescript/duniter/-/issues/1434Error `ruleNumber`2022-08-22T11:12:53+02:00Cédric MoreauError `ruleNumber`Duniter nodes are easily stuck in a fork when the frequency of forks increase.
The logs show `Error: ruleNumber`:
```
2022-08-18T20:40:11+02:00 - e[32minfoe[39m: Block resolution: 1 potential blocks after current#551678...
2022-08-18T2...Duniter nodes are easily stuck in a fork when the frequency of forks increase.
The logs show `Error: ruleNumber`:
```
2022-08-18T20:40:11+02:00 - e[32minfoe[39m: Block resolution: 1 potential blocks after current#551678...
2022-08-18T20:40:11+02:00 - e[31merrore[39m: Error: ruleNumber
at Function.checkBlock (/opt/duniter/app/lib/blockchain/DuniterBlockchain.js:63:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
```
Along with `NotFoundError: Key not found in database`:
```
2022-08-18T16:05:37+02:00 - �[32minfo�[39m: Block #551677 added to the blockchain in 246 ms
2022-08-18T16:05:39+02:00 - �[32minfo�[39m: Block #551677 added to the blockchain in 253 ms
2022-08-18T16:05:39+02:00 - �[32minfo�[39m: Block #551678 added to the blockchain in 70 ms
2022-08-18T16:05:39+02:00 - �[31merror�[39m: Unhandled rejection: NotFoundError: Key not found in database [1660828921]
2022-08-18T16:05:39+02:00 - �[31merror�[39m: NotFoundError: Key not found in database [1660828921]
at /opt/duniter/node_modules/levelup/lib/levelup.js:192:15
```
Actually, the `ruleNumber` error is a symptom of the `Key not found in database` error, which is a low level issue in the data access layer. A LevelDB key has been deleted whereas it is supposed to still exist.Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1423WS2P UPnP: start port lookup at less than 209002020-12-03T13:29:00+01:00Cédric MoreauWS2P UPnP: start port lookup at less than 20900I recently moved my home, and my Freebox IP changed. By default in such situation, Free gives you a brand new IP configuration and by default a dynamic one. In such case, the range of available ports is [1;16383].
But as Duniter starts ...I recently moved my home, and my Freebox IP changed. By default in such situation, Free gives you a brand new IP configuration and by default a dynamic one. In such case, the range of available ports is [1;16383].
But as Duniter starts its lookup at 20900, the UPnP port opening just fails. Always.
Maybe we could start the lookup at a lower range, like 10900? (keeping the "900" thing) I don't know if other users have constraints too that we should take into account as well making 10900 a wrong start.https://git.duniter.org/nodes/typescript/duniter/-/issues/1422duniter 1.8.0 always stops after a few time on raspberry Pi2021-05-10T19:57:37+02:00Benoît Rouitsduniter 1.8.0 always stops after a few time on raspberry PiHello. On a Raspberry Pi 4GB, Duniter 1.8.0 always stops after a few time running (say one or two days). I have to restart it manually almost every day. I don't see any logs generated by duniter for help. BTW previous duniter version was...Hello. On a Raspberry Pi 4GB, Duniter 1.8.0 always stops after a few time running (say one or two days). I have to restart it manually almost every day. I don't see any logs generated by duniter for help. BTW previous duniter version was working without problem. Tell me how can I help to troubleshoot that issue.https://git.duniter.org/nodes/typescript/duniter/-/issues/1421Upgrade to a newest Node.js version before Node.js v10 maintenance get dropped2023-06-09T11:11:28+02:00MoulUpgrade to a newest Node.js version before Node.js v10 maintenance get droppedDuniter is currently using Node.js v10.
This version is the last release in maintenance state before being dropped, as planned, on April 30th of 2021.
I am not sure how long would Node.js and TS/JS code would still live in Duniter, but u...Duniter is currently using Node.js v10.
This version is the last release in maintenance state before being dropped, as planned, on April 30th of 2021.
I am not sure how long would Node.js and TS/JS code would still live in Duniter, but updating Node.js version would allow to get security fixes from Node.js side.
https://nodejs.org/en/about/releases/2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1419Migrer les fichiers keyring.yml existant en 6402020-10-04T18:22:06+02:00ÉloïsMigrer les fichiers keyring.yml existant en 640A faire en Rust quand cette partie sera migrée car pas réussi en NodeJs, voir #1416A faire en Rust quand cette partie sera migrée car pas réussi en NodeJs, voir #14162.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1417import-lookup et crawl-lookup devraient transférer les documents de révocation2020-07-23T11:24:27+02:00matograineimport-lookup et crawl-lookup devraient transférer les documents de révocationLes fonctions import-lookup et crawl-lookup ne transmettent que les documents d'entrée dans la WoT. Il me semble tout aussi essentiel de transmettre les documents de révocation.Les fonctions import-lookup et crawl-lookup ne transmettent que les documents d'entrée dans la WoT. Il me semble tout aussi essentiel de transmettre les documents de révocation.https://git.duniter.org/nodes/typescript/modules/duniter-currency-monit/-/issues/70WotEx : seuls les membres référents sont affichés2020-07-17T10:41:33+02:00matograineWotEx : seuls les membres référents sont affichésSur la page Wotex, seuls les membres référents (bleu) sont affichés. Il n'y a pas de membre non-référent.Sur la page Wotex, seuls les membres référents (bleu) sont affichés. Il n'y a pas de membre non-référent.https://git.duniter.org/nodes/typescript/duniter/-/issues/1415gen-root requires undocumented --submit-local or (--submit-host and --submit-...2020-07-06T11:35:44+02:00Santiagogen-root requires undocumented --submit-local or (--submit-host and --submit-port) arguments`gen-root` calls `generateAndSend()`:
https://git.duniter.org/nodes/typescript/duniter/-/blob/v1.8.1/app/modules/prover/index.ts#L184
that checks if there is a submit host option passed along with the command:
https://git.duniter.org/n...`gen-root` calls `generateAndSend()`:
https://git.duniter.org/nodes/typescript/duniter/-/blob/v1.8.1/app/modules/prover/index.ts#L184
that checks if there is a submit host option passed along with the command:
https://git.duniter.org/nodes/typescript/duniter/-/blob/v1.8.1/app/modules/prover/index.ts#L248
however, this seems undocumented, at least `--help` doesn't describes this.https://git.duniter.org/nodes/typescript/modules/duniter-ui/-/issues/19Wrong translation2020-05-27T18:16:16+02:00matograineWrong translationOn Duniter v1.8.0-beta3, I get translations mixing FR and EN :
> ## Synchroniser
> **Votre noeud** will be synchronized with an existing currency: just enter technical details about a **noeud** to sync with it.
Moreover, some strings a...On Duniter v1.8.0-beta3, I get translations mixing FR and EN :
> ## Synchroniser
> **Votre noeud** will be synchronized with an existing currency: just enter technical details about a **noeud** to sync with it.
Moreover, some strings are not displayed : only the key is shown :
![image](https://forum.duniter.org/uploads/default/original/2X/4/4f990276a2a0ee50861201590a65e18606e98d24.png)https://git.duniter.org/nodes/typescript/modules/duniter-currency-monit/-/issues/69erreur sur page GaussianWotQuality2020-04-24T18:39:12+02:00ty kaynerreur sur page GaussianWotQualitysur la page http://localhost:10500/gaussianWotQuality?lg=fr
on trouve cette erreur sur la branche master:
TypeError: Cannot read property 'detailedDistance' of null
at membersQuality (/var/www/html/duniter-currency-monit/routes/tool...sur la page http://localhost:10500/gaussianWotQuality?lg=fr
on trouve cette erreur sur la branche master:
TypeError: Cannot read property 'detailedDistance' of null
at membersQuality (/var/www/html/duniter-currency-monit/routes/tools/membersQuality.js:36:31)
at module.exports (/var/www/html/duniter-currency-monit/routes/gaussianWotQuality2.js:69:51)
at
at process._tickCallback (internal/process/next_tick.js:182:7)