14 Commits

Author SHA1 Message Date
Elichai Turkel
45edacfbfa
Replace Double-SHA256 with blake2b and implement domain seperation (#1245)
* Replace default hasher (Double-SHA256) with domain seperated blake2b

* Replace all hashes with domain seperated blake2b

* Update the genesis blocks

* Replace OP_HASH256 with OP_BLAKE2B

* Fix the merkle tree by appending zeros instead of duplicating the hash when there is 1 branch left

* Update tests

* Add a payloadHash function

* Update gitignore to ignore binaries

* Fix a bug in the blake2b opcode
2020-12-21 12:51:45 +02:00
stasatdaglabs
f46dec449d [NOD-510] Change all references to Bitcoin to Kaspa (#531)
* [NOD-510] Change coinbase flags to kaspad.

* [NOD-510] Removed superfluous spaces after periods in comments.

* [NOD-510] Rename btcd -> kaspad in the root folder.

* [NOD-510] Rename BtcEncode -> KaspaEncode and BtcDecode -> KaspaDecode.

* [NOD-510] Rename BtcEncode -> KaspaEncode and BtcDecode -> KaspaDecode.

* [NOD-510] Continue renaming btcd -> kaspad.

* [NOD-510] Rename btcjson -> kaspajson.

* [NOD-510] Rename file names inside kaspajson.

* [NOD-510] Rename kaspajson -> jsonrpc.

* [NOD-510] Finish renaming in addrmgr.

* [NOD-510] Rename package btcec to ecc.

* [NOD-510] Finish renaming stuff in blockdag.

* [NOD-510] Rename stuff in cmd.

* [NOD-510] Rename stuff in config.

* [NOD-510] Rename stuff in connmgr.

* [NOD-510] Rename stuff in dagconfig.

* [NOD-510] Rename stuff in database.

* [NOD-510] Rename stuff in docker.

* [NOD-510] Rename stuff in integration.

* [NOD-510] Rename jsonrpc to rpcmodel.

* [NOD-510] Rename stuff in limits.

* [NOD-510] Rename stuff in logger.

* [NOD-510] Rename stuff in mempool.

* [NOD-510] Rename stuff in mining.

* [NOD-510] Rename stuff in netsync.

* [NOD-510] Rename stuff in peer.

* [NOD-510] Rename stuff in release.

* [NOD-510] Rename stuff in rpcclient.

* [NOD-510] Rename stuff in server.

* [NOD-510] Rename stuff in signal.

* [NOD-510] Rename stuff in txscript.

* [NOD-510] Rename stuff in util.

* [NOD-510] Rename stuff in wire.

* [NOD-510] Fix failing tests.

* [NOD-510] Fix merge errors.

* [NOD-510] Fix go vet errors.

* [NOD-510] Remove merged file that's no longer relevant.

* [NOD-510] Add a comment above Op0.

* [NOD-510] Fix some comments referencing Bitcoin Core.

* [NOD-510] Fix some more comments referencing Bitcoin Core.

* [NOD-510] Fix bitcoin -> kaspa.

* [NOD-510] Fix more bitcoin -> kaspa.

* [NOD-510] Fix comments, remove DisconnectBlock in addrindex.

* [NOD-510] Rename KSPD to KASD.

* [NOD-510] Fix comments and user agent.
2019-12-12 15:21:41 +02:00
Svarog
7a4deb6f18 [NOD-251] Use bluest parent anywhere validating difficulty, instead of selectedTip (#348) 2019-07-17 14:46:58 +03:00
Svarog
122520b9a5 Nod 42 restructure block acceptance logic (#217)
* [NOD-42] Split checkFinalityRules and newFinalityPoint

* [NOD-42] Rename connectToDAG -> addBlock + move anything that is not actually connecting block to DAG out of connectBlock

* [NOD-42] Extract methods from PastUTXO

* [NOD-42] Give names to outputs in verifyAndBuildUTXO and propagate name
changes up the call tree

* [NOD-42] Split loop that creates UTXODiff and updates acceptance data into 2 separate methods

* [NOD-42] Removed from applyUTXOChanges any validation logic, moved in any logic related to updating the DAG and renamed to applyDAGChanges

* [NOD-42] Rename: CheckTransactionInputs -> CheckTransactionInputsAndCalculateFee

* [NOD-42] Revise some comments

* [NOD-42] Removed finalityErr constant - it's not needed

* Multiple chain -> dag corrections in comments

* [NOD-42] Removed redundant declaration of feeData

* [NOD-42] Reworded some comments

* [NOD-42] Rename MultiblockTxsAcceptanceData -> MultiBlockTxsAcceptanceData
2019-03-19 11:21:27 +02:00
Svarog
58b1b01c3f Dev 378 optimize calculate fee (#189)
* [DEV-378] Added feeAccumulator structures

* [DEV-378] Added logic to create and store fee data when validating a block

* [DEV-378] Renamed feeAccumulator to compactFeeData, and all related entities accordingly

* [DEV-378] Converted MsgTx.TxHash() to pointer to hash and not hash

* [DEV-378] Restructured parameters to buildFeeTransaction and related entities

* [DEV-378] Finished the code that calculates fees for blocks

* [DEV-378] Fix TxIndex after changing the structure of AcceptedTxsData

* [DEV-378] For genesis block: Return empty AcceptedTxsData instead of nil

* [DEV-378] Off-by-one error

* [DEV-378] Length of compactFeeData should be determined by specific method, not

* [DEV-378] Multiple bugfixes in tx fee calculation

* [DEV-378] Calculate fee even if fastAdd, to save feeData

* [DEV-378] use IsEqual instead of == when comparing TxHash

* [DEV-378] txindex: if including block is the new block - don't fetch id from DB

* [DEV-378] Fixed a few typos and made some vars consts

* [DEV-378] Re-organized fee functions, removed redundant functions and constants, and revised a few comments

* [DEV-378] Recovered fmt string changes lost in merge

* [DEV-378] Renamed acceptedTxsData and related types and vars to txsAcceptanceData

* [DEV-378] Some comment fixes

* [DEV-378] Remove redundant .ToString()
2019-02-24 11:52:06 +02:00
Mike Zak
b522d6934d Added coverage.txt to .gitignore 2018-12-20 18:45:52 +02:00
stasatdaglabs
d5787954ee
[DEV-167] Create full docker-based environment for client team testing (#78)
* [DEV-167] Created Dockerfile, dockerignore, and docker-compose.

* [DEV-167] Updated docker-compose to use remote image.

* [DEV-167] Added --addrindex to docker-compose.

* [DEV-167] Switched to testnet and plugged in the correct address.

* [DEV-167] Removed the third and fourth nodes from docker-compose.

* [DEV-167] Exposed RPC port, added rpcuser and rpcpass.

* [DEV-167] Wrangled RPC stuff into shape. Moved docker stuff into btcd/docker.

* [DEV-167] Moved dockerignore back to root. Corrected path for rpc.cert and rpc.key.

* [DEV-167] Added Jenkins job stuff.

* [DEV-167] Added deploy.sh.

* [DEV-167] Removed .travis.yaml and a couple of files that shouldn't be in this branch.
2018-10-18 11:49:11 +03:00
Ori Newman
1e98d0dbfe [DEV-31] remove json transaction tests 2018-07-22 15:53:06 +03:00
Ori Newman
8e7d475bf9 [DEV-31] Regenrate block databases and genesis blocks in order to be compatiable with the new structure (uint64 timestamps) 2018-07-20 10:24:41 +03:00
Mike Zak
734abd749b (#DEV-14) Remove anything Segwit related in btcd package + some edits in btcjson+rpcclient to make tests pass 2018-06-07 13:46:32 +03:00
Stas Boutenko
91d2c669f0 Added IntelliJ GoLand-specific files to .gitignore. 2018-06-03 18:29:00 +03:00
Dave Collins
2554caee59 build: Convert project to use glide. (#689)
This converts the project to allow btcd to be used with the glide
package manager in order to provide stable and reproducible builds
without the user having to jump through all of the hoops as they do
today.

It consists of adding a glide.yaml file which identifies the project
dependencies and locations along with a glide.lock file which contains
the complete dependency tree pinned to specific versions.  Glide uses
these files to download the packages (or updates) to a local vendor
directory and checkout the correct pinned versions.  The go tool, in
turn, is used to build/install btcd and will use the pinned versions in
the vendor directory.

This also updates TravisCI to build using glide, removes some of the
exceptions in the lint checks which are no longer required, and updates
the README.md with the new instructions needed to build the project with
glide.
2016-05-06 10:47:53 -05:00
Dave Collins
f168694ecf Convert .gitignore line endings to unix. 2013-08-07 15:00:20 -05:00
Dave Collins
c59a86c467 Initial commit. 2013-08-06 11:32:43 -05:00