duniter issueshttps://git.duniter.org/nodes/typescript/duniter/-/issues2017-12-03T00:43:43+01:00https://git.duniter.org/nodes/typescript/duniter/-/issues/1190duniter-prover includes revoked identites?2017-12-03T00:43:43+01:00Cédric Moreauduniter-prover includes revoked identites?https://forum.duniter.org/t/comportement-bizarre-de-duniter-1-6-11/3592https://forum.duniter.org/t/comportement-bizarre-de-duniter-1-6-11/35921.6.0ÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/issues/1197CPU: Intel Atom should follow the same rule as ARM2018-01-12T18:24:22+01:00Cédric MoreauCPU: Intel Atom should follow the same rule as ARMSee: https://forum.duniter.org/t/duniter-powcluster-js-utilise-mes-8-coeurs-a-100/3608/17
Indeed, we divide the CPU value by 2 for ARM (empiric rule): https://github.com/duniter/duniter/blob/da85e4c3ba8e18a66b0c216335454473e1c205ae/ap...See: https://forum.duniter.org/t/duniter-powcluster-js-utilise-mes-8-coeurs-a-100/3608/17
Indeed, we divide the CPU value by 2 for ARM (empiric rule): https://github.com/duniter/duniter/blob/da85e4c3ba8e18a66b0c216335454473e1c205ae/app/modules/prover/lib/engine.ts#L38-L40
It seems Atom CPU suffer the same problem, and needs to have the CPU% value divided by 2 as well.1.7ÉloïsÉloïshttps://git.duniter.org/nodes/typescript/duniter/-/issues/1232powCluster.js process still alive after Duniter stop2020-05-01T13:22:06+02:00Cédric MoreaupowCluster.js process still alive after Duniter stop@nanocryk already raised this issue, and I could also observe this behavior with the powCluster.ts unit test with the following code:
```js
"use strict";
const co = require('co');
const should = require('should');
const PowEngine = req...@nanocryk already raised this issue, and I could also observe this behavior with the powCluster.ts unit test with the following code:
```js
"use strict";
const co = require('co');
const should = require('should');
const PowEngine = require('../../../app/modules/prover/lib/engine').PowEngine
const logger = require('../../../app/lib/logger').NewLogger()
describe('PoW Engine', () => {
it('should be configurable', () => co(function*(){
const e1 = new PowEngine({ nbCores: 1 }, logger);
(yield e1.setConf({ cpu: 0.2, prefix: '34' })).should.deepEqual({ cpu: 0.2, prefix: '34' });
const e2 = new PowEngine({ nbCores: 1 }, logger);
yield e1.shutDown()
}));
it('should be able to make a proof', () => co(function*(){
const e1 = new PowEngine({ nbCores: 1 }, logger);
const block = { number: 35 };
const zeros = 2;
const highMark = 'A';
const pair = {
pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd',
sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'
};
const forcedTime = 1;
const medianTimeBlocks = 20;
const avgGenTime = 5 * 60;
const proof = yield e1.prove({
newPoW: {
block,
zeros,
highMark,
pair,
forcedTime,
conf: {
medianTimeBlocks,
avgGenTime
}
}
}
)
proof.should.deepEqual({
pow: {
block: {
number: 35,
time: 1,
inner_hash: '51937F1192447A96537D10968689F4F48859E2DD6F8F9E8DE1006C9697C6C940',
nonce: 212,
hash: '009A52E6E2E4EA7DE950A2DA673114FA55B070EBE350D75FF0C62C6AAE9A37E5',
signature: 'bkmLGX7LNVkuOUMc+/HT6fXJajQtR5uk87fetIntMbGRZjychzu0whl5+AOOGlf+ilp/ara5UK6ppxyPcJIJAg=='
},
testsCount: 211,
pow: '009A52E6E2E4EA7DE950A2DA673114FA55B070EBE350D75FF0C62C6AAE9A37E5'
}
});
yield e1.shutDown()
}));
it.only('should be able to stop a proof', () => co(function*(){
const e1 = new PowEngine({ nbCores: 1 }, logger);
// yield e1.forceInit()
const block = { number: 26 };
const zeros = 10; // Requires hundreds of thousands of tries probably
const highMark = 'A';
const pair = {
pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd',
sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'
};
const forcedTime = 1;
const medianTimeBlocks = 20;
const avgGenTime = 5 * 60;
const proofPromise = e1.prove({
newPoW: {
block,
zeros,
highMark,
pair,
forcedTime,
conf: {
medianTimeBlocks,
avgGenTime
}
}
}
)
// yield new Promise((res) => setTimeout(res, 10))
// yield e1.cancel()
// const proof = yield proofPromise;
// should.not.exist(proof);
yield e1.shutDown()
}));
});
```
Then if I launch the test:
yarn tsc && node --trace-warnings node_modules/mocha/bin/_mocha --grep "PoW Engine"
I can see in my console that, even if the test is done, I still get messages of another process:
(node:19136) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): undefined
at emitWarning (internal/process/promises.js:63:21)
at emitPendingUnhandledRejections (internal/process/promises.js:95:11)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:19136) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
at emitWarning (internal/process/promises.js:78:15)
at emitPendingUnhandledRejections (internal/process/promises.js:95:11)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:19136) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): undefined
at emitWarning (internal/process/promises.js:63:21)
at emitPendingUnhandledRejections (internal/process/promises.js:95:11)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:19136) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): undefined
at emitWarning (internal/process/promises.js:63:21)
at emitPendingUnhandledRejections (internal/process/promises.js:95:11)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:19136) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): undefined
at emitWarning (internal/process/promises.js:63:21)
at emitPendingUnhandledRejections (internal/process/promises.js:95:11)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
This is a problem: the sub-processes launched by Duniter (here, the tests) should be killed along with Duniter being stopped.1.9Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1234Calculates proofs for many different and past blocks2018-01-27T18:54:52+01:00ÉloïsCalculates proofs for many different and past blockssince Saturday 9 December 1 am, 1 of my member node continues to calculate even when it is excluded, it tries to calculate proofs for a lot of past blocks ! And yet it is well synchronized with the rest of the network on block 76348. It'...since Saturday 9 December 1 am, 1 of my member node continues to calculate even when it is excluded, it tries to calculate proofs for a lot of past blocks ! And yet it is well synchronized with the rest of the network on block 76348. It's so weird !
```
2017-12-09T20:48:08+01:00 - info: POST Peer 2t6NP6Fvvu#76319 to 10 peers
2017-12-09T20:48:09+01:00 - info: Matched 3 zeros 000674C083277FC715D9D280CE17D7F7E4BC267A5A7996278BFA7E693C13203A with Nonce = 30400000020777 for block#76219 by D9D2za
2017-12-09T20:48:10+01:00 - info: ✔ PEER DfjVNNn7
2017-12-09T20:48:10+01:00 - info: POST Peer DfjVNNn7JW#76319 to 10 peers
2017-12-09T20:48:11+01:00 - warn: Could not reach duniter.floth.fr:80, reason: Unexpected token < in JSON at position 0
2017-12-09T20:48:11+01:00 - warn: Could not reach duniter.floth.fr:80, reason: Unexpected token < in JSON at position 0
2017-12-09T20:48:13+01:00 - info: Matched 3 zeros 0001882C0BBAB887823AB8E119C8EE8E272DBB61AFA318744EAC81AC6B2C19C1 with Nonce = 30100000234023 for block#76161 by D9D2za
2017-12-09T20:48:14+01:00 - warn: httpCode=400, ucode=1005, message=Document has unkown fields or wrong line ending format
2017-12-09T20:48:14+01:00 - info: Matched 3 zeros 000C970400951C1D631C3EFFCD79FD50CEAE7BEA53EF3CAF0608D0B3D10A264A with Nonce = 30100000234469 for block#76161 by D9D2za
2017-12-09T20:48:15+01:00 - info: Matched 3 zeros 0004907B9F9B19D88BA57A66CB6E99B4766ED9346F2F6D0000C7AADD6CD53F87 with Nonce = 30100000234579 for block#76161 by D9D2za
2017-12-09T20:48:15+01:00 - info: POST Peer Be1eVp7etV#76348 to 1 peers
2017-12-09T20:48:15+01:00 - info: ✔ PEER Be1eVp7e
2017-12-09T20:48:15+01:00 - info: POST Peer Be1eVp7etV#76348 to 10 peers
2017-12-09T20:48:19+01:00 - info: Matched 3 zeros 000AD639C259CC049C4C023AFD676DC4DF5D922B34A68F2144D90286B21FEB80 with Nonce = 30300003184833 for block#76157 by D9D2za
2017-12-09T20:48:19+01:00 - info: Matched 3 zeros 0005272B7B42765F75581E21F4E8FF40B46BEA538839BC44806E044942796DEE with Nonce = 30200000433995 for block#76156 by D9D2za
2017-12-09T20:48:23+01:00 - info: Matched 3 zeros 000A117999F8B3C8F345CEA2D8613434BF54C0F29E9FE566D8928AB234F2DCC1 with Nonce = 30300003186040 for block#76157 by D9D2za
2017-12-09T20:48:25+01:00 - warn: ETIMEDOUT
2017-12-09T20:48:25+01:00 - warn: ETIMEDOUT
2017-12-09T20:48:25+01:00 - info: Peer Be1eVp7etVfA7cT6er6dcJ9d5KxGJVY2tzCGGCAz3yG unreachable: now considered as DOWN.
2017-12-09T20:48:27+01:00 - info: Matched 3 zeros 000C27F8E97A77DDD1B944ED66BC7C2C03F466331EBCEB00FBF1B63E43F228D3 with Nonce = 30100000233011 for block#76163 by D9D2za
2017-12-09T20:48:28+01:00 - info: ✔ PEER 9zCYjVtP
2017-12-09T20:48:28+01:00 - info: POST Peer 9zCYjVtPFz#76318 to 10 peers
2017-12-09T20:48:28+01:00 - warn: Could not reach 167.114.232.189:10901, reason: Unknown reference block of peer
2017-12-09T20:48:31+01:00 - warn: Could not reach duniter.floth.fr:80, reason: Unexpected token < in JSON at position 0
2017-12-09T20:48:33+01:00 - info: ✔ PEER 4fHMTFBM
2017-12-09T20:48:33+01:00 - info: POST Peer 4fHMTFBMo5#76319 to 10 peers
2017-12-09T20:48:33+01:00 - warn: Could not reach 167.114.232.189:10901, reason: Unknown reference block of peer
2017-12-09T20:48:35+01:00 - info: Matched 3 zeros 000BC1DDE8F8F8018A102305BA290A1E283E8323A7525332A72AE4C7FCBB0053 with Nonce = 30400000020803 for block#76258 by D9D2za
2017-12-09T20:48:42+01:00 - info: Matched 3 zeros 0008D3706435B5A3A5274ABE0725D1712C694A5C659554D7B1F7D6D467098CAB with Nonce = 30300003191112 for block#76157 by D9D2za
2017-12-09T20:48:42+01:00 - info: Pulling blocks from the network...
2017-12-09T20:48:42+01:00 - info: Peer 48SLtTLL3CxAXUcmbKwp2PUg1hUvEh2s5EwEpRh8RaoR unreachable: now considered as DOWN.
2017-12-09T20:48:43+01:00 - info: Matched 3 zeros 00074786ECF9FDD67D0639CFEC68AE440C2C1D2DB0DF38B4177413549F5EC8FF with Nonce = 30300003191385 for block#76157 by D9D2za
2017-12-09T20:48:45+01:00 - info: ✔ PEER 38MEAZN6
2017-12-09T20:48:45+01:00 - info: POST Peer 38MEAZN68P#76319 to 10 peers
2017-12-09T20:48:45+01:00 - warn: Could not reach 167.114.232.189:10901, reason: Unknown reference block of peer
2017-12-09T20:48:46+01:00 - info: Matched 3 zeros 000B5705E7B03D3539DFD9902B8B187023209B37E70D8AE6B19B25443BD15313 with Nonce = 30400000020851 for block#76268 by D9D2za
2017-12-09T20:48:48+01:00 - warn: Could not reach duniter.floth.fr:80, reason: Unexpected token < in JSON at position 0
2017-12-09T20:48:49+01:00 - info: Matched 3 zeros 000854D6EDED4FD7D9EACF4C7B85339952947498CDC809AA0F30ABA00B5D9EEE with Nonce = 30100000234230 for block#76165 by D9D2za
2017-12-09T20:48:52+01:00 - info: Peer Com8rJukCozHZyFao6AheSsfDQdPApxQRnz7QYFf64mm unreachable: now considered as DOWN.
2017-12-09T20:48:52+01:00 - info: Matched 3 zeros 0009358457521339F8751B7763E5CF0F708F6F153890347EEAC33604F4AFC0C0 with Nonce = 30400000020868 for block#76274 by D9D2za
2017-12-09T20:48:52+01:00 - info: Block resolution: 0 potential blocks after current#76348...
2017-12-09T20:48:52+01:00 - info: Will pull blocks from the network in 9 min 59 sec
2017-12-09T20:48:52+01:00 - info: Matched 3 zeros 0007B694F567EF68BD70C00016B1384E0BF99E2C779E68405812923A21532531 with Nonce = 30100000232648 for block#76166 by D9D2za
2017-12-09T20:48:53+01:00 - info: Matched 3 zeros 000D8D22CA7396CBABC0F99E32D458E4F6DB7FCF155DE03BBBEF5C63E27EEB41 with Nonce = 30400000020983 for block#76274 by D9D2za
2017-12-09T20:48:56+01:00 - info: WS2P D9D2zaJoWYWveii1JRYLVK3J4Z7ZH3QczoKrnQeiM6mx: new incoming connection from 127.0.0.1:44909!
2017-12-09T20:48:57+01:00 - info: WS2P: established incoming connection from D9D2zaJo 127.0.0.1:44909
2017-12-09T20:48:58+01:00 - info: Matched 3 zeros 00014A7533480CF628902112B4D497A7BA09EA2041DE4FA004438A03ED21B3E0 with Nonce = 30300003195709 for block#76157 by D9D2za
2017-12-09T20:49:00+01:00 - info: Matched 3 zeros 0009E6BFAD920EB08C9ED861143CDEA3604D3A644150B92971AE5EDC209F6E25 with Nonce = 30200000431807 for block#76159 by D9D2za
2017-12-09T20:49:01+01:00 - info: worker 31956 died with code null and signal SIGINT
```1.6.0Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1256the 1.6.15 and 1.6.16 versions never starts the calculation of blocks2018-01-30T14:40:25+01:00gerard94the 1.6.15 and 1.6.16 versions never starts the calculation of blocksFor two days (since the installation of 1.6.15 and 1.6.16 just a little later), my Duniter linux desktop produces no more blocks and looks like the following picture. Where may I be wrong?![Capture_d_écran_de_2018-01-21_15-30-45](/upload...For two days (since the installation of 1.6.15 and 1.6.16 just a little later), my Duniter linux desktop produces no more blocks and looks like the following picture. Where may I be wrong?![Capture_d_écran_de_2018-01-21_15-30-45](/uploads/e4344af595c10473abb3c5bab418ad63/Capture_d_écran_de_2018-01-21_15-30-45.png)https://git.duniter.org/nodes/typescript/duniter/-/issues/1094Raspberry PI 3 does not find blocks2018-01-27T07:27:41+01:00Cédric MoreauRaspberry PI 3 does not find blocksApparently, a Raspberry PI 3 no more find any acceptable block since Duniter 1.4. It used to work with 1.3.
The computation is well started, but with a difficulty of 5 zeros and 90% CPU configured it seems not enough to find even just...Apparently, a Raspberry PI 3 no more find any acceptable block since Duniter 1.4. It used to work with 1.3.
The computation is well started, but with a difficulty of 5 zeros and 90% CPU configured it seems not enough to find even just a block per day.
IMO, this is a software issue with Duniter being too much asking to the PI, proof excluded.1.6.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1119PoW children process do not close when duniter closes on armhf2018-01-27T07:27:41+01:00Cédric MoreauPoW children process do not close when duniter closes on armhfSee this topic (french): https://forum.duniter.org/t/beta-test-duniter-1-6-ws2p/3247/50See this topic (french): https://forum.duniter.org/t/beta-test-duniter-1-6-ws2p/3247/501.6.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1089PoW is computing wrong block in G1Test2018-01-27T07:27:42+01:00Cédric MoreauPoW is computing wrong block in G1TestA lot of fork block are present in the nodes, which makes them compute another block than HEAD+1 because this HEAD is being changed during fork resolution.
We need a semaphore on this.A lot of fork block are present in the nodes, which makes them compute another block than HEAD+1 because this HEAD is being changed during fork resolution.
We need a semaphore on this.1.5.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1030written.json is not a function2018-01-27T07:27:43+01:00Cédric Moreauwritten.json is not a function*Created by: M5oul*
```bash
2017-07-11T14:51:11+02:00 - info: Generating proof-of-work with 4 leading zeros followed by [0-4]... (CPU usage set to 90%) for block#34361 GfKERH
2017-07-11T14:51:11+02:00 - info: Stop proof-of-work worker...*Created by: M5oul*
```bash
2017-07-11T14:51:11+02:00 - info: Generating proof-of-work with 4 leading zeros followed by [0-4]... (CPU usage set to 90%) for block#34361 GfKERH
2017-07-11T14:51:11+02:00 - info: Stop proof-of-work worker #1
2017-07-11T14:51:11+02:00 - info: Stop proof-of-work worker #2
2017-07-11T14:51:13+02:00 - info: Block #34361 added to the blockchain in 39771 ms
2017-07-11T14:51:13+02:00 - info: Stop proof-of-work worker #1
2017-07-11T14:51:14+02:00 - info: Stop proof-of-work worker #2
2017-07-11T14:51:15+02:00 - info: POST Block block#34361
2017-07-11T14:51:16+02:00 - info: Stop proof-of-work worker #1
2017-07-11T14:51:16+02:00 - info: Stop proof-of-work worker #2
2017-07-11T14:51:16+02:00 - info: Block #34362 added to the blockchain in 2031 ms
2017-07-11T14:51:17+02:00 - error: Written: transactions=[], excluded=[], actives=[], leavers=[], revoked=[], identities=[], joiners=[], certifications=[], hash=00001EF886E5880BBBB41FB0FE6460C07F42CF6D0609CF4DF31EBC844F0C91B8, signature=ctkCTzcl1KVzLN/cCOEQv1pqOlokCQHAtLgvukuWDDg8i4Bx/VFVGBZuMOg4lA6qUofzwGjExhTFxYSJpiokCQ==, raw=Version: 10
Type: Block
Currency: g1
Number: 34362
PoWMin: 75
Time: 1499777411
MedianTime: 1499775920
UnitBase: 0
Issuer: FVUFRrk1K5TQGsY7PRLwqHgdHRoHrwb1hcucp4C2N5tD
IssuersFrame: 91
IssuersFrameVar: 0
DifferentIssuersCount: 18
PreviousHash: 000028D46557301EE81E789C5736792A7606D5E025FBE5D4959D0C511BA5156C
PreviousIssuer: 6fFt4zdvtNyVcfJn7Y41mKLmMDizyK3nVeNW3qdDXzpc
MembersCount: 185
Identities:
Joiners:
Actives:
Leavers:
Revoked:
Excluded:
Certifications:
Transactions:
InnerHash: 63B3A95C97401D04982169BEA079E35638A302ABEC38368AC41D680EFB9F5A56
Nonce: 10200000001413
, version=10, currency=g1, number=34362, powMin=75, time=1499777411, medianTime=1499775920, unitbase=0, issuer=FVUFRrk1K5TQGsY7PRLwqHgdHRoHrwb1hcucp4C2N5tD, issuersFrame=91, issuersFrameVar=0, issuersCount=18, previousHash=000028D46557301EE81E789C5736792A7606D5E025FBE5D4959D0C511BA5156C, previousIssuer=6fFt4zdvtNyVcfJn7Y41mKLmMDizyK3nVeNW3qdDXzpc, membersCount=185, inner_hash=63B3A95C97401D04982169BEA079E35638A302ABEC38368AC41D680EFB9F5A56, nonce=10200000001413, dividend=null, parameters=, monetaryMass=14182000
2017-07-11T14:51:17+02:00 - error: TypeError: written.json is not a function
at /opt/duniter/node_modules/duniter-bma/lib/controllers/abstract.js:15:22
at next (native)
at onFulfilled (/opt/duniter/node_modules/co/index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:109:7)
2017-07-11T14:51:17+02:00 - error: TypeError: written.json is not a function
at /opt/duniter/node_modules/duniter-bma/lib/controllers/abstract.js:15:22
at next (native)
at onFulfilled (/opt/duniter/node_modules/co/index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:109:7)
2017-07-11T14:51:17+02:00 - warn: written.json is not a function
2017-07-11T14:51:19+02:00 - info: Stop proof-of-work worker #1
2017-07-11T14:51:19+02:00 - info: Stop proof-of-work worker #2
2017-07-11T14:51:19+02:00 - info: GIVEN proof-of-work for block#34361 with 4 leading zeros followed by [0-4]! stop PoW for GfKERH
2017-07-11T14:51:19+02:00 - warn: The proof-of-work generation was canceled: Proof-of-work computation canceled because block received
2017-07-11T14:51:19+02:00 - info: POST Block block#34362
2017-07-11T14:51:19+02:00 - warn: connect ECONNREFUSED 78.227.107.45:10901
2017-07-11T14:51:22+02:00 - info: POST Peer 3QLkBNoCNJ#34329
```1.4.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1126Gérer le préfixe de pair manuellement dans la configuration du nœud2018-01-27T07:27:43+01:00ÉloïsGérer le préfixe de pair manuellement dans la configuration du nœudBMA gère le préfixe de pair (premier caractère du nonce) afin d'éviter que deux nœuds partageant la même clé ne calculent la même preuve. WS2P ne le gère pas encore.BMA gère le préfixe de pair (premier caractère du nonce) afin d'éviter que deux nœuds partageant la même clé ne calculent la même preuve. WS2P ne le gère pas encore.1.6.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1123PoW handler stuck in an infinite loop2018-01-27T07:27:43+01:00Cédric MoreauPoW handler stuck in an infinite loopThe message:
> The proof-of-work generation was canceled: Document already under treatment
is displayed continuously in a kind of infinite loop.The message:
> The proof-of-work generation was canceled: Document already under treatment
is displayed continuously in a kind of infinite loop.1.6.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1024PoW is not launched2018-01-27T07:27:43+01:00Cédric MoreauPoW is not launched*Created by: M5oul*
- Version: `dev@32a7b9058818e6179714fb5e697039943df49292`*Created by: M5oul*
- Version: `dev@32a7b9058818e6179714fb5e697039943df49292`1.4.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1098PoW issue2018-01-27T07:27:43+01:00Cédric MoreauPoW issue*Created by: M5oul*
With version 1.5.9:
```bash
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]...*Created by: M5oul*
With version 1.5.9:
```bash
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:16+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:17+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:17+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:18+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:18+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:18+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:18+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:18+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:19+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:19+02:00 - info: Node 8KTEFQ (167.114.232.189:8999) is UP!
2017-09-15T12:02:19+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:19+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-15T12:02:19+02:00 - warn: The proof-of-work generation was canceled: [object Object]
```1.6.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1021Strange Nonce happen sometime2018-01-27T07:27:43+01:00Cédric MoreauStrange Nonce happen sometime*Created by: M5oul*
```bash
2017-06-26T17:33:16+02:00 - info: Matched 3 zeros 0006F7F79BB665F1AB16F5EAAE6F0884C460833655E2C77A7DDDE272791C7CCE with Nonce = 1.00000000000002e+25 for block#30392 by GfKERH
2017-06-26T17:33:16+02:00 - inf...*Created by: M5oul*
```bash
2017-06-26T17:33:16+02:00 - info: Matched 3 zeros 0006F7F79BB665F1AB16F5EAAE6F0884C460833655E2C77A7DDDE272791C7CCE with Nonce = 1.00000000000002e+25 for block#30392 by GfKERH
2017-06-26T17:33:16+02:00 - info: Matched 3 zeros 0006F7F79BB665F1AB16F5EAAE6F0884C460833655E2C77A7DDDE272791C7CCE with Nonce = 1.00000000000002e+25 for block#30392 by GfKERH
2017-06-26T17:33:17+02:00 - info: Matched 3 zeros 0006F7F79BB665F1AB16F5EAAE6F0884C460833655E2C77A7DDDE272791C7CCE with Nonce = 1.00000000000002e+25 for block#30392 by GfKERH
2017-06-26T17:33:40+02:00 - info: Pulling blocks from the network...
2017-06-26T17:33:40+02:00 - info: Will pull blocks from the network in 1 min 58 sec
```1.4.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1096Duniter Desktop starts looping for no reason on "The proof-of-work generation...2018-01-27T07:27:43+01:00Cédric MoreauDuniter Desktop starts looping for no reason on "The proof-of-work generation was canceled: [object Object]"*Created by: jytou*
For the second time in 3 days, my duniter desktop started looping on the following in the logs:
```
2017-09-10T19:09:25+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-10T19:09:25+...*Created by: jytou*
For the second time in 3 days, my duniter desktop started looping on the following in the logs:
```
2017-09-10T19:09:25+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-10T19:09:25+02:00 - trace: PoW loops = 143672
2017-09-10T19:09:25+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-10T19:09:25+02:00 - trace: PoW loops = 143673
2017-09-10T19:09:25+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-10T19:09:25+02:00 - trace: PoW loops = 143674
2017-09-10T19:09:25+02:00 - warn: The proof-of-work generation was canceled: [object Object]
2017-09-10T19:09:25+02:00 - trace: PoW loops = 143675
```
It gets stuck on an old block and doesn't go forward or calculate anything anymore.
When I try to restart it, it gives the following error:
```
2017-09-10T19:13:14+02:00 - error: TypeError: Cannot read property 'transactions' of null
at DuniterBlockchain.<anonymous> (/opt/duniter/app/lib/blockchain/DuniterBlockchain.js:443:36)
at next (<anonymous>)
at /opt/duniter/app/lib/blockchain/DuniterBlockchain.js:7:71
at __awaiter (/opt/duniter/app/lib/blockchain/DuniterBlockchain.js:3:12)
at DuniterBlockchain.undoDeleteTransactions (/opt/duniter/app/lib/blockchain/DuniterBlockchain.js:442:16)
at DuniterBlockchain.<anonymous> (/opt/duniter/app/lib/blockchain/DuniterBlockchain.js:406:24)
at next (<anonymous>)
at fulfilled (/opt/duniter/app/lib/blockchain/DuniterBlockchain.js:4:58)
```
And when I restart it again, I get a core dumped. Last time, it did restart correctly and after a sync it was back on track. Not this time. It took 4 restarts until it got back on track and it is now on the latest block.1.6.0https://git.duniter.org/nodes/typescript/duniter/-/issues/974Proof-of-work is launched during initial sync2018-01-27T07:27:44+01:00Cédric MoreauProof-of-work is launched during initial syncIt's making the sync longer, it could even break the sync if a PoW is found.It's making the sync longer, it could even break the sync if a PoW is found.1.2.3https://git.duniter.org/nodes/typescript/duniter/-/issues/910Memory leaks on main process2018-01-27T07:27:45+01:00Cédric MoreauMemory leaks on main process*Created by: M5oul*
On my Internet Cube dedicated to Duniter node, there memory leaks as duniter process takes 750Mb. This process is running since five days at least.
This process takes almost 130Mb when turning-it on.
That could e...*Created by: M5oul*
On my Internet Cube dedicated to Duniter node, there memory leaks as duniter process takes 750Mb. This process is running since five days at least.
This process takes almost 130Mb when turning-it on.
That could explain why my not-dedicated ARM board was unrechable since there were no more memory available.
![capture du 2017-03-27 09-33-02](https://cloud.githubusercontent.com/assets/4758871/24345523/ee2b3116-12d0-11e7-8884-8374df348bb7.png)
Other: I don't know why there is so much processes.1.2.3https://git.duniter.org/nodes/typescript/duniter/-/issues/870PoW difficulties order do not correspond to issuers order2018-01-27T07:27:45+01:00Cédric MoreauPoW difficulties order do not correspond to issuers order*Created by: M5oul*
Here is issuers list:
```diff
### Issuers for last 30 blocks from block n°10852 to block n°10881
| block | gentime | mediantime | hash | uid |
|---------+-----------+--------------+----------+...*Created by: M5oul*
Here is issuers list:
```diff
### Issuers for last 30 blocks from block n°10852 to block n°10881
| block | gentime | mediantime | hash | uid |
|---------+-----------+--------------+----------+--------------|
| 10881 | 09:17:15 | 08:05:36 | 00000AE4 | pafzedog |
| 10880 | 09:03:43 | 08:00:08 | 00000A80 | stanlog |
| 10879 | 08:56:28 | 07:54:10 | 0000060E | elois |
| 10878 | 08:56:51 | 07:47:50 | 00000EDD | jytou |
--| 10877 | 08:53:02 | 07:41:21 | 000005BB | urodelus |
--| 10876 | 08:48:34 | 07:34:54 | 00000B5A | moul |
--| 10875 | 08:42:25 | 07:28:37 | 00000C17 | Tortue |
| 10874 | 08:38:18 | 07:22:37 | 0000056C | nay4 |
| 10873 | 08:20:42 | 07:17:19 | 000001F1 | vincentux |
```
PoW difficulties should be the same, but it's not:
```diff
### Difficulty to generate next block n°10882 for 8/15 nodes:
| uid | match | Π diffi | Σ diffi |
|--------------+----------------------+-------------+-----------|
| cgeek | 00000* | 1.0 × 10^6 | 80 |
| JeanFerreira | 00000* | 1.0 × 10^6 | 80 |
| Thatoo | 00000* | 1.0 × 10^6 | 80 |
| vincentux | 00000* | 1.0 × 10^6 | 80 |
| gerard94 | 00000* | 1.0 × 10^6 | 80 |
| CandideSK8 | 00000[0-E]* | 1.0 × 10^6 | 81 |
| kimamila | 00000[0-E]* | 1.0 × 10^6 | 81 |
| nay4 | 00000[0-D]* | 2.1 × 10^6 | 82 |
--| urodelus | 0000000000* | 1.1 × 10^12 | 160 |
--| Tortue | 0000000000[0-E]* | 1.1 × 10^12 | 161 |
--| moul | 0000000000[0-D]* | 2.2 × 10^12 | 162 |
| jytou | 000000000000000[0-E] | 1.2 × 10^18 | 241 |
| elois | 00000000000000000000 | 3.8 × 10^30 | 403 |
| stanlog | 00000000000000000000 | 1.4 × 10^42 | 560 |
| pafzedog | 00000000000000000000 | 6.1 × 10^90 | 1203 |
```
For previous block:
```diff
### Difficulty to generate next block n°10881 for 8/15 nodes:
| uid | match | Π diffi | Σ diffi |
|--------------+----------------------+-------------+-----------|
| cgeek | 00000* | 1.0 × 10^6 | 80 |
| JeanFerreira | 00000* | 1.0 × 10^6 | 80 |
| Thatoo | 00000* | 1.0 × 10^6 | 80 |
| vincentux | 00000* | 1.0 × 10^6 | 80 |
| gerard94 | 00000* | 1.0 × 10^6 | 80 |
| CandideSK8 | 00000[0-E]* | 1.0 × 10^6 | 81 |
| kimamila | 00000[0-E]* | 1.0 × 10^6 | 81 |
| pafzedog | 00000[0-D]* | 2.1 × 10^6 | 82 |
--| Tortue | 0000000000[0-E]* | 1.1 × 10^12 | 161 |
--| moul | 0000000000[0-D]* | 2.2 × 10^12 | 162 |
| nay4 | 0000000000[0-D]* | 2.2 × 10^12 | 162 |
--| urodelus | 000000000000000* | 1.2 × 10^18 | 240 |
| jytou | 00000000000000000000 | 1.3 × 10^30 | 401 |
| elois | 00000000000000000000 | 4.2 × 10^42 | 563 |
| stanlog | 00000000000000000000 | 2.0 × 10^90 | 1200 |
```
That's a pretty strange behavior.https://git.duniter.org/nodes/typescript/duniter/-/issues/839CPU settings sometimes not taken into account2018-01-27T07:27:46+01:00Cédric MoreauCPU settings sometimes not taken into account*Created by: jytou*
I have duniter-desktop version 0.90.6 on Ubuntu 14, when I set the CPU settings to something lower than 100%, from time to time it will start mining at 100% anyhow (although the GUI settings still show the initial se...*Created by: jytou*
I have duniter-desktop version 0.90.6 on Ubuntu 14, when I set the CPU settings to something lower than 100%, from time to time it will start mining at 100% anyhow (although the GUI settings still show the initial setting < 100%). Clicking on the GUI with another setting correctly enforces it... for a while (and I believe at least until a new block is found).0.91.0https://git.duniter.org/nodes/typescript/duniter/-/issues/1262PoW: migrate to shared memory feature of Node 9/Node 102020-05-01T13:21:06+02:00Cédric MoreauPoW: migrate to shared memory feature of Node 9/Node 10As explained in #689, and after the problems with #1234 and #1256, this is definitely our target.
Yet, this requires us to migrate to Node 9 or Node 10.As explained in #689, and after the problems with #1234 and #1256, this is definitely our target.
Yet, this requires us to migrate to Node 9 or Node 10.1.9Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/1286Crashing 1.6.21 / Debian stretch2020-04-30T22:11:21+02:00SachaCrashing 1.6.21 / Debian stretchOn Debian Stretch up to date, I just installed new version of Duniter 1.6.21
It's completely instable for me, here is a crash log:
``
2018-03-04T16:44:55+01:00 - error: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at ChildProces...On Debian Stretch up to date, I just installed new version of Duniter 1.6.21
It's completely instable for me, here is a crash log:
``
2018-03-04T16:44:55+01:00 - error: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at ChildProcess.target.send (internal/child_process.js:606:16)
at Worker.send (internal/cluster/worker.js:40:28)
at PowWorker.sendCancel (/opt/duniter/app/modules/prover/lib/PowWorker.js:76:27)
at slaves.forEach.s (/opt/duniter/app/modules/prover/lib/powCluster.js:116:22)
at Array.forEach (<anonymous>)
at Master.cancelWorkersWork (/opt/duniter/app/modules/prover/lib/powCluster.js:115:21)
at Master.cancelWork (/opt/duniter/app/modules/prover/lib/powCluster.js:125:14)
at PowEngine.cancel (/opt/duniter/app/modules/prover/lib/engine.js:43:29)
at WorkerFarm.stopPoW (/opt/duniter/app/modules/prover/lib/blockProver.js:70:53)
at BlockProver.cancel (/opt/duniter/app/modules/prover/lib/blockProver.js:122:24)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
``1.7https://git.duniter.org/nodes/typescript/duniter/-/issues/1332Ğ1-test stuck because of the size of the block2020-04-30T22:26:39+02:00MoulĞ1-test stuck because of the size of the blockcf https://forum.duniter.org/t/monnaie-bloquee-trop-de-transactions-dans-le-bloc-a-generer/5648/4cf https://forum.duniter.org/t/monnaie-bloquee-trop-de-transactions-dans-le-bloc-a-generer/5648/41.7https://git.duniter.org/nodes/typescript/duniter/-/issues/687Proof-of-work with 42 leading zeros2017-01-03T10:54:59+01:00Cédric MoreauProof-of-work with 42 leading zeros*Created by: M5oul*
My node was on a fork, I manually reverted 15 blocks to make it join main fork branch:
```bash
2016-11-07T10:36:39+01:00 - info: Block #53029 added to the blockchain in 3157 ms
2016-11-07T10:36:39+01:00 - info: St...*Created by: M5oul*
My node was on a fork, I manually reverted 15 blocks to make it join main fork branch:
```bash
2016-11-07T10:36:39+01:00 - info: Block #53029 added to the blockchain in 3157 ms
2016-11-07T10:36:39+01:00 - info: Stop proof-of-work worker #1
2016-11-07T10:36:39+01:00 - info: Stop proof-of-work worker #2
2016-11-07T10:36:39+01:00 - info: POST Block block#53029
2016-11-07T10:36:41+01:00 - info: Will pull blocks from the network in 4 min 0 sec
2016-11-07T10:36:41+01:00 - warn: Pulling done. Continue proof-of-work loop.
2016-11-07T10:36:41+01:00 - info: Duniter server listening on http://192.168.1.16:8999
2016-11-07T10:36:41+01:00 - error: Error on WS Server
2016-11-07T10:36:41+01:00 - error: Error: listen EINVAL fe80::11:1ff:fec1:e6c4:8999
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at Server._listen2 (net.js:1221:19)
at listen (net.js:1270:10)
at net.js:1379:9
at _combinedTickCallback (node.js:386:13)
at process._tickCallback (node.js:407:11)
2016-11-07T10:36:41+01:00 - warn: Could NOT listen to http://fe80::11:1ff:fec1:e6c4:8999
2016-11-07T10:36:41+01:00 - warn: Error: listen EINVAL fe80::11:1ff:fec1:e6c4:8999
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at Server._listen2 (net.js:1221:19)
at listen (net.js:1270:10)
at net.js:1379:9
at _combinedTickCallback (node.js:386:13)
at process._tickCallback (node.js:407:11)
2016-11-07T10:36:41+01:00 - info: >> Server ready!
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: Too old membership
2016-11-07T10:36:41+01:00 - warn: httpCode=400, ucode=2026, message=Blockstamp does not match a block
2016-11-07T10:36:42+01:00 - info: Generating proof-of-work with 42 leading zeros followed by [0-9A-B]... (CPU usage set to 30%) for block#53030 J78bPU
2016-11-07T10:36:45+01:00 - info: POST Peer TENGx7WtzF#52999
2016-11-07T10:36:57+01:00 - info: Block #53030 added to the blockchain in 3118 ms
2016-11-07T10:36:57+01:00 - info: Stop proof-of-work worker #1
2016-11-07T10:36:57+01:00 - info: Stop proof-of-work worker #2
2016-11-07T10:36:58+01:00 - info: GIVEN proof-of-work for block#53030 with 42 leading zeros followed by [0-9A-B]! stop PoW for J78bPU
2016-11-07T10:36:58+01:00 - warn: Proof-of-work computation canceled because block received
2016-11-07T10:36:58+01:00 - warn: The proof-of-work generation was canceled: Proof-of-work computation canceled because block received
2016-11-07T10:36:58+01:00 - warn: Too high difficulty: waiting for other members to write next block
2016-11-07T10:36:58+01:00 - info: POST Block block#53030
2016-11-07T10:36:58+01:00 - warn: Blockchain changed!
2016-11-07T10:36:58+01:00 - warn: Too high difficulty: waiting for other members to write next block
2016-11-07T10:37:16+01:00 - info: POST Peer 7iBkcyryui#53000
2016-11-07T10:37:17+01:00 - info: POST Peer J78bPUvLjx#53005
```0.80.0https://git.duniter.org/nodes/typescript/duniter/-/issues/732PoW stopped two times when receiving a new block2017-01-02T16:34:02+01:00Cédric MoreauPoW stopped two times when receiving a new block*Created by: M5oul*
The node received a block, stopped Pow, and stopped again PoW, then search for next block:
```bash
2016-11-25T19:47:17+01:00 - info: Matched 3 zeros 00093B4C9F108F94EDF2C958B484C43E26822029BCE2E25DFA8DF83ECED1C4C8 ...*Created by: M5oul*
The node received a block, stopped Pow, and stopped again PoW, then search for next block:
```bash
2016-11-25T19:47:17+01:00 - info: Matched 3 zeros 00093B4C9F108F94EDF2C958B484C43E26822029BCE2E25DFA8DF83ECED1C4C8 with Nonce = 10300000014875 for block#58036 by J78bPU
2016-11-25T19:47:33+01:00 - info: Block #58036 added to the blockchain in 75 ms
2016-11-25T19:47:33+01:00 - info: Stop proof-of-work worker #1
2016-11-25T19:47:33+01:00 - info: Stop proof-of-work worker #2
2016-11-25T19:47:33+01:00 - info: Stop proof-of-work worker #3
2016-11-25T19:47:33+01:00 - info: Stop proof-of-work worker #4
2016-11-25T19:47:33+01:00 - info: POST Block block#58036
2016-11-25T19:47:34+01:00 - info: GIVEN proof-of-work for block#58036 with 4 leading zeros followed by [0-2]! stop PoW for J78bPU
2016-11-25T19:47:34+01:00 - warn: Proof-of-work computation canceled because block received
2016-11-25T19:47:34+01:00 - warn: The proof-of-work generation was canceled: Proof-of-work computation canceled because block received
2016-11-25T19:47:34+01:00 - info: Stop proof-of-work worker #1
2016-11-25T19:47:34+01:00 - info: Stop proof-of-work worker #2
2016-11-25T19:47:34+01:00 - info: Stop proof-of-work worker #3
2016-11-25T19:47:34+01:00 - info: Stop proof-of-work worker #4
2016-11-25T19:47:35+01:00 - info: Generating proof-of-work with 4 leading zeros followed by [0-2]... (CPU usage set to 14%) for block#58037 J78bPU
2016-11-25T19:47:41+01:00 - info: POST Peer 3euX4rhBE9#57964
2016-11-25T19:47:43+01:00 - warn: ETIMEDOUT
2016-11-25T19:47:43+01:00 - info: Peer BmDsozDoF3AW5x1G296tj9Mk6pRgo7sLvmYkPWknTyNQ unreachable: now considered as DOWN.
2016-11-25T19:47:51+01:00 - warn: ETIMEDOUT
2016-11-25T19:47:51+01:00 - warn: ETIMEDOUT
2016-11-25T19:47:51+01:00 - info: Peer BmDsozDoF3AW5x1G296tj9Mk6pRgo7sLvmYkPWknTyNQ unreachable: now considered as DOWN.
2016-11-25T19:47:51+01:00 - info: Peer BR5DDeKff8ZoJ5NFpcP8uwXbumR6Muas3yJankpBFRem unreachable: now considered as DOWN.
2016-11-25T19:48:03+01:00 - info: Matched 3 zeros 0003290C826A3A676DD34B928A853524A717270A57DF3701E71A3736D5575F88 with Nonce = 10300000001394 for block#58037 by J78bPU
```
It is an issue?0.80.0https://git.duniter.org/nodes/typescript/duniter/-/issues/66Proof-of-work difficulty change is too big2016-08-29T18:53:43+02:00Cédric MoreauProof-of-work difficulty change is too bigCurrently, PoW is computed by making the proof starting by a given number of zeros. For example `0000F73E2C2D639B4A90CA183A38581EBBE40F12`. But this technique implies each time the level need to evolve difficulty is either:
- multiplied ...Currently, PoW is computed by making the proof starting by a given number of zeros. For example `0000F73E2C2D639B4A90CA183A38581EBBE40F12`. But this technique implies each time the level need to evolve difficulty is either:
- multiplied by `16` (because of hexadecimal base)
- or divided by `16`
Which means, given an average computing time target of 10min/block: once the difficulty is too easy (the block is computed in under `10 / 4 = 2min30`), then the difficulty levels up by a `16` factor (due to hexadecimal notation), which gives `2.5 * 16 = 40 min`: the difficulty has become 4 time the average targeted computing time.
**That is a big validation time change.**
Instead, proof-of-work could use another defintion like: proof-of-work **must start with** `NB_ZEROS` zeros, followed by:
- a character between `[0,F]` if the difficulty depends only on leading zeros
- a character between `[0,7]` if the difficulty has to be 2 times harder
- a character between `[0,3]` if the difficulty has to be 4 times harder
- a character between `[0,1]` if the difficulty has to be 8 times harder
This definition of PoW allows to change from difficulty range of ̀`16` given by hexadecimal system (difficulty bounds are `SQRT(16) = 4` times less or `SQRT(16) = 4` times more than average target) to a difficulty range of `2` (difficulty bounds are `SQRT(2)` times less or `SQRT(2)` times more than average target).
So, given our last example: given an average computing time target of 10min/block: once the difficulty is too easy (the block is computed in under `10 / sqrt(2) = 7min`), then the difficulty levels up by a `2` factor which gives `7min * 2 = 14 min`: the difficulty has become `sqrt(2)` times the average targeted computing time.
That would be more acceptable.
0.20https://git.duniter.org/nodes/typescript/duniter/-/issues/1413New key works with WS2P but not with POW ?2020-06-13T19:19:05+02:00galuelNew key works with WS2P but not with POW ?Yunohost - Duniter
When changing the key for a member key on a Duniter node (Yunohost server), it appears that the new key is used for WS2P connections but not for POW.
Rebooting the server and restart duniter seems to fix it...
Befor...Yunohost - Duniter
When changing the key for a member key on a Duniter node (Yunohost server), it appears that the new key is used for WS2P connections but not for POW.
Rebooting the server and restart duniter seems to fix it...
Before reboot logs :
```
2020-06-09T07:13:04+02:00 - e[32minfoe[39m: Generating proof-of-work with 5 leading zeros followed by [0-5]... (CPU usage set to 60%) for block#329305 FKHT5Q
2020-06-09T07:13:08+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER Eu3cwXLM 329274-0
2020-06-09T07:13:08+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ✔ PEER Eu3cwXLM 329274-0
2020-06-09T07:13:09+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER Eu3cwXLM 329274-0
2020-06-09T07:13:11+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER Eu3cwXLM 329274-0
2020-06-09T07:13:15+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER Eu3cwXLM 329274-0
2020-06-09T07:13:16+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER 5fPevx21 329274-0
2020-06-09T07:13:16+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER 5fPevx21 329274-0
2020-06-09T07:13:16+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ⬇ PEER 5fPevx21 329274-0
2020-06-09T07:13:16+02:00 - e[32minfoe[39m: [Ds1z6Wd8] ✔ PEER 5fPevx21 329274-0
```
After reboot :
```
2020-06-09T13:22:54+02:00 info Matched 3 zeros 000E20A44C2A6DD78E1202432FD582EB535BCEB3A0CCE17EF9C877CDDD3D7255 with Nonce = 10099900000088 for block#288696 by Ds1z6W
2020-06-09T13:23:00+02:00 warn WS2P request timeout
2020-06-09T13:23:00+02:00 warn WS2P request timeout
2020-06-09T13:23:00+02:00 info Block resolution: 1 potential blocks after current#288695...
2020-06-09T13:23:00+02:00 info Block #288696 added to the blockchain in 281 ms
2020-06-09T13:23:00+02:00 info [done] worker c#0#w#1
2020-06-09T13:23:00+02:00 info Block resolution: 1 potential blocks after current#288696...
2020-06-09T13:23:00+02:00 info [done] worker c#0#w#0
2020-06-09T13:23:00+02:00 info No engine found the proof. It was probably cancelled.
2020-06-09T13:23:00+02:00 info GIVEN proof-of-work for block#288696 with 5 leading zeros followed by [0-5]! stop PoW for Ds1z6W
2020-06-09T13:23:00+02:00 warn The proof-of-work generation was canceled: Proof-of-work computation canceled because block received
```https://git.duniter.org/nodes/typescript/duniter/-/issues/649PoW processes are not always searching next block for choosen branch2017-12-19T22:20:43+01:00Cédric MoreauPoW processes are not always searching next block for choosen branch*Created by: M5oul*
Wow, it seems hashes for blocks from different branches are generated:
``` bash
2016-10-07T16:20:00+02:00 - info: Matched 3 zeros 000D3994D1233BA1CAB022C45B83F68243B83DBC02962040B72D06CBDC7E3CAB with Nonce = 1000001...*Created by: M5oul*
Wow, it seems hashes for blocks from different branches are generated:
``` bash
2016-10-07T16:20:00+02:00 - info: Matched 3 zeros 000D3994D1233BA1CAB022C45B83F68243B83DBC02962040B72D06CBDC7E3CAB with Nonce = 100000134723 for block#44846 by J78bPU
2016-10-07T16:20:04+02:00 - info: Node 9Hrc2f (leprat.aufildudoux.fr:15128) is UP!
2016-10-07T16:20:09+02:00 - info: Matched 3 zeros 000413B44EA3D93417C16C887E2ECA2220B2393CEE8A71AF1294ED778BD95ED9 with Nonce = 200000002029 for block#44851 by J78bPU
2016-10-07T16:20:20+02:00 - info: Matched 3 zeros 000A235FA3E0C8597311D94E833EB8FE882556EA3657945BD0063857A69F2068 with Nonce = 200000002624 for block#44851 by J78bPU
2016-10-07T16:20:38+02:00 - info: Matched 3 zeros 000575141597CD115D77E73A8D99EEAF0509F0DE7BEA99C38E35835DC27C63B0 with Nonce = 200000124839 for block#44846 by J78bPU
2016-10-07T16:20:39+02:00 - info: Matched 3 zeros 00025D50646B042EF944B9ADFDA591EB92280ADAF3B8241AE713EEDEB73303D1 with Nonce = 100000138001 for block#44846 by J78bPU
2016-10-07T16:20:42+02:00 - info: POST Peer BSmbyQCeRx#44850
2016-10-07T16:20:43+02:00 - info: Matched 3 zeros 0009F2BAC9657DF41F44CEBCC3945682CF8A62F2F6F3237EC0EADA26CA305E8A with Nonce = 300000131914 for block#44846 by J78bPU
2016-10-07T16:20:44+02:00 - info: Matched 3 zeros 0001E354996B099AC186978925AAA680ACD2C2A9C6CA4CF6F4F933F7913ECC38 with Nonce = 200000004005 for block#44851 by J78bPU
2016-10-07T16:20:45+02:00 - info: Matched 3 zeros 000EED7D27FFF7C07E478A2433C1F99E9B87CFBDCDB49E9C579714C75F2AF2A3 with Nonce = 400000004943 for block#44851 by J78bPU
2016-10-07T16:20:55+02:00 - info: POST Peer 9bZEATXBGP#44820
2016-10-07T16:20:57+02:00 - info: Matched 4 zeros 000080767BF73F04D9AA45838CC63CAB8A546F9F7E440A1AFBC17F9769DECE10 with Nonce = 300000005047 for block#44851 by J78bPU
2016-10-07T16:20:57+02:00 - info: Matched 3 zeros 00046725BC7FF64FF03C7A6512BED1AC3FDC115418C7CA0E45C256068D7239E0 with Nonce = 200000004721 for block#44851 by J78bPU
2016-10-07T16:21:05+02:00 - warn: ETIMEDOUT
2016-10-07T16:21:05+02:00 - info: Peer 9Hrc2f3kEJ4mwBcMJXeTrQtDxHoLFeYCGMnDd3Mwswe9 unreachable: now considered as DOWN.
2016-10-07T16:21:06+02:00 - info: Matched 3 zeros 00046994E8DD55A23511ACE3D89BBCC6F7324BE33B3DCAB176CAE868FD69EB53 with Nonce = 100000140291 for block#44846 by J78bPU
```
0.80.0https://git.duniter.org/nodes/typescript/duniter/-/issues/765PoW easy on index branch2016-12-20T10:25:34+01:00Cédric MoreauPoW easy on index branch*Created by: M5oul*
On `index` branch, Proof-of-work is very easy:
```bash
2016-12-19T06:57:56+04:00 - info: Done: B7285235980E2A3B28D84976AB9A7E38DFCF243DE48C02606BD42F7B71197001 in 0.01s (0 tests, ~0.00 tests/s)
2016-12-19T06:57:...*Created by: M5oul*
On `index` branch, Proof-of-work is very easy:
```bash
2016-12-19T06:57:56+04:00 - info: Done: B7285235980E2A3B28D84976AB9A7E38DFCF243DE48C02606BD42F7B71197001 in 0.01s (0 tests, ~0.00 tests/s)
2016-12-19T06:57:56+04:00 - info: FOUND proof-of-work with 0 leading zeros followed by [0-9A-F]!
2016-12-19T06:57:56+04:00 - warn: Proof-of-work self-submission: ruleNumber
2016-12-19T06:57:56+04:00 - warn: Identity with hash 'AC5647C8B4703FB72D773244F75BEED9E47A01CA8037A8E6BBB79168FAC82A8A' not found
2016-12-19T06:57:56+04:00 - warn: Identity with hash '683794A54A59FDF536132BDB8315A222E30CC8560162B607BC49BE8CC67304C8' not found
2016-12-19T06:57:57+04:00 - info: Transaction 2021A7DE6E95D38661A9CF48ECBBC587B56E5993E45369600596652F2B626206 added to block
2016-12-19T06:57:57+04:00 - info: Generating proof-of-work with 0 leading zeros followed by [0-9A-F]... (CPU usage set to 20%) for block#64393 J78bPU
2016-12-19T06:57:57+04:00 - info: ENGINE #3 HAS FOUND A PROOF
2016-12-19T06:57:57+04:00 - info: Stop proof-of-work worker #1
2016-12-19T06:57:57+04:00 - info: Stop proof-of-work worker #2
2016-12-19T06:57:57+04:00 - info: Stop proof-of-work worker #3
2016-12-19T06:57:57+04:00 - info: Stop proof-of-work worker #4
2016-12-19T06:57:57+04:00 - info: Done: 0ABBDDCDEA53CA4AE3BB2A3088ECEC72C2AF3E6A825566FB0558A298264E8252 in 0.01s (0 tests, ~0.00 tests/s)
2016-12-19T06:57:57+04:00 - info: FOUND proof-of-work with 0 leading zeros followed by [0-9A-F]!
2016-12-19T06:57:57+04:00 - warn: Proof-of-work self-submission: ruleNumber
2016-12-19T06:57:57+04:00 - warn: Identity with hash 'AC5647C8B4703FB72D773244F75BEED9E47A01CA8037A8E6BBB79168FAC82A8A' not found
2016-12-19T06:57:57+04:00 - warn: Identity with hash '683794A54A59FDF536132BDB8315A222E30CC8560162B607BC49BE8CC67304C8' not found
2016-12-19T06:57:58+04:00 - info: POST Peer 2wTV9THHfC#64362
2016-12-19T06:57:58+04:00 - info: Transaction 2021A7DE6E95D38661A9CF48ECBBC587B56E5993E45369600596652F2B626206 added to block
2016-12-19T06:57:58+04:00 - info: Generating proof-of-work with 0 leading zeros followed by [0-9A-F]... (CPU usage set to 20%) for block#64393 J78bPU
2016-12-19T06:57:58+04:00 - info: ENGINE #1 HAS FOUND A PROOF
2016-12-19T06:57:58+04:00 - info: Stop proof-of-work worker #1
2016-12-19T06:57:58+04:00 - info: Stop proof-of-work worker #2
2016-12-19T06:57:58+04:00 - info: Stop proof-of-work worker #3
2016-12-19T06:57:58+04:00 - info: Stop proof-of-work worker #4
```0.80.0https://git.duniter.org/nodes/typescript/duniter/-/issues/60Blockchain writing speed is too slow2016-08-29T18:54:11+02:00Cédric MoreauBlockchain writing speed is too slowLooking at current blockchain writing speed, it can be noted its value varies between 1 block / 2.5 minutes and 1 block / 40 minutes.
This is a too large interval. It is due to proof-of-work rule which changes difficulty with each zero ...Looking at current blockchain writing speed, it can be noted its value varies between 1 block / 2.5 minutes and 1 block / 40 minutes.
This is a too large interval. It is due to proof-of-work rule which changes difficulty with each zero of an hexadecimal string. With current algorithm, difficulty confines the speed between `avgSpeed / 4` and `avgSpeed * 4`, which makes a `16` times interval.
A better algorithm would limit this interval to a `2` times one (the highest writing speed is 2 times greater than lowest).
https://git.duniter.org/nodes/typescript/duniter/-/issues/316Add intermediary PoW results2016-08-29T18:52:59+02:00Cédric MoreauAdd intermediary PoW resultsWhen computing the PoW, we have no idea what is the proof-of-work state: is it stucked? has any near-proof be found?
A good start would be to display the `NB_ZEROS - 1` found proofs, just for the node to say "I'm on it, almost found", w...When computing the PoW, we have no idea what is the proof-of-work state: is it stucked? has any near-proof be found?
A good start would be to display the `NB_ZEROS - 1` found proofs, just for the node to say "I'm on it, almost found", with their Nonce + hash.
0.13.5https://git.duniter.org/nodes/typescript/duniter/-/issues/441Remove `blocksRot` parameter2016-08-29T18:55:15+02:00Cédric MoreauRemove `blocksRot` parameterWalking through http://www.coindesk.com/9-biggest-screwups-bitcoin-history/, I could remember the AuroraCoin initiative where we put 2-3 comments on their forum to warn them about spacetime asymmetry. This is article points out the failu...Walking through http://www.coindesk.com/9-biggest-screwups-bitcoin-history/, I could remember the AuroraCoin initiative where we put 2-3 comments on their forum to warn them about spacetime asymmetry. This is article points out the failure of AuroraCoin, arguing after the coins were issued, most of users did not invest their computer securing the blockchain, leading to a security issue because few power was required to control the blockchain.
I do not want such thing, and of course we have some differences which modifiy slightly the problem for us:
- users might add their computer just to secure their future UDs
- Duniter is not just CPU power, but requires personal signature
But if you look at [the protocol parameters](https://github.com/duniter/duniter/blob/master/doc/Protocol.md#protocol-parameters), you could see `blocksRot` parameter which deals with the individual PoW difficulty.
Basically, it says:
> Let's look at the `blocksRot` last blocks to define the number of last different issuers of blocks.
The problem is: `blocksRot` is a constant. Maybe we don't need such thing, and just have a dynamical value, for example each time a new issuer is detected (by computing & sharing a valid new block) then the "`blocksRot`" value would be incremented by `12`.
So if we start the blockchain, `blocksRot = 12` as long as only one user computes blocks. If a second user joins the computing party, then `blocksRot = 24`. If, for any reason a third person joins, then `blocksRot = 36`. And if _one of the 3 people_ stops computing blocks and no more appears in the `blocksRot` blocks (36), then `blocksRot = 24` from that moment.
Why this number of `12`? Well why not, also this might be linked to [this article about web of humans](http://www.internetactu.net/2016/05/12/a-combien-peut-on-cooperer/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+internetactu%2FbcmJ+%28InternetActu.net%29).
I don't know if such an algorithm will be enough, but for sure a static number is an open door to exploits.
0.30https://git.duniter.org/nodes/typescript/duniter/-/issues/492Have a different personal difficulty rule2016-10-17T10:38:56+02:00Cédric MoreauHave a different personal difficulty ruleToday the rule is the following:
```
PERSONAL_DIFF = MAX [ PoWMin ; PoWMin * FLOOR (percentRot * (1 + nbPreviousIssuers )/ (1 + nbBlocksSince)) ]
```
Which leads to difficulty curves like this:
[![image](https://cloud.githubuserconten...Today the rule is the following:
```
PERSONAL_DIFF = MAX [ PoWMin ; PoWMin * FLOOR (percentRot * (1 + nbPreviousIssuers )/ (1 + nbBlocksSince)) ]
```
Which leads to difficulty curves like this:
[![image](https://cloud.githubusercontent.com/assets/969136/16496745/d1fa2d32-3ef3-11e6-9579-ee0eaaaf7f92.png)](https://forum.duniter.org/t/common-and-personnal-proof-of-work-difficulties/924/9)
Maybe we could have smoother curves, or be able to have only 1/3 of the members with the common difficulty instead of 2/3 like we can see in this graph (for percentRot = 0,9).
0.40https://git.duniter.org/nodes/typescript/duniter/-/issues/539Network stucked because of generated blocks with wrong blockstamp on transaction2016-08-29T18:50:16+02:00Cédric MoreauNetwork stucked because of generated blocks with wrong blockstamp on transaction*Created by: M5oul*
``` bash
2016-08-20T10:02:22+02:00 - info: Done: 000029EC0F931CF9BC73F8CCAEC978954D91864419A826E39626C88AC7C84E6D in 1348.13s (26562 tests, ~19.70 tests/s)
2016-08-20T10:02:22+02:00 - info: FOUND proof-of-work with 4...*Created by: M5oul*
``` bash
2016-08-20T10:02:22+02:00 - info: Done: 000029EC0F931CF9BC73F8CCAEC978954D91864419A826E39626C88AC7C84E6D in 1348.13s (26562 tests, ~19.70 tests/s)
2016-08-20T10:02:22+02:00 - info: FOUND proof-of-work with 4 leading zeros followed by [0-6]!
2016-08-20T10:02:22+02:00 - warn: Proof-of-work self-submission: Wrong blockstamp for transaction
2016-08-20T10:02:23+02:00 - warn: Too old membership
--
2016-08-20T10:24:54+02:00 - info: Done: 000029EC0F931CF9BC73F8CCAEC978954D91864419A826E39626C88AC7C84E6D in 1348.23s (26562 tests, ~19.70 tests/s)
2016-08-20T10:24:54+02:00 - info: FOUND proof-of-work with 4 leading zeros followed by [0-6]!
2016-08-20T10:24:55+02:00 - warn: Proof-of-work self-submission: Wrong blockstamp for transaction
2016-08-20T10:24:55+02:00 - info: 88.174.120.187 - GET /blockchain/block/32005 HTTP/1.1 200 1569 - 59.322 ms
--
2016-08-20T10:47:28+02:00 - info: Done: 000029EC0F931CF9BC73F8CCAEC978954D91864419A826E39626C88AC7C84E6D in 1348.31s (26562 tests, ~19.70 tests/s)
2016-08-20T10:47:28+02:00 - info: FOUND proof-of-work with 4 leading zeros followed by [0-6]!
2016-08-20T10:47:28+02:00 - warn: Proof-of-work self-submission: Wrong blockstamp for transaction
2016-08-20T10:47:29+02:00 - warn: Too old membership
--
2016-08-20T11:10:00+02:00 - info: Done: 000029EC0F931CF9BC73F8CCAEC978954D91864419A826E39626C88AC7C84E6D in 1348.26s (26562 tests, ~19.70 tests/s)
2016-08-20T11:10:00+02:00 - info: FOUND proof-of-work with 4 leading zeros followed by [0-6]!
2016-08-20T11:10:01+02:00 - warn: Proof-of-work self-submission: Wrong blockstamp for transaction
2016-08-20T11:10:02+02:00 - warn: Too old membership
```
0.30https://git.duniter.org/nodes/typescript/duniter/-/issues/540Add a tile to see the bloc computing in the UI2016-09-19T20:53:06+02:00Cédric MoreauAdd a tile to see the bloc computing in the UIIt would display several informations:
- whether it is currently computing blocs
- number of "almost" proofs found, for each 16^ level
- average computing speed
It would display several informations:
- whether it is currently computing blocs
- number of "almost" proofs found, for each 16^ level
- average computing speed
0.31https://git.duniter.org/nodes/typescript/duniter/-/issues/564Impossible to generate the root block2016-09-01T19:22:59+02:00Cédric MoreauImpossible to generate the root block*Created by: b3j0f*
Hi,
I just created a new node, accessible from the http api, and I connected a new participant (not a member actually) from the sakia interface.
Then, I tried to create a root block, and I got this error (I haven't g...*Created by: b3j0f*
Hi,
I just created a new node, accessible from the http api, and I connected a new participant (not a member actually) from the sakia interface.
Then, I tried to create a root block, and I got this error (I haven't got time to put a newcomer to add...):
``` bash
lyst@lyst:~$ duniter gen-root
2016-08-27T10:24:49-04:00 - debug: Plugging file system...
2016-08-27T10:24:49-04:00 - debug: Loading conf...
2016-08-27T10:24:49-04:00 - debug: Loading crypto functions...
2016-08-27T10:24:49-04:00 - debug: Upgrade database...
? Newcomers to add: (Press <space> to select)
❯◯ b3j0f2016-08-27T10:24:49-04:00 - error: httpCode=400, ucode=2018, message=Wrong new block: cannot make a root block without members
2016-08-27T10:24:49-04:00 - error: Error: [object Object]
at Error (native)
at /opt/duniter/sources/app/cli.js:829:15
at process._tickCallback (node.js:412:9)
2016-08-27T10:24:49-04:00 - error: Error: [object Object]
at Error (native)
at /opt/duniter/sources/app/cli.js:829:15
at process._tickCallback (node.js:412:9)
```
Then, I tried to write the next block and the process is still running with this output...
``` bash
2016-08-27T10:26:39-04:00 - debug: Plugging file system...
2016-08-27T10:26:40-04:00 - debug: Loading conf...
2016-08-27T10:26:40-04:00 - debug: Loading crypto functions...
2016-08-27T10:26:40-04:00 - debug: Upgrade database...
2016-08-27T10:26:40-04:00 - debug: Block to be sent: #0 (1 newcomers, 0 certifications)
2016-08-27T10:26:40-04:00 - info: Generating proof-of-work with NaN leading zeros followed by [0-undefined]... (CPU usage set to 60%)
2016-08-27T10:26:50-04:00 - info: Mesured max speed is ~106 tests/s. Proof will try with ~64 tests/s.
```
Did I miss something ? Or the command "gen-root" is became useless ?
0.31https://git.duniter.org/nodes/typescript/duniter/-/issues/569Proposition for better difficulty PoW computation2016-11-14T16:51:55+01:00Cédric MoreauProposition for better difficulty PoW computation*Created by: M5oul*
I propose a better way to compute Proof of Work difficulty to have numbers more explicit and which represents in a more realistic way how strong machines are working on it.
### Definitions
- `H`: hexadecimal possibil...*Created by: M5oul*
I propose a better way to compute Proof of Work difficulty to have numbers more explicit and which represents in a more realistic way how strong machines are working on it.
### Definitions
- `H`: hexadecimal possibilities, each char can have 16 values: `[0-9A-F]`.
- `P`: valid possibilities
- `pos`: position on the string
### Current computing difficulty
[Proof of Work protocol documentation](https://github.com/duniter/duniter/blob/master/doc/Protocol.md#proof-of-work-1) on how difficulty is currently computed.
Currently difficulty is calculated with a sum of difficulties of each char to appear:
> Difficulty = Σ (pos = 0 ; pos += 1 ; max(len)) [H - P(pos) + 1]
> Difficulty = [H - P(pos(0)) + 1] + [H - P(pos(1)) + 1] + [H - P(pos(n)) + 1] + [H - P(pos(n+1)) + 1]…
For instance: to match `0000*`, difficulty = 16 × 4 = 64.
### Compute difficulty proposition
Computation must be done with multiplication to fit with probabilities rules:
> Difficulty = Π (pos = 0 ; pos += 1 ; max(len)) [H - P(pos) + 1]
> Difficulty = [H - P(pos(0)) + 1] × [H - P(pos(1)) + 1] × [H - P(pos(n)) + 1] × [H - P(pos(n+1)) + 1]…
For instance: to match `0000*`, difficulty = 16⁴ = 65.563.
#### Probability
With this difficulty computing, we could also compute probability to found a valid block at each test:
> Probability = 1 / Difficulty
### Results comparison table
| Match | Σ Difficulty | Π Difficulty | Probability |
| :-: | :-: | :-: | :-: |
| `*****` = `[0-9A-F]****` | 1 | 1 | 1/1 |
| `[0-9]****` | 7 | (16 - 10 + 1) = 7 | 1/(16 - 10 + 1) = 1/7 |
| `[0-1]****` | 15 | (16 - 2 + 1) = 15 | 1/(16 - 2 + 1) = 1/15 |
| `0****` | 16 | 16 | 1/[16 - 1 + 1] = 1/16 |
| `0[0-9]***` | 16 + (16 - 10 + 1) = 24 | 16 × (16 - 10 + 1) = 112 | 1/112 |
| `00***` | 16 × 2 = 32 | 16² = 256 | 1/16² |
| `0000*` | 16 × 4 = 64 | 16⁴ = 65.563 | 1/16⁴ |
| `0000[0-5]` | 16 × 4 + 6 = 70 | 16⁴ × (16 - 10) = 393.216 | 1/[16⁴ × (16 - 10)] |
As you could see 70 is very different than 393k.
### Implementation
I don't know what do that means for implementation.
May be, only changing calculation formula?
Does it impact PoW computation?
Horizonhttps://git.duniter.org/nodes/typescript/duniter/-/issues/572Proof-of-work difficulty is not correctly bounded2016-09-28T16:23:55+02:00Cédric MoreauProof-of-work difficulty is not correctly boundedSee #569
See #569
0.40https://git.duniter.org/nodes/typescript/duniter/-/issues/577Logs only show informations about proofs between 3 and 5 leading zeros2016-11-25T18:59:16+01:00Cédric MoreauLogs only show informations about proofs between 3 and 5 leading zerosThese logs only show up for proofs between 3 and 5 leading zeros:
```
2016-08-31T10:13:42+02:00 - info: Matched 3 zeros 000CCA1B453F7FC7D9E32F69B33B9EF106685E4CFCF618CB7D4806CF690A7FEA with Nonce = 12537 for block#35084
2016-08-31T10:14...These logs only show up for proofs between 3 and 5 leading zeros:
```
2016-08-31T10:13:42+02:00 - info: Matched 3 zeros 000CCA1B453F7FC7D9E32F69B33B9EF106685E4CFCF618CB7D4806CF690A7FEA with Nonce = 12537 for block#35084
2016-08-31T10:14:06+02:00 - info: Matched 3 zeros 000225501ADCC301027E8F5B029C16429AA295876D9B3A593921ACF8A72FC93C with Nonce = 16601 for block#35084
```
It should be done for the `[n - x; n]` leading zeros instead, where:
- `n` is the target number of zeros
- `x` is the number of levels under `n` that we also want to see in logs
Because for a proof of 6, we do not want to see when the node find a proof with 2 zeros for example, so we would have `n = 6, x = 3` for example.
0.31Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/584Benefit from multi-cores for PoW computing2016-09-22T20:12:35+02:00Cédric MoreauBenefit from multi-cores for PoW computing0.31https://git.duniter.org/nodes/typescript/duniter/-/issues/589Sort /blockchain/difficulties by difficulty level2016-09-17T18:34:55+02:00Cédric MoreauSort /blockchain/difficulties by difficulty levelhttp://cgeek.fr:9330/blockchain/difficulties
``` json
{
"block": 38179,
"levels": [
{
"uid": "charles",
"level": 65
},
{
"uid": "kimamila",
"level": 65
},
{
"uid": "vincentux",
...http://cgeek.fr:9330/blockchain/difficulties
``` json
{
"block": 38179,
"levels": [
{
"uid": "charles",
"level": 65
},
{
"uid": "kimamila",
"level": 65
},
{
"uid": "vincentux",
"level": 65
},
{
"uid": "cgeek",
"level": 130
},
{
"uid": "gnu-tux",
"level": 65
},
{
"uid": "mmpio",
"level": 65
},
{
"uid": "pafzedog",
"level": 65
},
{
"uid": "hacky",
"level": 65
},
{
"uid": "inso",
"level": 65
},
{
"uid": "moul",
"level": 455
},
{
"uid": "Tortue",
"level": 195
}
]
}
```
This result should have its entries sorted by `level`, no matter if it is ASC or DESC.
0.31https://git.duniter.org/nodes/typescript/duniter/-/issues/607CPU proof-of-work doesn't respect setting limit percentage2016-10-03T18:14:52+02:00Cédric MoreauCPU proof-of-work doesn't respect setting limit percentage*Created by: M5oul*
`htop` shows process up to 70% by cores for 60% CPU limit setting:
![capture du 2016-09-22 14-14-43](https://cloud.githubusercontent.com/assets/4758871/18747943/36b08bae-80d0-11e6-8ed1-13c6dad42364.png)
*Created by: M5oul*
`htop` shows process up to 70% by cores for 60% CPU limit setting:
![capture du 2016-09-22 14-14-43](https://cloud.githubusercontent.com/assets/4758871/18747943/36b08bae-80d0-11e6-8ed1-13c6dad42364.png)
0.31.2Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/typescript/duniter/-/issues/609After resync from a turned off node, the node do not compute blocks2016-11-04T08:00:03+01:00Cédric MoreauAfter resync from a turned off node, the node do not compute blocks*Created by: M5oul*
After resync from a turned off node, the node do not compute blocks:
``` fish
2016-09-23T11:19:41+02:00 - info: Block #41083 added to the blockchain in 381 ms
2016-09-23T11:19:41+02:00 - info: POST Block block#41083...*Created by: M5oul*
After resync from a turned off node, the node do not compute blocks:
``` fish
2016-09-23T11:19:41+02:00 - info: Block #41083 added to the blockchain in 381 ms
2016-09-23T11:19:41+02:00 - info: POST Block block#41083
2016-09-23T11:19:41+02:00 - info: Block #41084 added to the blockchain in 293 ms
2016-09-23T11:19:42+02:00 - info: POST Block block#41084
2016-09-23T11:19:42+02:00 - info: Block #41085 added to the blockchain in 378 ms
2016-09-23T11:19:42+02:00 - info: POST Block block#41085
2016-09-23T11:19:42+02:00 - info: Block #41086 added to the blockchain in 339 ms
2016-09-23T11:19:42+02:00 - info: POST Block block#41086
2016-09-23T11:19:47+02:00 - info: Will pull blocks from the network in 10 min 0 sec
2016-09-23T11:19:47+02:00 - info: Duniter server listening on http://192.168.1.21:24723
2016-09-23T11:19:47+02:00 - warn: Could NOT listen to http://fe80::10ef:2572:d9a7:ffdd:24723
2016-09-23T11:19:48+02:00 - warn: Error: listen EINVAL fe80::10ef:2572:d9a7:ffdd:24723
at Object.exports._errnoException (util.js:907:11)
at exports._exceptionWithHostPort (util.js:930:20)
at Server._listen2 (net.js:1237:19)
at listen (net.js:1286:10)
at net.js:1395:9
at nextTickCallbackWith3Args (node.js:453:9)
at process._tickCallback (node.js:359:17)
2016-09-23T11:19:48+02:00 - info: >> Server ready!
```
After restarting it, node compute blocks again.
0.31.2https://git.duniter.org/nodes/typescript/duniter/-/issues/612How difficulties works when there is a two majors branches?2016-09-24T14:59:05+02:00Cédric MoreauHow difficulties works when there is a two majors branches?*Created by: M5oul*
How difficulties works when there is a two majors branches?
Does both have it's own difficulties system rotation or there is only one for all nodes?
This question is to understand how it works and may be include it b...*Created by: M5oul*
How difficulties works when there is a two majors branches?
Does both have it's own difficulties system rotation or there is only one for all nodes?
This question is to understand how it works and may be include it better on Silkaj.
https://git.duniter.org/nodes/typescript/duniter/-/issues/613Daemon stopped because of PoW issue2016-09-27T13:17:43+02:00Cédric MoreauDaemon stopped because of PoW issue*Created by: M5oul*
My ARM node daemon was no more running.
I noticed that three hours later because it wasn't answering requests.
``` bash
2016-09-24T09:05:28+02:00 - info: 163.172.176.32 - GET /blockchain/blocks/50/41336 HTTP/1.1 200...*Created by: M5oul*
My ARM node daemon was no more running.
I noticed that three hours later because it wasn't answering requests.
``` bash
2016-09-24T09:05:28+02:00 - info: 163.172.176.32 - GET /blockchain/blocks/50/41336 HTTP/1.1 200 2 - 14.965 ms
2016-09-24T09:05:28+02:00 - info: 163.172.130.151 - GET /blockchain/blocks/50/41336 HTTP/1.1 200 2 - 4.883 ms
2016-09-24T09:05:31+02:00 - info: 88.174.120.187 - POST /network/peering/peers HTTP/1.1 400 63 - 235.663 ms
2016-09-24T09:05:36+02:00 - error: Error: channel closed
at ChildProcess.target.send (internal/child_process.js:523:16)
at Timeout._repeat (/opt/duniter/sources/app/lib/computation/blockProver.js:279:47)
at Timeout.wrapper [as _onTimeout] (timers.js:408:11)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
```
Ok, I could reproduce it. Do you want database copy?
0.31https://git.duniter.org/nodes/typescript/duniter/-/issues/619Error: Proof-of-work computation canceled2016-09-30T18:15:31+02:00Cédric MoreauError: Proof-of-work computation canceled*Created by: RavanH*
On ARM board (Raspberry Pi 3), `top` shows 4 node processes running...
One of the many entries from duniter.log:
```
2016-09-27T18:50:54+00:00 - info: Generating proof-of-work with 5 leading zeros followed by [0-9...*Created by: RavanH*
On ARM board (Raspberry Pi 3), `top` shows 4 node processes running...
One of the many entries from duniter.log:
```
2016-09-27T18:50:54+00:00 - info: Generating proof-of-work with 5 leading zeros followed by [0-9A-F]... (CPU usage set to 60%) for block#42329 9Hrc2f
2016-09-27T18:51:01+00:00 - info: Matched 3 zeros 00046C97EFA0CACEC954CB96ECB921DB2C5C3DC1D7682BFE7406254299842998 with Nonce = 400000000188 for block#42329 by 9Hrc2f
2016-09-27T18:51:01+00:00 - info: POST Peer BnSRjMjJ7g#42328
2016-09-27T18:51:05+00:00 - info: Proof-of-work interrupted for some unknown reason, restarting..
2016-09-27T18:51:05+00:00 - warn: Proof-of-work computation canceled
2016-09-27T18:51:05+00:00 - error: Proof-of-work computation canceled
```
https://forum.duniter.org/t/error-proof-of-work-computation-canceled/1288
0.31.2https://git.duniter.org/nodes/typescript/duniter/-/issues/622Proof-of-work running during re-syncting2017-02-07T06:41:09+01:00Cédric MoreauProof-of-work running during re-syncting*Created by: M5oul*
When re-syncting with a low computer, between every blocks received, there is proof-of-work running for every blocks.
It's useless, and re-sync could go faster.
*Created by: M5oul*
When re-syncting with a low computer, between every blocks received, there is proof-of-work running for every blocks.
It's useless, and re-sync could go faster.
0.90.6https://git.duniter.org/nodes/typescript/duniter/-/issues/633Stop Proof-of-Work, found a block, restart PoW for same block2017-03-03T17:03:16+01:00Cédric MoreauStop Proof-of-Work, found a block, restart PoW for same block*Created by: M5oul*
With 0.31.2b4, the node says it found a block, stop computing then restart computing for same block:
``` bash
2016-10-03T14:56:18+02:00 - info: Matched 3 zeros 000E7AF5F0136B1EB8BE2489120F79AF212C636D28A3D705B1E8AA9...*Created by: M5oul*
With 0.31.2b4, the node says it found a block, stop computing then restart computing for same block:
``` bash
2016-10-03T14:56:18+02:00 - info: Matched 3 zeros 000E7AF5F0136B1EB8BE2489120F79AF212C636D28A3D705B1E8AA9B76263AA8 with Nonce = 300000022159 for block#43796 by J78bPU
2016-10-03T14:56:20+02:00 - info: Matched 4 zeros 000011E6210FBBA5C29B3A2A1E441F96E15B90C52CF2BCFCA61BA1C6CC7049CD with Nonce = 200000022372 for block#43796 by J78bPU
2016-10-03T14:56:20+02:00 - info: ENGINE #2 HAS FOUND A PROOF
2016-10-03T14:56:20+02:00 - info: Stop proof-of-work worker #1
2016-10-03T14:56:20+02:00 - info: Stop proof-of-work worker #2
2016-10-03T14:56:20+02:00 - info: Stop proof-of-work worker #3
2016-10-03T14:56:20+02:00 - info: Stop proof-of-work worker #4
2016-10-03T14:56:29+02:00 - info: Matched 3 zeros 00055526F96F701D5BB556364C649C445A98BA3EFBD5C477D1F15488A10992AA with Nonce = 100000001270 for block#43796 by J78bPU
2016-10-03T14:56:30+02:00 - info: Matched 3 zeros 0007CC74E645AFF316DAD86AF23CAED05B645DB4AD9615BFF87972D0C005226E with Nonce = 300000001406 for block#43796 by J78bPU
2016-10-03T14:56:32+02:00 - info: Node BSmbyQ (peer.duniter.org:8999) is UP!
2016-10-03T14:56:43+02:00 - info: Matched 3 zeros 0002C0544EAA8EB3F88252D969D7212BBF2FA4AF9D30B7B5B4F2CBA4A30FF76C with Nonce = 100000003045 for block#43796 by J78bPU
2016-10-03T14:56:49+02:00 - info: Matched 3 zeros 000197105D6144D9828992D6E2D9BA281417C11D77A0EDF25386C544D21B60B0 with Nonce = 300000003945 for block#43796 by J78bPU
2016-10-03T14:56:58+02:00 - info: Matched 3 zeros 000571568704BE2446F59E62B0C94B38129EB2312D5DB76F1FC26671657A2452 with Nonce = 300000004981 for block#43796 by J78bPU
2016-10-03T14:56:59+02:00 - info: Matched 3 zeros 000DE80A8425A1EB852D6B6C54DB0153B8D4B3C4FC73ABEBE1A06548BD13DF09 with Nonce = 100000004992 for block#43796 by J78bPU
2016-10-03T14:57:20+02:00 - info: Matched 3 zeros 00091702C14BC9862AF58ECE45FCA34D93A0F7BBA492052751BCD4901DD8FD70 with Nonce = 100000007646 for block#43796 by J78bPU
```
0.91.0https://git.duniter.org/nodes/typescript/duniter/-/issues/634With shared keyring, try not to compute the exact same proof2016-10-16T22:53:52+02:00Cédric MoreauWith shared keyring, try not to compute the exact same proofIndeed, if all the nodes with a shared keyring uses the same Nonce schema and have the exact same data to include into the block, then the computed proof will be exactly the same, repeated on each node.
Which is a pure waste of time and...Indeed, if all the nodes with a shared keyring uses the same Nonce schema and have the exact same data to include into the block, then the computed proof will be exactly the same, repeated on each node.
Which is a pure waste of time and energy.
0.40https://git.duniter.org/nodes/typescript/duniter/-/issues/635CPU% is not correctly implemented2017-01-06T11:52:57+01:00Cédric MoreauCPU% is not correctly implemented> Written by RavenH in #607
>
> Installed 0.31.2 and all seems well with cpu 0.1... top reports around 14% cpu usage for each of the 4 processes.
>
> However, with cpu 0.6 the actual usage seemed to float around 82% at the start but a...> Written by RavenH in #607
>
> Installed 0.31.2 and all seems well with cpu 0.1... top reports around 14% cpu usage for each of the 4 processes.
>
> However, with cpu 0.6 the actual usage seemed to float around 82% at the start but after a few minutes it spiked to 100% and now stays there constantly... Log reports nothing unusual. Calculation, pulling and posting to peers is being done.
0.80.4https://git.duniter.org/nodes/typescript/duniter/-/issues/672Change difficulty rule: no more exclude members from the PoW process2016-11-08T12:00:26+01:00Cédric MoreauChange difficulty rule: no more exclude members from the PoW processToday with DUP 0.4, only a 1/3 of the nodes can find the next block. We can see that when there are big forks, some of the branches get stuck, and that might become stuck branches.
As of DUP 0.4, we changed the difficulty rule a bit to ...Today with DUP 0.4, only a 1/3 of the nodes can find the next block. We can see that when there are big forks, some of the branches get stuck, and that might become stuck branches.
As of DUP 0.4, we changed the difficulty rule a bit to introduce _a handicap_ based on personal block issuance.
I suppose we should just generalize this rule, so no fork will be stuck, ever, and anyone can pursue its own fork alone if he wants to, no matter if that takes days, weeks or months to reach a difficulty adapted to its new situation.
0.50.0https://git.duniter.org/nodes/typescript/duniter/-/issues/675Change difficulty rule: use the median as reference instead of 52016-11-08T12:00:21+01:00Cédric MoreauChange difficulty rule: use the median as reference instead of 5Currently the personal handicap is computed over `5`:
```
PERSONAL_EXCESS = MAX(0, (nbPersonalBlocksInFrame / 5) - 1)
```
A better approach could be to replace `5` by `medianInFrame`, which would correspond to the median of issued bloc...Currently the personal handicap is computed over `5`:
```
PERSONAL_EXCESS = MAX(0, (nbPersonalBlocksInFrame / 5) - 1)
```
A better approach could be to replace `5` by `medianInFrame`, which would correspond to the median of issued blocks per issuer.
We used `5` because it is the number used for computing the frame of difficulty `IssuersFrame`. But the median would be fairer: the personal handicap would depend on _other peers CPU power_, not an arbitrary number.
So compared to DUP 0.4, which is already fairer than DUP 0.3 as long as block issuance repartition is concerned, DUP 0.5 would increase again the difficulty of the best issuers, leaving more room for little issuers.
0.50.0https://git.duniter.org/nodes/typescript/duniter/-/issues/682Strange proof-of-work behaviour2016-11-07T11:55:18+01:00Cédric MoreauStrange proof-of-work behaviour*Created by: M5oul*
The node found a good hash, didn't do anything with it and continue search for hash.
Then it found a new valid hash. This hash was found two times by two engines or by one engine and is was submitted two times.
```...*Created by: M5oul*
The node found a good hash, didn't do anything with it and continue search for hash.
Then it found a new valid hash. This hash was found two times by two engines or by one engine and is was submitted two times.
```bash
2016-10-31T09:03:41+01:00 - info: Matched 4 zeros 000030C711649B6425EC99438DC01D87A34EE94212961C7E533FF922B7D70B36 with Nonce = 10300000018034 for block#51104 by J78bPU
2016-10-31T09:03:41+01:00 - info: ENGINE #3 HAS FOUND A PROOF
2016-10-31T09:03:41+01:00 - info: Stop proof-of-work worker #1
2016-10-31T09:03:41+01:00 - info: Stop proof-of-work worker #2
2016-10-31T09:03:41+01:00 - info: Stop proof-of-work worker #3
2016-10-31T09:03:41+01:00 - info: Stop proof-of-work worker #4
2016-10-31T09:04:08+01:00 - info: Matched 3 zeros 000F3062BF4AEADB1B50A1BACD8BE7025C1DC926C8989DEED986290719DDF3F4 with Nonce = 10400000003062 for block#51104 by J78bPU
2016-10-31T09:04:17+01:00 - info: Matched 3 zeros 000631F9DD6EA72E5A25064D3961009DFAB7D41A52219F13657911DBFA3B1635 with Nonce = 10300000004143 for block#51104 by J78bPU
2016-10-31T09:04:25+01:00 - info: Matched 3 zeros 0007CD9F2BD3AB4053206131CDFD0E4E0069EB645984A4684185D0AF0CA02C83 with Nonce = 10100000005194 for block#51104 by J78bPU
2016-10-31T09:04:35+01:00 - info: Matched 3 zeros 000AC5AD2BB60947091FBCE4FB112B5598CB7D3A3F6D1722790337B489E25D82 with Nonce = 10200000005775 for block#51104 by J78bPU
2016-10-31T09:04:49+01:00 - info: Matched 4 zeros 00001161FC90C89409B82AB2EF0BA9CC9A70B1CBC0C7AFDFFB7CA3FD44A78CC1 with Nonce = 10400000007417 for block#51104 by J78bPU
2016-10-31T09:04:49+01:00 - info: ENGINE #4 HAS FOUND A PROOF
2016-10-31T09:04:49+01:00 - info: Stop proof-of-work worker #1
2016-10-31T09:04:49+01:00 - info: Stop proof-of-work worker #2
2016-10-31T09:04:49+01:00 - info: Stop proof-of-work worker #3
2016-10-31T09:04:49+01:00 - info: Stop proof-of-work worker #4
2016-10-31T09:04:49+01:00 - info: Done: 00001161FC90C89409B82AB2EF0BA9CC9A70B1CBC0C7AFDFFB7CA3FD44A78CC1 in 220.25s (7416 tests, ~33.67 tests/s)
2016-10-31T09:04:49+01:00 - info: FOUND proof-of-work with 4 leading zeros followed by [0-4]!
2016-10-31T09:04:49+01:00 - info: Block #51104 added to the blockchain in 253 ms
2016-10-31T09:04:49+01:00 - info: POST Block block#51104
2016-10-31T09:04:50+01:00 - error: Already processed
2016-10-31T09:04:50+01:00 - info: Done: 00001161FC90C89409B82AB2EF0BA9CC9A70B1CBC0C7AFDFFB7CA3FD44A78CC1 in 221.20s (7416 tests, ~33.53 tests/s)
2016-10-31T09:04:50+01:00 - info: FOUND proof-of-work with 4 leading zeros followed by [0-4]!
2016-10-31T09:04:50+01:00 - warn: Proof-of-work self-submission: Already processed
```0.50.0https://git.duniter.org/nodes/typescript/duniter/-/issues/683Source of fork when restarting a node sharing same pubkey with other nodes2017-01-03T16:42:51+01:00Cédric MoreauSource of fork when restarting a node sharing same pubkey with other nodes*Created by: M5oul*
When I restart one of my member node, it's not directly recognized alive by the network and his other member ally node.
It's a problem, as if this node is not recognized by the network, it won't receive last blocks ...*Created by: M5oul*
When I restart one of my member node, it's not directly recognized alive by the network and his other member ally node.
It's a problem, as if this node is not recognized by the network, it won't receive last blocks and will compute for nothing an existing block and will consequently fork.
The network lost a computing node.
My node oftenly fork, I revert blocks as I am sure this fork is useless.
----
Here is some logs explained in a practice case:
- Restart, resync, this one is last block added:
```bash
2016-11-04T07:57:55+01:00 - info: Block #52209 added to the blockchain in 255 ms
2016-11-04T07:57:55+01:00 - warn: Blockchain changed!
2016-11-04T07:57:55+01:00 - info: POST Block block#52209
```
- Computing next block `#52210`:
```bash
(……………)
2016-11-04T07:57:57+01:00 - info: Generating proof-of-work with 4 leading zeros followed by [0-2]... (CPU usage set to 40%) for block#52210 J78bPU
2016-11-04T07:58:13+01:00 - info: Matched 3 zeros 0002FFDFE6378985A8744563E1C62E74F07027214B98E0BDBD99F4D1364D042B with Nonce = 10200000002177 for block#52210 by J78bPU
```
- Discover other node ten minutes after been started, with [strange logs reported on this ticket](https://github.com/duniter/duniter/issues/647#issue-181486032):
```bash
(……………)
2016-11-04T08:06:58+01:00 - error: Routing error: %s httpCode=409, ucode=2022, message=A newer peer document is available, version=2, currency=test_net, status=UP, statusTS=1478229864, hash=6F4775E35998D233891EF528343D558D04E7E9F5C17DC57C396D25E9713C6714, first_down=null, last_try=null, pubkey=J78bPUvLjxmjaEkdjxWLeENQtcfXm7iobqB49uT1Bgp3, block=52182-00000DD68F0546C16D9B79CB44CDA0A1C3E3557EA46FA4DA6DA7A0C13018144C, signature=RRA16iXGENn7uV+pukRy7L9KmSlJzMdQXlJPnUHyavPUBt9CpGhxBwFspfZIbI1EDOuxBFDErGlpSSPyvO6YBQ==, endpoints=[BASIC_MERKLED_API desktop.moul.re 78.227.107.45 2a01:e34:ee36:b2d0:e79:cd45:ed65:147 24723, BASIC_MERKLED_API misc.moul.re 78.227.107.45 8999], raw=Version: 2
Type: Peer
Currency: test_net
PublicKey: J78bPUvLjxmjaEkdjxWLeENQtcfXm7iobqB49uT1Bgp3
Block: 52182-00000DD68F0546C16D9B79CB44CDA0A1C3E3557EA46FA4DA6DA7A0C13018144C
Endpoints:
BASIC_MERKLED_API desktop.moul.re 78.227.107.45 2a01:e34:ee36:b2d0:e79:cd45:ed65:147 24723
BASIC_MERKLED_API misc.moul.re 78.227.107.45 8999
```
- Continue to compute same block `#52210`, found two blocks:
```bash
(……………)
2016-11-04T08:07:35+01:00 - info: Matched 3 zeros 0001699D04888AE6C8B6734E83AC7CBC4FDD1005AF1D67C23BC5D03B04B6A017 with Nonce = 10200000067313 for block#52210 by J78bPU
2016-11-04T08:07:37+01:00 - info: Matched 4 zeros 000053673D64AD387FC3B86FD472122B4BCA19D92F7D1DB66E6457E223DA622E with Nonce = 10400000069876 for block#52210 by J78bPU
2016-11-04T08:07:43+01:00 - info: Pulling blocks from the network...
2016-11-04T08:07:44+01:00 - info: Block #52210 added to the blockchain in 361 ms
2016-11-04T08:07:44+01:00 - info: Stop proof-of-work worker #1
2016-11-04T08:07:44+01:00 - info: Stop proof-of-work worker #2
2016-11-04T08:07:44+01:00 - info: Stop proof-of-work worker #3
2016-11-04T08:07:44+01:00 - info: Stop proof-of-work worker #4
2016-11-04T08:07:44+01:00 - info: POST Block block#52210
2016-11-04T08:07:44+01:00 - info: Block #52211 added to the blockchain in 285 ms
2016-11-04T08:07:44+01:00 - warn: Waiting for the end of pulling...
2016-11-04T08:07:44+01:00 - info: POST Block block#52211
2016-11-04T08:07:45+01:00 - info: GIVEN proof-of-work for block#52210 with 4 leading zeros followed by [0-2]! stop PoW for J78bPU
2016-11-04T08:07:45+01:00 - warn: Proof-of-work computation canceled because block received
2016-11-04T08:07:45+01:00 - warn: The proof-of-work generation was canceled: Proof-of-work computation canceled because block received
2016-11-04T08:07:45+01:00 - info: Block #52212 added to the blockchain in 316 ms
2016-11-04T08:07:45+01:00 - info: Stop proof-of-work worker #1
2016-11-04T08:07:45+01:00 - info: Stop proof-of-work worker #2
2016-11-04T08:07:45+01:00 - info: Stop proof-of-work worker #3
2016-11-04T08:07:45+01:00 - info: Stop proof-of-work worker #4
2016-11-04T08:07:45+01:00 - info: POST Block block#52212
2016-11-04T08:07:45+01:00 - info: POST Peer 2GF9YTSMdF#52182
2016-11-04T08:07:47+01:00 - warn: Error: getaddrinfo ENOTFOUND fe80 fe80:33428
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
2016-11-04T08:07:47+01:00 - info: Peer 3Tyv128DBfvkMVHd8K1wQgkK2S16utrAvoqbBye7TWcg unreachable: now considered as DOWN.
2016-11-04T08:07:48+01:00 - info: Will pull blocks from the network in 10 min 0 sec
2016-11-04T08:07:48+01:00 - warn: Pulling done. Continue proof-of-work loop.
2016-11-04T08:07:48+01:00 - warn: Too old membership
```
- Compute next block `#52213`:
```bash
(…………………)
2016-11-04T08:07:48+01:00 - warn: Too old membership
2016-11-04T08:07:48+01:00 - info: Generating proof-of-work with 4 leading zeros followed by [0-2]... (CPU usage set to 40%) for block#52213 J78bPU
2016-11-04T08:07:49+01:00 - info: Matched 3 zeros 00079908D63CB7CCCC317166F9CF02BE384803552927A19AEDDAE7C132B8E72A with Nonce = 10100000000321 for block#52213 by J78bPU
```
Ouf! in this case, the node didn't generate block `#52210` and didn't forked.
If this block was generated, I had to revert it, cutting the branch :smile: 0.80.0https://git.duniter.org/nodes/typescript/duniter/-/issues/694Increase the level of "Too high difficulty"2016-11-11T18:15:07+01:00Cédric MoreauIncrease the level of "Too high difficulty"As of today, the limit is set to:
```js
POW_MAXIMUM_ACCEPTABLE_HANDICAP: 8
```
Which means that a node with an handicap of 8 levels will try to compute the PoW, but not for a handicap of 9 levels. We could move this threshold by ...As of today, the limit is set to:
```js
POW_MAXIMUM_ACCEPTABLE_HANDICAP: 8
```
Which means that a node with an handicap of 8 levels will try to compute the PoW, but not for a handicap of 9 levels. We could move this threshold by 16^4, which means 4 more zeros, which seems enough.0.50.1https://git.duniter.org/nodes/typescript/duniter/-/issues/701Add option "do not compute block if handicap exceed x%"2017-01-02T23:28:20+01:00Cédric MoreauAdd option "do not compute block if handicap exceed x%"*Created by: M5oul*
Compared to protocol v0.4, with v0.5, nodes are searching all the time around their maximum.*Created by: M5oul*
Compared to protocol v0.4, with v0.5, nodes are searching all the time around their maximum.Horizonhttps://git.duniter.org/nodes/typescript/duniter/-/issues/714Bug on PoW?2016-11-16T23:28:03+01:00Cédric MoreauBug on PoW?*Created by: M5oul*
```bash
2016-11-16T12:10:22+01:00 - warn: Error: Wrong proof-of-work level: given 4 zeros and '1', required was 5 zeros and an hexa char between [0-9A-F]
at Error (native)
at /opt/duniter/sources/app/lib/...*Created by: M5oul*
```bash
2016-11-16T12:10:22+01:00 - warn: Error: Wrong proof-of-work level: given 4 zeros and '1', required was 5 zeros and an hexa char between [0-9A-F]
at Error (native)
at /opt/duniter/sources/app/lib/rules/global_rules.js:83:13
at next (native)
at onFulfilled (/opt/duniter/sources/node_modules/co/index.js:65:19)
```0.50.2https://git.duniter.org/nodes/typescript/duniter/-/issues/742Use 0.4 difficulty2016-12-10T15:02:49+01:00Cédric MoreauUse 0.4 difficultyDUP 0.5 difficulty is judged [not as desirable](https://forum.duniter.org/t/block-issuance-distribution/1312/18?u=cgeek) as the 0.4 one.
We will go back to 0.4 algorithm for DUP 0.6.DUP 0.5 difficulty is judged [not as desirable](https://forum.duniter.org/t/block-issuance-distribution/1312/18?u=cgeek) as the 0.4 one.
We will go back to 0.4 algorithm for DUP 0.6.0.60.0