ARK Core v2.2: Core Is Now An NPM Package And Has Its Own CLI

in #arkecosystem5 years ago

With the release of Core V2, we promised a more frequent and iterative
development pace. In keeping with that promise, we are happy to announce the
second release of our new Core V2 era. Core v2.2 will make ARK even easier to
install out of the box and will no longer require the use of any external
programs (such as ARK Commander).

It has been exactly 1 month since the release of ARK Core v2.1 and we are
excited to have another great update ready to publish. A lot of hard work has
gone into this release, so without further ado, let us introduce ARK v2.2.

What’s New?

Two of the biggest changes are an introduction of Core CLI (Command Line
Interface) and making the ARK Core an NPM (Node.js package manager)** **package.

A CLI is a means of interacting with a program where the user issues commands to
the program in the form of successive lines of text (command lines). An NPM
package in this case, is an all-in-one management suite similar to an executable
file containing all ARK packages needed to run ARK core.

We wanted to make ARK Core even easier to manage, without the need to install
any other management tool. We achieved this with integration of CLI inside the
Core. Core CLI now comes with the ARK Core when you install it, helping you to
manage your core much easier. With this, the ARK Core Commander will become
deprecated as well.

An example of the new CLI can be seen in a command like running ‘ark update’,
which will check if there is a new version of the Core available, and if there
is an update available it will give you an option to update and take care of
everything in the background.

We have also made the ARK Snapshot manager part of the Core CLI. Now making
snapshots is even easier for the user (as simple as running ‘ark
snapshot:dump’).

To learn more about functions of the CLI please give this a read:
https://docs.ark.io/guidebook/core/cli.html

The second biggest change is the new easy installation of the ARK Core by making
Core and all of its plugins NPM packages. NPM is the world’s largest software
registry, making installs and updates to the Core MUCH quicker and easier than
with previous versions like v2.1.

To give you an example: An update on a medium tier server up until now, took
more than 60 seconds because every file needed to be compiled on your server
(taking up resources). With NPM, files are pre-compiled and updating on average
takes 10 seconds or less.

ARK Core NPM package:

https://www.npmjs.com/package/@arkecosystem/core

The third biggest change is the introduction of ARK Utils into the Core. We have
started to implement some of the functions from the previously developed ARK
Utils library that will have a bigger impact on the performance of making
essential Core functions faster. Some of the performance increases are 10x
faster than previous implementations. To continue to bring faster performance to
the ARK Core, we’ll be making more changes gradually with each update on our way
to Core v3.

To learn more about ARK Utils:

https://blog.ark.io/a8f958c7402e

V2.2 also features a minor re-engineering of our peering logic that introduces
improvements geared towards making it harder to perform a Sybil attack. These
improvements also result in improved fork recovery, making it easier for nodes
to find good peers.

With the release of Core v2.2, ARK Commander becomes incompatible and obsolete.
It should not be used under any circumstances, as there will be no additional
development or support. The GitHub repository for Commander will be archived and
preserved.

To those running current ARK Core and want to update, please follow these
migration instructions (v2.1 to v2.2):
https://docs.ark.io/releases/v2.2/migrating_2.1_2.2.html

Changes In Numbers (from 2.1 to 2.2)

  • **7 different developers **contributing to the Core.
  • 96 new commits to the Core.
  • 325 files changed in the Core.
  • 8,930 lines of code added to the Core.
  • 7,077 lines of code deleted in the Core.

Added

  • Implement a CLI with @oclif to replace Core Commander
    (#2100)
  • Add sorting to voters endpoint
    (#2103)
  • Validate GET replies from other peers
    (#2102)
  • Pass query to findAllByVote method
    (#2142)
  • Fetch list of peers from at least a few others
    (#2152)

Fixed

  • Pass the base flags for programmatic calls in core-tester-cli
    (#2108)
  • 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

  • Replaced lodash.sortBy/orderBy with faster implementations
    (#2106)
  • Improve fork handling in updatePeersOnMissingBlocks
    (#2125)
  • Throw an error if the peers or plugins file are missing
    (#2135)
  • Improve selection of peer for downloading blocks
    (#2137)
  • Merge core-snapshot-cli commands into core
    (#2149)

Removed

  • Remove unnecessary ping call in
    (#2123)
  • Remove broken getRandomDownloadBlocksPeer
    (#2121)

What’s Next for Core?

Core v2.3 will be another big update in our Core life-cycle. With Core v2.3
things are going to get interesting, with the introduction of AIP 29
(“Generalized Transaction Types”), enabling developers to introduce custom
transaction types with ease.

With AIP-29, new base classes for transactions are going to be introduced. This
will allow us to develop new transaction types by using inheritance and
following base transaction skeleton designs. Making new transaction types will
become easier, standardized and will give developers instant options to
implement new transaction types. AIP 29 is also needed for our next steps (AIP
11 and AIP 18), as it will be used by our core transaction types in Core v2.4.

AIP 29 will be the first step towards Ark becoming a “smart contract”
alternative platform since we’ll gradually be adding “tx templates”, which
you’ll be able to re-use and modify for specific use cases or simply develop
your own transaction type instead of writing a smart contract. We believe that
with AIP 29 integration, Core will become a much more powerful mechanism than
traditional smart contract systems with the ability to develop specific use
cases and business logic just by using new transaction types.

We sincerely hope that community developers will get involved as well, helping
to create as many templates as possible.

Current hashing functions (SHA256, RIPEMD-160, …) which are provided by Node.JS
will be replaced by a much quicker library that will further optimize Core
functions. With regards to SHA256, after some predetermined block height, block
IDs will be generated as full SHA256, encoded as a hex string. With this we
eliminate a potential collision of block IDs with blockchain height or other
block IDs.

The VendorField (SmartBridge) field will also get an increase of size from 64
to 255 bytes
, giving developers additional space for instructions that can be
included in the field.

Core v2.3 is well into development and we anticipate a release on our
Development Network by the end of March/early April for testing. Stay tuned to
our channels if you would like to get involved and help test any new releases.

Special Thanks

Thank you to all who have helped test the newest Core on Development Network,
provided pull-requests, and identified issues — we couldn’t have done it without
you!

For those running your own servers with ARK Core and if you experience and
errors or issues please open Github issue report for easier tracking and
resolving:
https://github.com/ArkEcosystem/core/issues.


Follow us on social media ( Twitter | Facebook | Reddit | YouTube), join our community ( Slack | Discord ) and stay tuned to our blog on Medium.

Sort:  

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 18 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 5 SBD worth and should receive 90 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64136.70
ETH 3128.20
USDT 1.00
SBD 3.94