Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit aa53bdd
Merge: dbfb81c da88ddb
Author: Jiang Jinyang <[email protected]>
Date:   Tue Apr 16 01:17:01 2019 -0500

    Merge pull request nervosnetwork#473 from u2/cellbase_maturity

    feature: cellbase maturity verify

commit da88ddb
Author: u2 <[email protected]>
Date:   Mon Apr 15 17:52:26 2019 +0800

    feature: cellbase maturity verify

commit dbfb81c
Merge: 6250bd8 2cdbe4a
Author: Quake Wang <[email protected]>
Date:   Mon Apr 15 18:05:02 2019 +0900

    Merge pull request nervosnetwork#474 from jjyr/fix-valid-since-rpc

    fix: valid_since use String instead u64 in RPC

commit 2cdbe4a
Author: jjy <[email protected]>
Date:   Mon Apr 15 14:30:53 2019 +0800

    fix: valid_since use String instead u64 in RPC

commit 6250bd8
Merge: 8d69722 dfd5c8a
Author: ian <[email protected]>
Date:   Mon Apr 15 10:03:51 2019 +0800

    Merge pull request nervosnetwork#470 from doitian/configure-sentry

    chore: add sentry tags

commit 8d69722
Merge: 554ba4e ec6336f
Author: ian <[email protected]>
Date:   Sun Apr 14 19:37:51 2019 +0800

    Merge pull request nervosnetwork#471 from nervosnetwork/quake/cuckoo_verify_panic

    fix: CuckooEngine verify invalid length proof should not panic

commit ec6336f
Author: quake wang <[email protected]>
Date:   Sun Apr 14 12:59:37 2019 +0900

    fix: CuckooEngine verify invalid length proof should not panic

commit dfd5c8a
Author: ian <[email protected]>
Date:   Sun Apr 14 11:16:09 2019 +0800

    chore: add more sentry tags

commit e452c64
Author: ian <[email protected]>
Date:   Sun Apr 14 09:05:32 2019 +0800

    chore: add sentry tags

commit 554ba4e
Merge: 3b5ceed d6fa197
Author: Quake Wang <[email protected]>
Date:   Sun Apr 14 10:06:12 2019 +0900

    Merge pull request nervosnetwork#467 from doitian/wrong-option-name

    docs: fix wrong option name

commit 3b5ceed
Merge: 0db3859 b0003b6
Author: Quake Wang <[email protected]>
Date:   Sun Apr 14 10:05:38 2019 +0900

    Merge pull request nervosnetwork#468 from doitian/require-config-file-to-start

    feat: ckb must loads config files from file system.

commit 0db3859
Merge: ac79f50 7662ee0
Author: Quake Wang <[email protected]>
Date:   Sun Apr 14 10:03:06 2019 +0900

    Merge pull request nervosnetwork#450 from nervosnetwork/quake/index_store_trait_merge

    refactor: merge ChainIndex and ChainStore trait

commit ac79f50
Merge: e70407c febcae0
Author: ian <[email protected]>
Date:   Sun Apr 14 08:24:04 2019 +0800

    Merge pull request nervosnetwork#469 from jjyr/fix-peer-store-unique

    fix: PeerStore unique constraint failed

commit febcae0
Author: jjy <[email protected]>
Date:   Sat Apr 13 23:17:01 2019 +0800

    fix: PeerStore unique constraint failed

commit b0003b6
Author: ian <[email protected]>
Date:   Sat Apr 13 21:55:35 2019 +0800

    feat: ckb must loads config files from file system.

    This is a **BREAKING CHANGE**.

    It is a mechanism to avoid starting ckb in a wrong directory by accident.

commit d6fa197
Author: ian <[email protected]>
Date:   Sat Apr 13 21:00:51 2019 +0800

    docs: fix wrong option name

commit e70407c
Merge: d3acea8 4c3d283
Author: ian <[email protected]>
Date:   Sat Apr 13 13:03:19 2019 +0800

    Merge pull request nervosnetwork#463 from doitian/fix-docker-image-name

    docs: fix docker image name

commit d3acea8
Merge: 1afbd86 75d0bc7
Author: Quake Wang <[email protected]>
Date:   Sat Apr 13 11:40:23 2019 +0900

    Merge pull request nervosnetwork#464 from yangby-cryptape/mv-txtrace-to-jsonrpc-types

    refactor: don't have to build rocksdb when use all jsonrpc types

commit 75d0bc7
Author: Boyu Yang <[email protected]>
Date:   Sat Apr 13 09:26:34 2019 +0800

    refactor: don't have to build rocksdb when use all jsonrpc types

commit 4c3d283
Author: ian <[email protected]>
Date:   Fri Apr 12 22:41:37 2019 +0800

    docs: fix docker image name

    Use the full name `nervos/ckb`.

commit 1afbd86
Merge: 0800b17 62bcb82
Author: ian <[email protected]>
Date:   Fri Apr 12 22:20:57 2019 +0800

    Merge branch 'rc/v0.9.0' into develop

commit 62bcb82
Merge: 0f86904 fb82031
Author: ian <[email protected]>
Date:   Fri Apr 12 22:20:00 2019 +0800

    Merge branch 'master' into rc/v0.9.0

commit 0800b17
Author: ian <[email protected]>
Date:   Fri Apr 12 22:09:30 2019 +0800

    chore: setup integration test in ci

    - Use Travis Branch Trigger to run integration test.
    - Use Travis Pull Request Trigger to run unit test.
    - Run both tests in master branch.

commit fb82031
Author: ian <[email protected]>
Date:   Fri Apr 12 22:09:30 2019 +0800

    chore: setup integration test in ci

    - Use Travis Branch Trigger to run integration test.
    - Use Travis Pull Request Trigger to run unit test.
    - Run both tests in master branch.

commit 0f86904
Author: ian <[email protected]>
Date:   Fri Apr 12 22:09:30 2019 +0800

    chore: setup integration test in ci

    - Use Travis Branch Trigger to run integration test.
    - Use Travis Pull Request Trigger to run unit test.
    - Run both tests in master branch.

commit 09fcdd9
Author: ian <[email protected]>
Date:   Fri Apr 12 21:13:18 2019 +0800

    chore: drop bors

    bors is not stable. We'll run the integration test after PR merged to develop
    and RC branches.

commit 63a1bb6
Merge: 14d8ffc ac1fb97
Author: ian <[email protected]>
Date:   Fri Apr 12 21:47:19 2019 +0800

    Merge pull request nervosnetwork#460 from doitian/drop-bors

    chore: drop bors

commit 14d8ffc
Merge: f986b24 3cf197c
Author: ian <[email protected]>
Date:   Fri Apr 12 21:46:49 2019 +0800

    Merge pull request nervosnetwork#448 from zhangsoledad/zhangsoledad/relay_filter

    feat: relay known filter

commit f986b24
Merge: 9de1418 a12a5fd
Author: ian <[email protected]>
Date:   Fri Apr 12 21:46:15 2019 +0800

    Merge pull request nervosnetwork#455 from nervosnetwork/thewawar/fix-sqlite-start

    fix: Sqlite can not start

commit 9de1418
Merge: bdc8ace eb7045c
Author: ian <[email protected]>
Date:   Fri Apr 12 21:30:40 2019 +0800

    Merge branch 'rc/v0.9.0' into develop

commit eb7045c
Merge: 900e53d cbee1d4
Author: ian <[email protected]>
Date:   Fri Apr 12 21:25:36 2019 +0800

    Merge pull request nervosnetwork#458 from nervosnetwork/dockerfile

    chore: update Dockerfile [skip ci]

commit ac1fb97
Author: ian <[email protected]>
Date:   Fri Apr 12 21:13:18 2019 +0800

    chore: drop bors

    bors is not stable. We'll run the integration test after PR merged to develop
    and RC branches.

commit cbee1d4
Author: ian <[email protected]>
Date:   Fri Apr 12 14:22:31 2019 +0800

    chore: update Dockerfile [skip ci]

commit 7662ee0
Author: quake wang <[email protected]>
Date:   Fri Apr 12 21:06:06 2019 +0900

    chore: re-enable some clippy hint

commit 884bfa1
Author: quake wang <[email protected]>
Date:   Fri Apr 12 20:30:03 2019 +0900

    chore: rebase develop

commit d6ca06e
Author: quake wang <[email protected]>
Date:   Fri Apr 12 12:10:14 2019 +0900

    chore: remove unused ChainIndex file

commit 586b89c
Author: quake wang <[email protected]>
Date:   Fri Apr 12 11:55:08 2019 +0900

    chore: remove some unused `Send` and `static` trait bounds

commit 1b69bb6
Author: quake wang <[email protected]>
Date:   Fri Apr 12 11:27:39 2019 +0900

    refactor: merge ChainIndex and ChainStore trait, remove unused `Clone` impl of CompactBlockMedianTimeView

commit a12a5fd
Author: Linfeng Qian <[email protected]>
Date:   Fri Apr 12 16:26:26 2019 +0800

    fix: Sqlite can not start

commit bdc8ace
Merge: 9485f1a db84513
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Fri Apr 12 08:17:42 2019 +0000

    Merge nervosnetwork#452

    452: chore: upgrade p2p dependence r=zhangsoledad a=driftluo

    Co-authored-by: piaoliu <[email protected]>

commit 3cf197c
Author: zhangsoledad <[email protected]>
Date:   Thu Apr 11 20:59:08 2019 +0800

    refactor: remove unused bloom_filter protocol

commit 32b79b5
Author: zhangsoledad <[email protected]>
Date:   Thu Apr 11 20:52:37 2019 +0800

    feat: relay known filter

commit 900e53d
Author: ian <[email protected]>
Date:   Fri Apr 12 15:13:13 2019 +0800

    chore: deploy github releases as prerelease [skip ci]

commit db84513
Author: piaoliu <[email protected]>
Date:   Fri Apr 12 15:02:02 2019 +0800

    chore: upgrade p2p dependence

commit 9485f1a
Merge: 9b05508 4f5aadf
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Fri Apr 12 04:37:44 2019 +0000

    Merge nervosnetwork#451

    451: chore: bump rust toolchain to 1.34.0 r=zhangsoledad a=zhangsoledad

    * Dockerfile updated
    * remove redundant_closure
    * switch stabilized std TryFrom
    * AtomicU64

    Co-authored-by: zhangsoledad <[email protected]>

commit 4f5aadf
Author: zhangsoledad <[email protected]>
Date:   Fri Apr 12 11:45:11 2019 +0800

    chore: bump rust toolchain to 1.34.0

commit 9b05508
Author: ian <[email protected]>
Date:   Fri Apr 12 10:47:01 2019 +0800

    docs: update quick start [skip ci]

commit cfaf75b
Author: ian <[email protected]>
Date:   Fri Apr 12 09:57:34 2019 +0800

    docs: update nighly builds link

commit f4c7b1b
Author: ian <[email protected]>
Date:   Fri Apr 12 09:55:01 2019 +0800

    chore: fix quick start docs

commit 7c8c65f
Author: ian <[email protected]>
Date:   Fri Apr 12 10:47:01 2019 +0800

    docs: update quick start [skip ci]

commit d22a4dc
Author: ian <[email protected]>
Date:   Fri Apr 12 09:57:34 2019 +0800

    docs: update nighly builds link

commit dadc3cd
Author: ian <[email protected]>
Date:   Fri Apr 12 09:55:01 2019 +0800

    chore: fix quick start docs

commit b58721d
Merge: 69d06e1 ef16437
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Fri Apr 12 00:06:55 2019 +0000

    Merge nervosnetwork#372

    372: feat: tx valid since r=quake a=jjyr

    Co-authored-by: jjy <[email protected]>

commit ef16437
Author: jjy <[email protected]>
Date:   Fri Apr 12 00:48:00 2019 +0800

    fix: tx-valid-since rebase

commit 69d06e1
Merge: 60b8c1a 6573165
Author: ian <[email protected]>
Date:   Fri Apr 12 00:22:42 2019 +0800

    Merge branch 'rc/v0.9.0' into develop

commit 6573165
Author: ian <[email protected]>
Date:   Fri Apr 12 00:21:45 2019 +0800

    chore: ckb version tweaks (nervosnetwork#449)

    - rerun build.rs to get latest version info when any file has changed.
    - include pre version.

commit d5fd988
Author: jjy <[email protected]>
Date:   Thu Apr 11 22:51:48 2019 +0800

    fix: update cfb verifier

commit 527edad
Author: jjy <[email protected]>
Date:   Wed Apr 10 14:47:34 2019 +0800

    fix: tx valid_since rebase

commit c7f1f3f
Author: jjy <[email protected]>
Date:   Wed Apr 10 14:22:14 2019 +0800

    fix: verify tx valid_since remain flags must be empty

commit cba3e03
Author: jjy <[email protected]>
Date:   Tue Apr 9 15:56:28 2019 +0800

    fix: rebase witness

commit 9b21859
Author: jjy <[email protected]>
Date:   Tue Apr 9 13:40:40 2019 +0800

    fix: cellbase input valid_since should be 0

commit e920572
Author: jjy <[email protected]>
Date:   Tue Apr 9 13:32:15 2019 +0800

    fix: update valid_since timestamp represent accoding to RFC0017

commit d78b171
Author: jjy <[email protected]>
Date:   Mon Apr 8 16:09:12 2019 +0800

    fix: regenerate protocol

commit 620d1ab
Author: jjy <[email protected]>
Date:   Mon Apr 8 10:17:11 2019 +0800

    fix: ignore immature tx error in relay

commit d1973bb
Author: jjy <[email protected]>
Date:   Sun Apr 7 19:19:03 2019 +0800

    refactor: ChainState use tx_pool_config.txs_verify_cache_size

commit 5a944a8
Author: jjy <[email protected]>
Date:   Sun Apr 7 12:06:40 2019 +0800

    refactor: remove unused clippy annotation

commit 44f2a22
Author: jjy <[email protected]>
Date:   Sat Apr 6 21:53:33 2019 +0800

    fix: from parent block to calculate median_block_timestamp

commit 9abfd68
Author: jjy <[email protected]>
Date:   Sat Apr 6 20:16:42 2019 +0800

    doc: fix send_transaction RPC doc

commit fd2ee8c
Author: jjy <[email protected]>
Date:   Sat Apr 6 17:04:46 2019 +0800

    refactor: move ChainState initialize into new

commit 644f7aa
Author: jjy <[email protected]>
Date:   Sat Apr 6 11:11:31 2019 +0800

    feat: move valid_since field from tx to CellInput

commit 04d7dde
Author: jjy <[email protected]>
Date:   Mon Apr 1 15:19:51 2019 +0800

    fix: RPC add valid_since field

commit 2925b97
Author: jjy <[email protected]>
Date:   Fri Mar 29 16:27:55 2019 +0800

    fix: update test always_success_type_hash for tx valid_since

commit 076c768
Author: jjy <[email protected]>
Date:   Fri Mar 29 14:52:42 2019 +0800

    feat: tx valid since

commit 60b8c1a
Merge: 1a759e2 a2e8b45
Author: ian <[email protected]>
Date:   Thu Apr 11 23:48:49 2019 +0800

    Merge nervosnetwork#435

    435: refactor: store module

    BREAKCHANGE: This PR is a break change since we changed the rocksdb's column family name and column list, need to delete old database.

    This PR refactor db and chain store, make it easy to switch different key-value store implementation.
    - [x] Refactor `Batch` to associated type
    - [x] Refactor `ChainIndex`
    - [x] Remove some static lifetime bound for `ChainIndex`
    - [x] Change `Col` from Option to u32
    - [x] Move `Cachedb` to db module

    Co-authored-by: quake wang <[email protected]>

commit 1a759e2
Author: ian <[email protected]>
Date:   Thu Apr 11 20:32:53 2019 +0800

    chore: unshallow repo before building package [skip ci]

commit 7ee9967
Author: ian <[email protected]>
Date:   Thu Apr 11 20:16:17 2019 +0800

    chore: do not cache release build [skip ci]

commit 0661659
Merge: 76cc48d 45a5fca
Author: ian <[email protected]>
Date:   Thu Apr 11 20:10:51 2019 +0800

    Merge branch 'rc/v0.9.0' into develop

commit 45a5fca
Author: ian <[email protected]>
Date:   Thu Apr 11 20:09:05 2019 +0800

    docs: how to get old versions of ckb

commit 0974dc4
Author: ian <[email protected]>
Date:   Thu Apr 11 10:17:29 2019 +0800

    docs: build ckb from master

commit 8decb6c
Author: ian <[email protected]>
Date:   Thu Apr 11 19:42:57 2019 +0800

    chore: publish artifacts directly

commit 6ec0717
Author: ian <[email protected]>
Date:   Thu Apr 11 17:13:19 2019 +0800

    chore: fix package script

commit 76cc48d
Merge: 04f090e b42f9d4
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Thu Apr 11 07:59:55 2019 +0000

    Merge nervosnetwork#441

    441: feat: use hex string represent lock args in config r=quake a=zhangsoledad

    Co-authored-by: zhangsoledad <[email protected]>

commit b42f9d4
Author: zhangsoledad <[email protected]>
Date:   Thu Apr 11 10:55:34 2019 +0800

    feat: use hex string represent lock args in config

commit 04f090e
Author: ian <[email protected]>
Date:   Thu Apr 11 10:17:29 2019 +0800

    docs: build ckb from master

commit 991e864
Merge: 017568b b23e7d3
Author: ian <[email protected]>
Date:   Thu Apr 11 10:17:00 2019 +0800

    Merge branch 'rc/v0.9.0' into develop

commit b23e7d3
Merge: e1ac356 0aefcc9
Author: ian <[email protected]>
Date:   Thu Apr 11 09:47:55 2019 +0800

    Merge pull request nervosnetwork#424 from nervosnetwork/testnet-hotfix-2019-04-09

    fix: apply hotfix for bugs found in test

commit a2e8b45
Author: quake wang <[email protected]>
Date:   Thu Apr 11 10:11:01 2019 +0900

    chore: resolve some error handle issue

commit 017568b
Merge: 4902e15 c812c16
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Wed Apr 10 17:26:39 2019 +0000

    Merge nervosnetwork#439

    439: fix: mining bug caused by type changes in RPC r=zhangsoledad a=xxuejie

    Co-authored-by: Xuejie Xiao <[email protected]>

commit c812c16
Author: Xuejie Xiao <[email protected]>
Date:   Wed Apr 10 15:25:32 2019 +0000

    fix: mining bug caused by type changes in RPC

commit 0aefcc9
Author: Linfeng Qian <[email protected]>
Date:   Tue Apr 9 11:31:04 2019 +0800

    fix: rustfmt

commit 66ac6a1
Author: piaoliu <[email protected]>
Date:   Fri Apr 5 13:37:46 2019 +0800

    fix: upgrage p2p dependence, fix cpu abnormal occupation

commit 4648db2
Author: Linfeng Qian <[email protected]>
Date:   Thu Apr 4 18:00:05 2019 +0800

    chore: Downgrade some log level from debug to trace

commit b00844b
Author: Linfeng Qian <[email protected]>
Date:   Thu Apr 4 17:38:21 2019 +0800

    fix: Remove sender when channel disconnected

commit 973b8aa
Author: Linfeng Qian <[email protected]>
Date:   Thu Apr 4 14:18:54 2019 +0800

    fix: Uncomment eviction disconnect code

commit 52c529e
Author: Linfeng Qian <[email protected]>
Date:   Wed Apr 3 16:11:10 2019 +0800

    fix: Temporary remove peer eviction logic

commit 9995c5c
Author: Linfeng Qian <[email protected]>
Date:   Wed Apr 3 15:30:11 2019 +0800

    fix: Network error handling

commit f55cec5
Author: zhangsoledad <[email protected]>
Date:   Wed Apr 3 14:21:32 2019 +0800

    feat: experimental deadlock detection

commit e1ac356
Author: zhangsoledad <[email protected]>
Date:   Wed Apr 10 22:11:44 2019 +0800

    fix: create tempfile in root dir prevent cross-device link (nervosnetwork#438)

commit 4902e15
Merge: b580f33 0e65c5b
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Wed Apr 10 14:03:45 2019 +0000

    Merge nervosnetwork#437

    437: fix: RPC `local_node_info` returns duplicated addr r=jjyr a=rink1969

    fix nervosnetwork#436

    Co-authored-by: rink1969 <[email protected]>

commit b34a0c0
Author: zhangsoledad <[email protected]>
Date:   Tue Apr 2 19:18:08 2019 +0800

    fix: temp fix tx relay flood

commit b580f33
Merge: 29c0a4d 2338d48
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Wed Apr 10 12:32:38 2019 +0000

    Merge nervosnetwork#434

    434: feat: Change all u64 fields in RPC to String r=xxuejie a=xxuejie

    This PR actually contains 2 parts:

    * refactor: Use TryFrom when parsing RPC request data
    * feat: Change capacity field to String type in RPC

    Co-authored-by: Xuejie Xiao <[email protected]>

commit 29c0a4d
Merge: f5a17c1 641f146
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Wed Apr 10 11:41:16 2019 +0000

    Merge nervosnetwork#392

    392: refactor: avoid recursive lock r=doitian a=zhangsoledad

    Co-authored-by: zhangsoledad <[email protected]>

commit 0e65c5b
Author: rink1969 <[email protected]>
Date:   Wed Apr 10 17:16:18 2019 +0800

    fix: return duplicated addr

    see the issue for details

    fixes issue nervosnetwork#436

commit 4c06dca
Author: quake wang <[email protected]>
Date:   Wed Apr 10 19:10:31 2019 +0900

    refactor: move cachedb to db module

commit 641f146
Author: zhangsoledad <[email protected]>
Date:   Wed Apr 10 17:52:24 2019 +0800

    refactor: get rid of `let _ =` pattern

commit d600e92
Author: zhangsoledad <[email protected]>
Date:   Wed Apr 10 17:51:17 2019 +0800

    fix: accept_connection protocol registry

commit ecb4ec0
Author: quake wang <[email protected]>
Date:   Wed Apr 10 18:51:02 2019 +0900

    refactor: change Col from Option to u32

commit bee5bb9
Author: quake wang <[email protected]>
Date:   Wed Apr 10 18:36:18 2019 +0900

    chore: rebase develop

commit 6bd4075
Author: quake wang <[email protected]>
Date:   Wed Apr 10 18:23:41 2019 +0900

    chore: rebase develop

commit 89bfb95
Author: quake wang <[email protected]>
Date:   Wed Apr 10 18:02:17 2019 +0900

    refactor: remove static bound for ChainIndex

commit f37264b
Author: quake wang <[email protected]>
Date:   Wed Apr 10 16:47:47 2019 +0900

    refactor: add helper methods to batch

commit 5ca1dbe
Author: quake wang <[email protected]>
Date:   Wed Apr 10 13:09:30 2019 +0900

    refactor: batch function

commit 06b4fc9
Author: quake wang <[email protected]>
Date:   Wed Apr 10 12:18:13 2019 +0900

    refactor: rename diskdb to rocksdb

commit f745bad
Author: quake wang <[email protected]>
Date:   Wed Apr 10 10:20:59 2019 +0900

    refactor: change DbBatch to assoicated type

commit 8d6b5f6
Author: quake wang <[email protected]>
Date:   Tue Apr 9 12:37:05 2019 +0900

    refactor: change DbBatch to assoicated type (WIP)

commit d7d658e
Author: quake wang <[email protected]>
Date:   Mon Apr 8 17:59:51 2019 +0900

    feat: add DBIterator

commit 7901f50
Author: quake wang <[email protected]>
Date:   Mon Apr 8 16:18:12 2019 +0900

    chore: remove unused COLUMN_BLOCK_TRANSACTION_IDS column

commit f5b8a01
Author: quake wang <[email protected]>
Date:   Mon Apr 8 15:59:15 2019 +0900

    chore: private field

commit 2338d48
Author: Xuejie Xiao <[email protected]>
Date:   Wed Apr 10 07:18:02 2019 +0000

    feat: Change all u64 fields in RPC to String

commit 6fb5964
Author: Xuejie Xiao <[email protected]>
Date:   Wed Apr 10 04:17:41 2019 +0000

    refactor: Change the code to properly process errors

commit f37cf2c
Author: Xuejie Xiao <[email protected]>
Date:   Wed Apr 10 03:35:07 2019 +0000

    fix: Add proper returns when parsing fails in miner

commit 9925d4e
Author: Xuejie Xiao <[email protected]>
Date:   Wed Apr 10 02:38:19 2019 +0000

    feat: Change capacity field to String type in RPC

commit 4c8166c
Author: Xuejie Xiao <[email protected]>
Date:   Wed Apr 10 02:34:41 2019 +0000

    refactor: Use TryFrom when parsing RPC request data

commit f5a17c1
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:31:43 2019 +0800

    chore(deps): bump serde from 1.0.89 to 1.0.90 (nervosnetwork#432)

    Bumps [serde](https://github.com/serde-rs/serde) from 1.0.89 to 1.0.90.
    - [Release notes](https://github.com/serde-rs/serde/releases)
    - [Commits](serde-rs/serde@v1.0.89...v1.0.90)

    Signed-off-by: dependabot[bot] <[email protected]>

commit 98f97e2
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:23:22 2019 +0800

    chore(deps): bump serde_bytes from 0.10.5 to 0.11.1 (nervosnetwork#433)

    Bumps [serde_bytes](https://github.com/serde-rs/bytes) from 0.10.5 to 0.11.1.
    - [Release notes](https://github.com/serde-rs/bytes/releases)
    - [Commits](serde-rs/bytes@0.10.5...0.11.1)

    Signed-off-by: dependabot[bot] <[email protected]>

commit 378e223
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:21:57 2019 +0800

    chore(deps): bump bincode from 1.1.2 to 1.1.3 (nervosnetwork#430)

    Bumps [bincode](https://github.com/TyOverby/bincode) from 1.1.2 to 1.1.3.
    - [Release notes](https://github.com/TyOverby/bincode/releases)
    - [Commits](bincode-org/bincode@v1.1.2...v1.1.3)

    Signed-off-by: dependabot[bot] <[email protected]>

commit 78a3add
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:20:57 2019 +0800

    chore(deps): bump regex from 1.1.4 to 1.1.5 (nervosnetwork#431)

    Bumps [regex](https://github.com/rust-lang/regex) from 1.1.4 to 1.1.5.
    - [Release notes](https://github.com/rust-lang/regex/releases)
    - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
    - [Commits](rust-lang/regex@1.1.4...1.1.5)

    Signed-off-by: dependabot[bot] <[email protected]>

commit 244c22b
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:20:31 2019 +0800

    chore(deps): bump hyper from 0.12.25 to 0.12.26 (nervosnetwork#429)

    Bumps [hyper](https://github.com/hyperium/hyper) from 0.12.25 to 0.12.26.
    - [Release notes](https://github.com/hyperium/hyper/releases)
    - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
    - [Commits](hyperium/hyper@v0.12.25...v0.12.26)

    Signed-off-by: dependabot[bot] <[email protected]>

commit 6de07fd
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:20:18 2019 +0800

    chore(deps): bump flatbuffers-verifier from 0.1.8 to 0.1.9 (nervosnetwork#428)

    Bumps [flatbuffers-verifier](https://github.com/nervosnetwork/cfb) from 0.1.8 to 0.1.9.
    - [Release notes](https://github.com/nervosnetwork/cfb/releases)
    - [Commits](https://github.com/nervosnetwork/cfb/commits)

    Signed-off-by: dependabot[bot] <[email protected]>

commit f0f11e4
Author: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 10 09:19:50 2019 +0800

    chore(deps): bump criterion from 0.2.10 to 0.2.11 (nervosnetwork#427)

    Bumps [criterion](https://github.com/bheisler/criterion.rs) from 0.2.10 to 0.2.11.
    - [Release notes](https://github.com/bheisler/criterion.rs/releases)
    - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
    - [Commits](bheisler/criterion.rs@0.2.10...0.2.11)

    Signed-off-by: dependabot[bot] <[email protected]>

commit 0590131
Merge: 0974742 ba0f88f
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Tue Apr 9 15:24:22 2019 +0000

    Merge nervosnetwork#404

    404: feat: Update embedded script r=doitian a=xxuejie

    The embedded secp256k1_blake2b_sighash_all script is compiled from https://github.com/nervosnetwork/ckb-system-scripts/blob/384da8adc0564a228f54ae4122adda12d966f9bc/c/secp256k1_blake2b_sighash_all.c

    Co-authored-by: Xuejie Xiao <[email protected]>

commit 0974742
Merge: de3d185 c581ea3
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Tue Apr 9 14:36:47 2019 +0000

    Merge nervosnetwork#422

    422: feat: Remove version from Script r=doitian a=xxuejie

    NOTE: This is a breaking change

    Co-authored-by: Xuejie Xiao <[email protected]>

commit fc7defe
Author: zhangsoledad <[email protected]>
Date:   Thu Apr 4 20:33:33 2019 +0800

    refactor: avoid recursive lock

commit de3d185
Merge: 7797cb3 24831f1
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Tue Apr 9 09:18:35 2019 +0000

    Merge nervosnetwork#418

    418: fix: try to repair a corrupted rocksdb automatically r=quake a=yangby-cryptape

    I have test this patch with a corrupted database (from @TheWaWaR).

    But I can not reproduce the bug by myself, so I did not write any test case.

    The database works, but the data is still corrupted (**because `header` add new fields?**):

    ```
    2019-04-09 07:39:24.154 +00:00 main WARN ckb_db::diskdb  Try repairing the rocksdb since Corruption: SST file is ahead of WALs ...
    2019-04-09 07:39:24.384 +00:00 main WARN ckb_db::diskdb  Try opening the repaired rocksdb ...
    thread 'main' panicked at 'header deserializing should be ok: Custom("invalid length 3, expected a 0x-prefixed hex string with 64 digits")', src/libcore/result.rs:997:5
    stack backtrace:
    ```

    Ref:
    - [RocksDB: Repairer](https://github.com/facebook/rocksdb/wiki/RocksDB-Repairer)
    - [RocksDB: WAL Recovery Modes](https://github.com/facebook/rocksdb/wiki/WAL-Recovery-Modes)
    - [`pub fn set_wal_recovery_mode(&mut self, mode: DBRecoveryMode)`](https://github.com/rust-rocksdb/rust-rocksdb/blob/267d92cbf9fdcbce9052ef06d7cb90b3111c6c54/src/db_options.rs#L1042-L1046)

    Co-authored-by: Boyu Yang <[email protected]>

commit c581ea3
Author: Xuejie Xiao <[email protected]>
Date:   Tue Apr 9 08:28:58 2019 +0000

    feat: Remove version from Script

    NOTE: This is a breaking change

commit 24831f1
Author: Boyu Yang <[email protected]>
Date:   Tue Apr 9 13:52:56 2019 +0800

    fix: try to repair a corrupted rocksdb automatically

commit 7797cb3
Merge: 32be9aa 5cb72d8
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Tue Apr 9 06:54:29 2019 +0000

    Merge nervosnetwork#419

    419: chore: use new constructors to make fixed structs more readable r=zhangsoledad a=yangby-cryptape

    Should I delete this unit test?

    https://github.com/nervosnetwork/ckb/blob/32be9aa704fce9c269b93b247b64e5a87dece575/util/crypto/src/secp/signature.rs#L159-L173

    Co-authored-by: Boyu Yang <[email protected]>

commit 5cb72d8
Author: Boyu Yang <[email protected]>
Date:   Tue Apr 9 11:51:08 2019 +0800

    chore: use new constructors to make fixed structs more readable

commit ba0f88f
Author: Xuejie Xiao <[email protected]>
Date:   Tue Apr 9 04:58:16 2019 +0000

    fix: Fix test

commit 32be9aa
Merge: 2f3914e 3da3e83 2a1b8ef
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Tue Apr 9 01:50:42 2019 +0000

    Merge nervosnetwork#414 nervosnetwork#416

    414: fix: clear tx verfy cache when chain reorg r=doitian a=zhangsoledad

    416: chore: ensure cfbc version r=zhangsoledad a=doitian

    Co-authored-by: zhangsoledad <[email protected]>
    Co-authored-by: ian <[email protected]>

commit 2f3914e
Merge: cbe4a8f 196e8e2
Author: bors[bot] <bors[bot]@users.noreply.github.com>
Date:   Tue Apr 9 00:58:35 2019 +0000

    Merge nervosnetwork#412

    412: chore: add make task to run integration test r=quake a=doitian

    Co-authored-by: ian <[email protected]>

commit 2a1b8ef
Author: ian <[email protected]>
Date:   Mon Apr 8 22:10:34 2019 +0800

    chore: ensure cfbc version

commit 196e8e2
Author: ian <[email protected]>
Date:   Mon Apr 8 19:39:51 2019 +0800

    chore: add make task to run integration test

commit 3da3e83
Author: zhangsoledad <[email protected]>
Date:   Mon Apr 8 19:23:13 2019 +0800

    fix: clear tx verfy cache when chain reorg

commit 053c58b
Author: Xuejie Xiao <[email protected]>
Date:   Mon Apr 8 01:20:06 2019 +0000

    feat: Update embedded script

    The embedded secp256k1_blake2b_sighash_all script is compiled from https://github.com/nervosnetwork/ckb-system-scripts/blob/384da8adc0564a228f54ae4122adda12d966f9bc/c/secp256k1_blake2b_sighash_all.c
  • Loading branch information
zhangsoledad committed Apr 16, 2019
1 parent 860b520 commit c80e5e7
Show file tree
Hide file tree
Showing 15 changed files with 164 additions and 19 deletions.
3 changes: 3 additions & 0 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ impl<CS: ChainStore + 'static> ChainService<CS> {
.map(|x| resolve_transaction(x, &mut seen_inputs, &cell_provider))
.collect();

let cellbase_maturity = { self.shared.consensus().cellbase_maturity() };

match txs_verifier.verify(
chain_state.mut_txs_verify_cache(),
&resolved,
Expand All @@ -478,6 +480,7 @@ impl<CS: ChainStore + 'static> ChainService<CS> {
consensus: self.shared.consensus(),
},
b.header().number(),
cellbase_maturity,
) {
Ok(_) => {
cell_set_diff.push_new(b);
Expand Down
2 changes: 1 addition & 1 deletion chain/src/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ fn test_transaction_spend_in_same_block() {
.chain_state()
.lock()
.get_cell_status(&OutPoint::new(tx2_hash, 0)),
CellStatus::live_output(tx2_output, Some(4))
CellStatus::live_output(tx2_output, Some(4), false)
);
}

Expand Down
2 changes: 1 addition & 1 deletion chain/src/tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) fn start_chain(
) -> (ChainController, Shared<ChainKVStore<MemoryKeyValueDB>>) {
let builder = SharedBuilder::<MemoryKeyValueDB>::new();
let shared = builder
.consensus(consensus.unwrap_or_else(Default::default))
.consensus(consensus.unwrap_or_else(|| Consensus::default().set_cellbase_maturity(0)))
.build();

let notify = NotifyService::default().start::<&str>(None);
Expand Down
17 changes: 15 additions & 2 deletions core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ pub enum LiveCell {
pub struct CellMeta {
pub cell_output: CellOutput,
pub block_number: Option<u64>,
pub cellbase: bool,
}

impl CellMeta {
pub fn is_cellbase(&self) -> bool {
self.cellbase
}

pub fn capacity(&self) -> Capacity {
self.cell_output.capacity
}
Expand All @@ -39,10 +44,15 @@ impl CellStatus {
CellStatus::Live(LiveCell::Null)
}

pub fn live_output(cell_output: CellOutput, block_number: Option<u64>) -> CellStatus {
pub fn live_output(
cell_output: CellOutput,
block_number: Option<u64>,
cellbase: bool,
) -> CellStatus {
CellStatus::Live(LiveCell::Output(CellMeta {
cell_output,
block_number,
cellbase,
}))
}

Expand Down Expand Up @@ -151,7 +161,9 @@ impl<'a> CellProvider for BlockCellProvider<'a> {
.outputs()
.get(out_point.index as usize)
{
Some(x) => CellStatus::live_output(x.clone(), Some(self.block.header().number())),
Some(x) => {
CellStatus::live_output(x.clone(), Some(self.block.header().number()), *i == 0)
}
None => CellStatus::Unknown,
}
} else {
Expand Down Expand Up @@ -284,6 +296,7 @@ mod tests {
lock: Script::default(),
type_: None,
},
cellbase: false,
};

db.cells.insert(p1.clone(), Some(o.clone()));
Expand Down
12 changes: 12 additions & 0 deletions script/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], Script::always_success(), None),
block_number: Some(1),
cellbase: false,
};
let input = CellInput::new(OutPoint::null(), 0, vec![]);

Expand Down Expand Up @@ -272,6 +273,7 @@ mod tests {
let dep_cell = CellMeta {
cell_output: CellOutput::new(buffer.len() as Capacity, buffer, Script::default(), None),
block_number: Some(1),
cellbase: false,
};

let script = Script::new(args, binary_hash);
Expand All @@ -286,6 +288,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], script, None),
block_number: Some(1),
cellbase: false,
};

let rtx = ResolvedTransaction {
Expand Down Expand Up @@ -333,6 +336,7 @@ mod tests {
let dep_cell = CellMeta {
cell_output: CellOutput::new(buffer.len() as Capacity, buffer, Script::default(), None),
block_number: Some(1),
cellbase: false,
};

let script = Script::new(args, binary_hash);
Expand All @@ -347,6 +351,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], script, None),
block_number: Some(1),
cellbase: false,
};

let rtx = ResolvedTransaction {
Expand Down Expand Up @@ -396,6 +401,7 @@ mod tests {
let dep_cell = CellMeta {
cell_output: CellOutput::new(buffer.len() as Capacity, buffer, Script::default(), None),
block_number: Some(1),
cellbase: false,
};

let script = Script::new(args, binary_hash);
Expand All @@ -410,6 +416,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], script, None),
block_number: Some(1),
cellbase: false,
};

let rtx = ResolvedTransaction {
Expand Down Expand Up @@ -466,6 +473,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], script, None),
block_number: Some(1),
cellbase: false,
};

let rtx = ResolvedTransaction {
Expand Down Expand Up @@ -511,6 +519,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], Script::always_success(), None),
block_number: Some(1),
cellbase: false,
};

let script = Script::new(args, (&blake2b_256(&buffer)).into());
Expand All @@ -525,6 +534,7 @@ mod tests {
let dep_cell = CellMeta {
cell_output: CellOutput::new(buffer.len() as Capacity, buffer, Script::default(), None),
block_number: Some(1),
cellbase: false,
};

let transaction = TransactionBuilder::default()
Expand Down Expand Up @@ -578,6 +588,7 @@ mod tests {
let dummy_cell = CellMeta {
cell_output: CellOutput::new(100, vec![], Script::always_success(), None),
block_number: Some(1),
cellbase: false,
};

let script = Script::new(args, (&blake2b_256(&buffer)).into());
Expand All @@ -587,6 +598,7 @@ mod tests {
let dep_cell = CellMeta {
cell_output: CellOutput::new(buffer.len() as Capacity, buffer, Script::default(), None),
block_number: Some(1),
cellbase: false,
};

let transaction = TransactionBuilder::default()
Expand Down
19 changes: 15 additions & 4 deletions shared/src/chain_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,16 @@ impl<CS: ChainStore> ChainState<CS> {
Ok(cycles) => {
// enqueue tx with cycles
let entry = PoolEntry::new(tx, 0, Some(cycles));
tx_pool.enqueue_tx(entry);
if !tx_pool.enqueue_tx(entry) {
return Err(PoolError::Duplicate);
}
Ok(cycles)
}
Err(TransactionError::UnknownInput) => {
let entry = PoolEntry::new(tx, 0, None);
tx_pool.enqueue_tx(entry);
if !tx_pool.enqueue_tx(entry) {
return Err(PoolError::Duplicate);
}
Err(PoolError::InvalidTx(TransactionError::UnknownInput))
}
Err(err) => Err(PoolError::InvalidTx(err)),
Expand All @@ -212,8 +216,13 @@ impl<CS: ChainStore> ChainState<CS> {
match ret {
Some(cycles) => Ok(cycles),
None => {
let cycles =
TransactionVerifier::new(&rtx, &self, self.tip_number()).verify(max_cycles)?;
let cycles = TransactionVerifier::new(
&rtx,
&self,
self.tip_number(),
self.consensus().cellbase_maturity,
)
.verify(max_cycles)?;
// write cache
self.txs_verify_cache.borrow_mut().insert(tx_hash, cycles);
Ok(cycles)
Expand Down Expand Up @@ -426,6 +435,7 @@ impl<CS: ChainStore> CellProvider for ChainState<CS> {
CellStatus::live_output(
tx.outputs()[out_point.index as usize].clone(),
Some(tx_meta.block_number()),
tx_meta.is_cellbase(),
)
}
}
Expand All @@ -448,6 +458,7 @@ impl<'a, CS: ChainStore> CellProvider for ChainCellSetOverlay<'a, CS> {
CellStatus::live_output(
tx.outputs()[out_point.index as usize].clone(),
Some(tx_meta.block_number()),
tx_meta.is_cellbase(),
)
}
}
Expand Down
4 changes: 3 additions & 1 deletion shared/src/tx_pool/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ pub enum PoolError {
TimeOut,
/// BlockNumber is not right
InvalidBlockNumber,
/// Duplicate tx
Duplicate,
}

impl fmt::Display for PoolError {
Expand Down Expand Up @@ -218,7 +220,7 @@ impl CellProvider for StagingPool {
if x.is_some() {
CellStatus::Dead
} else {
CellStatus::live_output(self.get_output(o).expect("output"), None)
CellStatus::live_output(self.get_output(o).expect("output"), None, false)
}
} else if self.edges.get_outer(o).is_some() {
CellStatus::Dead
Expand Down
5 changes: 5 additions & 0 deletions spec/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ impl Consensus {
self
}

pub fn set_cellbase_maturity(mut self, cellbase_maturity: usize) -> Self {
self.cellbase_maturity = cellbase_maturity;
self
}

pub fn genesis_block(&self) -> &Block {
&self.genesis_block
}
Expand Down
3 changes: 2 additions & 1 deletion sync/src/relayer/transaction_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ impl<'a, CS: ChainStore> TransactionProcess<'a, CS> {
}
Err(PoolError::InvalidTx(TransactionError::UnknownInput))
| Err(PoolError::InvalidTx(TransactionError::Conflict))
| Err(PoolError::InvalidTx(TransactionError::Immature)) => {
| Err(PoolError::InvalidTx(TransactionError::Immature))
| Err(PoolError::InvalidTx(TransactionError::CellbaseImmaturity)) => {
// this error may occured when peer's tip is different with us,
// we can't proof peer is bad so just ignore this
debug!(target: "relay", "peer {} relay a conflict or missing input tx: {:?}", self.peer, tx);
Expand Down
4 changes: 3 additions & 1 deletion sync/src/tests/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ fn setup_node(
.timestamp(unix_time_as_millis())
.difficulty(U256::from(1000u64)),
);
let consensus = Consensus::default().set_genesis_block(block.clone());
let consensus = Consensus::default()
.set_genesis_block(block.clone())
.set_cellbase_maturity(0);

let shared = SharedBuilder::<MemoryKeyValueDB>::new()
.consensus(consensus)
Expand Down
6 changes: 3 additions & 3 deletions util/jsonrpc-types/src/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl TryFrom<OutPoint> for CoreOutPoint {
#[derive(Clone, Default, Serialize, Deserialize, PartialEq, Eq, Hash, Debug)]
pub struct CellInput {
pub previous_output: OutPoint,
pub valid_since: u64,
pub valid_since: String,
pub args: Vec<Bytes>,
}

Expand All @@ -123,7 +123,7 @@ impl From<CoreCellInput> for CellInput {
let (previous_output, valid_since, args) = core.destruct();
CellInput {
previous_output: previous_output.into(),
valid_since,
valid_since: valid_since.to_string(),
args: args.into_iter().map(Bytes::new).collect(),
}
}
Expand All @@ -140,7 +140,7 @@ impl TryFrom<CellInput> for CoreCellInput {
} = json;
Ok(CoreCellInput::new(
previous_output.try_into()?,
valid_since,
valid_since.parse::<u64>()?,
args.into_iter().map(Bytes::into_vec).collect(),
))
}
Expand Down
14 changes: 10 additions & 4 deletions verification/src/block_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ impl TransactionsVerifier {
block_reward: Capacity,
block_median_time_context: M,
tip_number: BlockNumber,
cellbase_maturity: usize,
) -> Result<(), Error>
where
M: BlockMedianTimeContext + Sync,
Expand All @@ -377,10 +378,15 @@ impl TransactionsVerifier {
.map_err(|e| Error::Transactions((index, e)))
.map(|_| (None, *cycles))
} else {
TransactionVerifier::new(&tx, &block_median_time_context, tip_number)
.verify(self.max_cycles)
.map_err(|e| Error::Transactions((index, e)))
.map(|cycles| (Some(tx.transaction.hash()), cycles))
TransactionVerifier::new(
&tx,
&block_median_time_context,
tip_number,
cellbase_maturity,
)
.verify(self.max_cycles)
.map_err(|e| Error::Transactions((index, e)))
.map(|cycles| (Some(tx.transaction.hash()), cycles))
}
})
.collect::<Result<Vec<_>, _>>()?;
Expand Down
1 change: 1 addition & 0 deletions verification/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@ pub enum TransactionError {
Immature,
/// Invalid ValidSince flags
InvalidValidSince,
CellbaseImmaturity,
}
Loading

0 comments on commit c80e5e7

Please sign in to comment.