Developers Journal #20
This article details the progress of the Credits Development Team in enhancing the blockchain platform since our last update in mid-April.
During this period, perhaps the most long awaited and significant milestone was reached. As promised, Credits published the full source code of the project on GitHub. From now on any interested developer can assist the Credits team in the development process and contribute to the ongoing success of the project.
As part of the development process, We audited the code using the SonarCloud platform. After refactoring, our code achieved an "A" SonarCloud rating for reliability and safety standards.
Responding to numerous community requests, we completed security work on key management and implemented new key management functionality based on BIP32 (BitCoin Improvement Proposal 0032).
- Deterministic key generation from a general secret (based on the bip32) is now implemented. This allows the restoration of a wallet in case of loss of keys. It also increases confidentiality by masking the distribution of money between wallets generated from a common seed.
- The ability to translate seed into a seed-phrase containing 24 English words from the bip32 dictionary is added, the reverse is also now possible.
- The encryption of the private key using a secret file is implemented. The secret file is user selected.
- The ability to change the password to encrypt the private key has been added.
- The ability to specify whether to display the seed and private key in the output data of a node has appeared.
- To work with deterministic keys, an additional utility, cscrypto-Qt for Windows and Linux has been written. This utility is written using the Qt cross-platform framework and allows to generate keys, seed, public key using a private key, sign messages and files, verify signatures, and generate hashes for messages and files.
- Using the cscrypto-Qt utility, the node can be started without keys. In this case, the seed which can be displayed on the screen is generated. The cscrypto-Qt utility can be used to recover the keys.
- The calculation of commissions per transaction has been optimized (reducing the cost of CS transfer transactions).
- RAM usage is optimized.
- The network subsystem is optimized and stabilized.
- Network connection errors are fixed.
- Debug information about the reasons for the rejection of transactions was added.
- Migration to OpenJDK11 is complete.
- The algorithm for executing smart contracts on trusted nodes has been optimized. Now smart contracts are launched in parallel, in separate threads. The current implementation significantly increases the speed of execution of smart contracts.
- The cost of token transfer and call of smaler-sized smart contracts has been reduced.
- The incorrect calculation of token balances is fixed.
- A bug due to a timeout whereby a smart contract was not executed is fixed.
- Additional smart contract bugs are fixed.
- The migration to OpenJDK11 has been implemented.
- Various bugs were fixed.
- The code has been refactored, thrift structures have been optimized.
- Batch processing of smart contracts is now implemented.
- A method that provides the number of smart contract calls has been added for future display in the monitor.
- An API client alert is now implemented. The node will notify the client if a transaction does not hit the blockchain after a timeout. If the transaction is in the progress, the node can also notify the client.
- The optimization of status processing has been carried out. As a result, it is now possible to implement one-pass reading of the database. This allows the database to load twice as fast.
- API level verifications have been added for the following:
Excess of fee
- The ability to call the API method TransactionCount is added for any node (previously only for monitoring node).
- Crash bugs are fixed.
- Accumulation unused fluxes are fixed.
- Incorrect display information is fixed.
- Smart contact lock is fixed.
- Fee computation is fixed.
- Payable method processing is fixed.
- Critical thrift error is fixed (enabling the node to recover).
- Incorrect calculation of Transfers is fixed.
- Account calculation error is fixed.
- A "Smart contract empty" result processing bug is fixed.
- Smart contract time display bug is fixed.
- The transaction number bug is fixed.