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

init cross chain #1140

Merged
merged 129 commits into from
Feb 25, 2020
Merged

init cross chain #1140

merged 129 commits into from
Feb 25, 2020

Conversation

siovanus
Copy link
Contributor

  1. add cross chain manager native contract
  2. add block header sync native contract
  3. add cross chain message and state root in consensus
  4. add get cross chain msg and get cross states proof rpc

@Honglei-Cong
Copy link
Member

I suggest to go through all log.Errorf and log.Infof in patch, lots of them should be log.Debugf.

cmd/import_cmd.go Outdated Show resolved Hide resolved
@laizy laizy merged commit dbe6501 into ontio:cross-chain Feb 25, 2020
tanZiWen added a commit that referenced this pull request Feb 25, 2020
* update master

* change cross chain contract structure

* add cross chain neovm call

* add cross chain msg support

* Add get cross chain msg support

* add getcrossstatesproof support

* update return crosschainmsg

* add cross chain msg serialization and deserialization support

* add cross chain msg hash support

* add header in process cross tx

* fix multichain header desi/seri bug

* remove log info

* add some log and remove unused code

* fix neovm push method order erros

* fix bug

* add p2p cross chain message

* fix cross states vbft bug

* remove some print logs

* fix miss proposer sig bug

* remove repeated public key

* fix make array error

* update return cross chain message format

* update sigdata from map to array

* update cross msg to hexstring

* remove unused code

* update log

* fix gen cross hash bug

* fix pre execute contract bug

* update notify

* remove empty cross transaction generate cross message

* reset dup bookkeepers

* fix p2p error

* fix merge conflict

* fix cross commit sig cover endorser sig

* add license

* fix test error

* gofmt

* remove unnecessary code

* remove serizlization

* change position

* Gofmt

* fix

* fix error spell

* fix consensus cross chain msg sig bug

* add consensus verify

* fix error spell

* add test unit

* fix commit ignore error

* update cross state hashes array from byte to []common.Uint256

* update error spell

* fix cross states array append

* remove check height

* cross msg compatibly new version and old version

* add lock get cross states root

* remove unused code

* rename

* add version check

* add cross state root check

* remove unused code

* add solo cross states support

* update getblockbyheight -> getheaderbyheight

* fix ignore return error intercept

* update getheaderbyheight interface

* add verify bookkeeper intercept

* merge duplicated code

* remove unused code

* Remove unused code

* add header sync test

* add cross chain manager test unit

* gofmt

* add some test unit

* remove message info

* remove unused code

* add ut for cross_chain and header_sync

* fix multi cross chain request in one transaction bug

* add unit test

* change cross chain id from uint64 to []byte to adapt btc

* fix cross-chain ut

* upgrade go.sum

* fix spell error

* fix ont chain id

* add lock,unlock to ont contract

* update cross state store put return error

* fix ut

* modify lockparam deserialize

* go fmt and fix bug

* update bind param

* add ont_lock_proxy contract

* add some log info

* fix bind bugs

* add operator checkwitness

* fix bugs

* fix cross_chain check fromContract bug, and ont transfer invocation bug

* fix ont-lock bindassetname error

* add Args SerializeForMultiChain to make multichain recognize bytes and test

* fix bug to be constant with multichain

* Add some log

* remove unused code

* remvove fee

* Remove testcase fee.

* fix ignore malicious consensus node  create nil cross chain msg bug

* update lock proxy contract

* update get cross state root height

* change bind asset key

* update cross state version to const

* update add endorser cross msg sigdata

* add check proposal cross chain msg len(sigdata) != 0

* fix import

* add cross chain msg import and export cmd support

* remove log

* rollback

* add native call neovm gas fee check

* remove log

* update proposal cross chain msg len(sigdata ) > 0

* rename package, support both ont and ong crosschain transfer through lock_proxy, add interfaces to be consistent with OEP-65

* rename

* fix test

* update crypto to v1.0.8

* revert

* move cross msg to read from reader firstly

* update native call return type from interface{} to []byte

* remove log

* remove get cross chain msg judge

* update operator address get method

Co-authored-by: tanyuan <1067598718@qq.com>
Co-authored-by: popush <mailzouxueyan@163.com>
Co-authored-by: Daniel Liu <33597115+skyinglyh1@users.noreply.github.com>
Co-authored-by: hero5512 <lvshuaino@gmail.com>
tanZiWen added a commit that referenced this pull request Feb 25, 2020
* update master

* change cross chain contract structure

* add cross chain neovm call

* add cross chain msg support

* Add get cross chain msg support

* add getcrossstatesproof support

* update return crosschainmsg

* add cross chain msg serialization and deserialization support

* add cross chain msg hash support

* add header in process cross tx

* fix multichain header desi/seri bug

* remove log info

* add some log and remove unused code

* fix neovm push method order erros

* fix bug

* add p2p cross chain message

* fix cross states vbft bug

* remove some print logs

* fix miss proposer sig bug

* remove repeated public key

* fix make array error

* update return cross chain message format

* update sigdata from map to array

* update cross msg to hexstring

* remove unused code

* update log

* fix gen cross hash bug

* fix pre execute contract bug

* update notify

* remove empty cross transaction generate cross message

* reset dup bookkeepers

* fix p2p error

* fix merge conflict

* fix cross commit sig cover endorser sig

* add license

* fix test error

* gofmt

* remove unnecessary code

* remove serizlization

* change position

* Gofmt

* fix

* fix error spell

* fix consensus cross chain msg sig bug

* add consensus verify

* fix error spell

* add test unit

* fix commit ignore error

* update cross state hashes array from byte to []common.Uint256

* update error spell

* fix cross states array append

* remove check height

* cross msg compatibly new version and old version

* add lock get cross states root

* remove unused code

* rename

* add version check

* add cross state root check

* remove unused code

* add solo cross states support

* update getblockbyheight -> getheaderbyheight

* fix ignore return error intercept

* update getheaderbyheight interface

* add verify bookkeeper intercept

* merge duplicated code

* remove unused code

* Remove unused code

* add header sync test

* add cross chain manager test unit

* gofmt

* add some test unit

* remove message info

* remove unused code

* add ut for cross_chain and header_sync

* fix multi cross chain request in one transaction bug

* add unit test

* change cross chain id from uint64 to []byte to adapt btc

* fix cross-chain ut

* upgrade go.sum

* fix spell error

* fix ont chain id

* add lock,unlock to ont contract

* update cross state store put return error

* fix ut

* modify lockparam deserialize

* go fmt and fix bug

* update bind param

* add ont_lock_proxy contract

* add some log info

* fix bind bugs

* add operator checkwitness

* fix bugs

* fix cross_chain check fromContract bug, and ont transfer invocation bug

* fix ont-lock bindassetname error

* add Args SerializeForMultiChain to make multichain recognize bytes and test

* fix bug to be constant with multichain

* Add some log

* remove unused code

* remvove fee

* Remove testcase fee.

* fix ignore malicious consensus node  create nil cross chain msg bug

* update lock proxy contract

* update get cross state root height

* change bind asset key

* update cross state version to const

* update add endorser cross msg sigdata

* add check proposal cross chain msg len(sigdata) != 0

* fix import

* add cross chain msg import and export cmd support

* remove log

* rollback

* add native call neovm gas fee check

* remove log

* update proposal cross chain msg len(sigdata ) > 0

* rename package, support both ont and ong crosschain transfer through lock_proxy, add interfaces to be consistent with OEP-65

* rename

* fix test

* update crypto to v1.0.8

* revert

* move cross msg to read from reader firstly

* update native call return type from interface{} to []byte

* remove log

* remove get cross chain msg judge

* update operator address get method

Co-authored-by: tanyuan <1067598718@qq.com>
Co-authored-by: popush <mailzouxueyan@163.com>
Co-authored-by: Daniel Liu <33597115+skyinglyh1@users.noreply.github.com>
Co-authored-by: hero5512 <lvshuaino@gmail.com>
laizy pushed a commit that referenced this pull request Feb 25, 2020
* update master

* change cross chain contract structure

* add cross chain neovm call

* add cross chain msg support

* Add get cross chain msg support

* add getcrossstatesproof support

* update return crosschainmsg

* add cross chain msg serialization and deserialization support

* add cross chain msg hash support

* add header in process cross tx

* fix multichain header desi/seri bug

* remove log info

* add some log and remove unused code

* fix neovm push method order erros

* fix bug

* add p2p cross chain message

* fix cross states vbft bug

* remove some print logs

* fix miss proposer sig bug

* remove repeated public key

* fix make array error

* update return cross chain message format

* update sigdata from map to array

* update cross msg to hexstring

* remove unused code

* update log

* fix gen cross hash bug

* fix pre execute contract bug

* update notify

* remove empty cross transaction generate cross message

* reset dup bookkeepers

* fix p2p error

* fix merge conflict

* fix cross commit sig cover endorser sig

* add license

* fix test error

* gofmt

* remove unnecessary code

* remove serizlization

* change position

* Gofmt

* fix

* fix error spell

* fix consensus cross chain msg sig bug

* add consensus verify

* fix error spell

* add test unit

* fix commit ignore error

* update cross state hashes array from byte to []common.Uint256

* update error spell

* fix cross states array append

* remove check height

* cross msg compatibly new version and old version

* add lock get cross states root

* remove unused code

* rename

* add version check

* add cross state root check

* remove unused code

* add solo cross states support

* update getblockbyheight -> getheaderbyheight

* fix ignore return error intercept

* update getheaderbyheight interface

* add verify bookkeeper intercept

* merge duplicated code

* remove unused code

* Remove unused code

* add header sync test

* add cross chain manager test unit

* gofmt

* add some test unit

* remove message info

* remove unused code

* add ut for cross_chain and header_sync

* fix multi cross chain request in one transaction bug

* add unit test

* change cross chain id from uint64 to []byte to adapt btc

* fix cross-chain ut

* upgrade go.sum

* fix spell error

* fix ont chain id

* add lock,unlock to ont contract

* update cross state store put return error

* fix ut

* modify lockparam deserialize

* go fmt and fix bug

* update bind param

* add ont_lock_proxy contract

* add some log info

* fix bind bugs

* add operator checkwitness

* fix bugs

* fix cross_chain check fromContract bug, and ont transfer invocation bug

* fix ont-lock bindassetname error

* add Args SerializeForMultiChain to make multichain recognize bytes and test

* fix bug to be constant with multichain

* Add some log

* remove unused code

* remvove fee

* Remove testcase fee.

* fix ignore malicious consensus node  create nil cross chain msg bug

* update lock proxy contract

* update get cross state root height

* change bind asset key

* update cross state version to const

* update add endorser cross msg sigdata

* add check proposal cross chain msg len(sigdata) != 0

* fix import

* add cross chain msg import and export cmd support

* remove log

* rollback

* add native call neovm gas fee check

* remove log

* update proposal cross chain msg len(sigdata ) > 0

* rename package, support both ont and ong crosschain transfer through lock_proxy, add interfaces to be consistent with OEP-65

* rename

* fix test

* update crypto to v1.0.8

* revert

* move cross msg to read from reader firstly

* update native call return type from interface{} to []byte

* remove log

* remove get cross chain msg judge

* update operator address get method

Co-authored-by: tanyuan <1067598718@qq.com>
Co-authored-by: popush <mailzouxueyan@163.com>
Co-authored-by: Daniel Liu <33597115+skyinglyh1@users.noreply.github.com>
Co-authored-by: hero5512 <lvshuaino@gmail.com>
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.

8 participants