Skip to content

Commit

Permalink
Merge pull request ArkEcosystem#2097 from supaiku0/2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian authored Feb 13, 2019
2 parents 9a4397b + e227cf7 commit 64f2277
Show file tree
Hide file tree
Showing 49 changed files with 4,923 additions and 71 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.1.2] - 2019-02-13

### Fixed

- Fix quorum related issues
- Limit payload size
- Remove `signatures` from transaction payload

## [2.1.1] - 2019-02-12

### Fixed
Expand Down Expand Up @@ -184,7 +192,8 @@ Closed security vulnerabilities:

- Initial Release

[unreleased]: https://github.com/ArkEcosystem/core/compare/2.1.1...develop
[unreleased]: https://github.com/ArkEcosystem/core/compare/2.1.2...develop
[2.1.2]: https://github.com/ArkEcosystem/core/compare/2.1.1..2.1.2
[2.1.1]: https://github.com/ArkEcosystem/core/compare/2.1.0..2.1.1
[2.1.0]: https://github.com/ArkEcosystem/core/compare/2.0.19...2.1.0
[2.0.19]: https://github.com/ArkEcosystem/core/compare/2.0.18...2.0.19
Expand Down Expand Up @@ -280,3 +289,4 @@ Closed security vulnerabilities:
[#2080]: https://github.com/ArkEcosystem/core/pull/2080
[#2082]: https://github.com/ArkEcosystem/core/pull/2082
[#2083]: https://github.com/ArkEcosystem/core/pull/2083
[#2091]: https://github.com/ArkEcosystem/core/pull/2091
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.1.1"
"version": "2.1.2"
}
2 changes: 1 addition & 1 deletion packages/core-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-api",
"description": "Public API for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Kristjan Košič <[email protected]>",
"Brian Faust <[email protected]>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class TransactionsController extends Controller {
const pagination = super.paginate(request);

const transactions = this.transactionPool
.getTransactions(pagination.offset, pagination.limit)
.getTransactions(pagination.offset, pagination.limit, 0)
.map(transaction => ({
serialized: transaction,
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class TransactionsController extends Controller {

const pagination = super.paginate(request);

let transactions = this.transactionPool.getTransactions(pagination.offset, pagination.limit);
let transactions = this.transactionPool.getTransactions(pagination.offset, pagination.limit, 0);
transactions = transactions.map(transaction => ({
serialized: transaction,
}));
Expand Down
2 changes: 1 addition & 1 deletion packages/core-blockchain/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-blockchain",
"description": "Blockchain Manager for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"François-Xavier Thoorens <[email protected]>",
"Kristjan Košič <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-blockchain/src/blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class Blockchain implements blockchain.IBlockchain {
return;
}

if (this.state.started && this.state.blockchain.value === "idle") {
if (this.state.started) {
this.dispatch("NEWBLOCK");
this.enqueueBlocks([block]);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-container/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-container",
"description": "Container for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-database-postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-database-postgres",
"description": "PostgreSQL integration for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-database/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-database",
"description": "Database Interface for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"François-Xavier Thoorens <[email protected]>",
"Kristjan Košič <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-debugger-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-debugger-cli",
"description": "Debugger CLI for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-elasticsearch/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-elasticsearch",
"description": "A powerful Elasticsearch integration for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-error-tracker-bugsnag/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-error-tracker-bugsnag",
"description": "Bugsnag error tracker integration for Ark Core.",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-error-tracker-sentry/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-error-tracker-sentry",
"description": "Sentry error tracker integration for Ark Core.",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-event-emitter/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-event-emitter",
"description": "Event Manager for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-forger/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-forger",
"description": "Forger for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"François-Xavier Thoorens <[email protected]>",
"Kristjan Košič <[email protected]>",
Expand Down
15 changes: 4 additions & 11 deletions packages/core-forger/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ export class ForgerManager {
await this.__loadUsernames();

round = await this.client.getRound();
const delayTime = +this.config.getMilestone(round.lastBlock.height).blocktime * 1000 - 2000;

if (!round.canForge) {
// this.logger.debug('Block already forged in current slot')
// technically it is possible to compute doing shennanigan with arkjs.slots lib
Expand All @@ -111,7 +109,6 @@ export class ForgerManager {
}

const delegate = this.__isDelegateActivated(round.currentForger.publicKey);

if (!delegate) {
// this.logger.debug(`Current forging delegate ${
// round.currentForger.publicKey
Expand All @@ -125,22 +122,18 @@ export class ForgerManager {
await this.client.syncCheck();
}

await delay(delayTime); // we will check at next slot
await delay(slots.getTimeInMsUntilNextSlot()); // we will check at next slot

return this.__monitor(round);
}

const networkState = await this.client.getNetworkState();

if (!this.__parseNetworkState(networkState, delegate)) {
await delay(delayTime); // we will check at next slot

return this.__monitor(round);
if (this.__parseNetworkState(networkState, delegate)) {
await this.__forgeNewBlock(delegate, round);
}

await this.__forgeNewBlock(delegate, round);

await delay(delayTime); // we will check at next slot
await delay(slots.getTimeInMsUntilNextSlot()); // we will check at next slot

return this.__monitor(round);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion packages/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.1.1",
"version": "2.1.2",
"contributors": [
"Lúcio Rubens <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-http-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-http-utils",
"description": "Http Utilities for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interfaces/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-interfaces",
"description": "Interface types for essential Ark core modules",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"François-Xavier Thoorens <[email protected]>",
"Kristjan Košič <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface ITransactionPool {
* Get all transactions within the specified range [start, start + size), ordered by fee.
* @return {(Array|void)} array of serialized transaction hex strings
*/
getTransactions(start: number, size: number): string[];
getTransactions(start: number, size: number, maxBytes: number): string[];

/**
* Get all transactions within the specified range [start, start + size).
Expand All @@ -99,7 +99,7 @@ export interface ITransactionPool {
* insertion time, if fees equal (earliest transaction first).
* @return {Array} array of transaction[property]
*/
getTransactionsData(start: number, size: number, property: string): any[];
getTransactionsData(start: number, size: number, property: string, maxBytes: number): any[];

/**
* Remove all transactions from the transaction pool belonging to specific sender.
Expand Down
2 changes: 1 addition & 1 deletion packages/core-jest-matchers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-jest-matchers",
"description": "Jest matchers for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>",
"Erwann Gentric <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-json-rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-json-rpc",
"description": "A JSON-RPC 2.0 Specification compliant server to interact with the Ark Blockchain.",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"François-Xavier Thoorens <[email protected]>",
"Brian Faust <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion packages/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.1.1",
"version": "2.1.2",
"contributors": [
"François-Xavier Thoorens <[email protected]>",
"Brian Faust <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion packages/core-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkecosystem/core-logger",
"description": "Logger Manager for Ark Core",
"version": "2.1.1",
"version": "2.1.2",
"contributors": [
"Brian Faust <[email protected]>"
],
Expand Down
Loading

0 comments on commit 64f2277

Please sign in to comment.