Commit graph

166 commits

Author SHA1 Message Date
theoreticalbts
93a108487d Implement last_irreversible_block_num 2015-10-02 17:19:23 -04:00
Daniel Larimer
edcd46dd14 fix reindex with failed proposed transaction 2015-09-29 10:49:12 -04:00
theoreticalbts
0d7baa2b52 database: Remove obsolete retry_on_failure parameter 2015-09-28 12:15:17 -04:00
theoreticalbts
4c619414ae db_block.cpp: Add some comments 2015-09-28 12:15:17 -04:00
theoreticalbts
35acfff060 database: Implement before_last_checkpoint() function 2015-09-28 12:15:17 -04:00
theoreticalbts
f7980f5252 scheduler: Refactor 26007bb655 to use witness_schedule_object
The functionality is equivalent, but it now uses a separate witness_schedule_object,
and the code now lives in db_witness_schedule.cpp.
2015-09-18 14:26:54 -04:00
Daniel Larimer
966df708a5 fix unit tests 2015-09-18 13:56:32 -04:00
Daniel Larimer
26007bb655 update shuffling algorithm 2015-09-18 13:42:12 -04:00
theoreticalbts
b9727e6e1c Increase logging, improve error messages 2015-09-17 12:11:40 -04:00
theoreticalbts
e0414d390e Fix pending_block and fork handling
The pending_block member of database was a premature optimization and had an
unfortunate tendency to get out of sync, especially when switching forks.
This commit removes it, and substantially improves the handling of transactions
when switching forks.  Specifically, flooding or forking no longer causes nodes to
discard valid transactions.
2015-09-17 12:11:40 -04:00
theoreticalbts
c57806bb85 Always generate blocks linking to head_block_id() 2015-09-15 10:54:04 -04:00
Daniel Larimer
f506c2b089 better debugging messages around crashes 2015-09-15 08:38:27 -04:00
Eric Frias
dd7d57c5ac Fix invalid assertion about fork database results 2015-09-14 15:25:04 -04:00
Eric Frias
928b6934e0 Merge branch 'master' into p2p_sync_fixes
Conflicts:
	libraries/chain/include/graphene/chain/database.hpp
2015-09-10 17:34:20 -04:00
Eric Frias
b6bba74301 Restore much of the syncing code from BitShares 0.x, and add optimizations that prevent us from attempting to sync with peers those blockchain diverged from ours many blocks ago, which also reduces the size of sync messages. Add logging. 2015-09-10 08:56:29 -04:00
theoreticalbts
ff2db08475 database: Undo and re-apply pending_transactions before/after pushing a block. Fixes #299 2015-09-09 11:11:58 -04:00
Daniel Larimer
a748883fed adding API callback for observing pending transactions 2015-09-07 18:05:43 -04:00
Daniel Larimer
9080800c5b Updated APIs, fixed crash
- update fc to fix crash in websocket message handling
- added api to verify transactions without broadcasting them
- added api to broadcast a block produced outside the P2P network or
witness
2015-09-07 17:46:47 -04:00
Daniel Larimer
a32075897f adding verify_account_authority api 2015-09-07 10:19:51 -04:00
Daniel Larimer
a5071f2568 rollback on save 2015-09-03 17:42:52 -04:00
theoreticalbts
013033001f Don't infinitely recurse when block generation fails #261 2015-08-26 18:16:34 -04:00
theoreticalbts
6c052294e1 Remove block randomness and rewrite witness scheduling 2015-08-26 15:36:27 -04:00
theoreticalbts
dcc4f8076b database.hpp: Simplify get_scheduled_witness() return value 2015-08-26 15:36:26 -04:00
Daniel Larimer
0532661937 extra performance while reindexing 2015-08-24 18:50:09 -04:00
Daniel Larimer
2464b788ad improve reindexing performance 2015-08-24 17:57:44 -04:00
Daniel Larimer
15c99bd65b Address #247 - out-of-order blocks in fork db
- with this change the fork database now caches blocks that do not link
 and attempts to link the unlinked blocks after every new block is
 successfully linked.

 - with this change the fork database only tracks blocks as far back as
 the undo history allows.  This significantly reduces memory usage when
 there is high witness participation.
2015-08-19 09:47:10 -04:00
Nathan Hourt
2244e467ed Fix whitespace 2015-08-17 16:38:55 -04:00
Vikram Rajkumar
73cc012db9 Allow restarting block production with dummy checkpoint 2015-08-17 13:56:59 -04:00
theoreticalbts
2e9876b557 Implement chain-locked transactions 2015-08-06 12:56:37 -04:00
theoreticalbts
66c8cedf52 db_block.cpp: Assert legal slot_num in generate_block() to match header validation assert 2015-07-28 11:58:22 -04:00
theoreticalbts
f80219fd52 Implement maintenance_flag in dynamic_global_properties 2015-07-28 11:58:22 -04:00
Daniel Larimer
dffc83cca9 Refactor full account subscriptions
When subscribing to an account via the get_full_account API it will
start streaming any object relevant to the account that is added,
removed, or modified.
2015-07-21 15:19:52 -04:00
Daniel Larimer
46fae5cbbf make max authority check depth configurable by delegates 2015-07-17 09:41:08 -04:00
Daniel Larimer
8c6e0b9e55 Refactor Authority Checking
transaction_evaluation_state no longer tracks authority validation.
Authority validation is now compeltely independent of the database.
2015-07-17 00:41:43 -04:00
Daniel Larimer
b08b6cb553 Partial work toward auth refactor 2015-07-16 18:13:11 -04:00
Eric Frias
11a5d2b620 When the p2p code processes a block that contains transactions
we haven't seen, avoid fetching those transactions separately
2015-07-16 15:31:52 -04:00
Daniel Larimer
7f54d3d077 Issue #160 - Dynamic Undo History / Minority Fork
The blockchain now has a minimal participation requirement that can only
be overridden with checkpoints.  Any time participation falls below a
minimal level no new blocks may be added.

Currently it requires 66% participation and tolerates short periods of
time below 66% participation with a maximum of 500 consecutive blocks
missed.  For every two blocks produced 1 can be missed with a slack of
999 bias.
2015-07-15 14:13:24 -04:00
Daniel Larimer
e5f8d0f548 removing unecessary field 2015-07-14 18:50:03 -04:00
Daniel Larimer
cfa95a3f57 Issue #157 - make trx expiration absolute
This is done to comply with the policy that transactions should be self
describing and not depend upon implied state.  This makes things easier
for everyone to understand exactly when a transaction will be invalid
without having to refer to chain state.
2015-07-14 18:46:58 -04:00
Daniel Larimer
da254cdbff Fix #158 - block summary database now only has 2^16 entries 2015-07-14 17:56:42 -04:00
Daniel Larimer
d1c3c7a698 Issue #157 - TAPOS Refinements
1. Implement a TaPoS assert operation predicate that offers full block ID
validation for transactions that want the added security. This is only
required for transactions that are of high value and transfer control of
funds to a newly created identifier and where the witnesses cannot be
trusted.

2. Remove the full block ID from the transaction digest generation.
2015-07-14 17:28:26 -04:00
Vikram Rajkumar
6043586d15 Rename bad references to delegate -> witness; #147 2015-07-13 16:08:17 -04:00
Daniel Larimer
c49fbd87e7 adding checkpoints #121 to database 2015-07-09 14:09:21 -04:00
Daniel Larimer
baf5531238 Refactored chain library
- remove circular dependency with fee_schedule
- unitiy build db_* as database.cpp
- move protocol definitions in separate directory
- combined some objects/evaluators
- combined limit/call evaluator/objects into market_evaluator.*
2015-07-08 16:39:23 -04:00
Vikram Rajkumar
68744c9de0 Initialize genesis witnesses with default secret commitment; #17, #23 2015-07-07 12:36:31 -04:00
Daniel Larimer
fefa0f65f8 Issue #106 - Removing KeyObject
- this is a major refactor of the code and may have broken some behavior
in the wallet or witness nodes.
- this commit changes the serialization of operations
- the chain_tests pass
2015-07-02 01:52:45 -04:00
Nathan Hourt
f29eaa92e2 Fix all outstanding unexpected test failures 2015-07-01 13:53:07 -04:00
Eric Frias
fd94046eb6 Fix integer overflow errors, work around msvc parser bugs. 2015-06-30 18:50:58 -04:00
Daniel Larimer
18a99584a2 Start #116 Index Version Checking
- adding changes for #115 that didn't make the last commit
2015-06-30 18:40:46 -04:00
theoreticalbts
5f5e761ca8 db_block.cpp: Fix tapos rollover logic 2015-06-30 17:07:21 -04:00
Nathan Hourt
c530867933 Progress #17
- Add initial support for vesting genesis balances
- Add owner/active keys to genesis accounts
- Cleanup circa balance_object and evaluator
2015-06-30 17:05:17 -04:00
Daniel Larimer
e161e5a9fc Issues #112 Verifying all signatures are used
- refactor how signatures are stored on the transaction, removing key_id
and extra_signatures maps and replacing with a vector
- verify that each key only signs one time
- update tests to handle stricter policies on signatures
2015-06-30 15:11:26 -04:00
Daniel Larimer
73d55c2d94 #98 Add signature verification 2015-06-28 15:34:52 -04:00
Daniel Larimer
c566687974 fix tests properly 2015-06-25 14:14:30 -04:00
Daniel Larimer
342abe6ca1 Fix tests 2015-06-25 12:07:39 -04:00
Daniel Larimer
bf0ab60ceb Fix #88 If pushing generated block fails, then re-push all transactions to remove the failing transaction 2015-06-25 10:03:18 -04:00
Daniel Larimer
d7f7d64352 notify observes of changed objects after every pushed transaction 2015-06-22 18:11:54 -04:00
Nathan Hourt
3eaec849eb Progress #61: Getting witnesses/delegates by owner
Support and API are now present for retrieving witnesses and delegates
by their owners.
2015-06-22 15:03:24 -04:00
Nathan Hourt
639930a2d7 Test bulk discount on fees 2015-06-19 16:12:05 -04:00
Nathan Hourt
ec76179b0b Resolve #40 2015-06-18 15:51:23 -04:00
Daniel Larimer
0a5954db70 merge master 2015-06-18 15:31:30 -04:00
Daniel Larimer
ef4ed937cb Fix update_call_order
- redefine price feeds
- clean up unit test spam
2015-06-18 15:17:48 -04:00
theoreticalbts
2ec92c6695 database: Make functions which don't take skip_flags arg, use them to implement old API which does 2015-06-18 12:33:44 -04:00
Daniel Larimer
2724939ffb tests pass again 2015-06-16 18:45:33 -04:00
Daniel Larimer
ca89d5057c remove dependency on level db, bugs left to fix 2015-06-16 15:56:13 -04:00
Nathan Hourt
0a945b0257 Initial commit 2015-06-08 12:36:37 -04:00