Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
338 lines (292 sloc) 13.678 kb
# Config file for Abe.
# dbtype and connect-args are required.
# If not configured to run under FastCGI, host OR port is required.
# "NAME=VALUE" and "NAME VALUE" are equivalent. Just "NAME" sets
# value to True. Values of the form "..." or [...] or {...} are
# parsed as extended JSON, as are the values true, false, and null.
# Abe extends JSON syntax to allow strings to contain control
# characters (tab, LF, and CR) and to allow comments (from # to end of
# line) between tokens.
# "NAME += VALUE" appends VALUE to an array or updates an object
# defined by NAME. Hyphen in NAME is read as underscore, so
# "connect_args" and "connect-args" are synonymous. Later values
# override earlier ones (unless using "+=").
# All values may be passed as command-line arguments by preceding NAME
# with "--". Example: "python -m Abe.abe --upgrade --dbtype=sqlite3
# --connect-args=abe.sqlite --port 2750".
# dbtype is the name of a Python module. connect-args are arguments
# to pass to the module's "connect" function. Consult the module's
# documentation for values. The user needs permission to create
# tables. Consult your database documentation on how to configure a
# database. See also README.txt.
# PostgreSQL example; see also README-POSTGRES.txt:
#dbtype = psycopg2
#connect-args = { "database": "abe" }
# MySQL example; see also README-MYSQL.txt:
#dbtype MySQLdb
#connect-args {"user":"root","db":"abe"}
# SQLite3 example:
#dbtype = sqlite3
#connect-args = abe.sqlite
# Oracle example:
#dbtype=cx_Oracle
#connect-args=user/pass@SID
# ODBC examples. Don't use the same schema via ODBC and non-ODBC!
#dbtype = pyodbc
#connect-args = DSN=Abe;PWD=B!tc0iN;
#connect-args = DRIVER={ORACLE};DB=ORCL;UID=abe;PWD=Bitcoin;
#connect-args = DRIVER={PostgreSQL ANSI};Database=abe;
# Workaround for ODBC drivers that begin in autocommit mode:
#connect-args {"":"DRIVER={PostgreSQL ANSI};Database=abe;","autocommit":false}
# IBM DB2 example:
#dbtype = ibm_db_dbi
#connect-args {"dsn":"DATABASE=abe;UID=db2inst1;PWD=B!tCo1N","conn_options":{"102":0}}
# Specify port and/or host to serve HTTP instead of FastCGI:
#port 2750
#host localhost
# Specify no-serve to exit immediately after importing block files:
#no-serve
# Specify no-load to start abe server without ever loading the
# blockchain - this is useful if you have a dedicated instance loading
# blocks into your Abe database.
#no-load
# "upgrade" tells Abe to upgrade database objects automatically after
# code updates:
#upgrade
#
# Sometimes upgrades fail and leave the database unusable. Sometimes
# upgrades take several minutes or longer. You may get an idea of the
# time required by looking at comments near the bottom of
# Abe/upgrade.py. For example, if your schema version is Abe18 and
# you are upgrading to schema version Abe19, the relevant lines are:
#
# ('Abe18', add_block_num_tx), # Seconds
# ('Abe18.1', add_block_ss_destroyed), # Seconds
# ('Abe18.2', init_block_tx_sums), # 5 minutes
# ('Abe18.3', replace_chain_summary), # Fast
#
# In this case, you could expect a 5-minute upgrade. The following
# SQL shows the current schema version, provided that it is at least
# Abe13:
#
# SELECT configvar_value FROM configvar
# WHERE configvar_name = 'schema_version'
#
# "python -m Abe.abe -v" shows the schema version that the software
# requires. Sometimes you can upgrade a live database by running
# "python -m Abe.abe --config YOUR_ABE_CONFIG --no-serve --upgrade"
# but this often results in server errors and may sometimes corrupt
# the data. It is best if the upgrade process has exclusive access to
# the database.
# Include another configuration file, relative to this one's directory.
#config ../secret/abe.conf
# Add or replace object fields. This example assumes connect-args
# previously held an object such as { "user": "abe" }.
#connect-args += { "password": "B!tc0iN" }
# datadir tells Abe where and how to find block data. datadir is
# structured as a JSON array of objects: [ { ... }, ... ] You can add
# to the list of sources with datadir+=[...] or replace it by using
# datadir=[...]. Each object { ... } specifies a data source using
# named parameters, so the general form of datadir is:
# datadir+=[{"dir1name1":"dir1param1","dir1name2":"dir1param2",...},
# {"dir2name1":"dir2param1","dir2name2":"dir2param2",...},
# ...]
# The most important parameter is "dirname" and is the filesystem
# directory containing your bitcoin.conf file. (Bitcoind can use a
# non-default directory if you pass it -datadir=<dirname>.)
# Besides "dirname", most coins need the "chain" parameter, which is
# the chain name as shown in web pages. Also, each datadir needs a
# "policy" to define the block and transaction format, since this
# information is not encoded in the blockfiles.
# If "policy" is not given in datadir, it defaults to the chain name,
# but for new coins, a "policy" parameter is required. Run
# "python -m Abe.abe --list-policies" to see the possibilities, and
# "python -m Abe.abe --show-policy POLICY" for information about
# POLICY. When in doubt, look for the name of a coin on which the new
# coin is based, or a name suggestive of its distinctive features such
# as proof-of-work hash algorithm. If no policy works, see the
# modules in Abe/Chain for examples. Each module there implements a
# policy.
# New coins typically need a new "address_version", see doc/FAQ.html.
#datadir += [{
# "dirname": "/home/bitcoin/.bitcoin",
# "loader": "rpc", # See the comments for default-loader below.
# "chain": "Bitcoin"
# }]
#datadir += [{
# "dirname": "/home/jtobey/.novacoin",
# "chain": "NewCoin", # Display as "NewCoin" ...
# "policy": "NovaCoin" # ... but use the "NovaCoin" loader.
# }]
# datadir can supply information about new currencies.
# Note that "address_version" is a byte string: the byte (or, perhaps
# someday, several bytes) preceding the public key hash before base-58
# conversion. Example:
#
#datadir += [{
# "dirname": "/home/weeds/testnet",
# "chain": "Weeds",
# "code3": "WDS",
# "address_version": "\u00f3" }]
#datadir += [{
# "dirname":"/home/namecoin/.namecoin/testnet",
# "chain":"NCTestnet",
# "code3":"NC0",
# "address_version":"\u006f",
# "decimals": 8,
# "conf": "namecoin.conf" }]
# ignore-bit8-chains: list of chains for which block version bit 8 does
# NOT indicate a Namecoin-style merge-mined auxiliary proof-of-work.
#ignore-bit8-chains = ["Bitcoin", "Testnet"]
# Set binary-type=hex if you want to store binary data (hashes,
# scripts, keys, etc.) as hexadecimal strings regardless of the
# database's binary data support.
#
# To use experimental support for PostgreSQL BYTEA storage, set
# binary-type=pg-bytea. This may become the default on databases that
# support it.
#
# To use MySQL binary types, set binary-type=binary. This may become the
# default on databases that support it.
#
# The binary-type setting affects only the first run, where Abe
# creates its tables.
#binary-type hex
# Some databases have trouble with the large integers that Abe uses
# for statistics. Setting int-type=str causes Abe to pass certain
# integers to the database as strings and cast them to floating point
# in SQL expressions that calculate statistics. Try this if SQLite
# complains "OverflowError: long too big to convert".
#int-type str
# URL component for static content: logos, style sheets.
#static-path =
# Filesystem location of static content, if served by Abe.
#document-root = Abe/htdocs
# Uncomment "auto-agpl" to add a "Source" link to each page pointing
# to a "/download" URL that streams the directory containing abe.py
# and all subdirectories as a compressed TAR archive. This exposes
# files outside of the htdocs directory to the client, so use it with
# caution.
#auto-agpl
# Directory name and tarfile name prefix for auto-agpl source
# download.
#download-name = abe
# Primitive template system until I separate view from controller.
#template_vars += {
# "CONTENT_TYPE": "text/html; charset=utf-8",
# "APPNAME": "Abe",
# "DONATIONS_BTC": "1PWC7PNHL1SgvZaN7xEtygenKjWobWsCuf",
# "DONATIONS_NMC": "NJ3MSELK1cWnqUa6xhF2wUYAnz3RSrWXcK"
#}
#template_vars += { "DONATIONS_BTC": "1YourBitcoinAddressHere" }
#template_vars += { "HOMEPAGE": "chain/Bitcoin" }
#template = "
#<!DOCTYPE html>
#<html lang=\"en\">
#<head>
# <link rel=\"stylesheet\" type=\"text/css\"
# href=\"%(dotdot)s%(STATIC_PATH)sabe.css\" />
# <link rel=\"shortcut icon\" href=\"%(dotdot)s%(STATIC_PATH)sfavicon.ico\" />
# <title>%(title)s</title>
#</head>
#<body>
# <h1><a href=\"%(dotdot)s%(HOMEPAGE)s\"><img
# src=\"%(dotdot)s%(STATIC_PATH)slogo32.png\" alt=\"Abe logo\" /></a> %(h1)s
# </h1>
# %(body)s
# <p style=\"font-size: smaller\">
# <span style=\"font-style: italic\">
# Powered by <a href=\"%(ABE_URL)s\">%(APPNAME)s</a>
# </span>
# Tips appreciated!
# <a href=\"%(dotdot)saddress/%(DONATIONS_BTC)s\">BTC</a>
# <a href=\"%(dotdot)saddress/%(DONATIONS_NMC)s\">NMC</a>
# </p>
#</body>
#</html>
#"
# Save blocks to the database after reading this many bytes from a
# file. Abe may run faster with a higher value, for example 10000,
# while loading lots of data with a single process. Non-zero values
# can lead to errors when two processes load transaction data
# simultaneously.
#commit-bytes = 0
# "rescan" causes Abe to search all block files for new blocks. This
# can take several minutes on a large chain, longer if many of the
# blocks are not already in Abe's database. You might want to do this
# if Abe becomes stuck at an old block number: new blocks are loaded
# but not attached to the chain. You must run once with "rescan"
# after switching to another copy of the block files.
#rescan
# For displaying short links, base-url overrides the first part of the
# URL. This does not affect the link target, only the visible text.
# The value must include the trailing slash (/) if applicable.
#base-url = http://abe.example.org/
# History pages of addresses with more than this many receipts will be
# not be shown. This protects against denial of service. Use -1 for
# no limit. This also limits the total inputs shown by
# /unspent/ADDR|ADDR|...
#address-history-rows-max 1000
# Argument to logging.config.dictConfig. Requires Python 2.7 or later.
# http://docs.python.org/library/logging.config.html#logging-config-dictschema
#logging = {
# "version":1,
# "handlers": {
# "console": {
# "class": "logging.StreamHandler",
# "formatter": "full",
# "level": "DEBUG"}},
# "formatters": {
# "full": {
# "format": "%(asctime)s [%(process)d:%(threadName)s] %(name)s %(levelname)s - %(message)s"}},
# "root": {
# "handlers": ["console"],
# "level": "DEBUG"}}
# --log-sql logs all queries. This is quite verbose, so it is disabled
# by default.
#log-sql
# Create and use the abe_firstbits table. This affects only the first
# run, where Abe creates its tables, or the first run after an upgrade
# to firstbits-enabled Abe. This is disabled by default.
#use-firstbits
# shortlink-type=firstbits constructs address short links using
# firstbits. This is the default when use-firstbits is true.
# Otherwise, shortlink-type is a number of address characters to use.
# Fewer characters result in more collisions, where the page shows a
# list of matches instead of redirecting to the address history.
#shortlink-type 10
# keep-scriptsig=false prevents storage and display of transaction
# input signature scripts (scriptSig) and sequence numbers. This
# reduces the database size by about 20%.
#keep-scriptsig
# Add transactions to the database. The genesis transaction is
# unavailable via RPC and must be specified to enable full loading
# over RPC. See Abe/genesis_tx.py.
#import-tx += 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
# Use default-loader=blkfile to force Abe to load data by scanning
# blockfiles. Use default-loader=rpc to force the use of RPC
# with a running bitcoind (or *coin daemon). This requires:
#
# * A readable bitcoin.conf with the RPC username and password
#
# * HTTP access to bitcoind (SSL is not yet supported.)
#
# * Bitcoin 0.8 or newer with the -txindex option. (Run bitcoind
# once with -reindex if you previously ran it without -txindex.)
#
# * A "datadir" option with "chain":"Bitcoin" (or other chain
# name)
#
# * The "import-tx" option specifying the genesis transaction, if
# "bitcoid getrawtransaction" does not return it and it is not
# in Abe/genesis_tx.py. (Bitcoin's genesis transaction is in
# Abe/genesis_tx.py. Otherwise, it requires manually parsing
# the first blockfile or running once in blkfile mode and
# finding the "genesis tx" in Abe's output.)
#
# By default, Abe tries RPC and falls back to blkfile if that fails.
# Use "rpc,blkfile" to specify this behaviour across upgrades, or
# "default" to let Abe choose. The "loader" specified in a "datadir"
# entry takes precedence over "default-loader".
#
#default-loader = default
Jump to Line
Something went wrong with that request. Please try again.