1543 Commits

Author SHA1 Message Date
TomZ 6647cd0fc9 Move default log level to ignore Info but print Warning 2019-03-27 21:24:19 +01:00
TomZ e2ad40b719 Rename some API items for consistency 2019-03-27 20:25:07 +01:00
TomZ cd31c199ee Add some more asserts to NWM 2019-03-27 20:25:07 +01:00
TomZ a628db675a Cleanup and work on the API tags.
Make things more foolproof by having similar items in different namespaces
use the same number.
Remove APIs for the wallet as that is not a shipped component of the Hub
2019-03-27 20:24:31 +01:00
TomZ c8108f387c Drop API login requirement and api-cookie argument 2019-03-27 18:55:13 +01:00
TomZ 5d0fb95fda Fixlet; move assert
The boost APIs may callback outside of the strand in case of an error.
2019-03-25 12:50:27 +01:00
TomZ 503adb2484 Fix hash as returned by the API
when we get a hash from the JSON wrapped RPC interface it is a string
and it is in reverse order.
This makes sure that the generate() will create the same
hash as other parts of the API.
2019-03-25 12:50:27 +01:00
TomZ 0264e56551 Second part of 'file full' utxo detection
Do checks during insertAll for those really large blocks.
2019-03-25 12:50:27 +01:00
TomZ cb004d3336 Upgrade default to 128 2019-03-25 12:50:27 +01:00
TomZ 7e8ce613bb Fix regression, failure on shutdown 2019-03-24 21:39:41 +01:00
TomZ f78ff55e8d Parameter interaction; blocksize -> mempool
Can't make a big block if we limit the mempool size.
Experience shows we need 4 X the mempool size vs blocksize.
2019-03-24 21:21:32 +01:00
TomZ a8dd567006 Add unit test for the ring buffer class. 2019-03-24 11:43:43 +01:00
TomZ b0e57ffd7a Make UTXO able to handle much larger blocks.
Checking if my database file is full can not be assumed to only happen
on end-of-block if blocks get really large.
I'm taking a small performance hit to check this on insert and
flushSomeNodesToDisk on a more regular basis.
2019-03-24 10:23:52 +01:00
TomZ b8cf859fa6 Upgrade NWM to use ringbuffers
for internal purposes the network manager used std::list instances
for things that essentially were FIFO queues.
With high volume of packages being sent this causes a large overhead
and even a crash or two.
So I replaced them with ringbuffers which means that the normal
sending
of data will remove a large selection of mem allocations.
2019-03-24 10:23:52 +01:00
TomZ bcc454f1c6 Add some useful log output 2019-03-23 19:31:31 +01:00
TomZ f6c3efa33e Fixlet (speedup) 2019-03-23 19:31:18 +01:00
TomZ 54c565fdd8 DB files start at 1 2019-03-23 19:24:20 +01:00
TomZ 038f17bbaa Avoid calling logger during shutdown 2019-03-23 19:24:07 +01:00
TomZ e535d39ced Account for rounding errors. 2019-03-21 21:44:14 +01:00
TomZ 05a5af0d34 add parameter interaction max/accept blocksize 2019-03-21 18:43:00 +01:00
TomZ 9c920d1f70 Extend GetBlock API call
Allow interpretation of data to make it easier to
process by remote and less data to send.
2019-03-17 22:49:46 +01:00
TomZ 3fa2ac225f Make easier for user.
In applications we typically set a debug section
that is the default for that application so devs
can just call logInfo() without any arguments and
get the debug section for his app.
This now works with MessageParser::debugMessage() as well.
2019-03-17 22:49:46 +01:00
TomZ ec0673187c Add new BlockNotificationService 2019-03-17 22:49:46 +01:00
TomZ 8713914c47 Refactor to create a new baseclass for services
A NetworkSubscriptionService baseclass that creates
some metadata for each connection that uses the service.
2019-03-17 22:49:46 +01:00
TomZ a2b9f23246 Make generate() available through the API
This is a regtest only method, so limited usage.
2019-03-17 22:49:46 +01:00
TomZ 4c7d0010cc Make getBlock always return a height and hash
Also work on error reporting to remote.
2019-03-17 22:49:46 +01:00
TomZ 5bd599a1ed Expand GetBlock API call
Add a filter option to allow clients to send addresses
and match outputs against those bitcoin addresses so
only transactions that spend those outputs match will
be incuded in the result.

Add a session state so clients can send a filter
and just reuse that filter in subsequent calls.
2019-03-17 22:49:46 +01:00
TomZ 7d6760c49d Introduce new GetBlock API call
Demote the old RPC one to Legacy.
The old is still useful as it allows the 'verbose' version, but it uses
lots of deprecated tech and thus doesn't scale.
2019-03-17 22:49:46 +01:00
TomZ 504311d13c Merge branch '2019.01' 2019-03-17 22:38:24 +01:00
TomZ 1dd50ca837 For virtual block validation (&mining);
Validate both interblock-spents and double spends.
2019-03-17 22:24:21 +01:00
TomZ e729a59817 Fix APIRPC bytecount for sendRawTransaction
The full hash is returned.
2019-03-17 22:24:07 +01:00
TomZ 70d0c55a04 Add standard accessor; dataLength 2019-03-17 22:23:52 +01:00
TomZ bd2c43f4fd Merge branch '2019.01' 2019-03-15 19:26:23 +01:00
TomZ d04b93538c Make mining work again (after CTOR)
Mining currently runs a 'verifyOnly' step which is currently
entirely single-threaded because of CTOR.

Since we are collecting transactions from the mempool
it looks a bit odd to check what we already checked on
mempool-accept again.
2019-03-15 19:16:16 +01:00
TomZ 8deb6dbcd9 Fix comments. 2019-03-15 19:15:48 +01:00
TomZ b3331db7cd Fix log levels 2019-03-15 19:15:28 +01:00
TomZ 0e43b90210 Merge branch '2019.01' 2019-03-14 21:13:26 +01:00
TomZ a00dc19bd3 Pass uint256 by reference. 2019-03-14 21:13:14 +01:00
TomZ 133bb6b14f Fix using wrong txid. 2019-03-14 21:12:08 +01:00
TomZ 6aa8b4a184 Update API for TransactionBuilder to do signing
Allow users to add a private key and other details while
building a transaction and then as we export the final transaction
we sign the input.
2019-03-13 23:07:00 +01:00
TomZ 7e7fe61081 Little bit of review for TransactionBuilder 2019-03-13 23:06:54 +01:00
TomZ c90ae87187 add TransactionBuilder 2019-03-13 23:06:47 +01:00
TomZ a3776b4944 Port CreateAddress over to be a DirectParser
Its silly for such a simple method use bindings
2019-03-13 22:44:19 +01:00
TomZ 43fa503126 [Minor] Fix grammar of comment. 2019-03-13 22:43:25 +01:00
TomZ 557c2000f2 Move CKey to live in utils as well 2019-03-13 22:43:25 +01:00
TomZ a0f39317ea Add an accessor method: Tx::data() 2019-03-13 22:36:00 +01:00
TomZ cfe690320d Move various standalone simple classes into utils
The 'server' library has always been a catch-all and
ideally only the hub links it in (far future goal).
In line with this I move a list of files out of server
into the utils lib.
I choose 'utils' because all these are plain old data
objects that many crypto apps will find useful.

now in utils/primitives/
* CScript
* CPubKey
* CTransaction
* CBlock
* FastTransaction
* FastBlock
* CScript

streams.h is now in utils/streaming/
hash.h is now in utils/
2019-03-11 15:40:42 +01:00
TomZ adacad2992 Merge branch '2019.01' 2019-03-10 14:23:30 +01:00
TomZ a45eaac865 Make validationinterface a bit more consistent
This also fixes some regressions in the zmq API
2019-03-10 14:02:27 +01:00
TomZ d8ecf9cc41 Better warning if you forget to login. 2019-03-10 13:22:14 +01:00