Neil Booth
7399452294
Temporary hack to fix initial sync slowdown
8 years ago
Neil Booth
238b9e0285
Process blocks in the executor
This should eliminate latency when new blocks come in
and prevent sessions being dropped whilst they are processed.
8 years ago
Neil Booth
6b551973e8
queue -> tasks
8 years ago
Neil Booth
f9cc21807f
Further optimize the inner loop
8 years ago
Neil Booth
5c0b026158
Tasks queue just has null entries for now
8 years ago
Neil Booth
6aef79461f
Don't shut down block processor by cancellation
The block processor needs to be able to close cleanly, and not
mid-block. In order to be able to yield whilst processing blocks
we cannot forcefully close its coroutine with a cancellation.
8 years ago
Neil Booth
1b95bcd8ac
Open DB differently depending on if syncing
If syncing, use a high max_open_files, otherwise lower it.
8 years ago
Neil Booth
0afddb7bc3
Give backing up its own flush function
Remove some excessive log messages
8 years ago
Neil Booth
f5384ccc98
Remove get_tx_hash
Anything in the DB should be on the disk. Remove misleading
comment.
8 years ago
Neil Booth
3f743e9630
Distinguish undo_info being empty and not existing
Fixes #46
8 years ago
Neil Booth
af3ae6429e
Fix logging bug
8 years ago
Neil Booth
95a2de6dae
Move DB undo code to db.py
8 years ago
Neil Booth
8d253c81d3
Move clean_db() to db.py
8 years ago
Neil Booth
59244cc24e
Move bulk of FS flush code to db.py
More logically belongs there.
Have servers use the flushed DB height not the block processor's height.
Get all headers only from disk.
8 years ago
Neil Booth
df3cb8535a
Cleaner handling of touched addresses
Moved to local vars rather than an instance variable
8 years ago
TheLazieR Yip
f3ecfe00e2
Remove unused variables
8 years ago
TheLazieR Yip
828727d41a
Remove unneccessary local variables
8 years ago
TheLazieR Yip
b3623f5455
replace header_hashes with header_prevhash , header_hash
8 years ago
Neil Booth
ef2703177e
Fix another assertion error during reorgs
Fixes #44
8 years ago
Neil Booth
9e220820aa
Rework futures and event handling
8 years ago
Neil Booth
bab0d162de
Merge ServerManager and BlockServer
8 years ago
Neil Booth
640360c809
Add feature to simulate reorgs for debugging
8 years ago
Neil Booth
8970205e6c
Remove obsolete debugging feature
8 years ago
Neil Booth
2df5aa746f
Pop one from tx_counts for each block we back up.
Fixes #40
8 years ago
Neil Booth
26221e751e
Remove dead code
8 years ago
Neil Booth
d1ba4b1a76
Reset fs_height when backing up
8 years ago
Neil Booth
67bb01bf2c
Fix reorgs with unspendable TXOs
8 years ago
Neil Booth
87cdd2709d
Implement daemon failover
Daemon URLs can be comma-separated in the DAEMON_URL env var.
Surrounding whitespace is stripped.
http:// is preprended if missing.
The coin's default port is supplied if missing.
A trailing / is supplied if missing.
Closes #33
8 years ago
Neil Booth
98fd178c62
Make mempool truly asynchronous
Mempool updates happen in parallel asynchronously to processing of
new blocks once caught up. This means that, e.g., during the initial
slow mempool download incoming blocks can be processed and communicated
to clients without waiting for the downloaded mempool transaction
analysis to complete. From a client's point of view the server won't
be seen as lagging.
8 years ago
Neil Booth
8617c82ec2
Floor disk_count at zero.
8 years ago
Neil Booth
52116539d4
Clean shutdown: wait for transports to close
We give 10 seconds for everything to be cleaned up, then close forcibly.
Fixes #30
8 years ago
Neil Booth
3d87e299ea
Move formatted_time to library
8 years ago
Neil Booth
942d5d6b00
Fix import
8 years ago
Neil Booth
063a5469cc
Move mempool to be with BlockServer
BlockProcessor doesn't really need a mempool; mempools are
only useful for servers.
Set first_sync before flushing, so it goes into DB state.
Start servers immediately on catchup; mempool fills asynchronously.
Fixes #31
8 years ago
Neil Booth
d6fa4a1564
More logging improvements
- log software and DB version at startup
- log more DB info at startup
- log software and DB version when first synced
Fixes #29
8 years ago
Neil Booth
88185b0daa
Bump log threshold up; tweak log
8 years ago
Neil Booth
24d9e5a95e
Tweak flush logic
Aim to not check cache size if caught up; also reduces logs
8 years ago
Neil Booth
e6058c3fd3
hex_hash is already hex
8 years ago
Neil Booth
d2c575a24b
Better, more concise logs, particularly when caught up.
8 years ago
Neil Booth
3f8b26291a
At startup only log some things during initial sync
8 years ago
Neil Booth
f4651c0ca4
Store tx_num in 'h' table key so keys are unique
8 years ago
Neil Booth
3c98053f5d
Remove some dead code
8 years ago
Neil Booth
d85034353f
Remove useless re-raise of cancellation
8 years ago
Neil Booth
db187540d5
Have task coros handle cancelled exceptions
8 years ago
Neil Booth
a2280bbc93
Clean up futures handling
8 years ago
Neil Booth
8671e57183
Move fs flushes to same time as history flushes
8 years ago
Neil Booth
95cc979465
Yield more during mempool load
8 years ago
Neil Booth
85786b87a2
Save all UTXOs
Change the DB version
8 years ago
Neil Booth
4dac728984
Ignore the unspendable genesis coinbase
Fixes #17
8 years ago
Neil Booth
41ff6e5b11
Prepare 0.4.3
8 years ago