L’algorithme de Cesium v1.7.x exclus les API BMA des nœuds Duniter v1.9.x.
Je veux bien faire des images de la 1.9.1 mais je ne vois aucun tag de ce nom sur le dépôt. C’est normal ?
J’ai tenté un build à partir de la branche release/1.9.1 et ça échoue :
Step 11/28 : RUN PATH=${HOME}/.cargo/bin:${PATH} RUSTFLAGS="-C target-feature=-crt-static -L/usr/lib" make -C release ADD_DEBUG=N INSTALL_DEX=${INSTALL_DEX} server-gui clean && rm -rf work/extra
---> Running in 05372e5b65a5
make: Entering directory '/duniter/release'
make[1]: Entering directory '/duniter/work'
> leveldown@5.6.0 install /duniter/work/node_modules/leveldown
> node-gyp-build
> sqlite3@4.1.1 install /duniter/work/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
[sqlite3] Success: "/duniter/work/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" is installed via remote
added 878 packages from 1069 contributors and audited 881 packages in 10.863s
19 packages are looking for funding
run `npm fund` for details
found 161 vulnerabilities (25 low, 34 moderate, 80 high, 22 critical)
run `npm audit fix` to fix them, or `npm audit` for details
> duniter@1.9.1 install /duniter/work
> ./neon/build.sh
neon info forcing rebuild for new build settings
neon info running cargo
error: failed to parse lock file at: /duniter/work/Cargo.lock
Caused by:
package `constant_time_eq` is specified twice in the lockfile
neon ERR! cargo build failed
Cela semble étrange que personne d’autre n’ai eu ce soucis de double définition dans le fichier Cargo.lock …
Je UP ce post car il semblerait que les mêmes problèmes refont surface ! Voir le post ici : Connexion impossible sur Césium 1.7.16 - #7 par Moul - Césium - Forum Monnaie Libre
Et ça recommence : Connexion impossible sur Césium 1.7.16 - #15 par fdrubigny - Césium - Forum Monnaie Libre
Je retrouve ce post suite aux forks en série de ces derniers jours, merci @Maaltir.
J’ai repris la branche release/1.9.1 de @poka et j’y ai intégré les commits manquants de la branche de dev ainsi que ma branche de release/1.9 pour constuire une image docker 1.9.1-dev.
C’est moche (je lance le build 2 fois pour le moment pour contourner l’erreur ci-dessous) mais ça marche, je suis prêt à lancer un premier noeud v1.9.1.
Compiling duniter-server v1.9.1-dev (/duniter/work/rust-libs/duniter-server)
Finished `release` profile [optimized] target(s) in 9m 15s
neon info generating native/index.node
neon ERR! ENOENT: no such file or directory, copyfile '/duniter/work/target/release/libduniteroxyde.so' -> '/duniter/work/neon/native/index.node'
Error: ENOENT: no such file or directory, copyfile '/duniter/work/target/release/libduniteroxyde.so' -> '/duniter/work/neon/native/index.node'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! duniter@1.9.1 install: `./neon/build.sh`
npm ERR! Exit status 1
J’ai poussé mes modifs sur ma branche dev, j’ai passé les tests cargo test --all mais je n’arrive pas à lancer les tests avec npm test.
/duniter # npm test
> duniter@1.9.1 test /duniter
> DUNITER_JS_TESTS=yes DUNITER_LOG_STDOUT=no nyc --reporter html mocha
0 passing (3ms)
/duniter # node node_modules/mocha/bin/_mocha /duniter/test/
0 passing (5ms)
/duniter # /duniter/node_modules/.bin/tsc
app/lib/blockchain/DuniterBlockchain.ts:691:17 - error TS2339: Property 'saveSideBlock' does not exist on type 'FileDAL'.
691 await dal.saveSideBlock(block);
~~~~~~~~~~~~~
app/lib/dal/fileDAL.ts:842:23 - error TS2339: Property 'txDAL' does not exist on type 'FileDAL'.
842 tx = await this.txDAL.getTxByHash(hash);
~~~~~
app/lib/dal/fileDAL.ts:1279:21 - error TS2339: Property 'saveBlock' does not exist on type 'RustServer'.
1279 this.rustServer.saveBlock(block);
~~~~~~~~~
app/lib/dal/fileDAL.ts:1281:25 - error TS2304: Cannot find name 'cindex'.
1281 for (const entry of cindex) {
~~~~~~
app/lib/dal/fileDAL.ts:1285:9 - error TS2663: Cannot find name 'wotb'. Did you mean the instance member 'this.wotb'?
1285 wotb.addLink(from.wotb_id, to.wotb_id);
~~~~
app/lib/dal/fileDAL.ts:1287:9 - error TS2663: Cannot find name 'wotb'. Did you mean the instance member 'this.wotb'?
1287 wotb.removeLink(from.wotb_id, to.wotb_id);
~~~~
app/lib/dal/fileDAL.ts:1291:23 - error TS2339: Property 'blocks' does not exist on type '{ transactions: boolean; wotwizard: boolean; }'.
1291 if (conf.storage?.blocks !== false) {
~~~~~~
app/lib/dal/fileDAL.ts:1425:16 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1425 await this.txsDAL.saveBatch(records);
~~~~~~
app/lib/dal/fileDAL.ts:1436:16 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1436 await this.txsDAL.insertBatch(records);
~~~~~~
app/lib/dal/fileDAL.ts:1442:17 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1442 return this.txsDAL.removeAll();
~~~~~~
app/lib/dal/fileDAL.ts:1510:17 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1510 return this.txsDAL.getTxHistoryByPubkey(pubkey);
~~~~~~
app/lib/dal/fileDAL.ts:1514:17 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1514 return this.txsDAL.getTxHistoryByPubkeyBetweenBlocks(pubkey, +from, +to);
~~~~~~
app/lib/dal/fileDAL.ts:1518:17 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1518 return this.txsDAL.getTxHistoryByPubkeyBetweenTimes(pubkey, +from, +to);
~~~~~~
app/lib/dal/fileDAL.ts:1522:17 - error TS2339: Property 'txsDAL' does not exist on type 'FileDAL'.
1522 return this.txsDAL.getTxHistoryMempool(pubkey);
~~~~~~
app/lib/dal/indexDAL/sqlite/SqliteTransactions.ts:70:9 - error TS2345: Argument of type '{ hash: SqlNotNullableFieldDefinition; block_number: SqlNullableFieldDefiniti
on; locktime: SqlNullableFieldDefinition; ... 20 more ...; writtenOn: SqlNullableFieldDefinition; }' is not assignable to parameter of type '{ hash?: SqlFieldDefiniti
on | undefined; block_number?: SqlFieldDefinition | undefined; locktime?: SqlFieldDefinition | undefined; ... 18 more ...; recipient?: SqlFieldDefinition | undefined;
}'.
Object literal may only specify known properties, and 'written_on' does not exist in type '{ hash?: SqlFieldDefinition | undefined; block_number?: SqlFieldDefinitio
n | undefined; locktime?: SqlFieldDefinition | undefined; ... 18 more ...; recipient?: SqlFieldDefinition | undefined; }'.
70 written_on: new SqlNullableFieldDefinition("VARCHAR", false, 100),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
app/modules/bma/index.ts:24:24 - error TS2307: Cannot find module './lib/routing'.
24 import { Router } from "./lib/routing";
~~~~~~~~~~~~~~~
app/modules/bma/index.ts:250:16 - error TS2339: Property 'useOptimizedQueries' does not exist on type 'Server'.
250 server.useOptimizedQueries = true
~~~~~~~~~~~~~~~~~~~
app/modules/bma/index.ts:253:16 - error TS2339: Property 'gvaEnabled' does not exist on type 'Server'.
253 server.gvaEnabled = true
~~~~~~~~~~
app/modules/bma/index.ts:259:29 - error TS2339: Property 'getMainEndpoint' does not exist on type '{ BMA_PORTS_START: number; BMA_PORTS_END: number; DEFAULT_PORT: num
ber; IPV4_REGEXP: RegExp; IPV6_REGEXP: RegExp; HOST_ONION_REGEX: RegExp; PORT_START: number; ... 4 more ...; ERRORS: { ...; }; }'.
259 return BMAConstants.getMainEndpoint(conf)
~~~~~~~~~~~~~~~
app/modules/bma/lib/controllers/transactions.ts:41:5 - error TS2741: Property 'currency' is missing in type '{ version: number; issuers: string[]; inputs: string[]; o
utputs: string[]; unlocks: string[]; signatures: string[]; comment: string; locktime: number; hash: string; receivedTime: number; }' but required in type 'HttpTransac
tionPending'.
41 return {
~~~~~~~~
42 version: res.version,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
51 receivedTime: Math.floor(Date.now() / 1000),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 };
~~~~~~
app/modules/bma/lib/dtos.ts:799:3
799 currency: string;
~~~~~~~~
'currency' is declared here.
app/modules/bma/lib/dtos.ts:319:20 - error TS2339: Property 'time' does not exist on type 'TransactionDTO'.
319 time: tx.time || undefined
~~~~
app/modules/config.ts:24:20 - error TS2693: 'ProgramOptions' only refers to a type, but is being used as a value here.
24 cliOptions: [],ProgramOptions,
~~~~~~~~~~~~~~
app/modules/config.ts:40:21 - error TS2339: Property 'storeTxs' does not exist on type 'ProgramOptions'.
40 if (program.storeTxs || (program.storeTxs === undefined && !conf.nobma)) {
~~~~~~~~
app/modules/config.ts:40:42 - error TS2339: Property 'storeTxs' does not exist on type 'ProgramOptions'.
40 if (program.storeTxs || (program.storeTxs === undefined && !conf.nobma)) {
app/modules/config.ts:43:21 - error TS2339: Property 'storeWw' does not exist on type 'ProgramOptions'.
43 if (program.storeWw) {
~~~~~~~
app/modules/crawler/lib/sync.ts:187:44 - error TS2339: Property 'disableCheckConstraints' does not exist on type 'FileDAL'.
187 if (!cautious) await this.server.dal.disableCheckConstraints();
~~~~~~~~~~~~~~~~~~~~~~~
app/modules/crawler/lib/sync.ts:265:29 - error TS2339: Property 'enableCheckConstraints' does not exist on type 'FileDAL'.
265 await this.server.dal.enableCheckConstraints();
~~~~~~~~~~~~~~~~~~~~~~
app/modules/daemon.ts:19:22 - error TS7016: Could not find a declaration file for module 'tail'. '/duniter/node_modules/tail/lib/tail.js' implicitly has an 'any' type.
Try `npm install @types/tail` if it exists or add a new declaration (.d.ts) file containing `declare module 'tail';`
19 import { Tail } from "tail";
~~~~~~
app/modules/daemon.ts:20:10 - error TS2305: Module '"../lib/common-libs/constants"' has no exported member 'constants'.
20 import { constants } from "../lib/common-libs/constants";
~~~~~~~~~
app/modules/dump.ts:160:29 - error TS2339: Property 'unmute' does not exist on type 'Logger'.
160 NewLogger().unmute();
~~~~~~
app/modules/ws2p/lib/WS2PCluster.ts:1371:7 - error TS2304: Cannot find name 'logger'.
1371 logger.info("Pending transactions pushed on WS2P connections.");
~~~~~~
app/modules/ws2p/lib/WS2PCluster.ts:1373:7 - error TS2304: Cannot find name 'logger'.
1373 logger.warn("Fail to push pending transactions: " + e);
~~~~~~
Found 32 errors.
/duniter # npm test
> duniter@1.9.1 test /duniter
> DUNITER_JS_TESTS=yes DUNITER_LOG_STDOUT=no nyc --reporter html mocha
Error: Cannot find module '../native'
et au lancement…
~ $ duniter direct_start
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '../app/lib/common-libs/exit-codes'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/duniter/bin/duniter_js:4:19)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
C’est grave docteur ?
Bon, j’avance…
J’ai fixé les pbs de typescript, je n’ai plus d’erreurs qd je lance tsc.
J’arrive à compiler duniteroxyde avec un cargo build dans le répertoire neon/native, mais avec la commande cargo xtask build j’obtiens tjs cette erreur.
> duniter@1.9.1 install /home/aya/Sources/duniter
> ./neon/build.sh
neon info running cargo
warning: `/home/aya/Sources/duniter/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Compiling duniteroxyde v1.9.1-dev (/home/aya/Sources/duniter/neon/native)
warning: unexpected `cfg` condition value: `default-panic-hook`
--> neon/native/src/lib.rs:46:1
warning: `duniteroxyde` (lib) generated 1 warning
Finished `release` profile [optimized] target(s) in 10.92s
neon info generating native/index.node
neon ERR! ENOENT: no such file or directory, copyfile '/home/aya/Sources/duniter/target/release/libduniteroxyde.so' -> '/home/aya/Sources/duniter/neon/native/index.node'
Error: ENOENT: no such file or directory, copyfile '/home/aya/Sources/duniter/target/release/libduniteroxyde.so' -> '/home/aya/Sources/duniter/neon/native/index.node'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! duniter@1.9.1 install: `./neon/build.sh`
npm ERR! Exit status 1
Et ca me pose pb pour lancer les tests ou duniter :
[1|602/1/0|21/18/3|4.8]aya:123@sonic:~/Sources/duniter (dev)$ ./target/debug/duniter direct_start
internal/modules/cjs/loader.js:807
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: Module did not self-register.
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/aya/Sources/duniter/app/lib/logger.js:16:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
Lancement des tests !
786 passing (4m)
17 pending
6 failing
1) Document pool currency Transaction with wrong XHX should be rejected:
AssertionError [ERR_ASSERTION]: 'TextDocumentParseError: Grammar error: --> 13:77\n |\n13 | 1500:1:XHX(6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C0...
== 'TextDocumentParseError: Grammar error: --> 13:77\n |\n13 | 1500:1:XHX(6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C0...
+ expected - actual
TextDocumentParseError: Grammar error: --> 13:77
|
-13 | 1500:1:XHX(6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C01E52DDB7875B4B))␊
+13 | 1500:1:XHX(6B86B273FF34FCE19D6B804EFF5A3F5747ADA4EAA22F1D49C01E52DDB7875B4B))
| ^---
|
= expected output_cond_op_and or output_cond_op_or
at Object.assertEqual (/Users/aya/Sources/duniter/test/integration/tools/test-framework.ts:64:10)
at Context.it (/Users/aya/Sources/duniter/test/integration/documents-currency.ts:206:7)
2) Transactions history sent and received transactions should should exist:
AssertionError: expected Array [...] to have property length of 1 (got 6)
at Assertion.fail (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:275:17)
at Assertion.value (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:356:19)
at s1.expect (/Users/aya/Sources/duniter/test/integration/transactions/transactions-history.ts:92:48)
at Object.expectAnswer (/Users/aya/Sources/duniter/test/integration/tools/http-expect.ts:75:12)
3) Transactions history get transactions by blocks slice:
AssertionError: expected Array [...] to have property length of 1 (got 3)
at Assertion.fail (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:275:17)
at Assertion.value (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:356:19)
at s1.expect (/Users/aya/Sources/duniter/test/integration/transactions/transactions-history.ts:113:48)
at Object.expectAnswer (/Users/aya/Sources/duniter/test/integration/tools/http-expect.ts:75:12)
4) Transactions history get transactions by times slice:
AssertionError: expected Array [] to have property length of 1 (got 0)
at Assertion.fail (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:275:17)
at Assertion.value (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:356:19)
at s1.expect (/Users/aya/Sources/duniter/test/integration/transactions/transactions-history.ts:170:52)
at Object.expectAnswer (/Users/aya/Sources/duniter/test/integration/tools/http-expect.ts:75:12)
5) Testing transactions History by time should have a time not null:
AssertionError: expected Array [...] to have property length of 1 (got 3)
at Assertion.fail (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:275:17)
at Assertion.value (/Users/aya/Sources/duniter/node_modules/should/cjs/should.js:356:19)
at s1.expect (/Users/aya/Sources/duniter/test/integration/transactions/transactions-test.ts:85:64)
at Object.expectAnswer (/Users/aya/Sources/duniter/test/integration/tools/http-expect.ts:75:12)
6) Testing transactions Sources tic should be able to send 510 to toc:
AssertionError [ERR_ASSERTION]: { version: 10,
currency: 'duniter_unit_test_currency',
locktime: 0,
issuers: [ 'DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2... deepEqual { comment: '',
currency: 'duniter_unit_test_currency',
hash:
'B6DCADFB841AC05A902741A8772A70B4086D5AEAB147AD48987DDC38...
+ expected - actual
"unlocks": [
"0:SIG(0)"
]
"version": 10
- "writtenTime": 0
+ "writtenTime": 1490007210
"written_block": 3
}
at Context.it (/Users/aya/Sources/duniter/test/integration/transactions/transactions-test.ts:121:14)