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

NFT gallery #2771

Merged
merged 7 commits into from
Aug 9, 2021
Merged

NFT gallery #2771

merged 7 commits into from
Aug 9, 2021

Conversation

jolestar
Copy link
Member

@jolestar jolestar commented Aug 6, 2021

  1. 重构了 Gallery 的实现,不再依赖 Collection2,感觉 Collection2 很难有通用的设计方法。返回 NFTInfo 的 vector,用于遍历用户的 Gallery。
  2. 将 NFT.uid 重命名为 NFT.id ,更直接一些。uid 容易有歧义。
  3. withdraw_one 返回 NFT 而不是 Option
  4. 支持 get_nft_info_by_idx

@codecov
Copy link

codecov bot commented Aug 6, 2021

Codecov Report

Merging #2771 (0646210) into master (b61f992) will increase coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2771      +/-   ##
==========================================
+ Coverage   31.80%   31.89%   +0.10%     
==========================================
  Files         508      508              
  Lines       44778    44778              
  Branches    19929    19929              
==========================================
+ Hits        14236    14278      +42     
+ Misses      16643    16607      -36     
+ Partials    13899    13893       -6     
Flag Coverage Δ
unittests 31.89% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
chain/api/src/errors.rs 34.79% <0.00%> (-4.34%) ⬇️
sync/src/block_connector/test_illegal_block.rs 10.43% <0.00%> (-1.88%) ⬇️
chain/src/verifier/mod.rs 29.32% <0.00%> (ø)
sync/src/tasks/block_sync_task.rs 40.35% <0.00%> (ø)
executor/src/script_function_test.rs 11.63% <0.00%> (ø)
sync/src/block_connector/test_write_block_chain.rs 23.37% <0.00%> (ø)
sync/src/sync.rs 27.53% <0.00%> (+0.31%) ⬆️
types/src/block.rs 54.76% <0.00%> (+0.33%) ⬆️
vm/vm-runtime/src/starcoin_vm.rs 29.71% <0.00%> (+0.42%) ⬆️
commons/service-registry/src/service_actor.rs 41.94% <0.00%> (+3.23%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b61f992...0646210. Read the comment docs.

@sanlee42 sanlee42 closed this Aug 9, 2021
@sanlee42 sanlee42 reopened this Aug 9, 2021
@jolestar jolestar requested review from wh-antares and removed request for ssyuan August 9, 2021 04:13
@github-actions
Copy link

github-actions bot commented Aug 9, 2021

Benchmark for fd2592c

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.2±0.14ms 2.2±0.13ms 0.00%
block_apply/block_apply_10 428.3±5.65ms 425.6±5.26ms +0.63%
block_apply/block_apply_1000 43.9±0.46s 43.8±0.25s +0.23%
get_with_proof/db_store 38.8±0.40µs 38.6±0.52µs +0.52%
get_with_proof/mem_store 32.1±0.36µs 31.7±0.24µs +1.26%
put_and_commit/db_store/1 1258.0±63.28µs 1274.0±111.22µs -1.26%
put_and_commit/db_store/10 2.4±0.30ms 2.4±0.30ms 0.00%
put_and_commit/db_store/100 9.7±0.95ms 9.6±0.58ms +1.04%
put_and_commit/db_store/5 1959.8±146.59µs 1897.9±179.84µs +3.26%
put_and_commit/db_store/50 5.9±0.86ms 5.7±0.60ms +3.51%
put_and_commit/mem_store/1 63.2±5.60µs 63.0±5.61µs +0.32%
put_and_commit/mem_store/10 586.1±46.39µs 590.3±48.29µs -0.71%
put_and_commit/mem_store/100 5.8±0.86ms 5.7±0.81ms +1.75%
put_and_commit/mem_store/5 297.5±24.47µs 295.5±23.93µs +0.68%
put_and_commit/mem_store/50 2.9±0.19ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 3.4±0.05ms 3.4±0.09ms 0.00%
query_block/query_block_in(10)_times(1000) 33.6±0.68ms 33.3±0.66ms +0.90%
query_block/query_block_in(10)_times(10000) 335.1±6.39ms 333.0±6.45ms +0.63%
query_block/query_block_in(1000)_times(100) 930.9±5.42µs 922.0±5.09µs +0.97%
query_block/query_block_in(1000)_times(1000) 9.2±0.06ms 9.2±0.05ms 0.00%
query_block/query_block_in(1000)_times(10000) 94.0±0.64ms 91.6±0.37ms +2.62%
storage_transaction 49.8±4.16ms 47.7±4.42ms +4.40%
vm/transaction_execution/1 342.5±0.59ms 344.4±1.30ms -0.55%
vm/transaction_execution/10 117.2±0.33ms 118.0±1.59ms -0.68%
vm/transaction_execution/20 110.1±0.82ms 110.4±0.31ms -0.27%
vm/transaction_execution/5 140.5±1.31ms 140.5±0.32ms 0.00%
vm/transaction_execution/50 124.6±0.33ms 124.9±0.73ms -0.24%

@jolestar jolestar merged commit 378db78 into master Aug 9, 2021
@jolestar jolestar deleted the nft_gallery branch August 9, 2021 05:10
@jolestar jolestar mentioned this pull request Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants