Skip to content

Commit

Permalink
release: v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
martiliones authored Oct 13, 2022
2 parents a26d671 + 9494d6d commit e0408f3
Show file tree
Hide file tree
Showing 96 changed files with 6,668 additions and 711 deletions.
58 changes: 56 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,59 @@
"named": "always",
"asyncArrow": "ignore"
}],
"space-infix-ops": ["error", { "int32Hint": true }]
"space-infix-ops": ["error", { "int32Hint": true }],
"jsdoc/check-access": 1,
"jsdoc/check-alignment": 1,
"jsdoc/check-line-alignment": 1,
"jsdoc/check-param-names": 1,
"jsdoc/check-property-names": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/check-types": 1,
"jsdoc/check-values": 1,
"jsdoc/empty-tags": 1,
"jsdoc/multiline-blocks": 1,
"jsdoc/newline-after-description": 1,
"jsdoc/no-multi-asterisks": 1,
"jsdoc/require-param": 1,
"jsdoc/require-param-name": 1,
"jsdoc/require-param-type": 1,
"jsdoc/require-property": 1,
"jsdoc/require-property-name": 1,
"jsdoc/require-property-type": 1,
"jsdoc/require-returns-type": 1,
"jsdoc/require-yields": 1,
"jsdoc/require-yields-check": 1,
"jsdoc/tag-lines": 1,
"jsdoc/valid-types": 1,
"jsdoc/sort-tags": [
"warn",
{
"tagSequence": [
"global",
"typedef",
"var",
"name",
"namespace",
"constructor",
"callback",
"event",
"function",
"augments",
"lends",
"type",
"prop",
"param",
"throws",
"fires",
"listens",
"ingroup",
"deprecated",
"see",
"todo",
"ignore"
]
}
]
},
"globals": {
"PR": true,
Expand All @@ -54,5 +106,7 @@
"after": true,
"afterEach": true
},
"plugins": []
"plugins": [
"jsdoc"
]
}
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module.exports = function (grunt) {

eslint: {
options: {
configFile: '.eslintrc.json',
overrideConfigFile: '.eslintrc.json',
format: 'codeframe',
fix: false
},
Expand Down
38 changes: 23 additions & 15 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,26 @@ program
.option('-s, --snapshot <round>', 'verify snapshot')
.parse(process.argv);

var programOpts = program.opts();

/**
* @property {object} - The default list of configuration options. Can be updated by CLI.
* @default 'config.json'
*/
var appConfig = require('./helpers/config.js')(program.config);
var genesisblock = require(path.resolve(process.cwd(), (program.genesis || 'genesisBlock.json')));
var appConfig = require('./helpers/config.js')(programOpts.config);
var genesisblock = require(path.resolve(process.cwd(), (programOpts.genesis || 'genesisBlock.json')));

if (program.port) {
appConfig.port = program.port;
if (programOpts.port) {
appConfig.port = programOpts.port;
}

if (program.address) {
appConfig.address = program.address;
if (programOpts.address) {
appConfig.address = programOpts.address;
}

if (program.peers) {
if (typeof program.peers === 'string') {
appConfig.peers.list = program.peers.split(',').map(function (peer) {
if (programOpts.peers) {
if (typeof programOpts.peers === 'string') {
appConfig.peers.list = programOpts.peers.split(',').map(function (peer) {
peer = peer.split(':');
return {
ip: peer.shift(),
Expand All @@ -94,13 +96,13 @@ if (program.peers) {
}
}

if (program.log) {
appConfig.consoleLogLevel = program.log;
if (programOpts.log) {
appConfig.consoleLogLevel = programOpts.log;
}

if (program.snapshot) {
if (programOpts.snapshot) {
appConfig.loading.snapshot = Math.abs(
Math.floor(program.snapshot)
Math.floor(programOpts.snapshot)
);
}

Expand Down Expand Up @@ -309,7 +311,11 @@ d.run(function () {
app.options('*', cors());

var server = require('http').createServer(app);
var io = require('socket.io')(server);

const { Server } = require('socket.io');
const io = new Server(server, {
allowEIO3: true
});

var privateKey, certificate, https, https_io;

Expand All @@ -323,7 +329,9 @@ d.run(function () {
ciphers: 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:' + 'ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:' + '!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA'
}, app);

https_io = require('socket.io')(https);
https_io = new Server(https, {
allowEIO3: true
});
}

cb(null, {
Expand Down
8 changes: 3 additions & 5 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
]
},
"redis": {
"host": "127.0.0.1",
"port": 6379,
"db": 0,
"url": "redis://127.0.0.1:6379/0",
"password": null
},
"api": {
Expand Down Expand Up @@ -100,8 +98,8 @@
"options": {
"port": 443,
"address": "0.0.0.0",
"key": "./ssl/lisk.key",
"cert": "./ssl/lisk.crt"
"key": "./ssl/adamant.key",
"cert": "./ssl/adamant.crt"
}
},
"dapp": {
Expand Down
Binary file removed docs/adm-nodes.jpeg
Binary file not shown.
28 changes: 0 additions & 28 deletions docs/conf.json

This file was deleted.

Loading

0 comments on commit e0408f3

Please sign in to comment.