OSDN Git Service

bytom/bytom.git
6 years agoRevert "update master (#487)" (#518)
Yongfeng LI [Mon, 2 Apr 2018 12:29:15 +0000 (20:29 +0800)]
Revert "update master (#487)" (#518)

This reverts commit 01180396e6e36d20c8a666286c985637e6186bfd.

6 years agoupdate master (#487)
Yongfeng LI [Mon, 26 Mar 2018 10:45:14 +0000 (18:45 +0800)]
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)

6 years agoMerge pull request #375 from Bytom/dev
Guanghua Guo [Fri, 9 Feb 2018 01:28:34 +0000 (09:28 +0800)]
Merge pull request #375 from Bytom/dev

Dev

6 years agoadd comment (#374)
Paladz [Thu, 8 Feb 2018 10:30:24 +0000 (18:30 +0800)]
add comment (#374)

6 years agoforgot delete old unit test (#373)
Paladz [Thu, 8 Feb 2018 08:00:58 +0000 (16:00 +0800)]
forgot delete old unit test (#373)

6 years agofix retire issue bug (#372)
Paladz [Thu, 8 Feb 2018 07:46:47 +0000 (15:46 +0800)]
fix retire issue bug (#372)

6 years agoAdd unit test for wallet (#354)
Liu-Cheng Xu [Thu, 8 Feb 2018 07:45:15 +0000 (15:45 +0800)]
Add unit test for wallet (#354)

* Add unit test for wallet

* Update accordingly

6 years agoUse *chainjson.HexBytes instead of *json.RawMessage (#370)
icodezjb [Thu, 8 Feb 2018 07:24:51 +0000 (15:24 +0800)]
Use *chainjson.HexBytes instead of *json.RawMessage (#370)

6 years agoChange blockheader support json encode/decode (#367)
Guanghua Guo [Wed, 7 Feb 2018 09:24:33 +0000 (17:24 +0800)]
Change blockheader support json encode/decode (#367)

* Change blockheader support json encode/decode

* Add json comment

6 years agofix apply tx to handle the retire (#366)
Paladz [Tue, 6 Feb 2018 08:57:51 +0000 (16:57 +0800)]
fix apply tx to handle the retire (#366)

6 years agouse UTXO ReservationsPeriod (#364)
icodezjb [Tue, 6 Feb 2018 08:02:21 +0000 (16:02 +0800)]
use UTXO ReservationsPeriod (#364)

6 years agoMerge pull request #362 from Bytom/dev
Guanghua Guo [Mon, 5 Feb 2018 01:43:05 +0000 (09:43 +0800)]
Merge pull request #362 from Bytom/dev

Dev

6 years agoDon't init logrus in a seperate file (#361)
Liu-Cheng Xu [Mon, 5 Feb 2018 01:33:45 +0000 (09:33 +0800)]
Don't init logrus in a seperate file (#361)

The logging funcationality is broken when crossing compile the
executable file due to some unknown machnisms related to the main
package. So, move `log_hook.go` to `main.go`.

6 years agoremove old wallet.enable flag (#347)
d [Fri, 2 Feb 2018 07:48:10 +0000 (08:48 +0100)]
remove old wallet.enable flag (#347)

* Fix rpc server error (#195)

* remove old wallet.enable flag

6 years agofix bytomd panic when launch more web dashboard (#358)
icodezjb [Fri, 2 Feb 2018 06:01:25 +0000 (14:01 +0800)]
fix bytomd panic when launch more web dashboard (#358)

6 years agofix index external asset definition (#355)
icodezjb [Fri, 2 Feb 2018 05:45:10 +0000 (13:45 +0800)]
fix index external asset definition (#355)

6 years agoAdd walletdb recover function from keystore (#340)
yahtoo [Thu, 1 Feb 2018 07:02:34 +0000 (15:02 +0800)]
Add walletdb recover function from keystore (#340)

* Add walletdb recover function

* Fix walletUpdater goroutine data race bug

* Refactor walletdb recover from keystore code

* Delete useless lock

* Change rescanBlocks signal transfer

6 years agoMerge pull request #346 from Bytom/dev v0.4.0
Guanghua Guo [Thu, 1 Feb 2018 07:02:14 +0000 (15:02 +0800)]
Merge pull request #346 from Bytom/dev

Dev

6 years agoChange version &&support 386 multi platform (#344)
Guanghua Guo [Thu, 1 Feb 2018 06:59:24 +0000 (14:59 +0800)]
Change version &&support 386 multi platform (#344)

6 years agoupdate dashboard (#345)
李永峰 [Thu, 1 Feb 2018 06:57:03 +0000 (14:57 +0800)]
update dashboard (#345)

6 years agoMerge pull request #341 from Bytom/dev
Guanghua Guo [Thu, 1 Feb 2018 01:26:47 +0000 (09:26 +0800)]
Merge pull request #341 from Bytom/dev

Dev

6 years agoMiner (#329)
Guanghua Guo [Wed, 31 Jan 2018 11:56:26 +0000 (19:56 +0800)]
Miner (#329)

* Support rpc mining

* Add submit work funcion & rpc miner work

* Add resume chan

* Resume one goroutine test ok

* Fix a bug about resume

* Fix a bug, solveWork not quit

* Change import sequence

* Fix merge build failed

* loop call miner

* Fix a bug solveWork stop problem

6 years agosuper clean tensority init push (#337)
Paladz [Wed, 31 Jan 2018 07:10:02 +0000 (15:10 +0800)]
super clean tensority init push (#337)

* super clean tensority init push

* modify hashMatrix

6 years agoAdd import private key progress query (#331)
yahtoo [Wed, 31 Jan 2018 07:09:05 +0000 (15:09 +0800)]
Add import private key progress query (#331)

* Add import private key progress query

* Add xpub return when get progress

* Store account address index separately

* Add private key import complete flag

* Add import private key rollback process

* Refactor private key import code

* Fix the divisor zero problem

* Fix rescan progress return logic problem

* Fix variable reading and writing conflicts

6 years agocheck key and account before import key (#335)
李永峰 [Tue, 30 Jan 2018 07:48:21 +0000 (15:48 +0800)]
check key and account before import key (#335)

* check key and account before import key

* leverate error return

* remove unused function

6 years agoTensority (#334)
Paladz [Mon, 29 Jan 2018 12:08:35 +0000 (20:08 +0800)]
Tensority (#334)

* add  support lib for tensority

* add ltc scrypt algorithm

6 years agoadd support lib for tensority (#333)
Paladz [Mon, 29 Jan 2018 11:51:16 +0000 (19:51 +0800)]
add  support lib for tensority (#333)

6 years agoMake sure that coinbase utxo which has been some blocks confirmed whe… (#326)
icodezjb [Mon, 29 Jan 2018 05:45:48 +0000 (13:45 +0800)]
Make sure that coinbase utxo which has been some blocks confirmed whe… (#326)

* Make sure that coinbase utxo which has been some blocks confirmed when build transation

* remove utxo cache

* ErrMatchUTXO and ErrReservation

* return pending error

* code clean

6 years agoTxpool upgrade (#327)
Paladz [Mon, 29 Jan 2018 02:02:00 +0000 (10:02 +0800)]
Txpool upgrade (#327)

* change the block time from ms to second

* update block header time from ms to scond

* limit block max time

* txpool add uncommit utxo

* txpool remove tx will clean the utxo map

* tx add max time

* update for code review

* add log info

6 years agoDon't init native asset in init function (#324)
Liu-Cheng Xu [Thu, 25 Jan 2018 06:25:27 +0000 (14:25 +0800)]
Don't init native asset in init function (#324)

* Don't init native asset in init function

Previously, the init of logrus is after the invoke of creating native
asset, which may lead to incomplete logging.

* InitNativeAsset before NewRegistry

* Call initNativeAsset in NewRegistry

6 years agoadd dashboard with fixing create key (#325)
李永峰 [Thu, 25 Jan 2018 03:15:06 +0000 (11:15 +0800)]
add dashboard with fixing create key (#325)

6 years agocore upgrade (#310)
Paladz [Wed, 24 Jan 2018 06:44:07 +0000 (14:44 +0800)]
core upgrade (#310)

* tmp save

* fix the small bug

* add bit map status struct

* add unit test

* init push for core upgrade

* update the wallet part for core upgrade

* fix bug

* add utxo update

* fix for unit test

* fix mining part bug

* first version of elegant

* fix a mining part bug

* vm verify small change

* fix wallet part get transactions pointer bug

* code review variable rename

6 years agoMiner - proof of work (#311)
Guanghua Guo [Wed, 24 Jan 2018 01:37:10 +0000 (09:37 +0800)]
Miner - proof of work (#311)

* Add cmd/miner

* Add marshal function

* WorkResp mashal and unmashal ok

* miner getwork and do work ok

* Delete dead rpc code

* Delete WorkResp Unmarshal and Marshal function

6 years agoFull BIP32 EdDSA compatibility (#314)
yahtoo [Tue, 23 Jan 2018 08:58:32 +0000 (16:58 +0800)]
Full BIP32 EdDSA compatibility (#314)

6 years agoPassword array (#316)
icodezjb [Tue, 23 Jan 2018 08:37:17 +0000 (16:37 +0800)]
Password array (#316)

* Fix Key not Found Problem

Remove XPrv cache
Change password string to array

* use password array

* code clean

6 years agoEliminate resWrapper (#315)
Liu-Cheng Xu [Tue, 23 Jan 2018 07:43:04 +0000 (15:43 +0800)]
Eliminate resWrapper (#315)

- also standardize the imports of `wallet.go`

6 years agoAdd passwords and Remove xprv cache (#267)
Blockmeta-区块元 [Tue, 23 Jan 2018 02:38:01 +0000 (10:38 +0800)]
Add passwords and Remove xprv cache  (#267)

* Fix Key not Found Problem

Remove XPrv cache
Change password string to array

* Add password array

fix test bug

* Truncate useless codes

Return error ,no more "if"

6 years agoMerge pull request #309 from Bytom/dev
Guanghua Guo [Mon, 22 Jan 2018 11:00:59 +0000 (19:00 +0800)]
Merge pull request #309 from Bytom/dev

Dev

6 years agoAdd miner's getWork function (#306)
Guanghua Guo [Mon, 22 Jan 2018 02:24:57 +0000 (10:24 +0800)]
Add miner's getWork function (#306)

6 years agoAdd blockchain/accounts,assets test (#308)
Liu-Cheng Xu [Mon, 22 Jan 2018 02:19:51 +0000 (10:19 +0800)]
Add blockchain/accounts,assets test (#308)

6 years agoSupport list transactions summary (#303)
icodezjb [Fri, 19 Jan 2018 05:00:48 +0000 (13:00 +0800)]
Support list transactions summary (#303)

* Support list transactions summary

* use GetTransactionsSummary with the same transactions data

* Update GetTransactionsSummary

* format code

6 years agoAdd external asset ailas and definition (#278)
icodezjb [Fri, 19 Jan 2018 01:53:05 +0000 (09:53 +0800)]
Add external asset ailas and definition (#278)

* Save external asset alias and definition

(cherry picked from commit 0c59d87)

* Add btm definition

(cherry picked from commit 6c8d2b5)

* rename external asset alias

* use getNativeAsset

* skip save local asset definition

* index external asset definition

* Add update-asset-alias cmd

* Use assetID as asset alias if no alias in definition

* Add update-asset-alias ErrNullAlias

* Add native_asset_definition in genesis.json

* Reverse native_asset_definition

* Unused SerializeAssetDef

* use Registry.FindByID

* use CalcExtAssetKey

* Only remove aliasCache

* Add cache newAlias to assetID

* Resolve code conflict

6 years agoadd private key import (#305)
李永峰 [Thu, 18 Jan 2018 11:58:45 +0000 (19:58 +0800)]
add private key import (#305)

* correct import-private-key api

* update dashboard.go

add import private key interface

* improve naming

6 years agoSave create asset and create account key index (#304)
yahtoo [Thu, 18 Jan 2018 09:37:53 +0000 (17:37 +0800)]
Save create asset and create account key index (#304)

* Save create asset and create account key index

* Add key index read/write lock

6 years agofix test failure (#302)
李永峰 [Thu, 18 Jan 2018 06:28:52 +0000 (14:28 +0800)]
fix test failure (#302)

6 years agoRevert "remove useless ctx argument in accesstoken#CredentialStore" (#301)
Paladz [Thu, 18 Jan 2018 02:35:33 +0000 (10:35 +0800)]
Revert "remove useless ctx argument in accesstoken#CredentialStore" (#301)

* Revert "Add utxo reservation test (#291)"

This reverts commit 5607f070955c4d80525ac0c770b67589ca2d449a.

* Revert "remove useless ctx argument in accesstoken#CredentialStore (#300)"

This reverts commit c3aa98d6f1984a248430a3de0cbe0cafc9da7972.

6 years agoAdd utxo reservation test (#291)
Liu-Cheng Xu [Thu, 18 Jan 2018 02:02:49 +0000 (10:02 +0800)]
Add utxo reservation test (#291)

* Add utxo reservation test

- also the missing account deletion test.

* Deprecate resWrapper

6 years agoremove useless ctx argument in accesstoken#CredentialStore (#300)
李永峰 [Thu, 18 Jan 2018 02:00:08 +0000 (10:00 +0800)]
remove useless ctx argument in accesstoken#CredentialStore (#300)

6 years agostand tx is eveywhere (#298)
Paladz [Thu, 18 Jan 2018 01:59:10 +0000 (09:59 +0800)]
stand tx is eveywhere (#298)

* stand tx is eveywhere

* add unit test

6 years agoadd export private key (#299)
李永峰 [Wed, 17 Jan 2018 10:12:41 +0000 (18:12 +0800)]
add export private key (#299)

6 years agoRecovery walletDB support standard txs (#296)
yahtoo [Wed, 17 Jan 2018 02:48:04 +0000 (10:48 +0800)]
Recovery walletDB support standard txs (#296)

6 years agoCoinbase input (#290)
Paladz [Tue, 16 Jan 2018 11:40:08 +0000 (19:40 +0800)]
Coinbase input (#290)

* init push for coinbase have input

* fix io write bug

* support wallet display

* fix map side bug

6 years agoremove useless signer create arguments (#293)
李永峰 [Tue, 16 Jan 2018 10:41:26 +0000 (18:41 +0800)]
remove useless signer create arguments (#293)

6 years agoRename spend to spent (#287)
Liu-Cheng Xu [Tue, 16 Jan 2018 02:44:18 +0000 (10:44 +0800)]
Rename spend to spent (#287)

* Fix rpc server error (#195)

* Rename spend to spent

`spent` of `UtxoEntry` indicates if a certain utxo has been spent.

* Another typo

* Update stroage.proto

6 years agofix authn_test (#289)
李永峰 [Mon, 15 Jan 2018 11:43:34 +0000 (19:43 +0800)]
fix authn_test (#289)

6 years agoimprove remote visit for dashboard (#288)
李永峰 [Mon, 15 Jan 2018 11:19:29 +0000 (19:19 +0800)]
improve remote visit for dashboard (#288)

6 years agoMerge pull request #286 from Bytom/token-refactor
李永峰 [Mon, 15 Jan 2018 07:57:53 +0000 (15:57 +0800)]
Merge pull request #286 from Bytom/token-refactor

Token refactor

6 years agonot allow remote get access tokens
Yongfeng LI [Mon, 15 Jan 2018 07:03:57 +0000 (15:03 +0800)]
not allow remote get access tokens

6 years agofix accesstoken check api
Yongfeng LI [Mon, 15 Jan 2018 06:39:26 +0000 (14:39 +0800)]
fix accesstoken check api

6 years agoMerge pull request #285 from Bytom/dev
Guanghua Guo [Mon, 15 Jan 2018 06:30:36 +0000 (14:30 +0800)]
Merge pull request #285 from Bytom/dev

Dev

6 years agoimprove accesstoken list test
Yongfeng LI [Mon, 15 Jan 2018 05:09:06 +0000 (13:09 +0800)]
improve accesstoken list test

6 years agoreturn hashed secret afted creating accesstoken
Yongfeng LI [Mon, 15 Jan 2018 03:05:17 +0000 (11:05 +0800)]
return hashed secret afted creating accesstoken

check will requie id and the hashed secret

6 years agoNative segwit (#283)
Paladz [Mon, 15 Jan 2018 01:59:35 +0000 (09:59 +0800)]
Native segwit (#283)

* tmp save

* tmp save

* init push for native_segwit

* fix package name

* edit for code review

* update for code review

* oops, fix small bug

6 years agoremove redundant RedirectHandler (#282)
李永峰 [Fri, 12 Jan 2018 03:03:32 +0000 (11:03 +0800)]
remove redundant RedirectHandler (#282)

6 years agoPerformance test (#279)
Guanghua Guo [Fri, 12 Jan 2018 02:17:40 +0000 (10:17 +0800)]
Performance test (#279)

* Delete die code

* Add transaction test

* Move standard_transaction_test to test dir

* Add performance test for NewBlockTpl function

6 years agoAdd partial test for account and asset (#280)
Liu-Cheng Xu [Fri, 12 Jan 2018 02:12:57 +0000 (10:12 +0800)]
Add partial test for account and asset (#280)

6 years agoupdate dashboard with create address (#281)
李永峰 [Fri, 12 Jan 2018 02:10:21 +0000 (10:10 +0800)]
update dashboard with create address (#281)

6 years agoFix list transactions output error (#277)
yahtoo [Thu, 11 Jan 2018 02:57:57 +0000 (10:57 +0800)]
Fix list transactions output error (#277)

6 years agoTest (#272)
Guanghua Guo [Thu, 11 Jan 2018 01:31:11 +0000 (09:31 +0800)]
Test (#272)

* Fix rpc server error (#195)

* Add Test RunNode

* Add netinfo rpc test

* rpc integrate test ok

* Add list-key delete-key integrate test

* Add function comment

* Change wallet's sign

* Add util/util.go

* Change integrate/test

6 years agoMerge pull request #276 from Bytom/create-receiver
李永峰 [Wed, 10 Jan 2018 11:11:45 +0000 (19:11 +0800)]
Merge pull request #276 from Bytom/create-receiver

remove expiresAt param for create-account-receiver

6 years agorefactor create-account-receiver
Yongfeng LI [Wed, 10 Jan 2018 11:06:33 +0000 (19:06 +0800)]
refactor create-account-receiver

6 years agosimplify the params to create-account-addres (#274)
李永峰 [Wed, 10 Jan 2018 07:17:50 +0000 (15:17 +0800)]
simplify the params to create-account-addres (#274)

6 years agoMerge pull request #273 from Bytom/ci
李永峰 [Wed, 10 Jan 2018 06:11:35 +0000 (14:11 +0800)]
Merge pull request #273 from Bytom/ci

run build in travis ci

6 years agorun build in ci
Yongfeng LI [Wed, 10 Jan 2018 05:44:49 +0000 (13:44 +0800)]
run build in ci

6 years agoMerge pull request #271 from Bytom/response-refactor
李永峰 [Wed, 10 Jan 2018 05:41:02 +0000 (13:41 +0800)]
Merge pull request #271 from Bytom/response-refactor

factor response wrapper

6 years agoadd Response factor
Yongfeng LI [Wed, 10 Jan 2018 05:31:22 +0000 (13:31 +0800)]
add Response factor

mark resWrapper as Deprecated

6 years agoRevert "refactor blockchain resWrapper (#269)" (#270)
Paladz [Wed, 10 Jan 2018 04:59:26 +0000 (12:59 +0800)]
Revert "refactor blockchain resWrapper (#269)" (#270)

This reverts commit 96977ce2f4679ebe14a61b53d987a5ea1782997b.

6 years agorefactor blockchain resWrapper (#269)
李永峰 [Wed, 10 Jan 2018 04:49:58 +0000 (12:49 +0800)]
refactor blockchain resWrapper (#269)

6 years agoMerge build-transaction Actions (#265)
icodezjb [Tue, 9 Jan 2018 07:46:09 +0000 (15:46 +0800)]
Merge build-transaction Actions (#265)

* Merge build-transaction Actions

* Add TestMergeActions in transact_test.go

* Update MergeActions

* Update MergeActions

6 years agoAdd accesstoken authz error return (#266)
yahtoo [Tue, 9 Jan 2018 05:37:19 +0000 (13:37 +0800)]
Add accesstoken authz error return (#266)

6 years agoMerge pull request #263 from Bytom/fix-invalid-type
李永峰 [Mon, 8 Jan 2018 11:26:10 +0000 (19:26 +0800)]
Merge pull request #263 from Bytom/fix-invalid-type

correct CredentialStore#check argument type

6 years agocorrect CredentialStore#check argument type
Yongfeng LI [Mon, 8 Jan 2018 11:17:15 +0000 (19:17 +0800)]
correct CredentialStore#check argument type

6 years agoWebbrowser (#260)
Guanghua Guo [Mon, 8 Jan 2018 09:22:22 +0000 (17:22 +0800)]
Webbrowser (#260)

* Add webbrowser package

* Add bytomd run with webbrowser

* Add configure web's prameters

* go fmt

* Change wallet config

* Change lanch web browser time

6 years agoClear cache before deleting account (#258)
Liu-Cheng Xu [Mon, 8 Jan 2018 04:40:04 +0000 (12:40 +0800)]
Clear cache before deleting account (#258)

Close #253.

6 years agoimprove code style (#257)
李永峰 [Mon, 8 Jan 2018 04:26:40 +0000 (12:26 +0800)]
improve code style (#257)

6 years agorefactor code in CredentialStore#create (#255)
李永峰 [Mon, 8 Jan 2018 03:12:45 +0000 (11:12 +0800)]
refactor code in CredentialStore#create (#255)

* refactor code in CredentialStore#create

* change key generate in CredentialStore#Check

* correct CredentialStore#Delete and enhance test case

6 years agorefactor accesstoken create function (#250)
李永峰 [Fri, 5 Jan 2018 10:02:52 +0000 (18:02 +0800)]
refactor accesstoken create function (#250)

6 years agoDefine ErrInternalAsset (#249)
icodezjb [Fri, 5 Jan 2018 08:13:11 +0000 (16:13 +0800)]
Define ErrInternalAsset (#249)

6 years agoquick small change (#248)
Paladz [Fri, 5 Jan 2018 07:55:09 +0000 (15:55 +0800)]
quick small change (#248)

6 years agoElegant (#247)
Paladz [Fri, 5 Jan 2018 06:11:45 +0000 (14:11 +0800)]
Elegant (#247)

* tmp save

* init push for asset code elegant

* fix a saving bug

* edit for update account tag

6 years agoRemove annotated struct (#242)
Paladz [Fri, 5 Jan 2018 01:54:50 +0000 (09:54 +0800)]
Remove annotated struct (#242)

* tmp save

* all I wanna for Xmas is you

* edit format for test

* fix issue program display issue

6 years agoinit push for remove account annotated_struct (#241)
Paladz [Thu, 4 Jan 2018 01:59:47 +0000 (09:59 +0800)]
init push for remove account annotated_struct (#241)

6 years agoinit push for pay-to-script-hash (#235)
Paladz [Wed, 3 Jan 2018 09:40:25 +0000 (17:40 +0800)]
init push for pay-to-script-hash (#235)

* init push for pay-to-script-hash

* edit for code review

* edit the test code struct

* edit for golint

* add the cli part

6 years agoMerge pull request #238 from Bytom/dev v0.3.0
Guanghua Guo [Wed, 3 Jan 2018 05:56:25 +0000 (13:56 +0800)]
Merge pull request #238 from Bytom/dev

fix infinite call after list call fail (#237)

6 years agofix infinite call after list call fail (#237)
李永峰 [Wed, 3 Jan 2018 04:50:09 +0000 (12:50 +0800)]
fix infinite call after list call fail (#237)

6 years agoMerge pull request #236 from Bytom/dev
Guanghua Guo [Wed, 3 Jan 2018 02:54:25 +0000 (10:54 +0800)]
Merge pull request #236 from Bytom/dev

Dev

6 years agofix dashboard create key (#234)
李永峰 [Tue, 2 Jan 2018 12:09:41 +0000 (20:09 +0800)]
fix dashboard create key (#234)

6 years agoRefactor bytomcli via cobra (#222)
Liu-Cheng Xu [Tue, 2 Jan 2018 11:41:39 +0000 (19:41 +0800)]
Refactor bytomcli via cobra (#222)

* Fix rpc server error (#195)

* Reduce code duplication

* Add exit code

- add exit code for various exceptions.

* Exit after clientCall

* Refactor list-keys and delete-key

* Refactor list-accounts

* Refactor list-assets, add delete-account, etc

* Refactor update-account-tags

* Refactor cmds about access token

* Add txfeed related commands

- also a bit refactor.

* Delete jsend

* Resolve merge conflicts

* Add new files

* Pass golint

* Refactor create account receiver

* Refine commands help

* Use interface{} type instead of []string

* Refactor list-transactions,list-balances and list-unspent-outputs

* Refactor build-transaction

* Refactor sign-transaction and submit-transaction

* Replace bytomcli with cobra

* new branch base

* Refactor multiple commands

Updated:
- block-height
- is-mining
- gas-rate

Removed(bytomd):
- net-listening
- net-syncing
- peer-count

* Update block-related commands

* Refactor list cmd

* Update create-key and create-access-token

* Update txfeed

* Try to fix commit update

* build-transaction and sign-transaction

* code clean and unit-test

* Add cmd sign-submit-transaction

* List assets

* Use id instead of tx_id

* list one entry by id

* Delete transaction index

* Don't return error when no data

* Remove useless files

* List transactions by account id

* Format json tag

* Add asset alias on list-balances

* Add asset alias on list-unspent-outputs

* Add create-account-receiver experimentally

* Add account alias on list-unspent-outputs

* Update according to the preview review

* Revert accesstoken

* Delete useless code

* Rename to bcr

* Support build tramsaction by alias

* Add error log in pseudohsmSignTemplate

* Fix build spend transaction template

* Change dashboard

* Change dashboard.go

* Add btm alias

* Support retire transaction

* Refine net-info

* update dashboard.go

* update dashboard.go

* Support create account by multi-sign

* Multi-signature is avaliable

* Chang error code name

* update dashboard.go

* Update README.md roughly

* update dashboard.go by fixing build transaction with receiver

* Update README.md

* update dashboard.go by fixing create account/asset

6 years agoAdd RPC access auth config option on node start (#225)
yahtoo [Fri, 29 Dec 2017 07:45:57 +0000 (15:45 +0800)]
Add RPC access auth config option on node start (#225)

6 years agoclean the account utxo struct (#221)
Paladz [Fri, 29 Dec 2017 04:49:29 +0000 (12:49 +0800)]
clean the account utxo struct (#221)