Commit graph

1208 commits

Author SHA1 Message Date
hashmap
7db8e5e2dd Improve API errors (#1543)
Address ##1525 in particular and improve error messages in general.
Instead of `Request Error: Error { inner:` a client would get:
`Generic error: Invalid request body: missing field `method` at line 1 column 162`
2018-09-18 15:11:58 -07:00
Roy Blankman
db7b686073 Exit code 1 on wallet send fail (#1550)
Fixes #1504
2018-09-18 14:59:41 -07:00
Antioch Peverell
c291c48436 Simplify block broadcast (#1549)
* removed random "block vs compact_block"
2018-09-18 10:51:37 -07:00
Antioch Peverell
a4476443bb
Compact transactions (initial prep work) (#1548)
* introduce CompactTransaction (unused currently)

* rustfmt

* fix comments
2018-09-18 15:25:26 +01:00
Quentin Le Sceller
345a6cb53e Update rand crate to 0.5 (#1542)
* Update rand crate to 0.5

* Rustfmt

* Misplaced import
2018-09-18 09:39:45 +01:00
hashmap
b35950790b Use POST to compact and validate chain (#1541)
* More comments
* Move HeaderHandler code
2018-09-17 16:37:23 -07:00
Gary Yu
a0deb18e77
Update version of some crates (#1536)
Update version of some crates
2018-09-17 10:47:48 +08:00
Gary Yu
8bef9bef02
Small cleanup of SIGINT and SIGTERM handler (#1535) 2018-09-17 07:02:23 +08:00
Ivy Evans
9aed3b9c7f Fix documented emission rate (#1537)
The emission rate was changed to 60 grin per minute (or approximately
1 grin/second) in #569.
2018-09-16 15:36:38 -07:00
Gary Yu
84ae8f1a78 memmap: use official crate, instead of the explicit git url (#1532) 2018-09-15 10:22:32 -07:00
Gary Yu
986b1f62d3 fix: deprecated warning for env::home_dir, after upgrading to rust 1.29.0 (#1533) 2018-09-15 09:56:09 -07:00
Gary Yu
2c712fefff Small cleanup and perf improvement for peak_sizes_height and peaks (#1526)
* Small cleanup and perf improvement for  and

* rustfmt

* define a const 'ALL_ONES' for u64::MAX
2018-09-15 08:28:41 +01:00
Gary Yu
26244ef9dd Optimizations for txhashset rewind (#1528) 2018-09-14 16:51:36 -07:00
Gary Yu
d3a5ee130f Refactoring and cleanup on seed (#1513) 2018-09-14 16:09:25 -07:00
yeastplume
e7eb26eed4 rustfmt 2018-09-14 15:25:07 +01:00
Gary Yu
3c1d8c3f8b Small cleanup and perf improvement for peak_map_height (#1521) 2018-09-13 09:59:49 -07:00
Gary Yu
4a5a91a9cf Fix: clean_peers is using connected_peers, which make it do nothing (#1505)
* a failed handshake for example don't deserve banning
* remove not used 'BadOthers' from ReasonForBan
2018-09-13 09:53:35 -07:00
Gary Yu
644c1367b8 fix: too many words in a 1st level title (#1520) 2018-09-13 09:46:57 -07:00
Gary Yu
5291a061f1 Update the chinese intro for recent changes in english intro (#1519) 2018-09-12 21:22:49 -07:00
Gary Yu
1db1a02934 fix the comments of test bitmap (#1516) 2018-09-12 16:16:13 +01:00
Antioch Peverell
dca0d52dcd
Cleanup transaction with offset (#1514)
* cleanup build::transaction_with_offset

* rustfmt
2018-09-12 12:17:36 +01:00
Antioch Peverell
07eefc4d6b
cache get_shift() and get_leaf_shift() in prune_list (#1495)
* cache shift and leaf_shift values in prune_list for fast lookup later

* rustfmt

* fixup core tests
2018-09-12 08:19:05 +01:00
Parth Chopra
3eacc06a97 fixed list of requirements (pkg-config) (#1510)
pkg-config was incorrectly spelled pkc-config
2018-09-12 08:09:40 +01:00
Ignotus Peverell
a83404b22e
Simplify mining header serialization (#1509) 2018-09-11 20:31:05 -07:00
Gary Yu
97be1bf93e Fix wrong location of p2p config comments (#1511)
* remove 'WebStatic' from seeding_type
2018-09-11 20:30:24 -07:00
Gary Yu
7a689d468c Remove 'WebStatic' seed_type since it was obsoleted a while ago (#1512) 2018-09-11 20:28:27 -07:00
Antioch Peverell
77c2408c4e
Prevent duplicate output commitments (#1500)
* apply_output checks for duplicate commitment
not just a matching hash

* rustfmt
2018-09-11 19:36:00 +01:00
Quentin Le Sceller
596bf06556
Typo in logs (#1506) 2018-09-11 08:55:14 -04:00
Gary Yu
0dbfed5971 return an Err when read return 0 (#1503)
* return an Err when read return 0, instead of all zeroed buff without any error
2018-09-11 13:14:48 +02:00
Quentin Le Sceller
dd1cef2148 Add file based transaction in owner API (#1484)
* Add file based transaction in owner API
* Add finalize tx in owner API
* Code cleanup and placed file_receive in correct API
* Output an explicit error when http dest seems incorrect
* Add doc on send method
* Add cancel tx endpoint in owner API
* Add dump stored tx endpoint in owner API
*  Add missing parameters
2018-09-10 19:18:10 -07:00
Ignotus Peverell
4030b3d2f1
POW nonce has to be sent through stratum 2018-09-11 00:01:10 +00:00
Ignotus Peverell
6958f1c69e
First pass at Grin's security policy 2018-09-10 22:52:17 +00:00
Ignotus Peverell
ecf20602d5
Hard fork tryout: better PoW encapsulation in block header (#1478)
* Improve encapsulation with ProofOfWork struct
* Add dual pow scaling factor, fix test
* Fix pre_pow serialization, chain tests
* Adjust header serialized size calc
* Hard fork handling, version-based serialization
2018-09-10 15:36:57 -07:00
Gary Yu
48857b7e16 Fix infinite loop in case of some peer connect errors (#1494) 2018-09-10 15:23:49 -07:00
Gary Yu
e760ea2ce2 a little bit speed-up for full node syncing (#1463)
* simplified: track the head and orphans instead of every single block hash that sync requests
* change 1st block timeout from 1s to 5s
2018-09-10 12:32:20 -07:00
Gary Yu
277687c17c Add 2 more dns seeds (#1496) 2018-09-10 12:11:03 -07:00
Antioch Peverell
dbe53f63c8
disable chain compaction on archive nodes (#1498)
* disable chain compaction when in archive mode

* rustfmt
2018-09-10 15:59:42 +01:00
hashmap
da87f5fef4 Don't wait 30 seconds in case of a quick restart (#1488)
Currently on startup we wait for 30 secs if we don't have at least 4 peers with more work. If a node was quickly restarted it is already fully synced so thereare no peers with more work at all. This pr assumes that if we've done some work already and we have enough peers but still 0 with more work we are fully synced and good to go.
2018-09-07 13:01:54 -07:00
Quentin Le Sceller
2e6f7f72b3
Remove unused wallet listener and owner from config (#1483) 2018-09-06 10:34:08 +00:00
jaredbrubaker
54a4bb5b58 Update intro.md (#1482)
Correcting what I think may be a typo.
2018-09-06 07:09:15 +00:00
Yeastplume
974feaf07f
Add chaintype to wallet config (#1480)
* Add chain type to grin-wallet.toml

* rustfmt
2018-09-05 14:37:37 +01:00
Yeastplume
75f0ea6dd3
Save transaction as part of TxLogEntry after transaction completion (#1473)
* save wallet transaction on transaction completion

* rustfmt

* add resend command

* rustfmt

* added unit tests + fixes for grin wallet repost

* add ability to dump transaction file contents

* rustfmt

* wallet doc update
2018-09-05 12:12:29 +01:00
Antioch Peverell
77765796ab
improve "check known" steps during process_block() (#1475)
* document what we do during pipe::apply_block()

* rustfmt

* wip

* rustfmt

* wip

* additional check_known_store and check_known_mmr checks in process_block

* rustfmt

* cleanup coinbase maturity check in process_block

* consolidate the "check in store" logic
add TODOs around the 50 block OldBlock logic

* rustfmt

* cleanup
2018-09-05 10:51:29 +01:00
Ignotus Peverell
86aea875de
Full clang, not only libclang, is required
Fixes #1449
2018-09-04 16:03:49 -07:00
hashmap
1e65467d7d Remove vulnerable smallvec 0.2 from dependencies (#1474)
Reqwest 0.8.7 removed internal dependency on tokio-proto, which removed unsafe small-vec
dependency. It was a build dependency, but still nice to have `cargo audit` output.
2018-09-04 17:26:29 +02:00
John Tromp
c359c8aaf2 one day coinbase maturity (#1457)
* one day coinbase maturity

* make one day maturity a soft fork
2018-09-04 10:59:55 +01:00
Yeastplume
63880f71c7
BIP32 Lib Integration (#1454)
* Test integrating BIP-32 implementation (not complete)

* Test integrating BIP-32 implementation (not complete)

* factor out bip32 crypto functions into trait

* rustfmt

* compliation

* rustfmt

* fixes for test vectors.. all work now with hashes specified in BIP32

* rustfmt

* move reference hasher out of test
2018-09-04 10:58:26 +01:00
Gary Yu
ed73db671f fix for unstable travis-ci test on servers module (#1434)
* fix for unstable travis-ci test on servers module

* skip the PeerWithSelf connection request on sending side

* logs and comments change; and remove an unnecessary unwrap() in test
2018-09-04 10:52:11 +02:00
hashmap
0172a3e020 Fix amount parsing (from string) (#1458)
* Fix amount parsing (from string). Fixes #1384
* Add conversion with string padding
* Use string padding
2018-09-03 15:55:04 -04:00
Blade Doyle
a1141cab39 Record ideal miner behavior based on job_id value (#1461)
We have a very low default value for "attempt_time_per_block", which exposed an issue with the miner.  This change documents the correct / ideal behavior.
2018-09-03 19:15:18 +01:00