Commit graph

1083 commits

Author SHA1 Message Date
Yeastplume
9e0b3b6862
Store additional wallet detail and WalletInfo cleanup (#1167)
* adding wallet detail file, clean up wallet info output

* rustfmt

* ensure change outputs aren't written early

* rustfmt

* travis problems AGAIN

* file wallet explicit types
2018-06-14 17:02:05 +01:00
Quentin Le Sceller
a30ee88236
Cleanup imports (#1161)
Reorganize imports
2018-06-14 08:16:14 -04:00
Yeastplume
88616fd341
[WIP] Updates to support web-wallet (#1160)
* updates to support web wallet workflow

* rustfmt

* functions to support wallet, error handling

* rustfmt

* rebase rustfmt

* test fix
2018-06-13 21:58:45 +01:00
Ignotus Peverell
922b04608f
Clarification on range element count and parent insertion 2018-06-13 21:14:28 +01:00
Quentin Le Sceller
8f4dbfa540 Many typo fixes (#1158)
* Typo fix
* Parameterise
2018-06-13 17:03:34 +01:00
Antioch Peverell
a3bc383d4c fix build error (#1157) 2018-06-11 17:21:16 -04:00
Quentin Le Sceller
169ffee607 Externalize PMMR test (#1154)
Externalize PMMR tests into their own file under `tests/`
2018-06-11 22:01:30 +01:00
Yeastplume
05073c5c02
Web wallet api updates (#1155)
* CORS for webwallet

* rustfmt

* automatically start up wallet web api (owner) listener
2018-06-11 18:19:38 +01:00
Blade Doyle
973d46e6aa Fix the way shares are validated (#1153)
* Fix the way shares are validated

* fix includes

* Add unique error codes for share rejection reasons
2018-06-11 16:39:04 +01:00
Antioch Peverell
edc01bb05a Add verify_cut_through to both transaction and block (#1130)
We have no code that will produce a non-cut-through version of either
so this should be safe to add in testnet2
2018-06-10 20:59:58 +01:00
Quentin Le Sceller
310c7b0b48 Missing type annotation keychain (#1152) 2018-06-08 20:59:59 +01:00
yuntai
d07c5a128a [Trivial] Typo fixed (#1150) 2018-06-08 11:15:12 -04:00
Ignotus Peverell
af178f82f8
Refactor the Keychain to be based on a trait (#1146)
* First pass at restructuring the keychain crate and introducing a Keychain trait
* Parameterized everything that had to. Stuff compiles.
* More stuff compiles, fix most tests
* Big merge, pushing down opening the keychain forced adding factory methods on trait
* Test fixes for pool and servers crate
2018-06-08 06:21:54 +01:00
Quentin Le Sceller
a6590ea0ae
Add doc and persistent storage for docker (#1140)
* Add docker doc
2018-06-07 14:04:51 -04:00
Yeastplume
ebee05591b
Factor out wallet communications (#1142)
* move http calls out from libwallet internal

* rustfmt

* start to think about wallet communication traits

* rustfmt

* start of factoring out wallet client trait

* rustfmt

* move node_url trait fn into walletclient

* rustfmt

* comms factored out (with exception of wallet restore)

* rustfmt

* fix test

* rustfmt

* further test fix
2018-06-07 15:04:21 +01:00
Antioch Peverell
fffee377dd
Fix 2nd compact (#1143)
* add failing test to cover case where we compact
an already compacted data file

* fix the logic for pruning the data file
2018-06-06 22:46:21 +01:00
Yeastplume
8f66016557
[WIP] Wallet API Structure (#1133)
Wallet API Structure
2018-06-06 15:36:29 +01:00
Quentin Le Sceller
1815a6a8bf
Add a minimal dockerfile (#1136)
Add a minimal dockerfile
2018-06-05 14:54:06 -04:00
Quentin Le Sceller
1255ea2224
Upgrade and uniformize dependencies (#1138)
* Remove unused DandelionConfig

* Cargo upgrade and cleanup
2018-06-05 13:26:32 -04:00
Ignotus Peverell
057eb2dcb8
Minor typo fix 2018-06-05 06:46:07 +01:00
Ignotus Peverell
1bd7ece6e8
Doc drop, all unfinished drafts 2018-06-05 06:46:07 +01:00
Quentin Le Sceller
663733e72b
Replace try! for ? (#1134)
* Replace try for ?
2018-06-04 12:05:49 -04:00
Blade Doyle
c34da9598d Support shares (#1132)
* Support logging miner shares and minimum mining difficulty configuration

* rust formatting

* fix test
2018-06-04 11:22:42 +01:00
Antioch Peverell
0ecadd3486
move verify_kernel_sums into committed trait (#1131) 2018-06-02 19:00:44 +01:00
Antioch Peverell
6fd2afccb4
block::new() now sets a random pow on the header (#1128) 2018-06-02 15:17:07 +01:00
Antioch Peverell
0a80023527
pass in next height when applying raw txs (#1129)
rewind correctly to the previous height as necessary
2018-06-02 12:29:18 +01:00
Quentin Le Sceller
d6b689bada
Simplify DandelionConfig (#1115)
* Simplify DandelionConfig and make fields optional
2018-06-01 18:41:39 -04:00
Antioch Peverell
68c7cff6db Fix the intermittent error in pool tests (#1123) 2018-06-01 23:18:58 +01:00
hashmap
2fa32d15ce Rustify core/src/core (#1122)
Small refactoring of one folder, if it makes sense I could extend the scope.
* Remove some cloning (real and just verbosity in the code)
* Naming conventions like to/into*
* Some Clippy's suggestions

I found that we don't use field init shorthand syntax, so I didn't touch this part, was it discussed before?
2018-06-01 20:41:26 +01:00
Yeastplume
7812a02233
Libwallet refactoring - Library functions + ErrorTypes (#1113)
* move checker and rename to updater

* rustfmt

* complete checker/updater move

* rustfmt

* move libwallet error into separate file

* rustfmt

* starting to sort our error types

* updating errors in libtx and libwallet

* rustfmt

* factor out error type

* rustfmt

* compiling, errors split into libwallet and wallet errors

* rustfmt

* changing user error reporting to new format

* rustfmt

* clean up error types

* clean up error types

* move restore into libwallet

* rustfmt
2018-06-01 15:06:59 +01:00
Antioch Peverell
bbedeeaca3
fix grin.toml parsing error for missing values (#1120) 2018-06-01 09:35:33 -04:00
Antioch Peverell
279871e050
log # kernels so we can see tx aggregation (if any) (#1111) 2018-05-31 11:58:59 -04:00
Antioch Peverell
13fdc6ef6d
dandelion config in grin.toml matches actual defaults (#1110) 2018-05-31 09:50:27 -04:00
Antioch Peverell
4fda7a6899
Minimal Transaction Pool (#1067)
* verify a tx like we verify a block (experimental)

* first minimal_pool test up and running but not testing what we need to

* rework tx_pool validation to use txhashset extension

* minimal tx pool wired up but rough

* works locally (rough statew though)
delete "legacy" pool and graph code

* rework the new pool into TransactionPool and Pool impls

* rework pool to store pool entries
with associated timer and source etc.

* all_transactions

* extra_txs so we can validate stempool against existing txpool

* rework reconcile_block

* txhashset apply_raw_tx can now rewind to a checkpoint (prev raw tx)

* wip - txhashset tx tests

* more flexible rewind on MMRs

* add tests to cover apply_raw_txs on txhashset extension

* add_to_stempool and add_to_txpool

* deaggregate multi kernel tx when adding to txpoool

* handle freshness in stempool
handle propagation of stempool txs via dandelion monitor

* patience timer and fluff if we cannot propagate
to next relay

* aggregate and fluff stempool is we have no relay

* refactor coinbase maturity

* rewrote basic tx pool tests to use a real txhashset via chain adapter

* rework dandelion monitor to reflect recent discussion
works locally but needs a cleanup

* refactor dandelion_monitor - split out phases

* more pool test coverage

* remove old test code from pool (still wip)

* block_building and block_reconciliation tests

* tracked down chain test failure...

* fix test_coinbase_maturity

* dandelion_monitor now runs...

* refactor dandelion config, shared across p2p and pool components

* fix pool tests with new config

* fix p2p tests

* rework tx pool to deal with duplicate commitments (testnet2 limitation)

* cleanup and address some PR feedback

* add big comment about pre_tx...
2018-05-30 16:57:13 -04:00
Quentin Le Sceller
b6c31ebc78 Remove unused error type switch commitment (#1104)
* Remove unused switch commitment error

* Rustfmt

* Updated doc
2018-05-30 14:45:27 -04:00
Yeastplume
82ed280625
[WIP] Factoring out wallet traits and continued wallet library work (#1096)
* rename wallet libs

* rename transaction.rs to slate.rs

* rename transaction.rs to slate.rs

* move some types into libwallet/types

* rustfmt

* rename libtransaction libtx

* rename libtransaction libtx

* change types.rs to file_wallet

* rustfmt

* rename WalletData to FileWallet

* refactoring WalletBackend types out

* rustfmt

* All compiling, at least

* rustfmt

* fix FileWallet paths to persist

* rustfmt

* re-ignore wallet integration test
2018-05-30 17:48:32 +01:00
Antioch Peverell
601c9e769e
all duplicates (incorrectly) to maintain compatibility with testnet2 (#1103) 2018-05-30 10:15:37 -04:00
Antioch Peverell
982dae99a5
make enum values explicit (#1101) 2018-05-29 17:57:11 -04:00
Quentin Le Sceller
ec3c2e89a4 Store and communicate ban reason (#1085)
* Add read_i32 and write_i32
* Store and send reason for ban
* Client corruption ban reason
* Forgotten max message size
2018-05-29 03:45:31 +01:00
Gary Yu
81a1f12f36 doc: 'intro.md' support both English and Chinese version. (#1090) 2018-05-29 03:40:47 +01:00
cake808
7c1af97f82 typo fixed: anonimity -> anonymity (#1095) 2018-05-28 15:17:30 -04:00
Antioch Peverell
37e2dc86f6
fix the hash comparison (#1091)
for identifying duplicate commitments in apply_output...
2018-05-28 14:22:22 -04:00
Ignotus Peverell
bd5b916550
Clarified the scaling bullet point 2018-05-28 19:00:03 +01:00
Ignotus Peverell
18be73630d
Various small clarifications 2018-05-28 00:27:28 +01:00
Antioch Peverell
ac52799c7e
add test_output to .gitignore (#1092)
wallet tests create this dir
2018-05-25 21:34:49 -04:00
Yeastplume
1f94bfc038
libwallet refactor context, aggsig, error handling (#1087)
* remove context object from aggsig and transaction libs

* fix to aggsig, and remove unnecessary warnings

* put tx_fee function into libwallet::transaction

* Error cleanup, and creating libwallet error type

* remove some unwraps

* checker bug

* ensure transaction tests checks sender's wallet
2018-05-24 16:27:26 +01:00
Ignotus Peverell
ff5d651b6f
Wallet checker cleanup, remove old unconfirmed outputs (#1084)
Use the standard Rust `chunks` function instead of hand coded
cursors. Add a cleanup function to get rid of old unconfirmed
outputs.
2018-05-24 01:14:34 +01:00
Ignotus Peverell
3525df1bf1
Coinbase key reuse (#1081)
Reuse unused coinbase key in stratum server. Instead of asking a new key id from the wallet every time, the stratum server now provides the older one again if it hasn't been used (the local node didn't end up mining a block).
2018-05-23 19:32:38 +01:00
Ignotus Peverell
257b6bf05a
Minor refactor of OutputData mark_* functions 2018-05-22 21:43:41 +01:00
Ignotus Peverell
662db27ba4
Get block bodies from other fast sync'd nodes (#1073)
Previous code used to always get full blocks from archival peers.
Fast sync nodes shouldn't need to, other fast sync nodes have all
the history they need. This only uses archival nodes when blocks
are requested at a height that's older than the horizon.
2018-05-22 21:15:29 +01:00