GOLOS·CORE

The new version SoftFork 0.18.5

Golos·Core announced the SoftFork 0.18.5 version release which eliminated previously existing defects in the system.
This page describes a detailed outline of the fixes.

Reindexing:
SF 0.18.5 requires reindexing from all previous versions except version SF 0.18.4.

Defects fixed in this release

Defect (Task№) Abstract
943 Problem of creating a list of operations for operation_history plugin
936 The get_ops_in_block method, unlike the get_block method, did not provide information about virtual operations in block
948 Removed the first argument in the method broadcast_transaction_with_callback did not allow this method to be used in third-party libraries

Problem of creating a list of operations for operation_history plugin

Bug description
Some plugins, including operation_history, had difficulty setting options (keys).

For example, executing a command of the form “./golosd --=123” for keys history-blocks, history-start-block failed with the error message:
“Error parsing command line: option --history-blocks is ambiguous and matches different versions of --history-blocks”.

The error occurred when trying to run this command also with some other keys available in program_options.

Solution
The add_option method has been improved. Each of the plugins contains two objects program_options, this is either cli (command line options) or cfg (config file options). To declare a parameter, it has to be added to the cfg object with a required value.

The error cause was an additional declaration of parameters in cli, which caused duplicates in general list of parameters. The solution was based on removing the parameter declaration from the cli object.

The change is made to the following plugins:

  • account_history;
  • debug_node;
  • follow;
  • market_history;
  • operation_history;
  • statsd;
  • witness.

The get_ops_in_block method, unlike the get_block method, did not provide information about virtual operations in block

Bug description:

The get_ops_in_block method did not provide information about virtual operations in a block in the return value.

Solution:

It was decided to generate the return value of the get_ops_in_block method similar to the return value of the get_block method. These two methods become identical in structure in this release. The operation_history plugin has been supplemented with the get_block_with_virtual_ops method.

Samples

  1. The sample method request is as follows:

    var func = function (err, result) {
     ...
    };
    golos.api.send("operation_history",{"method": 
     "get_block_with_virtual_ops", "params":[<block>]}, func);
    

    The parameter is a block number.

  2. The sample response of the get_ops_in_block method is as follows:

    "previous": "00...00",
    "timestamp": "2018-09-01T00:01:22",
    "witness": "",
    "transaction_merkle_root": "00...00",
    "extensions": [],
    "witness_signature": "00...00",
    "transactions": [],
    "block_id": "0000000000000000000000000000000000000000",
    "signing_key": "GLS1111111111111111111111111111111114T1Anm",
    "transaction_ids": []
    "_virtual_operations": [{
     "trx_in_block": 65535,
     "op_in_trx": 0,
     "virtual_op": 1,
     "op": [
         "producer_reward",
         …
     ]
    }]
    

Removed the first argument in the method broadcast_transaction_with_callback did not allow this method to be used in third-party libraries

Bug description
In the previous version of softfork-0.18.4, the order of arguments in the broadcast_transaction_with_callback method was changed. The argument at the first position was removed as unused. Because this method was used by third-party libraries, the absence of this argument caused problems. Failure was caused by requirement to check node softfork version to find what arguments should be used to call that method.

Solution:
The removed argument has been returned back to the method broadcast_transaction_with_callback at its previous first position. The argument order and functioning of the libraries have been restored in this release. Additionally, one of checks in the method has been fixed too.

Notes:

  • The _virtual_operations field is optional and can be omitted if here are no virtual operations in the block. There is no more difference between responses of the methods.
  • Also the set_block_applied_callback method was modified in the plugin database_api. From now on, its response has the _virtual_operations field as well. This change affects API node only.

results matching ""

    No results matching ""