Skip to content

Commit

Permalink
Merge remote-tracking branch 'ArkEcosystem/core/develop' into blockid
Browse files Browse the repository at this point in the history
* ArkEcosystem/core/develop:
  chore: update dependencies and remove unused imports (#2212)
  fix(core-tester-cli): Don't hide errors from HTTP failures (#2223)
  chore: update CircleCI config
  chore: use yarn setup on CircleCI
  fix: resolve core-tester-utils conflicts and various errors
  chore: yarn.lock
  chore: bump versions
  chore: resolve conflicts
  refactor(core): allow to provide yes/no callbacks for confirm
  feat(core): suggest another command if the requested one was not found
  fix(core): only quote string flags that contain whitespace
  fix(core-blockchain): node stuck during sync  (#2220)
  docs: add #2217 to the changelog
  refactor(core): use restart instead of reload
  refactor(core): log the stderr output for pm2 errors
  refactor(core): handle pm2 errors outside of the process manager
  refactor(core): log the pm2 status if it is unknown
  refactor(core-p2p): log concise error message instead of dumping the reply (#2215)
  fix(core-blockchain): return if last downloaded block changed (#2216)
  fix(core-transaction-pool): invalid transactions after rollback (#2217)
  feat(core-p2p): Don't spoil the quorum if the peer has !forgingAllowed (#2214)
  fix(core): escape string flags
  docs: add #2207 to the changelog
  refactor(core-forger): Increase timeout for getting the network state (#2208)
  fix: vote balance update (#2207)
  fix(core): exclude undefined values from string casting
  build(docker): use latest release in production images
  chore: install stable release via setup script
  test(core-p2p): toBeGreaterThanOrEqual instead of toBe
  release: 2.2.0
  chore: bump version
  fix: schema
  fix: max payload size
  fix: quorum issues (#2091)
  • Loading branch information
vasild committed Mar 11, 2019
2 parents db19ae1 + f0fa7e8 commit 613c639
Show file tree
Hide file tree
Showing 85 changed files with 2,723 additions and 2,792 deletions.
18 changes: 6 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
key: 'core-node10-{{ checksum "checksum.txt" }}-1'
- run:
name: Install and build packages
command: yarn bootstrap && yarn build
command: yarn setup
- save_cache:
key: 'core-node10-{{ checksum "checksum.txt" }}-1'
paths:
Expand All @@ -41,7 +41,6 @@ jobs:
- ./packages/core-container/node_modules
- ./packages/core-database/node_modules
- ./packages/core-database-postgres/node_modules
- ./packages/core-debugger-cli/node_modules
- ./packages/core-elasticsearch/node_modules
- ./packages/core-error-tracker-bugsnag/node_modules
- ./packages/core-error-tracker-sentry/node_modules
Expand Down Expand Up @@ -112,7 +111,7 @@ jobs:
key: 'core-node11-{{ checksum "checksum.txt" }}-1'
- run:
name: Install and build packages
command: yarn bootstrap && yarn build
command: yarn setup
- save_cache:
key: 'core-node11-{{ checksum "checksum.txt" }}-1'
paths:
Expand All @@ -122,7 +121,6 @@ jobs:
- ./packages/core-container/node_modules
- ./packages/core-database/node_modules
- ./packages/core-database-postgres/node_modules
- ./packages/core-debugger-cli/node_modules
- ./packages/core-elasticsearch/node_modules
- ./packages/core-error-tracker-bugsnag/node_modules
- ./packages/core-error-tracker-sentry/node_modules
Expand Down Expand Up @@ -193,7 +191,7 @@ jobs:
key: 'core-node10-{{ checksum "checksum.txt" }}-1'
- run:
name: Install and build packages
command: yarn bootstrap && yarn build
command: yarn setup
- save_cache:
key: 'core-node10-{{ checksum "checksum.txt" }}-1'
paths:
Expand All @@ -203,7 +201,6 @@ jobs:
- ./packages/core-container/node_modules
- ./packages/core-database/node_modules
- ./packages/core-database-postgres/node_modules
- ./packages/core-debugger-cli/node_modules
- ./packages/core-elasticsearch/node_modules
- ./packages/core-error-tracker-bugsnag/node_modules
- ./packages/core-error-tracker-sentry/node_modules
Expand Down Expand Up @@ -299,7 +296,7 @@ jobs:
key: 'core-node10-{{ checksum "checksum.txt" }}-1'
- run:
name: Install and build packages
command: yarn bootstrap && yarn build
command: yarn setup
- save_cache:
key: 'core-node10-{{ checksum "checksum.txt" }}-1'
paths:
Expand All @@ -309,7 +306,6 @@ jobs:
- ./packages/core-container/node_modules
- ./packages/core-database/node_modules
- ./packages/core-database-postgres/node_modules
- ./packages/core-debugger-cli/node_modules
- ./packages/core-elasticsearch/node_modules
- ./packages/core-error-tracker-bugsnag/node_modules
- ./packages/core-error-tracker-sentry/node_modules
Expand Down Expand Up @@ -399,7 +395,7 @@ jobs:
key: 'core-node11-{{ checksum "checksum.txt" }}-1'
- run:
name: Install and build packages
command: yarn bootstrap && yarn build
command: yarn setup
- save_cache:
key: 'core-node11-{{ checksum "checksum.txt" }}-1'
paths:
Expand All @@ -409,7 +405,6 @@ jobs:
- ./packages/core-container/node_modules
- ./packages/core-database/node_modules
- ./packages/core-database-postgres/node_modules
- ./packages/core-debugger-cli/node_modules
- ./packages/core-elasticsearch/node_modules
- ./packages/core-error-tracker-bugsnag/node_modules
- ./packages/core-error-tracker-sentry/node_modules
Expand Down Expand Up @@ -505,7 +500,7 @@ jobs:
key: 'core-node11-{{ checksum "checksum.txt" }}-1'
- run:
name: Install and build packages
command: yarn bootstrap && yarn build
command: yarn setup
- save_cache:
key: 'core-node11-{{ checksum "checksum.txt" }}-1'
paths:
Expand All @@ -515,7 +510,6 @@ jobs:
- ./packages/core-container/node_modules
- ./packages/core-database/node_modules
- ./packages/core-database-postgres/node_modules
- ./packages/core-debugger-cli/node_modules
- ./packages/core-elasticsearch/node_modules
- ./packages/core-error-tracker-bugsnag/node_modules
- ./packages/core-error-tracker-sentry/node_modules
Expand Down
4 changes: 2 additions & 2 deletions .circleci/configTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{
"run": {
"name": "Install and build packages",
"command": "yarn bootstrap && yarn build"
"command": "yarn setup"
}
},
{
Expand Down Expand Up @@ -137,7 +137,7 @@
{
"run": {
"name": "Install and build packages",
"command": "yarn bootstrap && yarn build"
"command": "yarn setup"
}
},
{
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Reduce complexity and fix wrong offset handling in `core-elasticsearch` ([#2108])
- Stuck at not ready to accept new block ([#2139])
- Properly sort BigNumber values ([#2144])
- Properly update wallet balances if a vote transaction is reverted ([#2207])
- Invalid transactions after a rollback because block timestamps were used as transaction timestamp ([#2217])

### Changed

Expand Down Expand Up @@ -337,3 +339,5 @@ Closed security vulnerabilities:
[#2144]: https://github.com/ArkEcosystem/core/pull/2144
[#2149]: https://github.com/ArkEcosystem/core/pull/2149
[#2152]: https://github.com/ArkEcosystem/core/pull/2152
[#2207]: https://github.com/ArkEcosystem/core/pull/2207
[#2217]: https://github.com/ArkEcosystem/core/pull/2217
2 changes: 1 addition & 1 deletion __tests__/unit/core-p2p/court/guard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("Guard", () => {

it("should return false because passed", async () => {
await guard.monitor.acceptNewPeer(peerMock);
guard.suspensions[peerMock.ip].until = dato().subtractMinutes(1);
guard.suspensions[peerMock.ip].until = dato().subMinutes(1);

expect(guard.isSuspended(peerMock)).toBe(false);
});
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/core-transaction-pool/connection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ describe("Connection", () => {

it("should return false and remove blockedByPublicKey[senderPublicKey] when sender is not blocked anymore", async () => {
const publicKey = "thisPublicKeyIsNotBlockedAnymore";
(connection as any).blockedByPublicKey[publicKey] = dato().subtractSeconds(1);
(connection as any).blockedByPublicKey[publicKey] = dato().subSeconds(1);
expect(connection.isSenderBlocked(publicKey)).toBeFalse();
expect((connection as any).blockedByPublicKey[publicKey]).toBeUndefined();
});
Expand Down
21 changes: 12 additions & 9 deletions __tests__/unit/crypto/models/block.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { generators } from "../../../utils";
const { generateTransfers } = generators;

import ByteBuffer from "bytebuffer";
import { configManager } from "../../../../packages/crypto/src";
import { configManager, NetworkName } from "../../../../packages/crypto/src";
import { slots } from "../../../../packages/crypto/src/crypto";
import { Block, Delegate } from "../../../../packages/crypto/src/models";
import { testnet } from "../../../../packages/crypto/src/networks";
Expand Down Expand Up @@ -356,14 +356,17 @@ describe("Models - Block", () => {

describe("serializeFull", () => {
describe("genesis block", () => {
describe.each([["mainnet", 468048], ["devnet", 14492], ["testnet", 46488]])("%s", (network, length) => {
configManager.setFromPreset(network);
const genesis = require(`@arkecosystem/crypto/src/networks/${network}/genesisBlock.json`);
const serialized = Block.serializeFull(genesis).toString("hex");
const genesisBlock = new Block(Block.deserialize(serialized));
expect(serialized).toHaveLength(length);
expect(genesisBlock.verifySignature()).toBeTrue();
});
describe.each([["mainnet", 468048], ["devnet", 14492], ["testnet", 46488]])(
"%s",
(network: NetworkName, length: number) => {
configManager.setFromPreset(network);
const genesis = require(`@arkecosystem/crypto/src/networks/${network}/genesisBlock.json`);
const serialized = Block.serializeFull(genesis).toString("hex");
const genesisBlock = new Block(Block.deserialize(serialized));
expect(serialized).toHaveLength(length);
expect(genesisBlock.verifySignature()).toBeTrue();
},
);

configManager.setFromPreset("devnet");
});
Expand Down
10 changes: 5 additions & 5 deletions deprecated/core-graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-graphql",
"description": "GraphQL Integration for Ark Core",
"version": "2.2.0-rc.0",
"version": "2.2.0",
"contributors": [
"Lúcio Rubens <lucio@ark.io>"
],
Expand Down Expand Up @@ -31,10 +31,10 @@
"updates": "../../node_modules/npm-check-updates/bin/npm-check-updates -a"
},
"dependencies": {
"@arkecosystem/core-container": "^2.2.0-rc.0",
"@arkecosystem/core-http-utils": "^2.2.0-rc.0",
"@arkecosystem/core-interfaces": "^2.2.0-rc.0",
"@arkecosystem/crypto": "^2.2.0-rc.0",
"@arkecosystem/core-container": "^2.2.0",
"@arkecosystem/core-http-utils": "^2.2.0",
"@arkecosystem/core-interfaces": "^2.2.0",
"@arkecosystem/crypto": "^2.2.0",
"apollo-server-hapi": "^2.4.0",
"graphql-tools-types": "^1.2.1"
},
Expand Down
3 changes: 1 addition & 2 deletions deprecated/core-graphql/src/repositories/transactions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { constants, slots } from "@arkecosystem/crypto";
import { dato } from "@faustbrian/dato";

import { Repository } from "./repository";
import { buildFilterQuery } from "./utils/filter-query";

Expand Down Expand Up @@ -265,7 +264,7 @@ class TransactionsRepository extends Repository {
this.query.timestamp.gte(
slots.getTime(
dato()
.subtractDays(30)
.subDays(30)
.toMilliseconds(),
),
),
Expand Down
6 changes: 3 additions & 3 deletions deprecated/core-logger-winston/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-logger-winston",
"description": "Winston Logger for Ark Core",
"version": "2.2.0-rc.0",
"version": "2.2.0",
"contributors": [
"François-Xavier Thoorens <fx@ark.io>",
"Brian Faust <brian@ark.io>"
Expand Down Expand Up @@ -33,8 +33,8 @@
"updates": "../../node_modules/npm-check-updates/bin/npm-check-updates -a"
},
"dependencies": {
"@arkecosystem/core-interfaces": "^2.2.0-rc.0",
"@arkecosystem/core-logger": "^2.2.0-rc.0",
"@arkecosystem/core-interfaces": "^2.2.0",
"@arkecosystem/core-logger": "^2.2.0",
"chalk": "^2.4.2",
"colors": "^1.3.3",
"dayjs-ext": "^2.2.0",
Expand Down
8 changes: 4 additions & 4 deletions deprecated/core-snapshots-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-snapshots-cli",
"description": "Provides live cli interface to the core-snapshots module for ARK Core",
"version": "2.2.0-rc.0",
"version": "2.2.0",
"contributors": [
"Kristjan Košič <chris@ark.io>"
],
Expand Down Expand Up @@ -55,9 +55,9 @@
"updates": "../../node_modules/npm-check-updates/bin/npm-check-updates -a"
},
"dependencies": {
"@arkecosystem/core-container": "^2.2.0-rc.0",
"@arkecosystem/core-interfaces": "^2.2.0-rc.0",
"@arkecosystem/core-snapshots": "^2.2.0-rc.0",
"@arkecosystem/core-container": "^2.2.0",
"@arkecosystem/core-interfaces": "^2.2.0",
"@arkecosystem/core-snapshots": "^2.2.0",
"@oclif/command": "^1.5.10",
"@oclif/config": "^1.12.6",
"@oclif/plugin-help": "^2.1.6",
Expand Down
2 changes: 1 addition & 1 deletion docker/production/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY ./ /home/node/core
RUN apk add --no-cache --virtual .build-deps make gcc g++ python git \
&& apk add --no-cache bash sudo git openntpd openssl \
&& npm i pm2 -g --loglevel notice \
&& yarn global add @arkecosystem/core@beta \
&& yarn global add @arkecosystem/core \
&& yarn cache clean \
&& apk del .build-deps \
&& echo 'node ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ success "Installed system updates!"

heading "Installing Ark Core..."

yarn global add @arkecosystem/core@beta
yarn global add @arkecosystem/core
echo 'export PATH=$(yarn global bin):$PATH' >> ~/.bashrc
export PATH=$(yarn global bin):$PATH
ark config:publish
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"npmClient": "yarn",
"packages": ["packages/*", "plugins/*"],
"useWorkspaces": true,
"version": "2.2.0-rc.0"
"version": "2.2.1"
}
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "The packages that make up the Ark Core",
"scripts": {
"lerna": "./node_modules/lerna/cli.js",
"setup": "yarn && yarn clean && yarn bootstrap && yarn build",
"setup": "yarn && yarn bootstrap && yarn build",
"setup:clean": "yarn && yarn clean && yarn bootstrap && yarn build",
"bootstrap": "yarn lerna bootstrap",
"clean": "yarn lerna clean --yes",
"build": "yarn lerna run build",
Expand Down Expand Up @@ -38,54 +39,54 @@
"bench": "node benchmark/index.js"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.0",
"@babel/core": "^7.3.4",
"@babel/preset-env": "^7.3.4",
"@faustbrian/benchmarker": "^0.1.2",
"@sindresorhus/tsconfig": "^0.1.1",
"@types/babel__core": "^7.0.4",
"@sindresorhus/tsconfig": "^0.2.1",
"@types/babel__core": "^7.1.0",
"@types/body-parser": "^1.17.0",
"@types/express": "^4.16.0",
"@types/jest": "^23.3.10",
"@types/js-yaml": "^3.11.4",
"@types/node": "^10.12.17",
"@types/prettier": "^1.15.2",
"@types/express": "^4.16.1",
"@types/jest": "^24.0.9",
"@types/js-yaml": "^3.12.0",
"@types/node": "^11.10.5",
"@types/prettier": "^1.16.1",
"@types/pretty-ms": "^4.0.0",
"@types/request-promise": "^4.1.42",
"@types/rimraf": "^2.0.2",
"@types/uuid": "^3.4.4",
"@types/webpack": "^4.4.23",
"@types/webpack": "^4.4.25",
"@types/webpack-merge": "^4.1.3",
"@types/webpack-node-externals": "^1.6.3",
"axios": "^0.18.0",
"babel-loader": "^8.0.4",
"babel-loader": "^8.0.5",
"body-parser": "^1.18.3",
"codecov": "^3.1.0",
"codecov": "^3.2.0",
"cross-env": "^5.2.0",
"del-cli": "^1.1.0",
"docdash": "^1.0.1",
"docdash": "^1.0.3",
"express": "^4.16.4",
"husky": "^1.3.0",
"jest": "^23.6.0",
"jest-extended": "^0.11.0",
"js-yaml": "^3.12.0",
"lerna": "^3.6.0",
"lint-staged": "^8.1.0",
"npm-check-updates": "^2.15.0",
"prettier": "^1.15.3",
"prompts": "^2.0.1",
"husky": "^1.3.1",
"jest": "^24.3.1",
"jest-extended": "^0.11.1",
"js-yaml": "^3.12.2",
"lerna": "^3.13.1",
"lint-staged": "^8.1.5",
"npm-check-updates": "^3.0.2",
"prettier": "^1.16.4",
"prompts": "^2.0.3",
"regenerator-runtime": "^0.13.1",
"request-promise": "^4.2.2",
"rimraf": "^2.6.2",
"snyk": "^1.118.0",
"ts-jest": "^23.10.5",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",
"typedoc": "^0.13.0",
"typescript": "^3.2.2",
"request-promise": "^4.2.4",
"rimraf": "^2.6.3",
"snyk": "^1.136.1",
"ts-jest": "^24.0.0",
"tslint": "^5.13.1",
"tslint-config-prettier": "^1.18.0",
"typedoc": "^0.14.2",
"typescript": "^3.3.3333",
"uuid": "^3.3.2",
"webpack": "^4.27.1",
"webpack-cli": "^3.1.2",
"webpack-merge": "^4.1.5",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3",
"webpack-merge": "^4.2.1",
"webpack-node-externals": "^1.7.2"
},
"workspaces": [
Expand Down
Loading

0 comments on commit 613c639

Please sign in to comment.