OSDN Git Service

update master (#487)
authorYongfeng LI <wliyongfeng@gmail.com>
Mon, 26 Mar 2018 10:45:14 +0000 (18:45 +0800)
committerGitHub <noreply@github.com>
Mon, 26 Mar 2018 10:45:14 +0000 (18:45 +0800)
commit01180396e6e36d20c8a666286c985637e6186bfd
tree2dc958f7276be25ac5f549c9a960a6bdc1766ef9
parent6bb0c9be56ba66ce925dd2587f4f535f26566732
update master (#487)

* Sign process (#371)

* support sign between different node

* fix for golint

* sign password doesn't need array any more

* update dashboard (#379)

1. transaction pagination
2. simplify new transaction
3. i18n
4. expose new transaction advanced setting
5. fix bugs

* Skip p2p tests (#385)

Skip all the tests in p2p when running `go test`.

* p2sh use RawWitnessKeys (#386)

* p2sh use RawWitnessKeys

* change test key name for fix delay issue

* edit test dir name

* Automize the compilation of cross platform binary application (#387)

* Automize the compilation of cross platform binary application

* Add the default target

* Add phony

* Ingore target

* Refactor release target

* init version of edit block header (#389)

* init version of edit block header

* elegant the code a little bit

* fix isssue error

* Add md5 check (#398)

* init version of charge tx size gas (#394)

* init version of charge tx size gas

* edit the code a little bit

* change the storage gate rate

* fix a tx size bug

* fix for code review

* Disable colored logging

* Mining pool (#403)

* revert the cpu miner

* init version of minepool

* fix bug

* edit the test function

* fix the werid mutex issue

* change the name from minepool to miningpool

* fix check reward api

* change the api url

* change the url

* add make bytomd to make file (#404)

* fix import private key (#405)

* fix multi-sign account index (#407)

* fix multi-sign account index

* normalize multi-sign account index db key

* Add p2p network manager function (#397)

* Add p2p network manager function

* Adjust the code logic

* Optimize code

* Dev mining (#390)

* update

* update

* delete comment

* update tensority, same with c++

* add smix.go

* tensority is right

* add TestHash()

* add TestCalcSeedCache

* add TestCalcSeedCache

* Update scrypt.go

* mining/tensority: Time & space opt for dataIdentity[] init in mulMatrix()

* clean up code

* clean up codes

* remove hexutil files

* update tensority test

* edit get reward respone (#406)

* edit get reward respone

* delete used para in resp

* add the get-block-header-by-height api

* add a test cmd function

* update GenesisBlock nounce (#409)

* Getwork (#410)

* edit the getwork api

* edit the cmd miner work function

* rename the file from mempool.go -> txpool.go (#411)

* Seed (#415)

* add seed generate rule

* edit the getWork resp

* add golint

* Remove transaction reference data (#416)

* remove transaction level ReferenceData

* remove setTxRefDataAction

* remove ExtHash in TxHeader

* fix the unit wallet unit test

* remove the vm txdata opcode

* clean the txbuild due to we don't have txData any more

* wallet add contract utxo db (#414)

* standard transaction reserve utxo filter out contract utxo

* distinguish StandardUTXO and ContractUTXO
modfiy spendUTXOAction into no account, the contract utxo is not need to sign
wallet add contract utxo db
adjust function parameter format: the end of parameter is error

* delete ExtContractTag because contract utxo is stored in ContractUTXO

* spendUTXOAction add situation when account is empty
prevoutDBKeys delete return value
filterAccountTxs filter contract transaction to reduce unrelated transaction

* fix golint for blockchain/account/reserve.go

* optimise the import

* fix import issue (#417)

* adjust format for golint  (#419)

* standard transaction reserve utxo filter out contract utxo

* distinguish StandardUTXO and ContractUTXO
modfiy spendUTXOAction into no account, the contract utxo is not need to sign
wallet add contract utxo db
adjust function parameter format: the end of parameter is error

* delete ExtContractTag because contract utxo is stored in ContractUTXO

* spendUTXOAction add situation when account is empty
prevoutDBKeys delete return value
filterAccountTxs filter contract transaction to reduce unrelated transaction

* fix golint for blockchain/account/reserve.go

* optimise the import

* adjust format for golint

* adjust format

* Hash static len (#422)

* edit hash uint64 method

* edit unit test

* simplify next account index in account manager (#423)

* Remove reference data in TxInput & TxOutput (#420)

* remove ReferenceData in spendAction

* remove referenceData in controlAddressAction

* remove ReferenceData in controlReceiverAction and controlProgramAction

* remove ReferenceData in issueAction

* remove ReferenceData in spendUTXOAction and retireAction

* remove ReferenceData in TxInput

* fix typo

* fix validation_test

* remove ReferenceData in TxOutput

* remove more reference data

* remove RefDataHash in rawOutput

* delete the txinput/output vm level op

* delete unnecessary log (#424)

* standard transaction reserve utxo filter out contract utxo

* distinguish StandardUTXO and ContractUTXO
modfiy spendUTXOAction into no account, the contract utxo is not need to sign
wallet add contract utxo db
adjust function parameter format: the end of parameter is error

* delete ExtContractTag because contract utxo is stored in ContractUTXO

* spendUTXOAction add situation when account is empty
prevoutDBKeys delete return value
filterAccountTxs filter contract transaction to reduce unrelated transaction

* fix golint for blockchain/account/reserve.go

* optimise the import

* adjust format for golint

* adjust format

* add the function illustration

* delete unnecessary log

* rename create-account-address to create-account-receiver (#426)

* rename create-account-address to create-account-receiver

* update dashboard

* remove RefDataHash in SpendCommitment and UTXO (#428)

* remove RefDataHash in SpendCommitment

* remove RefDataHash in UTXO

* remove RefDataHash in annotatedUTXO

* create key and account in bytomd init (#425)

* create key and account in bytomd init

* init key and account when launch node

* refactor init account process

* fix init or recover account process

* remove useless accounts check

* remove some useless fields in node struct (#429)

* set default password to default account (#430)

* remove InitialBlockHash in Asset (#431)

* remove InitialBlockHash in Asset

* remove InitialBlockId of AssetDefinition

* rename create-account-address command (#432)

* Rename legacy (#433)

* remove external useless types

* rename legacy package to types

* remove Signer#Find (#435)

* Repalce tp with mp (#434)

Standardize the naming rule

* ignore File field when marshal XPub (#436)

* return AnnotatedAccount for list-accounts api (#437)

* simplify singers#Create (#438)

* remove useless code in blockchain/reactor.go (#441)

* add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

* Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

* init push for add newBlockCh for p2p (#443)

* init push for validate-address API (#444)

* init push for list address (#445)

* fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

* put hsm from BlockchainReactor to Wallet (#451)

* put token management from BlockchainReactor to Wallet (#452)

* init push for submit-tx (#450)

* modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

* edit the create-address api (#453)

* edit the create-address api

* update dashboard

* add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

*  bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* bugfix: disable wallet panic (#456)

* make test build failed (#457)

* modify reset-key-password api (#459)

* git# This is a combination of 18 commits.
fix json name for submit transaction

remove useless code in blockchain/reactor.go (#441)

add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

init push for add newBlockCh for p2p (#443)

init push for validate-address API (#444)

init push for list address (#445)

fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

put hsm from BlockchainReactor to Wallet (#451)

put token management from BlockchainReactor to Wallet (#452)

init push for submit-tx (#450)

modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

bytomcli add validate-address and list-addresses

edit the create-address api (#453)

* edit the create-address api

* update dashboard

add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* add reset-key-password

*  refactor node server (#460)

* remove NewNodeDefault

* refactor node start server

* list-addresses response add account_alias (#462)

* git# This is a combination of 18 commits.
fix json name for submit transaction

remove useless code in blockchain/reactor.go (#441)

add interface get-transaction (#439)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* update dashboard

Block json (#442)

* init version of get-block api

* edit for small details

* fix for golint

init push for add newBlockCh for p2p (#443)

init push for validate-address API (#444)

init push for list address (#445)

fix transaction API response json format and bytomcli API (#446)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

modify get-block-count API (#447)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

remove accounts and assets from BlockchainReactor (#448)

* remove accounts field in BlockchainReactor

* remove assets field in BlockchainReactor

put hsm from BlockchainReactor to Wallet (#451)

put token management from BlockchainReactor to Wallet (#452)

init push for submit-tx (#450)

modify get-transaction block_time types (#449)

* standard transaction reserve utxo filter out contract utxo

* add interface get-transaction
motify response json name

* modify json name for api

* fix transaction API response json format

* bytomcli add get-block

* retired xprv

* modify get-block-count

* modify block_time types
fix golint suggest

bytomcli add validate-address and list-addresses

edit the create-address api (#453)

* edit the create-address api

* update dashboard

add GetAccountBalances to wallet (#454)

* add GetAccountBalances to wallet

* fix import order

 bytomcli add validate-address and list-addresses  (#455)

* fix json name for submit transaction

* bytomcli add validate-address and list-addresses

* add reset-key-password

* list-addresses response add account_alias
modify bytomcli create-account-receiver

* remove serveHTTP and mux from BlockchainReactor (#463)

* remove serveHTTP of BlockchainReactor

* remove mux from BlockchainReactor

* refactor handler related tests (#464)

* refactor handler related tests

* fix imports

* add timerange to txbuilder (#461)

* add timerange to txbuilder

* timerange support block height

* add notes to timeRangeGash

* refactor list-unspent-outputs (#465)

* edit reset passowrd api (#467)

* modify bytomcli interface submit-transaction (#466)

modify password format

* add API struct (#468)

* rename rpc_reactor to api

* create API struct

* move server to API

* move buildHandler to API

* refactor initServer

* remove BlockchainReactor Handler

* move request handle methods to API struct (#470)

* move account related request handle methods to API

* move asset related request methods to API

* move hsm related request methods to API

* move other request methods to API

* list-addresses add filter by accountID pr accountAlias (#469)

* list-addresses add filter by accountID pr accountAlias

* optimse

* init push for static mining address (#471)

* init push for static mining address

* fix for code review

* Refactor api (#472)

* move listAccounts to API

* add chain to API

* call walllet from API directly

* move NewSuccessResponse and NewErrorResponse to api.go

* move several packages out of blockchain (#473)

* move account package out of blockchain

* move asset package out of blockchain

* move accesstoken out of blockchain

* move wallet package out of blockchain

* remove rpc package (#474)

* Revert "remove rpc package (#474)" (#475)

This reverts commit c0563a5d0953c00d86885c4d11d0ca7fdb19c090.

* modify the folder struct (#476)

* make some fields of BlockchainReactor public to facilitate separate API (#477)

* move maxBytesHandler to api.go

* move Response to api.go

* call chain from api directly

* not call BlockchainReactor inner methods from API

* make BlockchainReactor txFeedTracker public

* extract api from blockchain (#478)

* trim alias space before creating account, key and asset (#480)

* trim alias space before creating account, key and asset

* trim alias white space when creating account, asset and key

* Block min time (#481)

* tmp save

* tmp save

* add block timestamp range check

* fix for test

* improve some code (#482)

* fix build failure (#484)

* remove error check of GetBlockByHash in SaveBlock (#485)

* when wallet disable, wallet related api redirect to error (#483)

*  *when wallet disable, accesstoken can be call
 *redirect url path to wait-disable when wallet is closed

* fix redirect path to error when wallet is disable

*  move accesstoken from wallet into API

* modify handler value

* add function walletRedirectHandler for latencyHandler

* fix wallet_test (#486)
193 files changed:
.gitignore
Makefile
accesstoken/accesstoken.go [moved from blockchain/accesstoken/accesstoken.go with 100% similarity]
accesstoken/accesstoken_test.go [moved from blockchain/accesstoken/accesstoken_test.go with 100% similarity]
account/accounts.go [moved from blockchain/account/accounts.go with 82% similarity]
account/accounts_test.go [moved from blockchain/account/accounts_test.go with 67% similarity]
account/builder.go [moved from blockchain/account/builder.go with 88% similarity]
account/indexer.go [new file with mode: 0755]
account/reserve.go [moved from blockchain/account/reserve.go with 90% similarity]
account/reserve_test.go [moved from blockchain/account/reserve_test.go with 93% similarity]
api/accesstokens.go [moved from blockchain/accesstokens.go with 53% similarity]
api/accounts.go [new file with mode: 0644]
api/api.go [new file with mode: 0644]
api/assets.go [moved from blockchain/assets.go with 69% similarity]
api/blockchain_reactor.go [new file with mode: 0644]
api/errors.go [moved from blockchain/errors.go with 98% similarity]
api/hsm.go [new file with mode: 0644]
api/metrics.go [moved from blockchain/metrics.go with 98% similarity]
api/miner.go [new file with mode: 0644]
api/query.go [new file with mode: 0755]
api/receivers.go [new file with mode: 0755]
api/request.go [moved from blockchain/request.go with 63% similarity]
api/transact.go [new file with mode: 0644]
api/transact_test.go [moved from blockchain/transact_test.go with 98% similarity]
api/txfeeds.go [new file with mode: 0644]
api/types.go [new file with mode: 0644]
api/wallet.go [moved from blockchain/wallet.go with 69% similarity]
asset/annotate.go [moved from blockchain/asset/annotate.go with 100% similarity]
asset/asset.go [moved from blockchain/asset/asset.go with 96% similarity]
asset/asset_test.go [moved from blockchain/assets_test.go with 50% similarity]
asset/builder.go [moved from blockchain/asset/builder.go with 72% similarity]
blockchain/account/indexer.go [deleted file]
blockchain/account/receivers.go [deleted file]
blockchain/account/receivers_test.go [deleted file]
blockchain/accounts.go [deleted file]
blockchain/accounts_test.go [deleted file]
blockchain/asset/asset_test.go [deleted file]
blockchain/block_keeper.go
blockchain/blockchain_reactor.go
blockchain/hsm.go [deleted file]
blockchain/hsm_test.go [deleted file]
blockchain/miner.go
blockchain/net.go
blockchain/pseudohsm/pseudohsm.go
blockchain/pseudohsm/pseudohsm_test.go
blockchain/query.go [deleted file]
blockchain/query/annotated.go
blockchain/query/filter/doc.go [deleted file]
blockchain/query/transactions.go
blockchain/reactor.go
blockchain/receivers.go [deleted file]
blockchain/rpc/net.go
blockchain/rpc_reactor.go [deleted file]
blockchain/signers/signers.go
blockchain/tls.go
blockchain/transact.go
blockchain/txbuilder/actions.go
blockchain/txbuilder/builder.go
blockchain/txbuilder/constraint.go
blockchain/txbuilder/data_witness.go
blockchain/txbuilder/finalize.go
blockchain/txbuilder/rawtxsig_witness.go
blockchain/txbuilder/signature_program.go
blockchain/txbuilder/signature_witness.go
blockchain/txbuilder/signing_instruction.go
blockchain/txbuilder/txbuilder.go
blockchain/txbuilder/txbuilder_test.go
blockchain/txbuilder/types.go
blockchain/txbuilder/witness.go
blockchain/txdb/store.go [deleted file]
blockchain/txfeed/txfeed.go
blockchain/txfeeds.go
cmd/bytomcli/commands/account.go
cmd/bytomcli/commands/block.go
cmd/bytomcli/commands/bytomcli.go
cmd/bytomcli/commands/key.go
cmd/bytomcli/commands/transaction.go
cmd/bytomd/commands/run_node.go
cmd/bytomd/main.go
cmd/miner/main.go
common/math/dist.go [deleted file]
common/math/dist_test.go [deleted file]
common/sort.go [new file with mode: 0644]
config/genesis.go
config/genesis_test.go
consensus/difficulty/difficulty.go
consensus/difficulty/difficulty_test.go
consensus/general.go
crypto/scrypt/scrypt.go
crypto/scrypt/smix.go [new file with mode: 0644]
dashboard/dashboard.go
database/leveldb/cache.go [moved from blockchain/txdb/cache.go with 66% similarity]
database/leveldb/mainchain.go [moved from blockchain/txdb/mainchain.go with 97% similarity]
database/leveldb/mainchain_test.go [moved from blockchain/txdb/mainchain_test.go with 98% similarity]
database/leveldb/store.go [new file with mode: 0644]
database/leveldb/utxo_view.go [moved from blockchain/txdb/utxo_view.go with 96% similarity]
database/leveldb/utxo_view_test.go [moved from blockchain/txdb/utxo_view_test.go with 98% similarity]
database/storage/storage.pb.go [moved from blockchain/txdb/storage/storage.pb.go with 100% similarity]
database/storage/storage.proto [moved from blockchain/txdb/storage/storage.proto with 100% similarity]
database/storage/utxo_entry.go [moved from blockchain/txdb/storage/utxo_entry.go with 100% similarity]
database/store.go [new file with mode: 0644]
mining/cpuminer/cpuminer.go
mining/mining.go
mining/miningpool/minepool.go [new file with mode: 0644]
mining/tensority/matrix.go
mining/tensority/seed.go
mining/tensority/tensority.go
mining/tensority/tensority_test.go [new file with mode: 0644]
net/http/authn/authn.go
net/http/authn/authn_test.go
node/node.go
p2p/addrbook_test.go
p2p/connection_test.go
p2p/listener_test.go
p2p/netaddress_test.go
p2p/peer_set_test.go
p2p/peer_test.go
p2p/pex_reactor_test.go
p2p/secret_connection_test.go
p2p/switch.go
p2p/switch_test.go
p2p/trust/config.go [new file with mode: 0644]
p2p/trust/metric.go [new file with mode: 0644]
p2p/trust/metric_test.go [new file with mode: 0644]
p2p/trust/store.go [new file with mode: 0644]
p2p/trust/store_test.go [new file with mode: 0644]
p2p/trust/ticker.go [new file with mode: 0644]
protocol/bc/asset.go
protocol/bc/asset_test.go
protocol/bc/bc.pb.go
protocol/bc/bc.proto
protocol/bc/bctest/tx.go
protocol/bc/blockheader.go
protocol/bc/entry.go
protocol/bc/entry_test.go
protocol/bc/issuance.go
protocol/bc/legacy/fuzz_test.go [deleted file]
protocol/bc/merkle_test.go
protocol/bc/output.go
protocol/bc/retirement.go
protocol/bc/spend.go
protocol/bc/tx_status.go
protocol/bc/tx_status_test.go
protocol/bc/txheader.go
protocol/bc/types/bc_test.go [moved from protocol/bc/legacy/bc_test.go with 95% similarity]
protocol/bc/types/block.go [moved from protocol/bc/legacy/block.go with 99% similarity]
protocol/bc/types/block_commitment.go [moved from protocol/bc/legacy/block_commitment.go with 64% similarity]
protocol/bc/types/block_header.go [moved from protocol/bc/legacy/block_header.go with 80% similarity]
protocol/bc/types/block_test.go [moved from protocol/bc/legacy/block_test.go with 83% similarity]
protocol/bc/types/coinbase.go [moved from protocol/bc/legacy/coinbase.go with 81% similarity]
protocol/bc/types/fuzz_test.go [new file with mode: 0644]
protocol/bc/types/issuance.go [moved from protocol/bc/legacy/issuance.go with 85% similarity]
protocol/bc/types/issuance_witness.go [moved from protocol/bc/legacy/issuance_witness.go with 62% similarity]
protocol/bc/types/map.go [moved from protocol/bc/legacy/map.go with 85% similarity]
protocol/bc/types/map_test.go [moved from protocol/bc/legacy/map_test.go with 91% similarity]
protocol/bc/types/output_commitment.go [moved from protocol/bc/legacy/output_commitment.go with 99% similarity]
protocol/bc/types/spend.go [moved from protocol/bc/legacy/spend.go with 90% similarity]
protocol/bc/types/transaction.go [moved from protocol/bc/legacy/transaction.go with 96% similarity]
protocol/bc/types/transaction_test.go [moved from protocol/bc/legacy/transaction_test.go with 50% similarity]
protocol/bc/types/tx_test.go [moved from protocol/bc/legacy/tx_test.go with 64% similarity]
protocol/bc/types/txinput.go [moved from protocol/bc/legacy/txinput.go with 93% similarity]
protocol/bc/types/txoutput.go [moved from protocol/bc/legacy/txoutput.go with 85% similarity]
protocol/block.go
protocol/protocol.go
protocol/state/utxo_view.go
protocol/state/utxo_view_test.go
protocol/tx.go
protocol/tx_test.go
protocol/txpool.go [moved from protocol/mempool.go with 57% similarity]
protocol/txpool_test.go [moved from protocol/mempool_test.go with 80% similarity]
protocol/validation/block_test.go
protocol/validation/validation.go
protocol/validation/validation_test.go
protocol/validation/vmcontext.go
protocol/validation/vmcontext_test.go
protocol/vm/context.go
protocol/vm/introspection.go
protocol/vm/introspection_test.go
protocol/vm/ops.go
protocol/vm/stack_test.go
protocol/vm/vmutil/script.go
protocol/vm/vmutil/script_test.go
test/integration/standard_transaction_test.go
test/performance/mining_test.go
test/util.go
types/genesis.go
types/signable.go [deleted file]
util/util.go
version/version.go
wallet/annotated.go [moved from blockchain/wallet/annotated.go with 83% similarity]
wallet/indexer.go [moved from blockchain/wallet/indexer.go with 63% similarity]
wallet/wallet.go [moved from blockchain/wallet/wallet.go with 83% similarity]
wallet/wallet_test.go [moved from blockchain/wallet/wallet_test.go with 81% similarity]