forked from MatthewLM/PeercoinAbeExplorer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
abe.conf
313 lines (272 loc) · 12.2 KB
/
abe.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# Config file for Paycoin-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.
# Paycoin-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 Paycoin-Abe.abe --upgrade --dbtype=sqlite3
# --connect-args=abe.sqlite --port 2750".
# Paycoin-Abe uses a file to store block hashes. THIS FILE MUST EXIST.
# Please use the touch command to create the file
#hashfile = /home/abe/hashfile.dat
# 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=Paycoin-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 Paycoin-Abe database.
#no-load
# "upgrade" tells Paycoin-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
# Paycoin-Abe/upgrade.py. For example, if your schema version is Paycoin-Abe18 and
# you are upgrading to schema version Paycoin-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 Paycoin-Abe.abe -v" shows the schema version that the software
# requires. Sometimes you can upgrade a live database by running
# "python -m Paycoin-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 lists directories to scan for block files.
#datadir += /home/bitcoin/.bitcoin/testnet
#datadir += /home/bitcoin/.namecoin
#datadir += /home/bitcoin/.novacoin
# datadir
#datadir += [{
# "dirname": "/home/bitcoin/.bitcoin",
# "loader": "rpc", # See the comments for default-loader below.
# "chain": "Bitcoin"
# }]
#datadir += [{
# "dirname": "/Users/ryanmottley/Library/Application Support/Paycoin",
# "chain": "Paycoin", # Display as "NewCoin" ...
# "policy": "Paycoin" # ... 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",
# "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 Paycoin-Abe
# creates its tables.
#binary-type hex
# Some databases have trouble with the large integers that Paycoin-Abe uses
# for statistics. Setting int-type=str causes Paycoin-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 Paycoin-Abe.
#document-root = Paycoin-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": "Paycoin-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
# </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. Paycoin-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 Paycoin-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 Paycoin-Abe's database. You might want to do this
# if Paycoin-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 Paycoin-Abe creates its tables, or the first run after an upgrade
# to firstbits-enabled Paycoin-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 Paycoin-Abe/genesis_tx.py.
#import-tx += 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
# Use default-loader=blkfile to force Paycoin-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 Paycoin-Abe/genesis_tx.py. (Bitcoin's genesis transaction is in
# Paycoin-Abe/genesis_tx.py. Otherwise, it requires manually parsing
# the first blockfile.)
#
# By default, Paycoin-Abe tries RPC and falls back to blkfile if that fails.
# Use "rpc,blkfile" to specify this behaviour across upgrades, or
# "default" to let Paycoin-Abe choose. The "loader" specified in a "datadir"
# entry takes precedence over "default-loader".
#
#default-loader = default