Skip to content

v4.0 Release Notes Draft

Jonathan Chappelow edited this page Mar 19, 2019 · 11 revisions

Explorer pages

  • Complete redesign with new page styles, more information, and better organization.
  • Politeia Proposal(s) pages.
  • Listing aggregate block information on time intervals (week, month, etc.) on Block page.
  • Charts may use log or linear y axis scaling.
  • lots...

Nuts and Bolts

The following changes are of most interest to site operators and developers:

  • The dcrdata module is now v4.
  • New build process. Webpack via npm. See README.md#front-end-development and dev/build.sh to learn more.
  • Support for go 1.11.5 and 1.12.1.
  • Support for dcrd v1.4.0 (JSON-RPC v5.1.0).
  • New config settings (see --help for details):
    • API: insight-limit-rps, max-api-addrs, compress-api
    • DB: purge-n-blocks, fast-sqlite-purge, pgtimeout, hidepgconfig, addr-cache-cap
    • Politeia: proposalsdbfile, politeiaurl
    • Exchange bot: exchange-monitor, disable-exchange, exchange-currency, ratemaster, ratecert
    • Site config: mainnet-link, testnet-link
  • Removed config settings: mempool (it is required), dumpallmptix (was a debug tool)
  • Updated CONTRIBUTING.md, and moved it to the docs folder.
  • "hex" JSON field added to several "raw" endpoints (TODO: list endpoints here)
  • "network_name" added to API Status response
  • Information from dcrd's new getblockchaininfo RPC is used in many places.
  • dcrd reorganization sequence has changed with RPC v5.0.0, and dcrdata was changed to work with the new sequence. JSON-RPC server versions older than v5.0.0 are not compatible. Use the current dcrd release.
  • New "gov" packages (gov/agendas and gov/politeia), and the /proposals page.
  • New pubsub package, including related packages (pubsub/psclient and pubsub/types) and a demo client app (pubsub/democlient). pubsub's main types are PubSubHub and WebsocketHub. PubSubHub manages the collection and distribution of block chain and mempool. WebsocketHub and its event loop manage all websocket client connections. psclient defines a Client type that can help writing apps that connect to a dcrdata PubSub server.
  • mempool package has expanded functionality as a central hub for mempool data. explorer and pubsub now get their mempool updates from the mempool package's MempoolMonitor type. explorerUI and PubSubHub implement the MempoolDataSaver interface.
  • New exchanges package which implement and exchange rate data collection bot.
  • New dcrrates package and rateserver app for running a remove exchange data bot with dcrdata as a client.
  • New testutil/apiload package for load testing the dcrdata APIs.
  • New db/cache package for caching address data. Presently used in dcrpg.
  • The chainMonitor in the blockdata package replaced BlockConnectedSync with ConnectBlock. It is no longer necessary to run the BlockConnectedHandler goroutine.
  • Added the ability to purge N blocks on startup to assist in recovery.
  • dcrpg (dcrdata's PostgreSQL interface) changes:
    • dcrpg table versions are now 3.10.0 (dcrdata v3.1 had tables at version 3.5.5).
    • ChainDB queries have a query timeout now, and a cancelable context.Context.
    • Multiple caches added for address (db/cache) and ticket pool data.
    • When the log level is debug or verbose, the PostgreSQL server (postgres) settings are displayed in a table on dcrdata startup to assist in debugging configuration issues.
    • Time in PostgreSQL tables is now stored as TIMESTAMPTZ instead of INT8. Time fields of Go structs in api/types changed to new TimeDef type. Tables: addresses, vins, blocks, transactions.
    • chainwork column (TEXT) ADDED to the blocks table.
    • extra_data, merkle_root, stake_root, and final_state columns are REMOVED from the blocks table.
    • The agendas table scheme is completely new. The old table is dropped and it is recreated from scratch.
    • New agenda_votes table.
    • block_time column (TIMESTAMPTZ) ADDED to the votes table.
    • New testing table.
    • dcrdata sets the timezone to UTC at the beginning of each PostgreSQL session.
    • dcrpg now uses dcrjson/v2 and rpcclient/v2 modules.
  • dcrsqlite changes:
    • Now exports the main SQLite interface type, WiredDB.
    • New block data cache.
    • WiredDB will request a shutdown with a provided function if the "database is locked" error is encountered on a table write operation.
    • UnconfirmedTxnsForAddress is moved from dcrsqlite to rpcutils.
    • Side chains are now tracked: hash is the new primary key. The is_mainchain and is_valid columns are added. Ability to import side chain data from dcrd also added.
    • explorer.New now takes a config struct, ExplorerConfig.
  • Dependency changes:
    • Updated direct deps: asdine/storm, caarlos0/env, all dcrd modules, dcrwallet/wallet, dgraph-io/badger, didip/tollbooth, go-chi/chi, google/gops, googolleego-socket.io, mattn/go-sqlite3, rs/cors, sirupsen/logrus, golang.org/x/net,
    • Added deps: politeia, golang/protobuf, google.golang.org/grpc, jessevdk/go-flags
    • Removed deps: btcsuite/go-flags, oleide/lane