-
Notifications
You must be signed in to change notification settings - Fork 128
v4.0 Release Notes Draft
buck54321 edited this page Mar 20, 2019
·
11 revisions
- 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.
- Exchange rate monitoring for Decred-to-fiat conversions.
- lots...
- Added
/block/.../raw
and/block/.../header/raw
endpoints. These return the hexadecimal encoded serialized bytes of the block or block header. - Added
/agendas
and/agenda/{agendaid}
endpoints. -
"hex"
JSON field added to several "raw" endpoints (TODO: list endpoints here) -
"network_name"
added to API Status response - Compression is optional. Use
--compress-api
to enable compression in dcrdata's response handlers. - more...
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 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
- API:
- Removed config settings:
mempool
(it is required),dumpallmptix
(was a debug tool) - Updated CONTRIBUTING.md, and moved it to the docs folder.
- Information from dcrd's new
getblockchaininfo
RPC is used in many places. - dcrd's notification sequence for chain reorganization events 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
andgov/politeia
), and the /proposals page. - New
pubsub
package, including related packages (pubsub/psclient
andpubsub/types
) and a demo client app (pubsub/democlient
).pubsub
's main types arePubSubHub
andWebsocketHub
.PubSubHub
manages the collection and distribution of block chain and mempool data.WebsocketHub
and its event loop manage all websocket client connections.psclient
defines aClient
type that can help writing apps that connect to a dcrdata pub-sub server. -
mempool
package has expanded functionality as a central hub for mempool data.explorer
andpubsub
now get their mempool updates from themempool
package'sMempoolMonitor
type.explorerUI
andPubSubHub
implement theMempoolDataSaver
interface. - New
exchanges
package that implements an exchange rate data collection bot. - New
dcrrates
package andrateserver
app for running a remote exchange data bot with one ore more dcrdata instances as clients. - New
testutil/apiload
package for load testing the dcrdata APIs. - New
db/cache
package for caching address data. Presently used indcrpg
. - The
chainMonitor
in theblockdata
package replacedBlockConnectedSync
withConnectBlock
. It is no longer necessary to run theBlockConnectedHandler
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 cancelablecontext.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 ofINT64
. Time fields of Go structs inapi/types
are changed to the newTimeDef
type. Tables:addresses
,vins
,blocks
,transactions
. -
chainwork
column (TEXT
) ADDED to theblocks
table. -
extra_data
,merkle_root
,stake_root
, andfinal_state
columns are REMOVED from theblocks
table. - The
agendas
table scheme is completely new. The old table is dropped and recreated from scratch. - New
agenda_votes
table. -
block_time
column (TIMESTAMPTZ
) ADDED to thevotes
table. - New
testing
table. - dcrdata sets the timezone to UTC at the beginning of each PostgreSQL session.
-
dcrpg
now usesdcrjson/v2
andrpcclient/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 fromdcrsqlite
torpcutils
. - Side chains are now tracked:
hash
is the new primary key. Theis_mainchain
andis_valid
columns are added. Ability to import side chain data from dcrd also added. -
explorer.New
now takes a config struct,ExplorerConfig
.
- Now exports the main SQLite interface type,
- 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