duniter issueshttps://git.duniter.org/nodes/typescript/duniter/-/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/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/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/1399Champ `monetaryMass` incorrect sur certains blocs2020-05-10T16:03:49+02:00Cédric MoreauChamp `monetaryMass` incorrect sur certains blocsVoir https://forum.duniter.org/t/bug-de-masse-monetaire-duniter-1-7/7141Voir https://forum.duniter.org/t/bug-de-masse-monetaire-duniter-1-7/71411.10https://git.duniter.org/nodes/typescript/duniter/-/issues/1383WS2P: allow `upnp: true` combined with `port` and/or `remoteport`2020-10-04T18:30:46+02:00Cédric MoreauWS2P: allow `upnp: true` combined with `port` and/or `remoteport`Today if we use `upnp: true`, then Duniter ignores the `port` and `remoteport` option. This means that we can't precise the ports we want to be opened by UPnP. UPnP decides of everything currently.
I would like to be able to choose whic...Today if we use `upnp: true`, then Duniter ignores the `port` and `remoteport` option. This means that we can't precise the ports we want to be opened by UPnP. UPnP decides of everything currently.
I would like to be able to choose which ports UPnP will use.2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1381/node/sandboxes does not display certifications sandboxes2020-10-04T18:31:02+02:00Moul/node/sandboxes does not display certifications sandboxes```json
/node/sandboxes
{
"identities": {
"size": 5000,
"free": 4866
},
"memberships": {
"size": 5000,
"free": 4001
},
"transactions": {
"size": 200,
"free": 179
}
}
``````json
/node/sandboxes
{
"identities": {
"size": 5000,
"free": 4866
},
"memberships": {
"size": 5000,
"free": 4001
},
"transactions": {
"size": 200,
"free": 179
}
}
```2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1376Update ws module from v1 to v72019-05-12T18:25:44+02:00MoulUpdate ws module from v1 to v72.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1374When synchronisation get stuck by a no space left, nothing happen2019-05-07T22:51:48+02:00MoulWhen synchronisation get stuck by a no space left, nothing happenNo space left error is not handle during synchronisation, it get stuck without progress on the bars:
```bash
Progress:
Milestones: [||||||||||||||||||||] 100 %
Download: [|||| ] 21 %
Apply: [|||| ...No space left error is not handle during synchronisation, it get stuck without progress on the bars:
```bash
Progress:
Milestones: [||||||||||||||||||||] 100 %
Download: [|||| ] 21 %
Apply: [|||| ] 21 %
Sandbox: [ ] 0 %
Peers: [ ] 0 %
Status: GOT chunck #188/874 from 47000 to 47249 on peer ts.g1.librelois.fr
^C
tail -f ~/.config/duniter/duniter_default/duniter.log
2019-05-07T22:28:06+02:00 - error: Error: ENOSPC: no space left on device, write
2019-05-07T22:28:06+02:00 - error: Unhandled rejection: Error: ENOSPC: no space left on device, write
2019-05-07T22:28:06+02:00 - error: Error: ENOSPC: no space left on device, write
2019-05-07T22:28:06+02:00 - error: Unhandled rejection: Error: ENOSPC: no space left on device, write
2019-05-07T22:28:06+02:00 - error: Error: ENOSPC: no space left on device, write
```Horizonhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1371Replacing naclb by node-sodium2019-05-07T22:08:29+02:00Cédric MoreauReplacing naclb by node-sodiumNaclb was a handmaid port dependency for fast, native C++ execution of Nacl (speed needed for PoW).
Today, it exists [node-sodium](https://github.com/paixaop/node-sodium) which seems to do this exact job and be maintained actively and b...Naclb was a handmaid port dependency for fast, native C++ execution of Nacl (speed needed for PoW).
Today, it exists [node-sodium](https://github.com/paixaop/node-sodium) which seems to do this exact job and be maintained actively and bases on stantard C++ libs.
Maybe we could replace naclb by node-sodium.Horizonhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1369Synchronization logs are not stored into the log file2020-10-04T18:31:12+02:00MoulSynchronization logs are not stored into the log file> https://forum.duniter.org/t/g1-test-dans-les-choux/4192/335?u=moul> https://forum.duniter.org/t/g1-test-dans-les-choux/4192/335?u=moul2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1363JSON blockchain archives are duplicated2020-10-04T18:31:40+02:00Pascal EngélibertJSON blockchain archives are duplicatedBoth `archives` and `g1` folders contain exactly the same data (excepted the `fork` value), so 260 MB could be saved by removing one of them.Both `archives` and `g1` folders contain exactly the same data (excepted the `fork` value), so 260 MB could be saved by removing one of them.2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1354Add an automated test for dal.isMember()2022-07-07T10:45:00+02:00Cédric MoreauAdd an automated test for dal.isMember()See https://forum.duniter.org/t/bug-a-l-ajout-d-une-certification-d-un-non-membre-dans-le-bloc-a-calculer-v1-7-16/5952
`isMember()` should work: return true when and identity is member, false when it’s not
Tests to lock this feature fi...See https://forum.duniter.org/t/bug-a-l-ajout-d-une-certification-d-un-non-membre-dans-le-bloc-a-calculer-v1-7-16/5952
`isMember()` should work: return true when and identity is member, false when it’s not
Tests to lock this feature fixed in https://git.duniter.org/nodes/typescript/duniter/commit/f9778328c483f7a5a0b565f0f9d539fb175bec551.10https://git.duniter.org/nodes/typescript/duniter/-/issues/1353An identity with its membership which just expires proceed block calculation2020-10-04T18:34:17+02:00MoulAn identity with its membership which just expires proceed block calculation> Cf: https://forum.duniter.org/t/g1-test-dans-les-choux/4192/316?u=moul
It is not happening when launching pow with an already expired membership identity.
But, it happen, when an member identity is calculating, then loose its members...> Cf: https://forum.duniter.org/t/g1-test-dans-les-choux/4192/316?u=moul
It is not happening when launching pow with an already expired membership identity.
But, it happen, when an member identity is calculating, then loose its membership and keep calculate.
There is no further check at each block if the identity is still member. A mechanism should handle that.2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1349Deno instead of Nodejs?2020-05-10T18:15:04+02:00MoulDeno instead of Nodejs?- [Deno website](https://deno.land/)
- [Deno repository](https://github.com/denoland/deno)
> A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio.
Deno would be able to interpret TypeScript directly.
No need for transp...- [Deno website](https://deno.land/)
- [Deno repository](https://github.com/denoland/deno)
> A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio.
Deno would be able to interpret TypeScript directly.
No need for transpilation to JavaScript.
This is the project from the same author of Node.js.
The project is still in early stage. But, it worth having a look.Horizonhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1338Quick sync and normal sync do not lead to the same b_index2020-04-30T22:29:29+02:00Cédric MoreauQuick sync and normal sync do not lead to the same b_indexSee https://forum.duniter.org/t/g1-test-bloquee-bloc-genere-mais-refuse-de-part-sa-taille/5648/47See https://forum.duniter.org/t/g1-test-bloquee-bloc-genere-mais-refuse-de-part-sa-taille/5648/471.10https://git.duniter.org/nodes/typescript/duniter/-/issues/1335Have command specific options2019-01-29T12:17:41+01:00MoulHave command specific optionscf https://www.npmjs.com/package/commander#command-specific-options
This is really annoying to find which option apply to which command.
There is some specifics option only for `sync` command for instance.
They should only be accessib...cf https://www.npmjs.com/package/commander#command-specific-options
This is really annoying to find which option apply to which command.
There is some specifics option only for `sync` command for instance.
They should only be accessible via `duniter sync -h` and not via `duniter -h`.
General options which can apply to many commands should stay at the root of the help.2.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1334Write a test for issue #13322020-04-30T22:26:18+02:00Cédric MoreauWrite a test for issue #1332Issue #1332 is fixed, but we need a test to lock the behavior.Issue #1332 is fixed, but we need a test to lock the behavior.Horizon