OSDN Git Service

Mov (#518)
authorPaladz <yzhu101@uottawa.ca>
Mon, 23 Mar 2020 03:02:52 +0000 (11:02 +0800)
committerGitHub <noreply@github.com>
Mon, 23 Mar 2020 03:02:52 +0000 (11:02 +0800)
commit78ef45d4238457b2ad498d738db5a7a7a30df167
tree19882576f03e99b69d83878b3a4924a49ac21ee4
parent3adffe8810801582032e851f8ecb86cc83f253f4
Mov (#518)

* magnetic program (#402)

* add dex program

* optimise

* adjust code position

* add DecodeP2DCProgram

* optimise code format

* add contract code annotation

* adjust contract

* optimise

* modify contract name

* optimse

* adjust contract

* optimise

* delete redundant code

* optimse

* optimise

* add contract tx test

* add wrong test and ring contract

* optimise

* optimise

* optimise test

* optimise

* optimise

* modify parameter name (#411)

* fix bug (#412)

* fix bug

* fix

* fix name

* fix func name

* fix

* Mov database iterator (#415)

* mov_database_iterator

* opt log

* match engine (#418)

* match engine

* opt code

* update comment

* opt code

* fix validate trade pairs

* remove magic num

* opt canNotMatched func

* refactor

* fix travis (#425)

* modify crossin transaction (#416)

* modify crossin transaction

* add test

* fix review

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Modify federation sync (#422)

* Set chain Tx Gas 0 (#409)

* Set chain Tx Gas 0

* Fix test file err

* Revert test file modify

* add filter asset

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix a small bug

* delete unused

* mov core (#421)

* mov core

* bug fix

* opt code

* remove validate contract in validate cancel order

* fix validate

* bug fix

* bug fix

* fix ci

* fix mov database (#427)

* mov joint (#428)

* mov joint

* bug fix

* opt code

* fix ci

* format code

* fix mov (#429)

* add status fail check (#431)

* Mov merge (#430)

* Add MOV subprotol framework support

* opz code format

* opz code format

* Del unused code

* Set chain Tx Gas 0 (#409)

* Set chain Tx Gas 0

* Fix test file err

* Revert test file modify

* Modify interface function

* Opz code format

* MOV add startpoint

* mov merge

* fix ci

* opt code

* fix ci

* opt code

* fix dead lock

* opt code

* bug fix

* fix ci

* revert comment

* fix bug

* remove unuse parameter

* fix validate coinbase

* add calc matchedtx gas func

* opt code

* remove useless code

* opt validate

* block height limit for before proposal block

* merge order from pool (#432)

* merge order from pool

* bug fix order table

* bug fix order table

* bug fix

* rename

* fix order table (#434)

* add mov core test

* add calcMatchedTxFee test

* import order

* fix order table test

* fix match

* opt code

* Check mov store (#437)

* over view code of database/mov_store

* delete the duplicate code

* change the batch read number

* same change while go over the codes (#438)

* same change while go over the codes

* roll back mis edit

* add the comment (#439)

* Modify corssout tx action (#441)

* add program for crossout action

* fix

* fix sync status (#442)

* fix mov dead lock (#443)

* fix mov dead lock

* Delete LOCK

* set proposal have timeout (#444)

* set proposal have timeout

* edit for code review

* fix the roll back dead lock (#446)

* submit tx protocol verify (#447)

* fix request amount zero (#448)

* fix (#449)

* timeout level (#450)

* timeout level

* fix ci

* edit for code review

* edit for code review

* Update testnet config (#451)

* update testnet config

* update testnet param

* rollback federation config

* add op mul fraction to solve the mov exchange issue (#452)

* add op mul fraction to solve the mov exchange issue

* minor

* edit for code review

* no water

* fix mov should pay amount (#453)

* fix mov should pay amount

* opt code

* drop the useless tx (#455)

* drop the useless tx

* fix bug

* try to fix network issue (#456)

* try to fix network issue

* try fix bug

* try fix

* init version for edit sign process (#454)

* init version for edit sign process

* eleagent the code

* elegant the code

* try fix bug (#457)

* fix recursive order (#458)

* fix recursive order

* edit logic

* fix the test

* fix mov infinite loop (#461)

* fix mov infinite loop

* validate equals trade pair

* update

* update

* Fix mov issue (#462)

* fix mov infinite loop

* validate equals trade pair

* cycle match

* fix ci

* opt mov validate match tx (#470)

* opt mov validate match tx

* fix validate trade pair

Co-authored-by: Paladz <yzhu101@uottawa.ca>
* fix_open_federation_issue_asset (#478)

* fix_open_federation_issue_asset

* opt code

* complement mov test (#477)

Co-authored-by: Paladz <yzhu101@uottawa.ca>
* fix decimal (#479)

* fix decimal

* fix decimal

* bug fix

* fix decimal

* opt mov performance (#480)

* opt mov performance

* opt mov performance

* fix ci

* bug fix

* bug fix

* opt code

* remove test

* remove unknow file

* opt code

* opt code

* add comment

* opt code

* bug fix

* opt code

* use int for worker num

* fix match collector (#481)

* fix match collector

* add comment

* opt_mathch_collector (#483)

* Opt mathch collector (#482)

* opt_mathch_collector

* opt_mathch_collector

* final code review (#484)

* final code review

* edit for code review

Co-authored-by: Colt-Z <453256728@qq.com>
* Validate matched tx sequence test (#486)

* validate_matched_tx_sequence_test

* validate_matched_tx_sequence_test

* Validate matched tx sequence test (#487)

* validate_matched_tx_sequence_test

* validate_matched_tx_sequence_test

* Supplementary unit tests

* rename

* fix add order bug (#489)

* fix add order bug

* edit for code review

Co-authored-by: Colt-Z <453256728@qq.com>
* filter txpool by asset whitelis  (#488)

* add AssetWhitelist to FederationConfig

* use []*bc.AssetID for AssetWhitelist

* add (f *FederationAssetFilter) IsDust()

* fix https://github.com/Bytom/vapor/pull/488#discussion_r379226522

* fix https://github.com/Bytom/vapor/pull/488#discussion_r379226868

* fix https://github.com/Bytom/vapor/pull/488/files#r379226149

* fix https://github.com/Bytom/vapor/pull/488/files#r379225830

* convert assetID to lower-case

* golint

* add deleteBlock and then fix some tests (#491)

* add deleteBlock and then fix some tests

* add new test

* delete line

* fix one error

* change test case

* add s to word

* s

* update test cases

* update package and delete one same case

Co-authored-by: Paladz <yzhu101@uottawa.ca>
* fix init mov state (#492)

* fix init mov state

* remove Junk files

* Rollback pr2, rollback 的时候,更新 wallet 的状态, 改内核的下一个版本发 (#493)

* add rollback_func

* add wallet rollback

* update wallet finished

* add new wallet rollback flag

* fix one flag

* new design of new wallet

* update one comment

* rollback status from one wallet best hash start

* change two func name

* fix one test

* change rollback func return info

* remove ugly code

* fix ugly code

* remove ugly code

* re design reorganizeChain (#495)

* Rollback pr3 (#496)

* rollback chain

* fix test ci

* delete irrblock judge

* update rollblock

* delete test case

* fix bad delete

* change rollback

* delete one test

* add tip

* change rollback

* fix one err

* remove fmt

* remove one test

* rename

* rename variable

Co-authored-by: Poseidon <shenao.78@163.com>
* fix_add_order_of_order_book (#497)

* fix_add_order_of_order_book

* fix order book

* opt code

Co-authored-by: Paladz <yzhu101@uottawa.ca>
* fix validate tx (#499)

* add_comment_for_bbft (#502)

* fixed reward address (#504)

* match_fee_strategy (#506)

* match_fee_strategy

* rename variable

* opt code

* rename

* adjust order

* add test case

* validate reward address (#505)

* validate reward address

* fix ci

* opt code

* opt code

* opt code

* Match fee strategy (#507)

* match_fee_strategy

* rename variable

* opt code

* rename

* adjust order

* add test case

* bug fix

* bug fix

* add fee for multiple asset tesetcase

* add comment

* charge 1% fee (#509)

* charge 1% fee

* fix weird space

* edit for code review

Co-authored-by: paladz <453256728@qq.com>
* fix_mov_contract_test (#510)

* one_thousandth_fee (#508)

* one_thousandth_fee

* opt code

* update fee

* bug fix

* fix all testcase

* opt mov (#511)

* ban status fail for flash swap (#512)

* ban status fail for flash swap

* set up init check point

Co-authored-by: paladz <453256728@qq.com>
* no tricks (#513)

Co-authored-by: paladz <453256728@qq.com>
* for publish (#515)

* for publish

* fix test

Co-authored-by: paladz <453256728@qq.com>
* small fix (#517)

* small fix

* prevent timeout

* edit for golint

Co-authored-by: paladz <453256728@qq.com>
* Opt is matched (#516)

* opt is matched

* opt is matched

Co-authored-by: Paladz <yzhu101@uottawa.ca>
* rollback (#503)

* rollback

* add

* rollback test

* rollback xiugai

* delete one line

* s

* rename chainData

* reformat it

* opt code

Co-authored-by: shenao78 <shenao.78@163.com>
Co-authored-by: Paladz <yzhu101@uottawa.ca>
* last review (#519)

* last review

* edit for code review

* fix test case

Co-authored-by: paladz <453256728@qq.com>
Co-authored-by: oysheng <33340252+oysheng@users.noreply.github.com>
Co-authored-by: wz <mars@bytom.io>
Co-authored-by: Poseidon <shenao.78@163.com>
Co-authored-by: Chengcheng Zhang <943420582@qq.com>
Co-authored-by: Colt-Z <453256728@qq.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: ipqhjjybj <250657661@qq.com>
93 files changed:
.travis.yml
application/mov/common/type.go
application/mov/common/type_test.go [new file with mode: 0644]
application/mov/common/util.go [new file with mode: 0644]
application/mov/contract/contract.go [new file with mode: 0644]
application/mov/database/mov_iterator.go [new file with mode: 0644]
application/mov/database/mov_iterator_test.go [new file with mode: 0644]
application/mov/database/mov_store.go
application/mov/database/mov_store_test.go
application/mov/match/engine.go [new file with mode: 0644]
application/mov/match/engine_test.go [new file with mode: 0644]
application/mov/match/fee_strategy.go [new file with mode: 0644]
application/mov/match/order_book.go [new file with mode: 0644]
application/mov/match/order_book_test.go [new file with mode: 0644]
application/mov/match_collector.go [new file with mode: 0644]
application/mov/mock/mock.go [new file with mode: 0644]
application/mov/mock/mock_mov_store.go [new file with mode: 0644]
application/mov/mov_core.go [new file with mode: 0644]
application/mov/mov_core_test.go [new file with mode: 0644]
blockchain/txbuilder/actions.go
blockchain/txbuilder/signing_instruction.go
cmd/vapord/commands/rollback_node.go [new file with mode: 0644]
cmd/vapord/commands/root.go
cmd/vapord/commands/run_node.go
common/bytes.go
common/crossin_asset.go [new file with mode: 0644]
common/sort.go [deleted file]
config/config.go
config/federation_test.go
config/toml.go
consensus/general.go
consensus/segwit/segwit.go
database/account_store.go
database/store.go
database/store_test.go
database/utxo_view.go
database/wallet_store.go
docs/federation/sql_dump/federation_shema.sql
math/algorithm.go [new file with mode: 0644]
netsync/chainmgr/block_keeper.go
netsync/chainmgr/block_keeper_test.go
netsync/chainmgr/block_process.go
netsync/chainmgr/fast_sync.go
netsync/chainmgr/handle.go
netsync/chainmgr/msg_fetcher.go
netsync/chainmgr/storage.go
netsync/chainmgr/tx_keeper_test.go
node/node.go
proposal/blockproposer/blockproposer.go
proposal/proposal.go
proposal/proposal_test.go
protocol/asset_filter.go [new file with mode: 0644]
protocol/bbft.go
protocol/bc/bc.pb.go
protocol/bc/bc.proto
protocol/bc/crosschain_input.go
protocol/bc/entry_test.go
protocol/bc/types/block.go
protocol/bc/types/block_witness.go
protocol/bc/types/crosschain_output.go
protocol/bc/types/intrachain_output.go
protocol/bc/types/map.go
protocol/bc/types/vote_output.go
protocol/block.go
protocol/block_test.go
protocol/consensus_node_manager_test.go
protocol/protocol.go
protocol/store.go
protocol/tx.go
protocol/txpool.go
protocol/txpool_test.go
protocol/validation/tx.go
protocol/validation/tx_test.go
protocol/validation/vmcontext.go
protocol/vm/numeric.go
protocol/vm/numeric_test.go
protocol/vm/ops.go
protocol/vm/vmutil/script.go
test/accounts_test.go
test/bench_blockchain_test.go
test/mock/mempool.go
test/performance/mining_test.go
test/rollback_test.go [new file with mode: 0644]
test/util.go
test/wallet_test.go
test/wallet_test_util.go
toolbar/federation/api/handler.go
toolbar/federation/database/orm/asset.go
toolbar/federation/synchron/mainchain_keeper.go
toolbar/federation/synchron/sidechain_keeper.go
toolbar/precognitive/config/config.go
version/version.go
wallet/wallet.go