Skip to content

Commit ac778f8

Browse files
authored
Merge pull request #2199 from ArkEcosystem/2.2
2 parents 64f2277 + 4e4e5fc commit ac778f8

File tree

325 files changed

+8930
-7077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+8930
-7077
lines changed

.circleci/config.yml

+18-16
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
- ./packages/core-logger-winston/node_modules
5757
- ./packages/core-p2p/node_modules
5858
- ./packages/core-snapshots/node_modules
59-
- ./packages/core-snapshots-cli/node_modules
6059
- ./packages/core-test-utils/node_modules
6160
- ./packages/core-tester-cli/node_modules
6261
- ./packages/core-transaction-pool/node_modules
@@ -68,11 +67,6 @@ jobs:
6867
- run:
6968
name: Create .core/database directory
7069
command: mkdir -p $HOME/.core/database
71-
- run:
72-
name: core
73-
command: >-
74-
cd ~/core/.circleci && ./rebuild-db.sh && cd ~/core/packages/core &&
75-
yarn test:coverage
7670
- run:
7771
name: core-api
7872
command: >-
@@ -107,6 +101,9 @@ jobs:
107101
name: Last 1000 lines of test output
108102
when: on_fail
109103
command: tail -n 1000 test_output.txt
104+
- run:
105+
name: Lint
106+
command: yarn lint
110107
- run:
111108
name: Codecov
112109
command: ./node_modules/.bin/codecov
@@ -166,7 +163,6 @@ jobs:
166163
- ./packages/core-logger-winston/node_modules
167164
- ./packages/core-p2p/node_modules
168165
- ./packages/core-snapshots/node_modules
169-
- ./packages/core-snapshots-cli/node_modules
170166
- ./packages/core-test-utils/node_modules
171167
- ./packages/core-tester-cli/node_modules
172168
- ./packages/core-transaction-pool/node_modules
@@ -178,11 +174,6 @@ jobs:
178174
- run:
179175
name: Create .core/database directory
180176
command: mkdir -p $HOME/.core/database
181-
- run:
182-
name: core
183-
command: >-
184-
cd ~/core/.circleci && ./rebuild-db.sh && cd ~/core/packages/core &&
185-
yarn test:coverage
186177
- run:
187178
name: core-api
188179
command: >-
@@ -217,6 +208,9 @@ jobs:
217208
name: Last 1000 lines of test output
218209
when: on_fail
219210
command: tail -n 1000 test_output.txt
211+
- run:
212+
name: Lint
213+
command: yarn lint
220214
- run:
221215
name: Codecov
222216
command: ./node_modules/.bin/codecov
@@ -276,7 +270,6 @@ jobs:
276270
- ./packages/core-logger-winston/node_modules
277271
- ./packages/core-p2p/node_modules
278272
- ./packages/core-snapshots/node_modules
279-
- ./packages/core-snapshots-cli/node_modules
280273
- ./packages/core-test-utils/node_modules
281274
- ./packages/core-tester-cli/node_modules
282275
- ./packages/core-transaction-pool/node_modules
@@ -337,6 +330,9 @@ jobs:
337330
name: Last 1000 lines of test output
338331
when: on_fail
339332
command: tail -n 1000 test_output.txt
333+
- run:
334+
name: Lint
335+
command: yarn lint
340336
- run:
341337
name: Codecov
342338
command: ./node_modules/.bin/codecov
@@ -396,7 +392,6 @@ jobs:
396392
- ./packages/core-logger-winston/node_modules
397393
- ./packages/core-p2p/node_modules
398394
- ./packages/core-snapshots/node_modules
399-
- ./packages/core-snapshots-cli/node_modules
400395
- ./packages/core-test-utils/node_modules
401396
- ./packages/core-tester-cli/node_modules
402397
- ./packages/core-transaction-pool/node_modules
@@ -452,6 +447,9 @@ jobs:
452447
name: Last 1000 lines of test output
453448
when: on_fail
454449
command: tail -n 1000 test_output.txt
450+
- run:
451+
name: Lint
452+
command: yarn lint
455453
- run:
456454
name: Codecov
457455
command: ./node_modules/.bin/codecov
@@ -511,7 +509,6 @@ jobs:
511509
- ./packages/core-logger-winston/node_modules
512510
- ./packages/core-p2p/node_modules
513511
- ./packages/core-snapshots/node_modules
514-
- ./packages/core-snapshots-cli/node_modules
515512
- ./packages/core-test-utils/node_modules
516513
- ./packages/core-tester-cli/node_modules
517514
- ./packages/core-transaction-pool/node_modules
@@ -572,6 +569,9 @@ jobs:
572569
name: Last 1000 lines of test output
573570
when: on_fail
574571
command: tail -n 1000 test_output.txt
572+
- run:
573+
name: Lint
574+
command: yarn lint
575575
- run:
576576
name: Codecov
577577
command: ./node_modules/.bin/codecov
@@ -631,7 +631,6 @@ jobs:
631631
- ./packages/core-logger-winston/node_modules
632632
- ./packages/core-p2p/node_modules
633633
- ./packages/core-snapshots/node_modules
634-
- ./packages/core-snapshots-cli/node_modules
635634
- ./packages/core-test-utils/node_modules
636635
- ./packages/core-tester-cli/node_modules
637636
- ./packages/core-transaction-pool/node_modules
@@ -687,6 +686,9 @@ jobs:
687686
name: Last 1000 lines of test output
688687
when: on_fail
689688
command: tail -n 1000 test_output.txt
689+
- run:
690+
name: Lint
691+
command: yarn lint
690692
- run:
691693
name: Codecov
692694
command: ./node_modules/.bin/codecov

.circleci/configTemplate.json

+12
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
"command": "tail -n 1000 test_output.txt"
7777
}
7878
},
79+
{
80+
"run": {
81+
"name": "Lint",
82+
"command": "yarn lint"
83+
}
84+
},
7985
{
8086
"run": {
8187
"name": "Codecov",
@@ -159,6 +165,12 @@
159165
"command": "tail -n 1000 test_output.txt"
160166
}
161167
},
168+
{
169+
"run": {
170+
"name": "Lint",
171+
"command": "yarn lint"
172+
}
173+
},
162174
{
163175
"run": {
164176
"name": "Codecov",

.circleci/generateConfig.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ fs.readdir("./packages", (_, packages) => {
5555
});
5656

5757
const stepLog = job.steps[9];
58-
const stepCoverage = job.steps[10];
58+
const stepLint = job.steps[10];
59+
const stepCoverage = job.steps[11];
5960

6061
for (i = 0; i < steps.length; i++) {
6162
job.steps[testStepIndex + i] = steps[i];
6263
}
6364

6465
job.steps.push(stepLog);
66+
job.steps.push(stepLint);
6567
job.steps.push(stepCoverage);
6668

6769
config.jobs[name.slice(0, -1) + index] = job;

.codecov.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ ignore:
1212
- "packages/core-test-utils/src/fixtures/**/*"
1313
- "packages/core-tester-cli/**/*"
1414
- "packages/core-webhooks/src/database/migrations/**/*"
15+
- "packages/core/**/*"

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,8 @@ docker/development
6868

6969
# Vagrant
7070
.vagrant
71+
72+
# oclif
73+
tmp
74+
oclif.manifest.json
75+
npm-shrinkwrap.json

CHANGELOG.md

+52-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [2.2.0] - 2019-03-11
11+
12+
### Added
13+
14+
- Implement a CLI with @oclif to replace commander ([#2100])
15+
- Add sorting to voters endpoint ([#2103])
16+
- Validate GET replies from other peers ([#2102])
17+
- Pass query to findAllByVote method ([#2142])
18+
- Fetch list of peers from at least a few others ([#2152])
19+
20+
### Fixed
21+
22+
- Pass the base flags for programmatic calls in `core-tester-cli` ([#2108])
23+
- Reduce complexity and fix wrong offset handling in `core-elasticsearch` ([#2108])
24+
- Stuck at not ready to accept new block ([#2139])
25+
- Properly sort BigNumber values ([#2144])
26+
- Properly update wallet balances if a vote transaction is reverted ([#2207])
27+
- Invalid transactions after a rollback because block timestamps were used as transaction timestamp ([#2217])
28+
29+
### Changed
30+
31+
- Replaced lodash.sortBy/orderBy with faster implementations ([#2106])
32+
- Improve fork handling in updatePeersOnMissingBlocks ([#2125])
33+
- Throw an error if the peers or plugins file are missing ([#2135])
34+
- Improve selection of peer for downloading blocks ([#2137])
35+
- Merge core-snapshot-cli commands into core ([#2149])
36+
37+
### Removed
38+
39+
- Remove unnecessary ping call in ([#2123])
40+
- Remove broken getRandomDownloadBlocksPeer ([#2121])
41+
1042
## [2.1.2] - 2019-02-13
1143

1244
### Fixed
@@ -192,7 +224,8 @@ Closed security vulnerabilities:
192224

193225
- Initial Release
194226

195-
[unreleased]: https://github.com/ArkEcosystem/core/compare/2.1.2...develop
227+
[unreleased]: https://github.com/ArkEcosystem/core/compare/2.2.0...develop
228+
[2.2.0]: https://github.com/ArkEcosystem/core/compare/2.1.2...2.2.0
196229
[2.1.2]: https://github.com/ArkEcosystem/core/compare/2.1.1..2.1.2
197230
[2.1.1]: https://github.com/ArkEcosystem/core/compare/2.1.0..2.1.1
198231
[2.1.0]: https://github.com/ArkEcosystem/core/compare/2.0.19...2.1.0
@@ -290,3 +323,21 @@ Closed security vulnerabilities:
290323
[#2082]: https://github.com/ArkEcosystem/core/pull/2082
291324
[#2083]: https://github.com/ArkEcosystem/core/pull/2083
292325
[#2091]: https://github.com/ArkEcosystem/core/pull/2091
326+
[#2100]: https://github.com/ArkEcosystem/core/pull/2100
327+
[#2102]: https://github.com/ArkEcosystem/core/pull/2102
328+
[#2103]: https://github.com/ArkEcosystem/core/pull/2103
329+
[#2106]: https://github.com/ArkEcosystem/core/pull/2106
330+
[#2108]: https://github.com/ArkEcosystem/core/pull/2108
331+
[#2119]: https://github.com/ArkEcosystem/core/pull/2119
332+
[#2121]: https://github.com/ArkEcosystem/core/pull/2121
333+
[#2123]: https://github.com/ArkEcosystem/core/pull/2123
334+
[#2125]: https://github.com/ArkEcosystem/core/pull/2125
335+
[#2135]: https://github.com/ArkEcosystem/core/pull/2135
336+
[#2137]: https://github.com/ArkEcosystem/core/pull/2137
337+
[#2139]: https://github.com/ArkEcosystem/core/pull/2139
338+
[#2142]: https://github.com/ArkEcosystem/core/pull/2142
339+
[#2144]: https://github.com/ArkEcosystem/core/pull/2144
340+
[#2149]: https://github.com/ArkEcosystem/core/pull/2149
341+
[#2152]: https://github.com/ArkEcosystem/core/pull/2152
342+
[#2207]: https://github.com/ArkEcosystem/core/pull/2207
343+
[#2217]: https://github.com/ArkEcosystem/core/pull/2217
File renamed without changes.
File renamed without changes.

packages/core-snapshots-cli/package.json deprecated/core-snapshots-cli/package.json

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@arkecosystem/core-snapshots-cli",
33
"description": "Provides live cli interface to the core-snapshots module for ARK Core",
4-
"version": "2.1.2",
4+
"version": "2.2.0",
55
"contributors": [
66
"Kristjan Košič <chris@ark.io>"
77
],
@@ -17,6 +17,10 @@
1717
},
1818
"scripts": {
1919
"snapshot": "./bin/run",
20+
"publish:alpha": "npm publish --tag alpha",
21+
"publish:beta": "npm publish --tag beta",
22+
"publish:rc": "npm publish --tag rc",
23+
"publish:latest": "npm publish --tag latest",
2024
"prepublishOnly": "yarn build",
2125
"pretest": "yarn lint && yarn build",
2226
"prepack": "oclif-dev manifest && npm shrinkwrap",
@@ -51,17 +55,17 @@
5155
"updates": "../../node_modules/npm-check-updates/bin/npm-check-updates -a"
5256
},
5357
"dependencies": {
54-
"@arkecosystem/core-container": "^2.1.0",
55-
"@arkecosystem/core-interfaces": "^2.1.0",
56-
"@arkecosystem/core-snapshots": "^2.1.0",
57-
"@oclif/command": "^1.5.8",
58-
"@oclif/config": "^1.12.4",
58+
"@arkecosystem/core-container": "^2.2.0-beta.7",
59+
"@arkecosystem/core-interfaces": "^2.2.0-beta.7",
60+
"@arkecosystem/core-snapshots": "^2.2.0-beta.7",
61+
"@oclif/command": "^1.5.10",
62+
"@oclif/config": "^1.12.6",
5963
"@oclif/plugin-help": "^2.1.6",
6064
"@oclif/plugin-not-found": "^1.2.2",
6165
"@types/boom": "^7.2.1",
6266
"@types/cli-progress": "^1.8.0",
6367
"@types/commander": "^2.12.2",
64-
"@types/fs-extra": "^5.0.4",
68+
"@types/fs-extra": "^5.0.5",
6569
"cli-progress": "^2.1.1",
6670
"fs-extra": "^7.0.1"
6771
},

docker/production/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY ./ /home/node/core
99
RUN apk add --no-cache --virtual .build-deps make gcc g++ python git \
1010
&& apk add --no-cache bash sudo git openntpd openssl \
1111
&& npm i pm2 -g --loglevel notice \
12-
&& yarn setup \
12+
&& yarn global add @arkecosystem/core \
1313
&& yarn cache clean \
1414
&& apk del .build-deps \
1515
&& echo 'node ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

0 commit comments

Comments
 (0)