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: fix coverage test #183

Merged
merged 9 commits into from Jan 25, 2021
Merged

Conversation

cryptowen
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Jan 25, 2021

Codecov Report

Merging #183 (216139e) into main (5b900f5) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   32.82%   32.82%           
=======================================
  Files          33       33           
  Lines        5072     5072           
=======================================
  Hits         1665     1665           
  Misses       3407     3407           
Impacted Files Coverage Δ
ckb-contracts/tests/src/lib.rs 0.00% <ø> (ø)

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 5b900f5...216139e. Read the comment docs.

@cryptowen cryptowen merged commit 81e1f6d into nervosnetwork:main Jan 25, 2021
nolanxyg added a commit that referenced this pull request Mar 12, 2021
* modify bridge default capacity

* fix(off-chain): update the way of find eth cell (#136)

* feat(off-chain): add relay monitor

* feat(off-chain): add light client conservator

* feat(off-chain): remove telegram bot token

* feat(off-chain): update relay monitor with conservator list

* style(off-chain): add block in new line

* feat(off-chain): send all info once time

* style(off-chain): remove monitor in script

* style(off-chain): change find light cell way

* fix(off-chain): add light client and chain height difference

* fix(off-chain): update get live eth cell way

* fix: force server (#134)

* fix: db locked error by increasing timeout

* add optional param for test

* change thread num

* fix retry

* fix: deploy eth contracts out of gas

* fix clippy

* fix(deploy scripts): deploy.js bug while using custom wallet, this is a bug of hardhat framework

Co-authored-by: Ethan Hu <cosinlink@163.com>

* fix(ckb-contracts): add unit test (#106)

* fix(ckb-contracts): add ut

* fix(ckb-contracts): add ut for bridge typescript

* fix(ckb-contracts): new mock tests

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): bridge typescript tests

* fix(ckb-contracts): add light client tests

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): add recipient tests

* fix(ckb-contracts): fix test

* fix(ckb-contracts): fulfill recipient testcases

* fix(ckb-contracts): bridge test

* feat(ckb-contracts): add simple bridge typescript  (#141)

* feat(ckb-contracts): add simple bridge typescript

* fix(ckb-contracts): fix bug to rename to simple-bridge

* feat(offchain): add simple bridge typescript

* fix clippy

* fix(demo): fix command line

* fix(ckb-contracts): add debug

* feat: add arg to force create new bridge cell (#148)

* feat: return need capacity amount in not enough error (#149)

* chore: add `git submodule update --init` for local-ci (#152)

* fix(ckb-contracts): add history merkle root for ckb contracts (#145)

* fix(ckb-contracts): add history merkle root for ckb contracts

* fix(ckb-contracts): update types to make bridge lock only verify merkle proof

* fix(ckb-contracts): smt tests

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): comment bridge tests

* fix(ckb-contracts): define local Hasher to avoid inporting private repo

* fix(offchain): add SMT.store rocksdb impl

* fix(ckb-contracts): use header.number and header.hash to verify smt tree

* fix(offchain): use history merkle toor to update eth light client & execute mint

* fix(offchain): modify monitor and server

* fix(offchain): add cache to rocksdb

* fix(offchain): add readonlydb and pre merkle proof check

* feat: optimize mint witness (#160)

* feat: optimize mint witness

* add doc

* chore: small refact for recipient typescript

* remove test for temp, get it back when fixed the test

* fix(ckb-contracts): fix testcase (#161)

* fix(ckb-contracts): new bridge capsule tests (#165)

* fix(ckb-contracts): new bridge capsule tests

* fix(ckb-contracts): fix testcase format

* feat(eth-contracts): add openzeppelin upgradeable contract demo and test (#140)

* feat(eth-contracts): add openzeppelin upgradeable contract demo and test

* feat(eth-contracts): add openzeppelin upgradeable CKBChainV2 and TokenLocker, tests of them

* feat(eth-contracts): add deploy-openzeppelin.js for openzeppelin upgradeable contracts

* feat(eth-contracts): remove unused code

* feat(eth-contracts): remove unused script

* fix: ci error, add --network option

* test: fix ci error

* test: fix ci error2

* feat: add new deploy.js and deploy-erc20.js for openzeppelin upgradeable contracts

* fix: ci error

* fix: add retry times to deploy.js to fix deploy proxy error

* chore: modify start-geth to restart-geth

* feat(eth-contracts/test/utils): add retryPromise, getMockTinyHeaderParam for openzeppelin upgradeable contracts

* feat: add new deploy.js and setSpecificTinyHeader.js

* feat: modify setSpecificTinyHeader

* feat: add upgrade.js script

* lint: fix

* fix: test error

* fix: ci error

* fix: ci error on hardhat config

* fix: ci error on hardhat config

* fix: ci accounts error on hardhat config

* fix: add deploy ci error info

* lint: fix

* fix: delete unused contracts to fix local-ci problem

* fix: delete unused contracts to fix local-ci problem

* fix: modify old contract name to fix name conflict problem in openzeppelin validate check

* chore: modify test contract to test folder

* chore: modify test contract name to avoid contract name conflict

* feat(eth-contracts): fix todo, replace IERC2O.transfer with safeTransfer, fix blockNumber + numConfirmations overflow in CKBChain,

* fix: remove delegateCall in Address.sol, because openzeppelin upgrades doesn't support it

* doc: step by step guide (#170)

* doc: step by step guide

* add toc

* doc: update step by step guide (#180)

* test: fix coverage test (#183)

* add coverate test in makefile

* fix eth coverate test

* update github workflow config

* fix config problem

* fix ci

* fix ci

* fix ci

* fix ci

* move coverage test to seprate file

* fix(ckb-contracts): add ckb contracts tests (#191)

* fix(ckb-contracts): add simple bridge typescript tests

* fix(ckb-contracts): refactor eth recipient typescript tests

* fix(ckb-contracts): add tests for eth bridge lockscript

* fix(ckb-contracts): add eth bridge lock manage test

* improve indexer code

* feat: add coverage on openzeppelin upgradeable contracts (#193)

* fix: Increase eth indexer and ckb indexer state dependency

* feat: optimize indexer sql struct

* fix: add bridge typescript code hash verify in handle mint tx

* doc: update step-by-step guide (#196)

* Update offchain-modules/lib/src/dapp/db/source/indexer.sql

Co-authored-by: mkxbl <33241113+mkxbl@users.noreply.github.com>

* add sedner_addr index

* Update offchain-modules/lib/src/dapp/db/source/indexer.sql

Co-authored-by: mkxbl <33241113+mkxbl@users.noreply.github.com>

* fix: github-ci fix

* fix: github-ci fix

* fix(eth-contracts): fix test ci error (#199)

* test ci

* fix: ci test error

* minor change

* minor change

* minor change

* chore(ckb-contracts): upgrade dependency version (#200)

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* Update ckb-contracts.yml

* Update ckb-contracts.yml

* fix(ckb-contracts): upgrade dependency version

* fix(ckb-contracts): remove test dir from Cargo.toml

* fix(ckb-contracts): fix audit in ci

* fix(ckb-contracts): fix ci

* fix(ckb-contracts): fix ci

* fix(ckb-contracts): modify test

* fix(ckb-contracts): anyone can create simple typescript (#201)

* fix(ckb-contracts): anyone can create simple typescript

* fix(ckb-contracts): fix clippy

* chore: make a test

* minor change

* minor change

* add pm2

* test ci

* minor change

* minor change

* fix: update makefile

* update crosschain.sh

* minor change

* fix: remove force_create param

* minor change

* rm rocksdb

* fix: bugfix when parse light client cell data

* fix clippy

* chore: update ckb contracts deps (#206)

* chore: update ckb contracts deps

* update cfg-if

* fix: ckb contracts ci

* fix: ckb contracts ci

* fix(off-chain): solve possible problems caused by uncle block

* add some necessary logs

* feat: add token locker contract verify in burn tx

* feat: add CkbHistoryTxRootProof (#197)

* feat(eth-contracts): add CkbHistoryTxRoot decode

* feat(eth-contracts): start to dev CKBChainV3

* feat(eth-contracts): finish proveTxRootExist

* chore: add todo comment

* chore: remove unused code

* lint: fix

* fix: ci error

* feat: add ViewHistoryTxRoot decode tests

* test: add CKBChainV3 proveTxRootExist tests

* feat: add AddHistoryTxRoot event

* change contract and deploy

* feat(eth-contracts): finish unlockToken

* feat(eth-contracts): add initBlockNumber, latestBlockNumber check in txRootProof

* finish relay ckb header

* feat(eth-contracts): add new history tx root proof decode

* finish unlock with wrong proof

* finish unlock proof maker

* format

* chore: debug info and err handler

* fix: unlock wait until tx is confirmed

* feat(eth-contracts): finish unlockToken and proveTxRootExist by new proof

* chore: modify var name

* fix: fix _proveTxExist returns bug

* chore: optimize CKBChainV3 code

* feat: add _getTargetTxRoot to get leafMerkleIndex

* chore: add txRoot exist check

* feat: add more decode test

* test: add tokenLocker tests

* test: add tokenLocker more tests

* chore: remove unused tests and contract

* lint: fix

* test: modify tests

* fix: clippy error

* feat: modify CKBChainV3 to CKBChain, TokenLockerV2 to TokenLocker

* test: add more proveTxRootExist test

* test: add more proveTxExist test

* test: add more blake2b tests, upgrade hardhat to latest

* chore: remove unused code

* fix: recover deleted code

* fix: ci error

* test: fix test error

* test: remove unused test

* chore: remove unused getLatestBlockNumber

* chore: upgrade solc

* chore: add more comment to explain merkleIndex in historyTxRoot merkle tree

Co-authored-by: huwenchao <me@huwenchao.com>

* chore: update doc, docker for ckb history merkle root (#212)

* chore: update doc, docker for ckb history merkle root

* doc: update ref to audit-v1.2

* code clean

* fix(offchain): optimize eth header relay (#213)

* fix(offchain): optimize eth->ckb

* fix(offchain): fix unwrap to err

* fix generate ckb proof info in ckb relayer

* Update dapp-lib to adapt ckb_merkle_proof

* code clean

* fix(offchain): optimize ckb->eth (#215)

* fix(eth-contracts): add rinkeby testnet

* fix(offchain): fix gas_price and gas_limit

* fix(offchain): refactor ckb-relay

* fix(offchain): store tx root by rocksdb

* fix(offchain): ckb-relay and eth-relay use different rocksdb

* fix(offchain): unlock tx use rocksdb

* fix(offchain): break when block has burn tx

* fix(offchain): use readonly db when unlock

* fix(offchain): fix ckb relay delay

* fix(offchain): check latest_block_number after get proof

* feat: merge from main

* minor change

* test github ci

* refactor(off-chain): only relay confirmed blocks (#217)

* fix(offchain): only relay confirmed blocks

* fix(ckb-contracts): fix tests

* fix(ckb-contracts): fix tests

* fix(ci): fix ci bug

* test github ci

* fix github ci

* use pm2 to start services

* test github ci

* test github ci

* test github ci

* test github ci

* test github ci

* github ci test

* github ci test

* github ci test

* github ci test

* github ci test

* merge main to dapp-lib

Co-authored-by: 方平 <fpchen@outlook.com>
Co-authored-by: Wenchao Hu <huwenchao@cryptape.com>
Co-authored-by: Ethan Hu <cosinlink@163.com>
Co-authored-by: JacobDenver007 <29848184+JacobDenver007@users.noreply.github.com>
Co-authored-by: mkxbl <33241113+mkxbl@users.noreply.github.com>
Co-authored-by: huwenchao <me@huwenchao.com>
nolanxyg added a commit that referenced this pull request Mar 15, 2021
* modify bridge default capacity

* fix(off-chain): update the way of find eth cell (#136)

* feat(off-chain): add relay monitor

* feat(off-chain): add light client conservator

* feat(off-chain): remove telegram bot token

* feat(off-chain): update relay monitor with conservator list

* style(off-chain): add block in new line

* feat(off-chain): send all info once time

* style(off-chain): remove monitor in script

* style(off-chain): change find light cell way

* fix(off-chain): add light client and chain height difference

* fix(off-chain): update get live eth cell way

* fix: force server (#134)

* fix: db locked error by increasing timeout

* add optional param for test

* change thread num

* fix retry

* fix: deploy eth contracts out of gas

* fix clippy

* fix(deploy scripts): deploy.js bug while using custom wallet, this is a bug of hardhat framework

Co-authored-by: Ethan Hu <cosinlink@163.com>

* fix(ckb-contracts): add unit test (#106)

* fix(ckb-contracts): add ut

* fix(ckb-contracts): add ut for bridge typescript

* fix(ckb-contracts): new mock tests

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): bridge typescript tests

* fix(ckb-contracts): add light client tests

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): add recipient tests

* fix(ckb-contracts): fix test

* fix(ckb-contracts): fulfill recipient testcases

* fix(ckb-contracts): bridge test

* feat(ckb-contracts): add simple bridge typescript  (#141)

* feat(ckb-contracts): add simple bridge typescript

* fix(ckb-contracts): fix bug to rename to simple-bridge

* feat(offchain): add simple bridge typescript

* fix clippy

* fix(demo): fix command line

* fix(ckb-contracts): add debug

* feat: add arg to force create new bridge cell (#148)

* feat: return need capacity amount in not enough error (#149)

* chore: add `git submodule update --init` for local-ci (#152)

* fix(ckb-contracts): add history merkle root for ckb contracts (#145)

* fix(ckb-contracts): add history merkle root for ckb contracts

* fix(ckb-contracts): update types to make bridge lock only verify merkle proof

* fix(ckb-contracts): smt tests

* fix(ckb-contracts): fix clippy

* fix(ckb-contracts): comment bridge tests

* fix(ckb-contracts): define local Hasher to avoid inporting private repo

* fix(offchain): add SMT.store rocksdb impl

* fix(ckb-contracts): use header.number and header.hash to verify smt tree

* fix(offchain): use history merkle toor to update eth light client & execute mint

* fix(offchain): modify monitor and server

* fix(offchain): add cache to rocksdb

* fix(offchain): add readonlydb and pre merkle proof check

* feat: optimize mint witness (#160)

* feat: optimize mint witness

* add doc

* chore: small refact for recipient typescript

* remove test for temp, get it back when fixed the test

* fix(ckb-contracts): fix testcase (#161)

* fix(ckb-contracts): new bridge capsule tests (#165)

* fix(ckb-contracts): new bridge capsule tests

* fix(ckb-contracts): fix testcase format

* feat(eth-contracts): add openzeppelin upgradeable contract demo and test (#140)

* feat(eth-contracts): add openzeppelin upgradeable contract demo and test

* feat(eth-contracts): add openzeppelin upgradeable CKBChainV2 and TokenLocker, tests of them

* feat(eth-contracts): add deploy-openzeppelin.js for openzeppelin upgradeable contracts

* feat(eth-contracts): remove unused code

* feat(eth-contracts): remove unused script

* fix: ci error, add --network option

* test: fix ci error

* test: fix ci error2

* feat: add new deploy.js and deploy-erc20.js for openzeppelin upgradeable contracts

* fix: ci error

* fix: add retry times to deploy.js to fix deploy proxy error

* chore: modify start-geth to restart-geth

* feat(eth-contracts/test/utils): add retryPromise, getMockTinyHeaderParam for openzeppelin upgradeable contracts

* feat: add new deploy.js and setSpecificTinyHeader.js

* feat: modify setSpecificTinyHeader

* feat: add upgrade.js script

* lint: fix

* fix: test error

* fix: ci error

* fix: ci error on hardhat config

* fix: ci error on hardhat config

* fix: ci accounts error on hardhat config

* fix: add deploy ci error info

* lint: fix

* fix: delete unused contracts to fix local-ci problem

* fix: delete unused contracts to fix local-ci problem

* fix: modify old contract name to fix name conflict problem in openzeppelin validate check

* chore: modify test contract to test folder

* chore: modify test contract name to avoid contract name conflict

* feat(eth-contracts): fix todo, replace IERC2O.transfer with safeTransfer, fix blockNumber + numConfirmations overflow in CKBChain,

* fix: remove delegateCall in Address.sol, because openzeppelin upgrades doesn't support it

* doc: step by step guide (#170)

* doc: step by step guide

* add toc

* doc: update step by step guide (#180)

* test: fix coverage test (#183)

* add coverate test in makefile

* fix eth coverate test

* update github workflow config

* fix config problem

* fix ci

* fix ci

* fix ci

* fix ci

* move coverage test to seprate file

* fix(ckb-contracts): add ckb contracts tests (#191)

* fix(ckb-contracts): add simple bridge typescript tests

* fix(ckb-contracts): refactor eth recipient typescript tests

* fix(ckb-contracts): add tests for eth bridge lockscript

* fix(ckb-contracts): add eth bridge lock manage test

* improve indexer code

* feat: add coverage on openzeppelin upgradeable contracts (#193)

* fix: Increase eth indexer and ckb indexer state dependency

* feat: optimize indexer sql struct

* fix: add bridge typescript code hash verify in handle mint tx

* doc: update step-by-step guide (#196)

* Update offchain-modules/lib/src/dapp/db/source/indexer.sql

Co-authored-by: mkxbl <33241113+mkxbl@users.noreply.github.com>

* add sedner_addr index

* Update offchain-modules/lib/src/dapp/db/source/indexer.sql

Co-authored-by: mkxbl <33241113+mkxbl@users.noreply.github.com>

* fix: github-ci fix

* fix: github-ci fix

* fix(eth-contracts): fix test ci error (#199)

* test ci

* fix: ci test error

* minor change

* minor change

* minor change

* chore(ckb-contracts): upgrade dependency version (#200)

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* fix(ci): add audit in ci

* Update ckb-contracts.yml

* Update ckb-contracts.yml

* fix(ckb-contracts): upgrade dependency version

* fix(ckb-contracts): remove test dir from Cargo.toml

* fix(ckb-contracts): fix audit in ci

* fix(ckb-contracts): fix ci

* fix(ckb-contracts): fix ci

* fix(ckb-contracts): modify test

* fix(ckb-contracts): anyone can create simple typescript (#201)

* fix(ckb-contracts): anyone can create simple typescript

* fix(ckb-contracts): fix clippy

* chore: make a test

* minor change

* minor change

* add pm2

* test ci

* minor change

* minor change

* fix: update makefile

* update crosschain.sh

* minor change

* fix: remove force_create param

* minor change

* rm rocksdb

* fix: bugfix when parse light client cell data

* fix clippy

* chore: update ckb contracts deps (#206)

* chore: update ckb contracts deps

* update cfg-if

* fix: ckb contracts ci

* fix: ckb contracts ci

* fix(off-chain): solve possible problems caused by uncle block

* add some necessary logs

* feat: add token locker contract verify in burn tx

* feat: add CkbHistoryTxRootProof (#197)

* feat(eth-contracts): add CkbHistoryTxRoot decode

* feat(eth-contracts): start to dev CKBChainV3

* feat(eth-contracts): finish proveTxRootExist

* chore: add todo comment

* chore: remove unused code

* lint: fix

* fix: ci error

* feat: add ViewHistoryTxRoot decode tests

* test: add CKBChainV3 proveTxRootExist tests

* feat: add AddHistoryTxRoot event

* change contract and deploy

* feat(eth-contracts): finish unlockToken

* feat(eth-contracts): add initBlockNumber, latestBlockNumber check in txRootProof

* finish relay ckb header

* feat(eth-contracts): add new history tx root proof decode

* finish unlock with wrong proof

* finish unlock proof maker

* format

* chore: debug info and err handler

* fix: unlock wait until tx is confirmed

* feat(eth-contracts): finish unlockToken and proveTxRootExist by new proof

* chore: modify var name

* fix: fix _proveTxExist returns bug

* chore: optimize CKBChainV3 code

* feat: add _getTargetTxRoot to get leafMerkleIndex

* chore: add txRoot exist check

* feat: add more decode test

* test: add tokenLocker tests

* test: add tokenLocker more tests

* chore: remove unused tests and contract

* lint: fix

* test: modify tests

* fix: clippy error

* feat: modify CKBChainV3 to CKBChain, TokenLockerV2 to TokenLocker

* test: add more proveTxRootExist test

* test: add more proveTxExist test

* test: add more blake2b tests, upgrade hardhat to latest

* chore: remove unused code

* fix: recover deleted code

* fix: ci error

* test: fix test error

* test: remove unused test

* chore: remove unused getLatestBlockNumber

* chore: upgrade solc

* chore: add more comment to explain merkleIndex in historyTxRoot merkle tree

Co-authored-by: huwenchao <me@huwenchao.com>

* chore: update doc, docker for ckb history merkle root (#212)

* chore: update doc, docker for ckb history merkle root

* doc: update ref to audit-v1.2

* code clean

* fix(offchain): optimize eth header relay (#213)

* fix(offchain): optimize eth->ckb

* fix(offchain): fix unwrap to err

* fix generate ckb proof info in ckb relayer

* Update dapp-lib to adapt ckb_merkle_proof

* code clean

* fix(offchain): optimize ckb->eth (#215)

* fix(eth-contracts): add rinkeby testnet

* fix(offchain): fix gas_price and gas_limit

* fix(offchain): refactor ckb-relay

* fix(offchain): store tx root by rocksdb

* fix(offchain): ckb-relay and eth-relay use different rocksdb

* fix(offchain): unlock tx use rocksdb

* fix(offchain): break when block has burn tx

* fix(offchain): use readonly db when unlock

* fix(offchain): fix ckb relay delay

* fix(offchain): check latest_block_number after get proof

* feat: merge from main

* minor change

* test github ci

* feat: optimize ckb tx relayer. support batch unlock

* bugfix when parse unlock event

* minor change

* modify eth chain confirmed number for ropsten

* minor change

* bugfix on ckb tx relayer

* minor change

* minor change

Co-authored-by: 方平 <fpchen@outlook.com>
Co-authored-by: Wenchao Hu <huwenchao@cryptape.com>
Co-authored-by: Ethan Hu <cosinlink@163.com>
Co-authored-by: JacobDenver007 <29848184+JacobDenver007@users.noreply.github.com>
Co-authored-by: mkxbl <33241113+mkxbl@users.noreply.github.com>
Co-authored-by: huwenchao <me@huwenchao.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants