Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #2

Open
wants to merge 160 commits into
base: develop
Choose a base branch
from
Open

test #2

wants to merge 160 commits into from

Conversation

ybian19
Copy link
Owner

@ybian19 ybian19 commented Oct 30, 2020

No description provided.

quake and others added 30 commits August 29, 2020 16:04
2248:  feat: add verbosity param to chain related rpc r=quake a=quake

This PR adds an optional `verbosity ` param to chain related rpc, returns data in hex format without calculated hash values, it will improve performance in some scenarios, ~~for example, ckb-indexer can scan 2,000,000 blocks in 13 minutes with this change (before: 20 minutes)~~ **This benchmark is not correct, I will rerun it and update**

=== updated ckb-indexer benchmark result ===
scan 2,000,000 blocks, run 3 times, avg:
before: 17 minutes 40 seconds
after: 12 minutes 30 seconds


=== response example ===
hex format: 
```
echo '{                                                                                     
    "id": 2,     
    "jsonrpc": "2.0",
    "method": "get_tip_header",
    "params": ["0x1"]
}' \
| tr -d '\n' \
| curl -H 'content-type: application/json' -d @- \
http://localhost:8114

{"jsonrpc":"2.0","result":"0x000000002872ae19e93f872d7401000027c92700000000009e06003d02080700903e152458ff060ddf290e2b876d94211be8982f4b10ba63b9b017abb587bb75f59cd510ec3e3e13ff331a41d954f3ed9b9980cdcea5c88b5e7bf6fcfcd2bc2c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ed103b7d5f09434388f10dcba93240032b96b8ee42e3a01001579760524020700043bd6280000002b99f9d300010000","id":2}
```

v.s

json format
```
echo '{
    "id": 2,
    "jsonrpc": "2.0",
    "method": "get_tip_header",
    "params": []    
}' \
| tr -d '\n' \
| curl -H 'content-type: application/json' -d @- \
http://localhost:8114
{"jsonrpc":"2.0","result":{"compact_target":"0x19ae7228","dao":"0x5ed103b7d5f09434388f10dcba93240032b96b8ee42e3a010015797605240207","epoch":"0x708023d00069e","hash":"0x50f0a70e5fdbce353a46f018c1a6f1dd15cb7470fff8ebcb2b7b418cd1a5faab","nonce":"0x100d3f9992b00000028d63b0400","number":"0x27c927","parent_hash":"0x903e152458ff060ddf290e2b876d94211be8982f4b10ba63b9b017abb587bb75","proposals_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","timestamp":"0x1742d873fe9","transactions_root":"0xf59cd510ec3e3e13ff331a41d954f3ed9b9980cdcea5c88b5e7bf6fcfcd2bc2c","uncles_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","version":"0x0"},"id":2}
```

Co-authored-by: quake <quake.wang@gmail.com>
2251: feat: deprecated rpc method by adding `deprecated.` prefix to the rpc name r=doitian,zhangsoledad,yangby-cryptape a=quake

resolve nervosnetwork#2247, rpc method can be deprecated by adding `deprecated.` prefix to the rpc name:
```diff
+    #[rpc(name = "deprecated.get_cells_by_lock_hash")]
-    #[rpc(name = "get_cells_by_lock_hash")]
    fn get_cells_by_lock_hash
```

Co-authored-by: quake <quake.wang@gmail.com>
2266: fix: use forked metrics and forked sentry to fix RUSTSEC-2020-0041 temporarily r=yangby-cryptape a=yangby-cryptape

### Commits

- [chore(deps): bump crossbeam-channel from 0.4.3 to 0.4.4](nervosnetwork@728f5c3)
- [chore: remove direct dependencies of metrics exporters and observers](nervosnetwork@de3173a)
- [chore(deps): bump sentry from 0.16.0 to 0.17.0](nervosnetwork@1453b1a)
- [fix: use patched versions of metrics and sentry to fix RUSTSEC-2020-0041 temporarily](nervosnetwork@6aaae31)
  - [Changes of forked `metrics`](nervosnetwork/metrics-rs@4fd13f6)
  - [Changes of forked `sentry`](nervosnetwork/sentry-rust@0e964f5)

### References

- [RUSTSEC-2020-0041](../../../../rustsec/advisory-db/pull/381)

Co-authored-by: Boyu Yang <yangby@cryptape.com>
2236: refactor: rewrite discovery r=TheWaWaR,doitian a=driftluo

1. Discovery remove `Both` registration
2. Rewrite discovery protocol, the original implementation is too complicated and difficult to read, and there is a lot of unnecessary consumption
3. Use bloom filter to filter known address

Later, I will write these implementations back into Tentacle to avoid these problems with reference implementations

Co-authored-by: driftluo <driftluo@foxmail.com>
2274: chore: amend a log message which could cause users to be panic r=doitian,TheWaWaR a=yangby-cryptape

For example, the 8~10 lines of the log file for our all integration tests at present are:

> Failed to open AddrManager db, file: "XXX/addr_manager.db", error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
> Failed to open BanList db, file: "XXX/ban_list.db", error: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
> receiving shutdown signal ...

I think it's a bit confusing and scary.

Co-authored-by: Boyu Yang <yangby@cryptape.com>
2258: chore: integration test - log case name before start executing r=doitian,keroro520 a=chuijiaolianying



Co-authored-by: chuijiaolianying <chuijiaolianying@gmail.com>
doitian and others added 7 commits October 29, 2020 21:27
2336: docs(rpc): upgrade rpc.py r=quake,yangby-cryptape a=doitian

* Update the script to work with new added `<a>` tags in the generated HTML files.
* Fix missing spaces
* Fix links to types
* add missing doc of PoolTransactionEntry

Co-authored-by: ian <ian@nervos.org>
2337: chore: bump syn, quote and proc-macro2 from 0.x to 1.0.x r=yangby-cryptape a=yangby-cryptape



Co-authored-by: Boyu Yang <yangby@cryptape.com>
…to-package-ckb

chore(ci): Use draft release to package CKB
* docs: deny missing docs

* docs: add missing docs for fixed-hash-related crates

* docs: add missing docs for logger-related crates

* docs: add missing docs for memory-tracker crate

* docs: add missing docs for metrics-related crates

* ci: fix two ci checks

* docs: add missing docs for types crate

* docs: fix an incorrect description and two typos according to review comments

* docs: add missing docs for ckb-resource

* Update resource/src/template.rs

Co-authored-by: Boyu Yang <yangby@cryptape.com>

* docs: add todo for missing docs

Co-authored-by: Boyu Yang <yangby@cryptape.com>
@ybian19 ybian19 closed this Oct 30, 2020
@ybian19 ybian19 reopened this Oct 30, 2020
@ybian19
Copy link
Owner Author

ybian19 commented Oct 30, 2020

sync-test

@ybian19
Copy link
Owner Author

ybian19 commented Oct 30, 2020

result: 400block/s

@ybian19
Copy link
Owner Author

ybian19 commented Oct 30, 2020

sync-test

@ybian19
Copy link
Owner Author

ybian19 commented Oct 30, 2020

Sync Test Result

  • Sync Speed: 400 block/s

@ybian19
Copy link
Owner Author

ybian19 commented Oct 31, 2020

sync-test

@nervos-bot-user
Copy link

Sync Test Result

  • Sync Speed: 436 block/s

@ybian19
Copy link
Owner Author

ybian19 commented Oct 31, 2020

sync-test

@nervos-bot-user
Copy link

Sync Test Result

  • Sync Speed: 407 block/s

@ybian19
Copy link
Owner Author

ybian19 commented Nov 5, 2020

benchmark

@ybian19
Copy link
Owner Author

ybian19 commented Nov 5, 2020

Benchmark Result

  • TPS: 498
  • CKB Version: ee0ccec
  • Instance Type: c5.xlarge
  • Instances Count: 3
  • Bench Type: In2Out2
  • CKB Logger Filter: info,ckb=debug

@ybian19
Copy link
Owner Author

ybian19 commented Nov 6, 2020

benchmark

@ybian19
Copy link
Owner Author

ybian19 commented Nov 6, 2020

sync-test

@ybian19
Copy link
Owner Author

ybian19 commented Nov 6, 2020

Benchmark Result

  • TPS: 494
  • CKB Version: ee0ccec
  • Instance Type: c5.xlarge
  • Instances Count: 3
  • Bench Type: In2Out2
  • CKB Logger Filter: info,ckb=debug

@ybian19
Copy link
Owner Author

ybian19 commented Jan 16, 2021

sync-test

Repository owner deleted a comment from nervos-bot-user Jan 16, 2021
@ybian19
Copy link
Owner Author

ybian19 commented Jan 16, 2021

Benchmark Result

  • CKB Version: ee0ccec
  • Instance Region: ap-southeast-1
  • Sync Start: 2021-01-16 04:01:22
  • Sync End: 2021-01-16 10:56:19
  • Sync Height: 3441010
  • Sync Speed: 138 blocks/s

@ybian19
Copy link
Owner Author

ybian19 commented Jan 16, 2021

sync-test

@ybian19
Copy link
Owner Author

ybian19 commented Jan 16, 2021

Sync Test Result

  • CKB Version: ee0ccec
  • Instance Region: ap-southeast-1
  • Sync Start: 2021-01-16 11:23:00
  • Sync End: 2021-01-16 16:17:17
  • Sync Height: 3672200
  • Sync Speed: 207 blocks/s

@ybian19
Copy link
Owner Author

ybian19 commented Jan 19, 2021

benchmark

@ybian19
Copy link
Owner Author

ybian19 commented Jan 19, 2021

Benchmark Result

  • TPS: 492
  • CKB Version: ee0ccec
  • Instance Type: c5.xlarge
  • Instances Count: 3
  • Bench Type: In2Out2
  • CKB Logger Filter: info,ckb=debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants