Navigation Menu

Skip to content

Commit

Permalink
Update to ARK 2.5.7 (#5)
Browse files Browse the repository at this point in the history
* feat(core-jest-matchers): functional test matchers (ArkEcosystem#2562)

* refactor(core-p2p): socketcluster shutdown and logging (ArkEcosystem#2560)

* feat: Implement Delegate Resignation (AIP11) (ArkEcosystem#2538)

* fix(crypto): sync issues with devnet and mainnet (ArkEcosystem#2565)

* feat(core-api): accept block height to list block transactions (ArkEcosystem#2567)

* refactor(core-http-utils): return all schema errors in hapi-ajv (ArkEcosystem#2571)

* refactor: change hasExceededMaxTransactions()'s argument type (ArkEcosystem#2568)

hasExceededMaxTransactions() was taking an argument of type
Interfaces.ITransactionData and was just using its .senderPublicKey
member. Change it to take "senderPublicKey: string".

This makes it easier to use hasExceededMaxTransactions() from unit tests
with bogus senderPublicKey because no dummy transaction object is
necessary.

* fix(core-blockchain): use resolveOptions("blockchain") to get databaseRollback options (ArkEcosystem#2572)

* test: polish tx pool stress test and don't clock the TransactionFactory (ArkEcosystem#2575)

* Properly use TransactionFactory to generate transactions with
  different ids instead of manually overriding the "id" member. Add a
  generateTestTransactions() method, used in all 3 stress tests.

* The overall timing of "✓ multiple additions and retrievals (884ms)" is
  now not sufficient to assess the speed of the add+retrieve of the pool
  because it includes generating the test transactions with
  TransactionFactory which is about 11 times slower than the actual
  add+retrieve that is done by the test. Thus clock only the relevant
  snippet of the code with console.time().

* fix(crypto): make transaction amount required (ArkEcosystem#2574)

* refactor: use ApplicationEvents enum instead of string (ArkEcosystem#2580)

* feat(core-p2p): don't trust headers and verify config and plugin connectivity of peers (ArkEcosystem#2559)

* fix(core-blockchain): delete bad rounds after unclean shutdown (ArkEcosystem#2581)

* feat(core): command to generate network configuration (ArkEcosystem#2582)

* fix(core-p2p): don't cause suspensions for unresponsive plugins (ArkEcosystem#2583)

* fix(core-blockchain): divide blocks into smaller chunks for batch processing (ArkEcosystem#2586)

* chore(ci): setup node.js 12 on CircleCI (ArkEcosystem#2474)

* chore(changelog): add latest changes for 2.4.0 (ArkEcosystem#2591)

* fix(core-p2p): do not suspend peer for `AppNotReady` (ArkEcosystem#2590)

* refactor: use dayjs as it now has official UTC support (ArkEcosystem#2592)

* fix(core-database-postgres): use day instead of date (ArkEcosystem#2595)

* chore(core-database-postgres): add core-state dependency (ArkEcosystem#2598)

* refactor(core-json-rpc): use blockId schema for validation (ArkEcosystem#2596)

* chore: add missing dependencies (ArkEcosystem#2599)

* refactor(core-p2p): remove timeout banning (ArkEcosystem#2597)

* release: 2.4.0-next.4 (ArkEcosystem#2602)

* refactor(core-p2p): remove peer caching (ArkEcosystem#2606)

* feat(core-explorer): initial implementation (ArkEcosystem#2604)

* chore: add commands to check for missing dependencies and types (ArkEcosystem#2603)

* fix(core-p2p): non-blocking port ping (ArkEcosystem#2607)

* refactor(core-p2p): show mapped IPs as IPv4 (ArkEcosystem#2605)

* release: 2.4.0-next.5 (ArkEcosystem#2608)

* fix(core-forger): use a static reconnect timeout (ArkEcosystem#2610)

* chore: update contribution link (ArkEcosystem#2609)

* fix(core-database): assign calculated delegate ranks from temp wallets (ArkEcosystem#2611)

* fix(core-wallet-api): return plugins with package names (ArkEcosystem#2613)

* release: 2.4.0-next.6 (ArkEcosystem#2614)

* refactor(core-p2p): remove peer banning (ArkEcosystem#2612)

* release: 2.4.0-next.7 (ArkEcosystem#2617)

* refactor(core-blockchain): remove coldstart period (ArkEcosystem#2619)

* chore(deps): update dependencies to latest versions (ArkEcosystem#2620)

* fix(core-snapshots): camelize block keys before bignum transformation (ArkEcosystem#2615)

* refactor(core-transaction-pool): deserialize transactions before they leave the pool (ArkEcosystem#2622)

* release: 2.4.0-next.8 (ArkEcosystem#2624)

* fix(core-blockchain): chain replay stopped working after dependency update (ArkEcosystem#2629)

* fix(core-forger): wrap error message to satisfy schema (ArkEcosystem#2630)

* refactor(core-container): require a minimum of 0 as pubKeyHash (ArkEcosystem#2628)

* test(e2e): allow full sync testing (ArkEcosystem#2625)

* refactor: ask for a retry if installing core fails from install.sh (ArkEcosystem#2633)

* refactor: improve database configuration in install.sh script (ArkEcosystem#2632)

* fix(core-webhooks): require all properties in schema and handle 404 resources (ArkEcosystem#2634)

* fix(core-p2p): handle undefined `curr` during block download (ArkEcosystem#2636)

* fix(core-transaction-pool): check if transactions can still be applied before forging (ArkEcosystem#2635)

* release: 2.4.0-next.9 (ArkEcosystem#2637)

* chore(changelog): add latest changes for 2.4.0 (ArkEcosystem#2638)

* build: sequentially build modules with yarn (ArkEcosystem#2640)

* feat(core-exchange-json-rpc): use @arkecosystem/core-exchange-json-rpc programmatically (ArkEcosystem#2643)

* ci: enable node.js 12 jobs (ArkEcosystem#2631)

* ci: reuse steps for different node versions (ArkEcosystem#2644)

* fix(core-api): off by one error in transaction confirmations (ArkEcosystem#2645)

* refactor(core-p2p): remove redundant p2p port from broadcast (ArkEcosystem#2648)

* misc(core-snapshots): fix the link to the documentation (ArkEcosystem#2650)

* refactor(core-p2p): improve logging (ArkEcosystem#2652)

* fix(core): set the correct channel if core was directly installed with @next (ArkEcosystem#2646)

* fix(core-api): invalid orderBy causes internal server error (ArkEcosystem#2653)

* refactor(core-http-utils): remove whitelist access log (ArkEcosystem#2655)

* fix(core-p2p): perform `acceptNewPeer` non-blocking (ArkEcosystem#2656)

* misc: reword log message and fix typo (ArkEcosystem#2658)

The log message would say "file ...directoryname...", reword it so that
it does not mention whether it is a file or directory.

Also fix typo: s/corelates/correlates/

* fix(core-snapshots): avoid trying to INSERT duplicates in rounds (ArkEcosystem#2651)

* fix(core-snapshots): avoid trying to INSERT duplicates in rounds

Follow the logic of INSERTing into blocks and transactions also for
rounds: only INSERT a row during snapshot restore if its identifier
is higher than the highest in the database (ie a sloppy check whether
a row is in the database).

* fix(core-snapshots): check for proper return value from getLastRound()

getLastRound() would return `null` and not `undefined` if the rounds
table is empty.

* fix(core-snapshots): use null to denote missing last block

So that it is consistent with the return value of getLastBlock()

* chore(core-snapshots): silence tslint warning

manager.ts:52:32 - Use 'undefined' instead of 'null'

* fix(core-container): handle failing optional plugins gracefully (ArkEcosystem#2657)

* test(core-transaction-pool): add more tests for `getTransactionsForForging` (ArkEcosystem#2659)

* release: 2.4.0-next.10 (ArkEcosystem#2661)

* docs: 2.4.0 changelog (ArkEcosystem#2660)

* fix(core-transaction-pool): correctly purge invalid transactions from disk on start (ArkEcosystem#2665)

* fix(core-snapshots): don't append duplicate rounds rows to a snapshot (ArkEcosystem#2662)

When appending to an existent snapshot, only append rows with higher id
than already in the (old) snapshot. Otherwise the snapshot would contain
rows with duplciate rounds.id values and would not be importable.

This patch assumes no gaps in rounds.id and monotonically increasing
rounds.id when new rounds are being added.

* fix(core-transaction-pool): use temporary wallets for transaction validation (ArkEcosystem#2666)

* release: 2.4.0-next.11 (ArkEcosystem#2667)

* fix(core-api): correctly display second signature if available (ArkEcosystem#2670)

* fix(core-api): missing block confirmations on v2 endpoint (ArkEcosystem#2674)

* refactor(core-transaction-pool): expire transactions that don't have … (ArkEcosystem#2672)

* refactor(core-transaction-pool): expire transactions that don't have expiration

If a transaction does not have an expiration value set by the user, then
we would keep it for a long time in the pool and also it could possibly
be re-sent by somebody (not the author) long time after it was created,
if it has not been forged yet.

Change this to expire after 6h even transactions that don't have an
user-set expiration. 6h considered since the transaction creation time.

* Ignore the expiration of v1 transactions

* Rename some variables and a method

* Properly call the Memory constructor from tests

* test(core-transaction-pool): adjust expiration test

* chore(core-transaction-pool): silence tslint

* test(core-blockchain): disable transactions expiration

Since we try to apply the genesis transactions, which are created a few
years ago, set the pool default expiration to some point in the distant
future.

* refactor(core-wallet-api): allow custom wallet api port (ArkEcosystem#2679)

* release: 2.4.0-next.12 (ArkEcosystem#2680)

* docs: 2.4.0 changelog (ArkEcosystem#2677)

* release: 2.4.0 (ArkEcosystem#2682)

* chore(docker): add CORE_LOG_LEVEL for mainnet (ArkEcosystem#2683)

* chore(docker): add CORE_LOG_LEVEL_FILE for mainnet

* chore(docker): set core_channel for devnet

* chore(env): update environment files (ArkEcosystem#2684)

* fix(core-transaction-pool): delay transaction purge on start until after StateBuilder finished (ArkEcosystem#2685)

* fix(core-forger): ignore overheight block (ArkEcosystem#2687)

* fix(core-p2p): check claimed state of peer (ArkEcosystem#2686)

* docs: 2.4.0 changelog (ArkEcosystem#2688)

* chore(deps): use stable @arkecosystem/exchange-json-rpc (ArkEcosystem#2681)

* fix(install.sh): don't fail if apt-get or yum is not found (ArkEcosystem#2690)

* refactor(core-database-postgres): use sql to calculate fee statistics (ArkEcosystem#2692)

* fix(core-p2p): increase rate limit to handle bigger networks (ArkEcosystem#2693)

* revert: merge (ArkEcosystem#2694)

* release: 2.4.1 (ArkEcosystem#2695)

* refactor(core-api): remove the legacy API and support asset search (ArkEcosystem#2697)

* perf(crypto): cache genesis transaction ids (ArkEcosystem#2699)

* fix(core-blockchain): take milestones into account when downloading blocks in parallel (ArkEcosystem#2700)

* release: 2.4.12 (ArkEcosystem#2701)

* release: 2.5.0-next.0 (ArkEcosystem#2702)

* release: 2.5.0-next.1 (ArkEcosystem#2704)

* fix(core-p2p): add 2.5 to minimum versions (ArkEcosystem#2703)

* docs(changelog): fix formatting

* fix(core-database-postgres): possible database corruption when writing and deleting blocks (ArkEcosystem#2707)

* chore(core-database-postgres): add foreign key on transactions block id (ArkEcosystem#2671)

* release: 2.5.0-next.2 (ArkEcosystem#2713)

* fix(core-api): use CORE_API_DISABLED variable in defaults (ArkEcosystem#2711)

* refactor(core-p2p): only look for new peers when below minimum peers (ArkEcosystem#2714)

* feat(core-webhooks): add option to configure request timeout (ArkEcosystem#2710)

* release: 2.5.0-next.3

* feat(core-wallet-api): impose the same rate limit as the public API (ArkEcosystem#2717)

* refactor(core-wallet-api): always keep the Wallet API enabled (ArkEcosystem#2715)

* chore(core-p2p): allow 2.4 and 2.5 nodes (ArkEcosystem#2716)

* fix(core-p2p): forget peer when socket is disconnected (ArkEcosystem#2720)

* perf(core-p2p): improve peer block header check (ArkEcosystem#2719)

* refactor(core-p2p): only fetch block headers when verifying peers (ArkEcosystem#2728)

* refactor(core-p2p): delay peer discovery until after state initialization is done (ArkEcosystem#2727)

* refactor(core-http-utils): remove createSecureServer method (ArkEcosystem#2730)

* refactor(core-p2p): improved rate limiting (ArkEcosystem#2729)

* fix(core-p2p): off-by-one error when fetching blocks from peer (ArkEcosystem#2733)

* fix(core): check for user confirmation in snapshot commands (ArkEcosystem#2734)

* test(core-api): transformer service and 404 assertions (ArkEcosystem#2735)

* refactor(core-wallet-api): respect the whitelist of the public API (ArkEcosystem#2718)

* test(core-api): test /transactions/fees and /blockchain endpoints (ArkEcosystem#2736)

* test(core-api): /node/configuration/crypto endpoint (ArkEcosystem#2737)

* test(core-api): /node/fees endpoint (ArkEcosystem#2738)

* chore(docker): Add Wallets API, remove PostgreSQL container port default mapping to localhost (ArkEcosystem#2741)

* docs(docker): Updated README (ArkEcosystem#2742)

* misc(core-p2p): log all socket errors (ArkEcosystem#2731)

* refactor(core-database-postgres): exit on unexpected error (ArkEcosystem#2744)

* perf(core-p2p): download serialized blocks (ArkEcosystem#2743)

* refactor(core-p2p): block when rate limit exceeded (ArkEcosystem#2745)

* fix(core-blockchain): always attempt to download blocks after start (ArkEcosystem#2746)

* release: 2.5.0-next.4 (ArkEcosystem#2747)

* fix(core-utils): grant access if the whitelist is empty (ArkEcosystem#2748)

* release: 2.5.0-next.5 (ArkEcosystem#2749)

* fix: do not purge transactions when a block is not accepted (ArkEcosystem#2751)

* release: 2.4.13 (ArkEcosystem#2752)

* fix: previous round order calculation (ArkEcosystem#2754)

* refactor(core-database-postgres): check error code instead of e… (ArkEcosystem#2755)

* fix: treat and return BigInt values as strings (ArkEcosystem#2739)

* feat(core-api): return timestamp from /node/status (ArkEcosystem#2758)

* refactor(core-transaction-pool): remove blockSender (ArkEcosystem#2756)

* fix(install.sh): check ntp status as sudo

* fix(install.sh): grep ntp status

* fix(core-blockchain): revert accepted blocks when saveBlocks fails (ArkEcosystem#2761)

* fix(install.sh): check ntp status as sudo

* fix(install.sh): grep ntp status

* chore(docker): Add Wallets API, remove PostgreSQL container port default mapping to localhost (ArkEcosystem#2741)

* docs(docker): Updated README (ArkEcosystem#2742)

* refactor(core-database-postgres): remove the id column from rounds (ArkEcosystem#2723)

* refactor(core-database-postgres): remove the id column from rounds

The id column is not necessary.

Resolves ArkEcosystem#2664

* fix(core-snapshots): fix typo in SQL query

* fix(core-snapshots): remove any traces of rounds.id usage

* fix(core-snapshots): do not restore genesis block with wrong id (ArkEcosystem#2759)

For some reason the hardcoded id of the genesis block in
packages/crypto/src/networks/*/genesisBlock.json is different than the
one that would be calculated by the crypto package (block
serialize/deserialize).

Because the id as in genesisBlock.json is already in previous_block of
the subsequent block (at height 2), we must use the hardcoded id instead
of the one derived by the crypto package.

* fix(core-p2p): avoid iterating on non-iterable peerBlocks (ArkEcosystem#2763)

If peerBlocks is falsy, then "for (const block of peerBlocks) {"
would throw an exception that peerBlocks is not iterable.

* fix(core-database-postgres): correct estimate if less than limit rows (ArkEcosystem#2764)

For example, if the request is contains offset=100, limit=10 and we
get 3 rows from the database, then we know that the total rows matching
the query are 103: 100 (skipped due to offset) + 3 (returned rows).

* fix: try harder to return the requested number of transactions (ArkEcosystem#2765)

* fix: try harder to return the requested number of transactions

Before this patch we would take the top "size" transactions, filter away
some of them and return the result, possibly returning less than the
requested "size" even if there could be legit transactions in the pool
that could be returned, up to "size".

Change the code to keep iterating until we have collected "size" valid
transactions, or the end of the pool is reached.

* fix: iterate over copied array

* fix(core-transaction-pool): try harder to return the requested number of transactions (ArkEcosystem#2766)

Before this patch we would take the top "size" transactions, filter away
some of them and return the result, possibly returning less than the
requested "size" even if there could be legit transactions in the pool
that could be returned, up to "size".

Change the code to keep iterating until we have collected "size" valid
transactions, or the end of the pool is reached.

* release: 2.4.14 (ArkEcosystem#2767)

* fix(crypto): reject future and expired transaction timestamps (ArkEcosystem#2757)

* release: 2.5.0-next.6 (ArkEcosystem#2769)

* refactor: delete last block if deserialization fails (ArkEcosystem#2770)

* refactor(core-p2p): discover new peers sooner (ArkEcosystem#2771)

* feat(core-database-postgres): enforce chained blocks at database level (ArkEcosystem#2753)

Make sure we don't end up with blocks having previous_block point to a
nonexistent block, even if bugs exist at the application level that
would attempt to do that.

* Node 11 -> node 10 for v18

* fix(core-p2p): TypeError: Reduce of empty array with no initial value (ArkEcosystem#2774)

* fix(core-database-postgres): drop check_previous_block with arguments (ArkEcosystem#2775)

* chore(deps): update dependencies to latest versions (ArkEcosystem#2768)

* feat(core-api): make it configurable whether to use estimates (ArkEcosystem#2772)

* feat(core-api): make it configurable whether to use estimates

Introduce a new boolean config option totalCountIsEstimate and use
database estimates for the total number of rows if it is true (fast)
or use the precise COUNT(*) if the option is false (slow).

So, it is up to the node operator to configure their node for accuracy
vs speed. Add a new property in the response to indicate which one is
being used.

Resolves ArkEcosystem#2676
Pagination error in api/blocks/{id}/transactions endpoint

* fix(core-api): only try to return totalCount[IsEstimate] if it is set

* refactor(core-api): move totalCountIsEstimate property to meta

* chore: rename config variable totalCountIsEstimate to estimateTotalCount

* chore: make it possible to set estimate/ornot via the environment

* chore: rename short-lived variable q to query

* fix: missing recipient_id

* test: fix

* release: 2.5.0-next.7 (ArkEcosystem#2776)

* fix(crypto): raise bignumber maximum (ArkEcosystem#2777)

* backport: some fixes for the deployer (ArkEcosystem#2782)

* release: 2.4.15 (ArkEcosystem#2783)

* refactor(core): run GC earlier on potatos (ArkEcosystem#2785)

* fix(crypto): allow future timestamps up to 3600 + blocktime seconds (ArkEcosystem#2787)

* refactor(core-http-utils): always enforce `application/json` as content-type (ArkEcosystem#2786)

* refactor(core-forger): increase timeout, check time left in slot (ArkEcosystem#2788)

* refactor(core-p2p): refresh peer ports (ArkEcosystem#2784)

* feat(install): let the user choose if they want to use @next release (ArkEcosystem#2789)

* docs(changelog): 2.5.0 (ArkEcosystem#2790)

* revert: let the user choose if they want to use @next release (ArkEcosystem#2793)

* fix(core-forger): also check if still in same slot (ArkEcosystem#2792)

* release: 2.5.0-next.8 (ArkEcosystem#2794)

* release: 2.5.0-next.9 (ArkEcosystem#2796)

* fix(core-api): handle null url and malformed JSON payloads (ArkEcosystem#2797)

* release: 2.5.0 (ArkEcosystem#2798)

* docs(changelog): remove reverted PR from 2.5.0

* chore(deps): bump @arkecosystem/exchange-json-rpc to 1.0.1 (ArkEcosystem#2799)

* fix(core-http-utils): loading of ssl certificate (ArkEcosystem#2800)

* release: 2.5.1 (ArkEcosystem#2801)

* fix(core-p2p): accepted versions (ArkEcosystem#2802)

* fix(core-snapshots): also fix the genesis block id during verify (ArkEcosystem#2809)

* chore(deps): update dependencies to their latest versions (ArkEcosystem#2808)

* chore(crypto): export dist/index.js for cjs and umd (ArkEcosystem#2807)

* perf(core-database): lookup wallets by keys (ArkEcosystem#2810)

* release: 2.5.7 (ArkEcosystem#2812)

* @ArkEcosystem -> @blockpool-io

* ark 2.5.7 -> bpl 2.0.0-pre.5

* arkToSatoshi -> bplToSatoshi, arktoshi -> bpltoshi

* Updated install scripts

* Updated default accepted versions

* Updated .env files

* update genesis block and milestones to include additional properties
  • Loading branch information
toucansam-bpl committed Aug 3, 2019
1 parent e9f2878 commit 0f4cd5a
Show file tree
Hide file tree
Showing 1,133 changed files with 62,533 additions and 61,360 deletions.
1,264 changes: 337 additions & 927 deletions .circleci/config.yml

Large diffs are not rendered by default.

521 changes: 0 additions & 521 deletions .circleci/configTemplate.json

This file was deleted.

96 changes: 0 additions & 96 deletions .circleci/generateConfig.js

This file was deleted.

15 changes: 0 additions & 15 deletions .circleci/rebuild-db.sh

This file was deleted.

7 changes: 4 additions & 3 deletions .codecov.yml
@@ -1,4 +1,5 @@
ignore:
- "packages/**/src/defaults.ts"
- "packages/**/src/index.ts"
- "packages/**/src/plugin.ts"
- "packages/**/src/defaults.ts"
- "packages/**/src/index.ts"
- "packages/**/src/plugin.ts"
- "packages/core-interfaces"
8 changes: 8 additions & 0 deletions .gitignore
Expand Up @@ -73,3 +73,11 @@ docker/development
tmp
oclif.manifest.json
npm-shrinkwrap.json

# Transaction Pool
transaction-pool.sqlite
transaction-pool.sqlite-shm
transaction-pool.sqlite-wal

# P2P
/peers.json
274 changes: 29 additions & 245 deletions .snyk

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .yarnrc
@@ -1 +1,2 @@
child-concurrency 1
--install.ignore-engines true

0 comments on commit 0f4cd5a

Please sign in to comment.