Skip to content

Commit 70a7c60

Browse files
Merge pull request #4020 from OriginTrail/v6/prerelease/testnet
v8.1.1+hotfix.9 Testnet Release
2 parents 4141ebe + 4a43757 commit 70a7c60

File tree

9 files changed

+350
-26626
lines changed

9 files changed

+350
-26626
lines changed

config/config.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@
198198
"maximumAssertionSizeInKb": 500000,
199199
"commandExecutorVerboseLoggingEnabled": false,
200200
"appDataPath": "data",
201-
"logLevel": "info",
201+
"logging": {
202+
"defaultLevel": "trace",
203+
"enableExperimentalScopes": true
204+
},
202205
"assetSync": {
203206
"syncDKG": {
204207
"enabled": true,
@@ -404,7 +407,10 @@
404407
"maximumAssertionSizeInKb": 500000,
405408
"commandExecutorVerboseLoggingEnabled": false,
406409
"appDataPath": "data",
407-
"logLevel": "trace",
410+
"logging": {
411+
"defaultLevel": "info",
412+
"enableExperimentalScopes": true
413+
},
408414
"assetSync": {
409415
"syncDKG": {
410416
"enabled": false,
@@ -638,7 +644,10 @@
638644
"maximumAssertionSizeInKb": 500000,
639645
"commandExecutorVerboseLoggingEnabled": false,
640646
"appDataPath": "data",
641-
"logLevel": "trace",
647+
"logging": {
648+
"defaultLevel": "trace",
649+
"enableExperimentalScopes": true
650+
},
642651
"assetSync": {
643652
"syncDKG": {
644653
"enabled": false,
@@ -841,7 +850,10 @@
841850
"maximumAssertionSizeInKb": 500000,
842851
"commandExecutorVerboseLoggingEnabled": false,
843852
"appDataPath": "data",
844-
"logLevel": "trace",
853+
"logging": {
854+
"defaultLevel": "trace",
855+
"enableExperimentalScopes": false
856+
},
845857
"assetSync": {
846858
"syncDKG": {
847859
"enabled": false,
@@ -1073,7 +1085,10 @@
10731085
"maximumAssertionSizeInKb": 500000,
10741086
"commandExecutorVerboseLoggingEnabled": false,
10751087
"appDataPath": "data",
1076-
"logLevel": "trace",
1088+
"logging": {
1089+
"defaultLevel": "trace",
1090+
"enableExperimentalScopes": false
1091+
},
10771092
"assetSync": {
10781093
"syncDKG": {
10791094
"enabled": false,

index.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,72 @@ process.on('unhandledRejection', (err) => {
5757
return; // Don't crash for peer lookup failures
5858
}
5959

60+
// Handle ECONNRESET errors gracefully - these are common network issues
61+
if (err && (err.code === 'ECONNRESET' || err.errno === -104)) {
62+
console.warn(`Network connection reset (ECONNRESET): ${err.message}`);
63+
return; // Don't crash for connection reset errors
64+
}
65+
66+
// Handle ERR_UNSUPPORTED_PROTOCOL errors gracefully
67+
if (err && err.code === 'ERR_UNSUPPORTED_PROTOCOL') {
68+
console.warn(`Unsupported protocol error (ERR_UNSUPPORTED_PROTOCOL): ${err.message}`);
69+
return; // Don't crash for protocol errors
70+
}
71+
72+
// Handle EPIPE (broken pipe) errors gracefully
73+
if (err && (err.code === 'EPIPE' || err.errno === -32)) {
74+
console.warn(`Broken pipe error (EPIPE): ${err.message}`);
75+
return; // Don't crash for broken pipe errors
76+
}
77+
78+
// Handle ETIMEDOUT errors gracefully - these are common database connection timeouts
79+
if (err && (err.code === 'ETIMEDOUT' || err.errno === -110)) {
80+
console.warn(`Connection timeout error (ETIMEDOUT): ${err.message}`);
81+
return; // Don't crash for timeout errors
82+
}
83+
84+
// Handle Sequelize "Got timeout reading communication packets" errors gracefully
85+
if (err && err.message && err.message.includes('Got timeout reading communication packets')) {
86+
console.warn(`Sequelize communication timeout error: ${err.message}`);
87+
return; // Don't crash for database communication timeout errors
88+
}
89+
6090
// For all other unhandled rejections, crash the node
6191
console.error('Something went really wrong! OT-node shutting down...', err);
6292
process.exit(1);
6393
});
6494

6595
process.on('uncaughtException', (err) => {
96+
// Handle ERR_UNSUPPORTED_PROTOCOL errors gracefully
97+
if (err && err.code === 'ERR_UNSUPPORTED_PROTOCOL') {
98+
console.warn(`Unsupported protocol error (ERR_UNSUPPORTED_PROTOCOL): ${err.message}`);
99+
return; // Don't crash for protocol errors
100+
}
101+
102+
// Handle EPIPE (broken pipe) errors gracefully
103+
if (err && (err.code === 'EPIPE' || err.errno === -32)) {
104+
console.warn(`Broken pipe error (EPIPE): ${err.message}`);
105+
return; // Don't crash for broken pipe errors
106+
}
107+
108+
// Handle ECONNRESET errors gracefully
109+
if (err && (err.code === 'ECONNRESET' || err.errno === -104)) {
110+
console.warn(`Network connection reset (ECONNRESET): ${err.message}`);
111+
return; // Don't crash for connection reset errors
112+
}
113+
114+
// Handle ETIMEDOUT errors gracefully - these are common database connection timeouts
115+
if (err && (err.code === 'ETIMEDOUT' || err.errno === -110)) {
116+
console.warn(`Connection timeout error (ETIMEDOUT): ${err.message}`);
117+
return; // Don't crash for timeout errors
118+
}
119+
120+
// Handle Sequelize "Got timeout reading communication packets" errors gracefully
121+
if (err && err.message && err.message.includes('Got timeout reading communication packets')) {
122+
console.warn(`Sequelize communication timeout error: ${err.message}`);
123+
return; // Don't crash for database communication timeout errors
124+
}
125+
66126
console.error('Something went really wrong! OT-node shutting down...', err);
67127
process.exit(1);
68128
});

ot-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class OTNode {
9292
}
9393

9494
initializeLogger() {
95-
this.logger = new Logger(this.config.logLevel);
95+
this.logger = new Logger(this.config.logging.defaultLevel);
9696
}
9797

9898
initializeFileService() {

0 commit comments

Comments
 (0)