It has been 2 weeks since DevNet went live for community testing and we are very pleased with how things are progressing. We would like to thank all who have already joined to help test the new Core! As always, we would like to invite everyone else that has yet to participate to join and help out as well.

The new DevNet utilizing ARK Core v2 was launched 2 weeks ago. Since then we have fixed several bugs and implemented many new features based on community input. In addition, we have also begun testing dynamic fees and higher network throughput.

Changes In Numbers

Over the course of last 14 days there were:

10 different developers contributing to the Core.

contributing to the Core. 53 commits to the Core repository.

to the Core repository. 166 files changed in the Core repository.

in the Core repository. 978 lines of code deleted from the Core.

from the Core. 3,561 lines of code added to the Core.

Testing

We have begun testing dynamic fees on DevNet. Every delegate can now chose their minimum acceptable fee depending on the transaction type. Here is an example of a normal transaction with a set fee of only 0.00000275 DѦ. Prior to this, v1 fees were set at a static 0.1 DѦ.

Example of a TX with Dynamic Fees as low as 0.00000275: https://dexplorer.ark.io/transaction/3585ce1b6840f6e2c63a1c5c6cbe2877ae95555030d917f3d32027d8f44254c4

Another item under testing is milestone offset by height in the configuration file. A new milestone was set at block height 21,600 and from this block forward the chain started to accept blocks with up to 150 transactions per block. This is a large increase from the previous default of 50 TPB (which is currently the same as MainNet). This successful transition has shown a solid increase of 3x in Transactions Per Second, bringing the previous 6.25 TPS to 18.75 TPS. While we are all very excited about this successful jump, please remember that we are still testing and these numbers are subject to change. The final throughput could be higher or lower for MainNet, and more testing is needed before finalizing any TPS numbers.

Example of a block with 150 TX in it:

https://dexplorer.ark.io/block/4486277915989266225

New Features

Blockchain ready plugin for P2P API — new plugin for the P2P API that returns a 503 Service Unavailable on certain endpoints that require the blockchain to be ready. For v1 endpoints it will return 200 Success with a body of { success: false } because that is how it was handled in the legacy P2P API where there is no proper use of status codes.

— new plugin for the P2P API that returns a 503 Service Unavailable on certain endpoints that require the blockchain to be ready. For v1 endpoints it will return 200 Success with a body of because that is how it was handled in the legacy P2P API where there is no proper use of status codes. P2P Config API — adds a new config endpoint under http://0.0.0.0:4000/config, where 4000 is the P2P port of the corresponding network, meaning it can vary between main, dev and testnet. It exposes information like versions of core and the network and other detailed information about plugins and their state.

— adds a new config endpoint under http://0.0.0.0:4000/config, where 4000 is the P2P port of the corresponding network, meaning it can vary between main, dev and testnet. It exposes information like versions of core and the network and other detailed information about plugins and their state. Immutable storage —provides an immutable storage in the form of the new package core-storage . This package makes use of https://facebook.github.io/immutable-js/ under the hood so everything that can be done by immutable.js can also be done with core-storage. core-storage only is a wrapper around immutable.js in order to make it possible to have a shared instance for in-memory information that all plugins and the core itself can access at any time without having to worry about the data in it getting modified without being told to do so. This storage can be used for peers, wallets, blockchain state, blocks and other items where the data needs to stay as initially stored.

—provides an immutable storage in the form of the new package . This package makes use of https://facebook.github.io/immutable-js/ under the hood so everything that can be done by immutable.js can also be done with core-storage. only is a wrapper around immutable.js in order to make it possible to have a shared instance for in-memory information that all plugins and the core itself can access at any time without having to worry about the data in it getting modified without being told to do so. This storage can be used for peers, wallets, blockchain state, blocks and other items where the data needs to stay as initially stored. Criteria based peer suspensions and offender banning —The previous ban system was quite harsh, not taking the type of offense into account to implement a ban. In order to make a better assessment with regard to peer violations we have implemented the __determineSuspensionTime method. Checks will be performed on the peer in question to determine a fair ban time for each cause of trouble instead of flat out banning for 5+ hours. Previous offences are now taken into account and an offence weight is determined. If a total of 100 offence weight is reached a peer will be banned for 1 day as it is deemed to be a repeat offender.

—The previous ban system was quite harsh, not taking the type of offense into account to implement a ban. In order to make a better assessment with regard to peer violations we have implemented the method. Checks will be performed on the peer in question to determine a fair ban time for each cause of trouble instead of flat out banning for 5+ hours. Previous offences are now taken into account and an offence weight is determined. If a total of 100 offence weight is reached a peer will be banned for 1 day as it is deemed to be a repeat offender. Setting slot height — makes it possible to set the height in the slot module of the crypto package.

— makes it possible to set the height in the slot module of the crypto package. Enabled CORS for P2P post transactions endpoint — this is to match v1 transactions endpoint. Currently, the /peer/transactions endpoint is used in v1 to post transactions.

— this is to match v1 transactions endpoint. Currently, the endpoint is used in v1 to post transactions. Internal event emitting via P2P API —when the forger and relay were launched separately the emitted events would never reach the relay as the relay and forger were isolated. This will emit the given event via API to make sure the relay will be notified.

—when the forger and relay were launched separately the emitted events would never reach the relay as the relay and forger were isolated. This will emit the given event via API to make sure the relay will be notified. Log usernames in forger (via P2P API) — adds the ability to log usernames in the forger as previously it did not have access to that data.

— adds the ability to log usernames in the forger as previously it did not have access to that data. Return broadcast IDs for better feedback —the v2 endpoint only returned IDs of accept, excess or invalid transactions. If a server doesn’t have dynamic fees enabled transactions will be broadcasted until a node is found that will forge it, but the user would not know that the transaction is being broadcasted instead of being immediately accepted.

—the v2 endpoint only returned IDs of accept, excess or invalid transactions. If a server doesn’t have dynamic fees enabled transactions will be broadcasted until a node is found that will forge it, but the user would not know that the transaction is being broadcasted instead of being immediately accepted. Tester CLI tweaks on v2 endpoints — updated Tester CLI to use only v2 endpoints, and some other small changes to the Tester.

Fixed Bugs

Fixed transaction processing — there was an issue with the vote test. Also issues with multi-sig because the fee is (keysgroup + 1) * fee , but the guard was only comparing the tx fee with the fee constant.

— there was an issue with the vote test. Also issues with multi-sig because the fee is , but the guard was only comparing the tx fee with the fee constant. Fixed blockchain not ready for usernames —if a request would be sent to the P2P API to get usernames before the node is synced it would throw a 500. This handles it by returning a response with a message.

—if a request would be sent to the P2P API to get usernames before the node is synced it would throw a 500. This handles it by returning a response with a message. Cast port number when filtering peers — some peers in the peer list had the port stored as a string. We’ve added a forced-cast when filtering a specific peer on the v1 endpoint ( /api/v1/peers/get ) just as a precaution.

— some peers in the peer list had the port stored as a string. We’ve added a forced-cast when filtering a specific peer on the v1 endpoint ( ) just as a precaution. Fixed delegate voters endpoint 500 error — if a delegate wasn’t found on the v1 endpoint /api/v1/delegates/voters , it threw a 500 error. The changes now return success: true and an empty array (which matches current MainNet).

— if a delegate wasn’t found on the v1 endpoint , it threw a 500 error. The changes now return and an empty array (which matches current MainNet). Fixed new delegate not updating —when a wallet user registers a new delegate name, it is not indexed in the wallet manager. This means that when the vote weight is recalculated at the end of each round, that wallet is not included. This has now been resolved.

—when a wallet user registers a new delegate name, it is not indexed in the wallet manager. This means that when the vote weight is recalculated at the end of each round, that wallet is not included. This has now been resolved. Post transaction endpoint to closer match v1 — previously the response from /peer/transactions always returns successful even with invalid transactions. This changes the response and brings the values more in-line with the v1 endpoint.

— previously the response from always returns successful even with invalid transactions. This changes the response and brings the values more in-line with the v1 endpoint. Pagination v2 fixes — issues with paginated endpoints (E.g. orderBy missing, limit max not set) have been resolved.

— issues with paginated endpoints (E.g. orderBy missing, limit max not set) have been resolved. Fixed cast port number in peer list to number —the peer list has inconsistent JSON — all endpoints; /peer/list , /api/peers and /api/v2/peers . This causes issues for SDKs (e.g. C++) that require strict type mappings, where it is impossible for a value to be both a string or an integer.

—the peer list has inconsistent JSON — all endpoints; , and . This causes issues for SDKs (e.g. C++) that require strict type mappings, where it is impossible for a value to be both a string or an integer. Fixed return empty object instead of array — returns an empty object to match the type of walletsByAddress .

— returns an empty object to match the type of . Fixed delete ID query parameter to prevent faulty query for votes — The ID parameter from the path was causing an incorrect query to be generated when requesting.

— The ID parameter from the path was causing an incorrect query to be generated when requesting. Fixed sending too many requests to relays in forger —the forger was sending wake-up signals to all relays instead of choosing one, thereby causing excess requests resulting in missing blocks in certain cases.

—the forger was sending wake-up signals to all relays instead of choosing one, thereby causing excess requests resulting in missing blocks in certain cases. Return peer height on v2 endpoints — return height of peers when accessing v2 endpoints.

— return height of peers when accessing v2 endpoints. Fixes on rebuilding MainNet — with changes to the v2 code, query has changed with code updates so it has been modified to be able to rebuild MainNet.

— with changes to the v2 code, query has changed with code updates so it has been modified to be able to rebuild MainNet. Fixed bad method call on suspended peers endpoint — the suspended peers endpoint did not work due to calling non-existent methods.

— the suspended peers endpoint did not work due to calling non-existent methods. Launch P2P server before pinging peers — swapping the order in which the P2P server is started. The previous order meant that the node would try to connect with peers before its own server is online. This results in other peers trying to ping the server that is not online yet, resulting in it being suspended.

— swapping the order in which the P2P server is started. The previous order meant that the node would try to connect with peers before its own server is online. This results in other peers trying to ping the server that is not online yet, resulting in it being suspended. Fixed core-p2p tests and added package to jest config.

Fixed changed logic in getRandomPeer > keys.filter, was too permissive.

Refactoring and Other Commits

Keeping the relay that responded to syncCheck and syncCall, until forging is done — using the relay that responded to synCheck and making sure the relay is synced. Also no host changing between getting network state and transaction from pool. This saves time, sticking with the host that responded and is synced.

— using the relay that responded to synCheck and making sure the relay is synced. Also no host changing between getting network state and transaction from pool. This saves time, sticking with the host that responded and is synced. Webhooks queue and tests — removes the use of a Redis queue for the Webhooks. Now they are immediately sent out. Also added some missing tests for the conditions.

— removes the use of a Redis queue for the Webhooks. Now they are immediately sent out. Also added some missing tests for the conditions. Use immutable Map instead of object as storage — using native Map instead of object as storage, with added tests (all, entries, keys, values) and refactoring to replace native map with immutable map.

— using native Map instead of object as storage, with added tests (all, entries, keys, values) and refactoring to replace native map with immutable map. Reducing P2P complexity — the complexity of the P2P Interface was quite high (and still is) so this PR tries to reduce this a bit.

— the complexity of the P2P Interface was quite high (and still is) so this PR tries to reduce this a bit. Docs for GraphQL — new documentation for functions within modules and general description of modules before they are assigned. Descriptive approach to using and understanding the GraphQL plugin for Core.

— new documentation for functions within modules and general description of modules before they are assigned. Descriptive approach to using and understanding the GraphQL plugin for Core. Added GraphQL tests — added fixtures for test data, queries, expected results and history. Documentation added on every module to describe exactly what its role is in the testing process.

— added fixtures for test data, queries, expected results and history. Documentation added on every module to describe exactly what its role is in the testing process. Use P2P port for forger in plugins config — changing the plugins.js to use the P2P port as default for the forger host.

— changing the to use the P2P port as default for the forger host. Enabled CORS for P2P config endpoint.

Added core-database package to jest config.

Added core-blockchain tests and package to jest config.

Added core-transaction-pool package to jest config.

Enabled logging of dynamic fee actions.

Testnet DB name change.

Added core-forger package to jest config.

The entire ARK crew would like to thank our ARK team developers and community developers for all the awesome work and time they are putting into making the new Core better and better each day — keep it up!

How Can I Help With Development?

If you want to help, get involved and earn some extra ARK be sure to give ARK GitHub Development Bounty a read and get coding: