Skip to content

Releases: Lamden/lamden_block_service

Arko Blockservice

25 Jan 21:56
81577b7
Compare
Choose a tag to compare

Upgraded to work with the Arko network and will no longer work with Legacy Lamden networks. For Legacy Lamden use <v2.0.

Official Release!

27 May 21:08
Compare
Choose a tag to compare

The Lamden Block Service finally gets what it deserves, an official release!

New

  • Test cases for all endpoints, server and "block grabber" code!
  • Documentation for all endpoints using swagger (a live version will be made available later)
  • Documentation for the entire Block Service including installation, endpoint, WebSockets and exporting current state from another Block Service. Check out the documentation at Lamden Docs.
  • A new repair mechanism will allow the block service to find out when it's missing blocks and grab them from the master node.
  • A new stamp estimation endpoint that can pre-run transactions to get the result, stamp cost and state changes of a transaction. This will make guessing at stamps a thing of the past hopefully! This endpoint requires the new Stamp Estimation Microservice to be installed

Bug fixes

  • Should be more reliable and not need to be repaired manually anymore.
  • closes #18

new_block event integration

25 Jan 14:39
Compare
Choose a tag to compare

Changes

  1. New blocks are captured from the masternode new_block websocket events
  2. Previous blocks are still captured by calling the masternode block endpoint which means syncing from block 0 will still take a while and cause a draw on the masternode. A quicker block syncing mechanism is needed (ie, syncing a block service from an existing block service)
  3. Block service will now attempt to repair missing blocks every 5 minutes on the previous 1000 blocks. These are blocks that for whatever reason the node couldn't get the information for when it tried.

Upgrade Steps from <= v0.6.3:

  1. pull latest code from master
  2. npm install
    • to install some added packages
  3. run the "setRepairHeight" loader
    • from the project root run node src/database/loaders/setRepairHeight.mjs <block_num> where <block_num> is your last synced block. You can get this from the /synced_stats endpoint
    • If you don't do this then it will start to reprocess/sync from block 0. It will check that the block exists in the DB before pulling it from the masternode. If the block in the DB is designated as "block-does-not-exist" it will get the block information from the masternode and then process that block. As it does this it sets "repairHeight" to the last block synced. So setting this manually via the loaders script will avoid the delay.
  4. restart block service instance

TX endpoint and new collection data

16 Dec 15:43
098a6dd
Compare
Choose a tag to compare

New Features

  • transaction hash and transaction uid can now be looked up via a new tx endpoint:
    • blockservice_host/tx?hash=some_txHash
    • blockservice_host/tx?uid=some_tx_uid
    • If both are provided in the query will use txHash
  • State Changes objects which are served on the /history endpoints now have a list of raw keys there were changed
  • Current State objects which are served on the /current endpoint now have prev_values and prev_uid

Upgrade steps

Pull and Restart

  • git fetch && git pull
  • restart blockservice (however you have it running)

Update Database

  • It's always a good idea to do a mongodump and backup the database before running these loader files
    If this is a new install, and the blockservice has never run before, then you can disregard this step.

This will update your collections with new information now provided by this upgrade. These loaders need to be run in the proper order. The new block service code will handle any new transactions coming in, these loaders will only affect entries that are previous to your upgrade so you can keep the blockservice running while these loaders work.

  1. node src/database/loaders add_affectedRawKeysList.mjs
    • This will add a list of keys that were changed during the transaction to all object in the StateChanges collection
    • This addition is needed to make the next loader work
  2. node src/database/loaders prev_tx.mjs
    • This will add prev_value and prev_uid to all objects in the CurrentState collection.
    • This could take a few hours* but your block service will continue to function while this loader runs.