public key - What are the DER signature and SEC format ...

Signing Issue -- Signature must use SIGHASH_FORKID

Currently integrating my wallet software with Bitcoin Cash, but am having one hell of a time sending funds. I like to think I'm quite well versed with the bitcoin protocol, but this one has me stumped, so any help greatly appreciated.
Keep getting that, "Signature must use SIGHASH_FORKID" error. I know the general format of bitcoin txs, which is basically: Version + Num_Inputs + Inputs + Num_Outputs + Outputs + Locktime. Then I know how to sign via ECDSA, create the DER signatures, etc. That's all no problem.
This 0x40 SIGHASH is causing an issue though. What do I change within the original bitcoin tx to add that 0x40 in there?
I think one thing I have to do, is when getting that double SHA256 hash to sign, instead of adding '00000000' at the end you add '40000000' to get the proper hash to sign. However, what do I change in the DER signature to make this work? At the end of the DER there's a '01' so tried switching that to to 40, and no luck. Tried adding 40 at the end as some docs state, and again no luck.
Any help would be greatly appreciated, as I know this is a 30 second fix that I've already spent 3 days on. Google isn't much help on this one.
submitted by Envrin to Bitcoincash [link] [comments]

Bitcoin (BTC)A Peer-to-Peer Electronic Cash System.

Bitcoin (BTC)A Peer-to-Peer Electronic Cash System.
  • Bitcoin (BTC) is a peer-to-peer cryptocurrency that aims to function as a means of exchange that is independent of any central authority. BTC can be transferred electronically in a secure, verifiable, and immutable way.
  • Launched in 2009, BTC is the first virtual currency to solve the double-spending issue by timestamping transactions before broadcasting them to all of the nodes in the Bitcoin network. The Bitcoin Protocol offered a solution to the Byzantine Generals’ Problem with a blockchain network structure, a notion first created by Stuart Haber and W. Scott Stornetta in 1991.
  • Bitcoin’s whitepaper was published pseudonymously in 2008 by an individual, or a group, with the pseudonym “Satoshi Nakamoto”, whose underlying identity has still not been verified.
  • The Bitcoin protocol uses an SHA-256d-based Proof-of-Work (PoW) algorithm to reach network consensus. Its network has a target block time of 10 minutes and a maximum supply of 21 million tokens, with a decaying token emission rate. To prevent fluctuation of the block time, the network’s block difficulty is re-adjusted through an algorithm based on the past 2016 block times.
  • With a block size limit capped at 1 megabyte, the Bitcoin Protocol has supported both the Lightning Network, a second-layer infrastructure for payment channels, and Segregated Witness, a soft-fork to increase the number of transactions on a block, as solutions to network scalability.

https://preview.redd.it/s2gmpmeze3151.png?width=256&format=png&auto=webp&s=9759910dd3c4a15b83f55b827d1899fb2fdd3de1

1. What is Bitcoin (BTC)?

  • Bitcoin is a peer-to-peer cryptocurrency that aims to function as a means of exchange and is independent of any central authority. Bitcoins are transferred electronically in a secure, verifiable, and immutable way.
  • Network validators, whom are often referred to as miners, participate in the SHA-256d-based Proof-of-Work consensus mechanism to determine the next global state of the blockchain.
  • The Bitcoin protocol has a target block time of 10 minutes, and a maximum supply of 21 million tokens. The only way new bitcoins can be produced is when a block producer generates a new valid block.
  • The protocol has a token emission rate that halves every 210,000 blocks, or approximately every 4 years.
  • Unlike public blockchain infrastructures supporting the development of decentralized applications (Ethereum), the Bitcoin protocol is primarily used only for payments, and has only very limited support for smart contract-like functionalities (Bitcoin “Script” is mostly used to create certain conditions before bitcoins are used to be spent).

2. Bitcoin’s core features

For a more beginner’s introduction to Bitcoin, please visit Binance Academy’s guide to Bitcoin.

Unspent Transaction Output (UTXO) model

A UTXO transaction works like cash payment between two parties: Alice gives money to Bob and receives change (i.e., unspent amount). In comparison, blockchains like Ethereum rely on the account model.
https://preview.redd.it/t1j6anf8f3151.png?width=1601&format=png&auto=webp&s=33bd141d8f2136a6f32739c8cdc7aae2e04cbc47

Nakamoto consensus

In the Bitcoin network, anyone can join the network and become a bookkeeping service provider i.e., a validator. All validators are allowed in the race to become the block producer for the next block, yet only the first to complete a computationally heavy task will win. This feature is called Proof of Work (PoW).
The probability of any single validator to finish the task first is equal to the percentage of the total network computation power, or hash power, the validator has. For instance, a validator with 5% of the total network computation power will have a 5% chance of completing the task first, and therefore becoming the next block producer.
Since anyone can join the race, competition is prone to increase. In the early days, Bitcoin mining was mostly done by personal computer CPUs.
As of today, Bitcoin validators, or miners, have opted for dedicated and more powerful devices such as machines based on Application-Specific Integrated Circuit (“ASIC”).
Proof of Work secures the network as block producers must have spent resources external to the network (i.e., money to pay electricity), and can provide proof to other participants that they did so.
With various miners competing for block rewards, it becomes difficult for one single malicious party to gain network majority (defined as more than 51% of the network’s hash power in the Nakamoto consensus mechanism). The ability to rearrange transactions via 51% attacks indicates another feature of the Nakamoto consensus: the finality of transactions is only probabilistic.
Once a block is produced, it is then propagated by the block producer to all other validators to check on the validity of all transactions in that block. The block producer will receive rewards in the network’s native currency (i.e., bitcoin) as all validators approve the block and update their ledgers.

The blockchain

Block production

The Bitcoin protocol utilizes the Merkle tree data structure in order to organize hashes of numerous individual transactions into each block. This concept is named after Ralph Merkle, who patented it in 1979.
With the use of a Merkle tree, though each block might contain thousands of transactions, it will have the ability to combine all of their hashes and condense them into one, allowing efficient and secure verification of this group of transactions. This single hash called is a Merkle root, which is stored in the Block Header of a block. The Block Header also stores other meta information of a block, such as a hash of the previous Block Header, which enables blocks to be associated in a chain-like structure (hence the name “blockchain”).
An illustration of block production in the Bitcoin Protocol is demonstrated below.

https://preview.redd.it/m6texxicf3151.png?width=1591&format=png&auto=webp&s=f4253304912ed8370948b9c524e08fef28f1c78d

Block time and mining difficulty

Block time is the period required to create the next block in a network. As mentioned above, the node who solves the computationally intensive task will be allowed to produce the next block. Therefore, block time is directly correlated to the amount of time it takes for a node to find a solution to the task. The Bitcoin protocol sets a target block time of 10 minutes, and attempts to achieve this by introducing a variable named mining difficulty.
Mining difficulty refers to how difficult it is for the node to solve the computationally intensive task. If the network sets a high difficulty for the task, while miners have low computational power, which is often referred to as “hashrate”, it would statistically take longer for the nodes to get an answer for the task. If the difficulty is low, but miners have rather strong computational power, statistically, some nodes will be able to solve the task quickly.
Therefore, the 10 minute target block time is achieved by constantly and automatically adjusting the mining difficulty according to how much computational power there is amongst the nodes. The average block time of the network is evaluated after a certain number of blocks, and if it is greater than the expected block time, the difficulty level will decrease; if it is less than the expected block time, the difficulty level will increase.

What are orphan blocks?

In a PoW blockchain network, if the block time is too low, it would increase the likelihood of nodes producingorphan blocks, for which they would receive no reward. Orphan blocks are produced by nodes who solved the task but did not broadcast their results to the whole network the quickest due to network latency.
It takes time for a message to travel through a network, and it is entirely possible for 2 nodes to complete the task and start to broadcast their results to the network at roughly the same time, while one’s messages are received by all other nodes earlier as the node has low latency.
Imagine there is a network latency of 1 minute and a target block time of 2 minutes. A node could solve the task in around 1 minute but his message would take 1 minute to reach the rest of the nodes that are still working on the solution. While his message travels through the network, all the work done by all other nodes during that 1 minute, even if these nodes also complete the task, would go to waste. In this case, 50% of the computational power contributed to the network is wasted.
The percentage of wasted computational power would proportionally decrease if the mining difficulty were higher, as it would statistically take longer for miners to complete the task. In other words, if the mining difficulty, and therefore targeted block time is low, miners with powerful and often centralized mining facilities would get a higher chance of becoming the block producer, while the participation of weaker miners would become in vain. This introduces possible centralization and weakens the overall security of the network.
However, given a limited amount of transactions that can be stored in a block, making the block time too longwould decrease the number of transactions the network can process per second, negatively affecting network scalability.

3. Bitcoin’s additional features

Segregated Witness (SegWit)

Segregated Witness, often abbreviated as SegWit, is a protocol upgrade proposal that went live in August 2017.
SegWit separates witness signatures from transaction-related data. Witness signatures in legacy Bitcoin blocks often take more than 50% of the block size. By removing witness signatures from the transaction block, this protocol upgrade effectively increases the number of transactions that can be stored in a single block, enabling the network to handle more transactions per second. As a result, SegWit increases the scalability of Nakamoto consensus-based blockchain networks like Bitcoin and Litecoin.
SegWit also makes transactions cheaper. Since transaction fees are derived from how much data is being processed by the block producer, the more transactions that can be stored in a 1MB block, the cheaper individual transactions become.
https://preview.redd.it/depya70mf3151.png?width=1601&format=png&auto=webp&s=a6499aa2131fbf347f8ffd812930b2f7d66be48e
The legacy Bitcoin block has a block size limit of 1 megabyte, and any change on the block size would require a network hard-fork. On August 1st 2017, the first hard-fork occurred, leading to the creation of Bitcoin Cash (“BCH”), which introduced an 8 megabyte block size limit.
Conversely, Segregated Witness was a soft-fork: it never changed the transaction block size limit of the network. Instead, it added an extended block with an upper limit of 3 megabytes, which contains solely witness signatures, to the 1 megabyte block that contains only transaction data. This new block type can be processed even by nodes that have not completed the SegWit protocol upgrade.
Furthermore, the separation of witness signatures from transaction data solves the malleability issue with the original Bitcoin protocol. Without Segregated Witness, these signatures could be altered before the block is validated by miners. Indeed, alterations can be done in such a way that if the system does a mathematical check, the signature would still be valid. However, since the values in the signature are changed, the two signatures would create vastly different hash values.
For instance, if a witness signature states “6,” it has a mathematical value of 6, and would create a hash value of 12345. However, if the witness signature were changed to “06”, it would maintain a mathematical value of 6 while creating a (faulty) hash value of 67890.
Since the mathematical values are the same, the altered signature remains a valid signature. This would create a bookkeeping issue, as transactions in Nakamoto consensus-based blockchain networks are documented with these hash values, or transaction IDs. Effectively, one can alter a transaction ID to a new one, and the new ID can still be valid.
This can create many issues, as illustrated in the below example:
  1. Alice sends Bob 1 BTC, and Bob sends Merchant Carol this 1 BTC for some goods.
  2. Bob sends Carols this 1 BTC, while the transaction from Alice to Bob is not yet validated. Carol sees this incoming transaction of 1 BTC to him, and immediately ships goods to B.
  3. At the moment, the transaction from Alice to Bob is still not confirmed by the network, and Bob can change the witness signature, therefore changing this transaction ID from 12345 to 67890.
  4. Now Carol will not receive his 1 BTC, as the network looks for transaction 12345 to ensure that Bob’s wallet balance is valid.
  5. As this particular transaction ID changed from 12345 to 67890, the transaction from Bob to Carol will fail, and Bob will get his goods while still holding his BTC.
With the Segregated Witness upgrade, such instances can not happen again. This is because the witness signatures are moved outside of the transaction block into an extended block, and altering the witness signature won’t affect the transaction ID.
Since the transaction malleability issue is fixed, Segregated Witness also enables the proper functioning of second-layer scalability solutions on the Bitcoin protocol, such as the Lightning Network.

Lightning Network

Lightning Network is a second-layer micropayment solution for scalability.
Specifically, Lightning Network aims to enable near-instant and low-cost payments between merchants and customers that wish to use bitcoins.
Lightning Network was conceptualized in a whitepaper by Joseph Poon and Thaddeus Dryja in 2015. Since then, it has been implemented by multiple companies. The most prominent of them include Blockstream, Lightning Labs, and ACINQ.
A list of curated resources relevant to Lightning Network can be found here.
In the Lightning Network, if a customer wishes to transact with a merchant, both of them need to open a payment channel, which operates off the Bitcoin blockchain (i.e., off-chain vs. on-chain). None of the transaction details from this payment channel are recorded on the blockchain, and only when the channel is closed will the end result of both party’s wallet balances be updated to the blockchain. The blockchain only serves as a settlement layer for Lightning transactions.
Since all transactions done via the payment channel are conducted independently of the Nakamoto consensus, both parties involved in transactions do not need to wait for network confirmation on transactions. Instead, transacting parties would pay transaction fees to Bitcoin miners only when they decide to close the channel.
https://preview.redd.it/cy56icarf3151.png?width=1601&format=png&auto=webp&s=b239a63c6a87ec6cc1b18ce2cbd0355f8831c3a8
One limitation to the Lightning Network is that it requires a person to be online to receive transactions attributing towards him. Another limitation in user experience could be that one needs to lock up some funds every time he wishes to open a payment channel, and is only able to use that fund within the channel.
However, this does not mean he needs to create new channels every time he wishes to transact with a different person on the Lightning Network. If Alice wants to send money to Carol, but they do not have a payment channel open, they can ask Bob, who has payment channels open to both Alice and Carol, to help make that transaction. Alice will be able to send funds to Bob, and Bob to Carol. Hence, the number of “payment hubs” (i.e., Bob in the previous example) correlates with both the convenience and the usability of the Lightning Network for real-world applications.

Schnorr Signature upgrade proposal

Elliptic Curve Digital Signature Algorithm (“ECDSA”) signatures are used to sign transactions on the Bitcoin blockchain.
https://preview.redd.it/hjeqe4l7g3151.png?width=1601&format=png&auto=webp&s=8014fb08fe62ac4d91645499bc0c7e1c04c5d7c4
However, many developers now advocate for replacing ECDSA with Schnorr Signature. Once Schnorr Signatures are implemented, multiple parties can collaborate in producing a signature that is valid for the sum of their public keys.
This would primarily be beneficial for network scalability. When multiple addresses were to conduct transactions to a single address, each transaction would require their own signature. With Schnorr Signature, all these signatures would be combined into one. As a result, the network would be able to store more transactions in a single block.
https://preview.redd.it/axg3wayag3151.png?width=1601&format=png&auto=webp&s=93d958fa6b0e623caa82ca71fe457b4daa88c71e
The reduced size in signatures implies a reduced cost on transaction fees. The group of senders can split the transaction fees for that one group signature, instead of paying for one personal signature individually.
Schnorr Signature also improves network privacy and token fungibility. A third-party observer will not be able to detect if a user is sending a multi-signature transaction, since the signature will be in the same format as a single-signature transaction.

4. Economics and supply distribution

The Bitcoin protocol utilizes the Nakamoto consensus, and nodes validate blocks via Proof-of-Work mining. The bitcoin token was not pre-mined, and has a maximum supply of 21 million. The initial reward for a block was 50 BTC per block. Block mining rewards halve every 210,000 blocks. Since the average time for block production on the blockchain is 10 minutes, it implies that the block reward halving events will approximately take place every 4 years.
As of May 12th 2020, the block mining rewards are 6.25 BTC per block. Transaction fees also represent a minor revenue stream for miners.
submitted by D-platform to u/D-platform [link] [comments]

Question about ECDSA private key recovery from known k parameter

I'm trying to solve a challenge about finding ECDSA private key from known k, and I encountered a problem that I can't google, so I hope someone will help me here.

I have a signature, a Bitcoin address, a message and the k parameter used to create the signature. I wrote a solution that works with my own test cases, but it fails with the challenge in the following way: the public key that gets derived from found private key is not the same as as the public key that corresponds to the Bitcoin address. However, signing the same message with the same k produces the same signature as the challenge signature (aside from special byte appended by Bitcoin). I suspected that the problem might be with the R, but R, and tried a few different values, even though it's already supplied by Bitcoin signature format, but still failed to produce the same public key.
Update: found the R value that leads to the same public key that I can derive from my found private key. Seems like this was a part of the challenge. Still, want to know the answer to my last question, as I don't know much theory about Ecdsa.
Update 2: after getting a hint, I found the private key by using -s instead of s to calculate the private key. But I don't fully understand how it worked, I see it has something to do with ECDSA malleability, so my second question is - how it all worked?
So, my question is - what I could be doing wrong? Can different private keys produce the same signature when k and message are the same?
submitted by Satoshi_Hodler to crypto [link] [comments]

You can call you a Bitcoiner if you know/can explain these terms...

03/Jan/2009
10 Minutes
10,000 BTC Pizza
2016 Blocks
21 Million
210,000 Blocks
51% Attack
Address
Altcoin
Antonopoulos
Asic
Asic Boost
Base58
Batching
Bech32
Bit
Bitcoin Cash
Bitcoin Improvement Proposal (BIP)
Bitcoin SV
Bitmain
Block
Block height
Block reward
Blockchain
Blockexplorer
Bloom Filter
Brain Wallet
Buidl
Change Address
Child pays for parent (CPFP)
Coinbase (not the exchange)
CoinJoin
Coinmarketcap (CMC)
Colored Coin
Confirmation
Consensus
Custodial Wallet
Craig Wright
David Kleinman
Difficulty
Difficulty adjustment
Difficulty Target
Dogecoin
Dorian Nakamoto
Double spend
Elliptic Curve Digital Signature Algorithm (ECDSA)
Ethereum
Faketoshi
Fork
Full Node
Gavin Andresen
Genesis Block
Getting goxed
Halving
Hard Fork
Hardware Wallet
Hash
Hashing
Hierarchical Deterministic (HD) Wallet
Hodl
Hot Wallet
Initial Coin Offering (ICO)
Initial Exchange Offering (IEO)
Ledger
Light Node
Lightning
Litecoin
Locktime
Mainnet
Malleability
Master Private Key
Master Public Key
Master Seed
mBTC
Mempool
Merkle Tree
Mining
Mining Farm
Mining Pool
Mixing
MtGox
Multisig
Nonce
Not your keys,...
Opcode
Orphan block
P2PKH
P2SH
Paper Wallet
Peers
Pieter Wuille
Premining
Private key
Proof of Stake (PoS)
Proof of Work (PoW)
Pruning
Public key
Pump'n'Dump
Replace by Fee (RBF)
Ripemd160
Roger Ver
sat
Satoshi Nakamoto
Schnorr Signatures
Script
Segregated Witness (Segwit)
Sha256
Shitcoin
Sidechain
Signature
Signing
Simplified Payment Verification (SPV)
Smart Contract
Soft Fork
Stratum
Syncing
Testnet
Transaction
Transaction Fees
TransactionId (Txid)
Trezor
User Activated Soft Fork (UASF)
Utxo
Wallet Import Format (WIF)
Watch-Only Address
Whitepaper
List obviously not complete. Suggestions appreciated.
Refs:
https://bitcoin.org/en/developer-glossary https://en.bitcoin.it/wiki/Main_Page https://www.youtube.com/channel/UCgo7FCCPuylVk4luP3JAgVw https://www.youtube.com/useaantonop
submitted by PolaT1x to Bitcoin [link] [comments]

Weekly Dev Update #17

THORChain Weekly Dev Update for Week 12–18 Nov 2019

![](https://miro.medium.com/max/2880/1*Fy-NCZAKhgbZmE-iEIQChQ.png)

Recent Changes

Some recent updates to the protocol:

Update to Emission

The first iteration of the block reward scheme was announced in the previous weekly update. An immediate concern raised from the community was that the emission was too aggressive in the initial year and rewards dropped off fast beyond the 5 year mark. Taking Bitcoin’s emission as an example, the emission curve has been updated to target 2% emission after 10 years.
![](https://miro.medium.com/max/2384/1*gqBLvJOl2G4n3IHW1rViKg.png)
The Block Reward equation is given by the following recurrence equation: g(n+2) = ((R - (g(n+1) + g(n))) / x) / y Which evaluates to: ![](https://miro.medium.com/max/1624/1*ttpsRd7HUs2-7hvDGO6elg.png) where: R = Reserve, x = 6 (Arbitrary Emission Factor) y = (seconds per day / seconds per block) / days per year y = (86400 / 5) * 365.2425 The final curve thus has a Day 0 emission of 25%, Year 1 emission of 20% and Year 10 emission of 2%.

ChaosNet

The original plan for BEPSwap (prior to the Yggdrasil liquidity breakthrough) was to have it as a separate mainnet before launching the real THORChain in 2020 with cross-chain support. Now THORChain has in-built cross-chain support and a clear roadmap to 99 nodes. This means the mainnet launch will have public, community-run nodes at the start. The community has been fielding many questions about how to run a node, and the mechanics in doing so. Since the THORChain team will not be running any nodes, it is necessary to have a full-rehearsal with the community at launch. As such, the plan is for a public ChaosNet on 03 January 2020. ChaosNet will have the following key differences: * Minimum bond of 100k RUNE. * Maximum of 12 Nodes. * Churn cycle of 1 day. * Maximum stake amount of 600k RUNE total. * 2.7m RUNE Protocol Reserve to emit Bond and Stake rewards. * Hard-coded Ragnorök at 6 weeks.
Any member who wishes to join ChaosNet to get accustomed to running a node can do so, and will receive Block Rewards roughly equivalent to mainnet (25%). They will be setting up nodes, churning in, servicing the network and earning rewards. The system will hold up to 600k Rune, at which point it will refund any additional staked amount. The community can stake small amounts of real assets, prepare arbitrage bots, set up telegram alert bots and more. In short, it is a public rehearsal with the entire community across all facets (nodes, stakers, traders) so that everyone will have access to the same information and not unfairly benefit when the real mainnet launches. Additionally, the system will be hard-coded to perform a Ragnorök 6 weeks later, which will refund all the remaining reserve as well as bonded and staked assets. This will go a long way in re-assuring the community that the system can tolerate all levels of risk, including black-swan events, and that funds are safe at all times.

Internal Arbitrage

A new feature will be launched that will allow users to use internal arbitrage. This is an asymmetrical withdrawal to Rune, then immediately followed by a asymmetrical stake of Rune in another pool. A trader may want to do this instead of doing transactional arbitrage in order to exploit price differences between two pools the fastest way possible. Instead of an outgoing transaction being processed, followed by another incoming transaction, Rune balances and stakeUnits are swapped internally, being completed inside of a few seconds.

Fee-based Transaction Prioritisation

Currently there is no prioritisation to the order of transactions, all transactions are simply processed in order of time received. In moments of high demand of network resources (such as when there are large arbitrage opportunities and users are racing to exploit them), transactions will queue in the mempool. If the system cannot respond fast enough, then the reason for high demand will persist (the large arbitrage opportunity). The solution is to remove the reason for high demand in the first place, which is the large arbitrage opportunity, at the same time as collecting the maximum revenue for the system. As such, in the checkTx method (which can triage the mempool), transactions will be sorted and ordered in the value of the fee of the swap transaction. Assuming rational actors, the following transactions will then be prioritised over all others: * A transaction from an impatient swapper who is willing to pay a large fee. * A transaction from a trader who is able to arbitrage out a price discrepancy (and still make a gain).
This then means the system can collect as much income as possible (good for the stakers) at the same time as prioritising transactions that can arbitrage out large price discrepancies quickly. This then means swaps from transient swappers will experience a market price that accurately matches the reference price at all times.

BEPSwap Development

The team are working on 4 parallel streams of effort. Cross-chain infrastructure has now been merged into a single repo called “THORNode”. * THORChain * Midgard Public API * Threshold Signature Scheme implementation * Front-end Integration for BEPSwap

THORChain

Bug fixes, refactoring, as well as more logic around Yggdrasil funding. Additionally, node churn and the first part of block rewards PR was merged. * Add admin config event, fix tx out events https://gitlab.com/thorchain/bepswap/thornode/merge_requests/255 * Resolve “Select a satellite pool to swap out” https://gitlab.com/thorchain/bepswap/thornode/merge_requests/253 * Include the thorcli volume for the signer. https://gitlab.com/thorchain/bepswap/thornode/merge_requests/261 * Rune Reserves, block rewards, bond units, oh my! https://gitlab.com/thorchain/bepswap/thornode/merge_requests/258 * Add mechanism to slash a node account bond or rewards https://gitlab.com/thorchain/bepswap/thornode/merge_requests/264 * Add add event https://gitlab.com/thorchain/bepswap/thornode/merge_requests/262 * Issue198 node churn https://gitlab.com/thorchain/bepswap/thornode/merge_requests/270 * Issue199 — fix signer doesn’t process multiple txout item https://gitlab.com/thorchain/bepswap/thornode/merge_requests/271 * issue194: only rune get refund for invalid memo https://gitlab.com/thorchain/bepswap/thornode/merge_requests/272 * Outbound — mark txout item out hash based on the coin as well https://gitlab.com/thorchain/bepswap/thornode/merge_requests/273

Midgard Public API

Database ported from influxdb to timescaledb (more maturity, better developer tooling). Endpoints built out include/pools and /stakers. * Feature/new endpoint format, refactors and general clean ups
The OpenApi Schema can be reviewed here:
https://testnet-api.bepswap.net/v1/doc

Threshold Signature Scheme

TSS was successfully implemented into the Genesis ceremony, with the focus now being on the key-gen and key-sign ceremonies. Multi-cast DNS was switched out for a distributed hash table to facilitate node discovery. * Issue4 — docker images and ci https://gitlab.com/thorchain/tss/multi-party-ecdsa-dockemerge_requests/5 * Fix a docker bug https://gitlab.com/thorchain/tss/multi-party-ecdsa-dockemerge_requests/6
A proof-of-concept is being prepared using BinanceChain TSS library, which was recently launched in order to make a decision whether to switch libraries. A go-based implementation is better for THORNode, since it is also written in Go.
https://github.com/binance-chain/tss-lib

Frontend Implementation

Bug-fixes and tweaks from community feedback. The frontend is now ready for implementation with the latest Midgard API. * Resolve “Write cypress e2e test for pool stake list view” https://gitlab.com/thorchain/bepswap/bepswap-react-app/merge_requests/164 * Resolve “Update rune token icon” https://gitlab.com/thorchain/bepswap/bepswap-react-app/merge_requests/165 * Resolve “Update confirmation modal” https://gitlab.com/thorchain/bepswap/bepswap-react-app/merge_requests/166 * Resolve “Update wallet view” https://gitlab.com/thorchain/bepswap/bepswap-react-app/merge_requests/167 * Resolve “Add tooltip for wallet connection” https://gitlab.com/thorchain/bepswap/bepswap-react-app/merge_requests/168

Timelines

The team are working for these milestones: * Feature Freeze: 20 November 2019 on-time * Audit: 20 December 2019 on-time * ChaosNet: 03 January 2020 on-time

Community

To keep up to date, please monitor community channels, particularly Telegram and Twitter: Twitter: https://twitter.com/thorchain_org Telegram Community: https://t.me/thorchain_org Telegram Announcements: https://t.me/thorchain Reddit: https://reddit.com/thorchain Github: https://github.com/thorchain Medium: https://medium.com/thorchain
submitted by thorchain_org to THORChain [link] [comments]

How the core developers are working to further scale Bitcoin.

Following the implementation of Segwit, it's time to talk about Schnorr signatures and how they are going to aid in scaling Bitcoin. Segwit works by altering the composition of Bitcoin blocks. It moves the signature data to another part of the block, hence the name "Segregated Witness". Now that the signature data has been reorganized, Schnorr signatures can be applied to them, where they are signed at once rather than individually. According to coindesk, "Under the ECDSA scheme, each piece of a bitcoin transaction is signed individually, while with Schnorr signatures, all of this data can be signed once"[3].
What are Schnorr Signatures?
How is this going to change/improve Bitcoin?
How are these changes going to implemented?
How is the work coming along?
The meat and potatoes of the matter
The verification equation:
sG = R - H(R || P1 || C || m)P1 - H(R || P2 || C || m)P2 
The signature equation:
R = H(R || P1 || C || m)P1 + … + s*G 
Summations are fundamentally faster to compute on computers than multiplication. This is because each multiplication operation is the sum of the terms where the n is the number of terms. So 5 * 7 = 5 + 5 + 5 + 5 + 5 + 5 + 5 (or vice versa for 7). computers only have the capacity to perform two operations - addition and bitwise shifts. Algorithms that maximize the use of these operations are comparitively faster than algorithms that use multiplication, division, or modulus even when the time complexity of the two problems are equal. This is why "For 100000 keys, the speedup is approximately 8x"[1].
"And aggregation shrinks the transaction sizes by the amounts of inputs they have. In our paper, we went and ran numbers on the shrinkage based on existing transaction patterns, there was a 28% reduction based on the existing history"[1].
This is VERY SIGNIFICANT. The "aggregation shrinks the transaction sizes by the amounts of inputs they have"[1]. This means the "more inputs you have, the more you gain because you add a shared cost of paying for one signature"[1].
"Validation time regardless of how complex your script is. You just prove that the script existed, it is valid, and the hash. But anything that further complicates the structure of transaction. This helps fungibility, privacy, and bandwidth"[1].
What can you do to help?
Sources
[1] http://diyhpl.us/wiki/transcripts/bitcoin-core-dev-tech/2017-09-06-signature-aggregation/
[2] https://github.com/bitcoin-core/secp256k1
[3] https://www.coindesk.com/just-segwit-bitcoin-core-already-working-new-scaling-upgrade/
Edit: Finally got formatting to work.
submitted by RussianHacker1011101 to Bitcoin [link] [comments]

Is It Safe to Share Your Bitcoin Address?

Is It Safe to Share Your Bitcoin Address?
Is It Safe to Share Your Bitcoin Address?
Before we decide that sharing bitcoin address is compromised or safe, we must understand few important aspects of bitcoin address and its security because this information guides you in deciding whether to share the bitcoin address to anyone or on any website. Bitcoin is the most privileged cryptocoin in the current crypto world. Any bitcoin user can generate bitcoin address without even having an internet connection, and additionally, it is not necessary to register with the bitcoin world network. Thus people can create such address with the help of the software available freely on numerous websites. Technically, a Bitcoin address is a 160-bit hash of the public portion of a public/private ECDSA key pair. Using public-key cryptography, you can “sign” data with your secret private key, and anyone who knows your public key can verify your signature legitimacy.
A bitcoin address includes 26-35 alphanumeric characters with similar to 1, 3 bc1 which is a digital designation. A bitcoin payment address looks like "bc1par0srtr5xfkny3l613lydnw9re59gtzzkf8ndq"
However, this is one of a kind of bitcoin address format, and in fact, there are 3 other formats of such addresses. Those formats are P2PKH, P2SH, and Bech32. You can think of the address of your bank account number where the money can be received or deposited by yourself or third parties. Generally, most of the bitcoin address consists of 32 characters with random uppercase, lowercase, and numbers except “I” and “O”. These two letters have never been used till today to avoid the ambiguity. Bitcoin addresses are a consequence of generating a public and key pair. The address is known secretly to wallet owner. Therefore, this is entirely safe and secure if your storing device is not compromised.
Without sharing your bitcoin address, it is not possible to receive funds from another party, so you have to share the Bitcoin address without a second option. Now the question arises that what can happen to my address once you make it public. Hackers can manage to find your address, but cannot do anything until you share them your private keys. The private key can be understood like the password for your bank account for transaction requirement, thus without revealing your private key, people can locate your address, but cannot peep into your account details or be able to do any transaction.
These addresses are not crypto wallet nor balance accounts. You can use it to receive the crypto funds. These addresses are just like bank account numbers where other parties can see and deposit, but they cannot withdraw or send money from that account. Only the owner of the address has the power to send money if he/she has other private keys. Bitcoin address has a built-in check code, so no one can send the bitcoin to wrong address. If the address is valid, but without an owner in such cases the coins sent mistakenly are lost forever and cannot be reverted.
To conclude, it is very safe to share the bitcoin address to another by keeping the private key within your limitation. The private key cannot be accessible to any other third parties on any aspect.
Ultimately, investors have to be updated with the crypto world, especially while buy Bitcoin and buy ethereum other Altcoins.
submitted by unicoindcx to u/unicoindcx [link] [comments]

Ardor Improvement Proposal (AIP001?) - Adding Support for the "ed25591" Digital Signature Algorithm

This post is inspired by some of the ideas in this thread - https://www.reddit.com/Ardocomments/7qane0/confusion_and_inconsistent_instructions_about/. Is there a way to improve the Addresses and Public Keys in Ardor? Yes, there are a few ways... but a really good option might be to smuggle in some extra features too. Like killing two birds with one stone.
Basically, since Bitcoin and NXT launched there has been a lot of very impressive work done on Digital Signatures Algorithms and specifically in relation to Elliptical Curves. A lot of this work has even been motivated by the cryptocurrency space. Ardor has an opportunity to benefit from some of this innovation by making some simple but clever modifications to it's code.
Different cryptocurrencies settled on competing standards for their Digital Signature Algorithms during the design phase. For example, Bitcoin uses an elliptical curve called Secp2561 with a Digital Signature Algorithm called ECDSA. Ardor uses an elliptical curve called Curve25519 with a Digital Signature Algorithm called EC-KCDSA. There are various reasons why these choices were selected. The history might be of interest to some of you, but I won't go into that now. The elliptic curves are constants so the progress over time is on the Digital Signature Algorithms. Curiously some of the most impressive progress has been made on a DSA that neither Bitcoin nor Ardor use, called ed25591. But at least ed25591 builds on the same curve that Ardor already uses - Curve25519.
So what is so great about ed25591? Well, it's new. You might say that's not necessarily a good thing. We want to see stability with a component like this. Well, it's seeing some rapid adoption because of it's awesome new features. See here for adoption insight - https://ianix.com/pub/ed25519-deployment.html. I.e. it's quickly becoming a standard. So with out further ado - what makes ed25591 really cool:
Some of the really technical benefits can be seen on the projects' homepage here - https://ed25519.cr.yp.to/. Oh and it's completely unencumbered by patents or licenses. And the reference code is "public domain".
I probably haven't done ed25591 enough justice. It's really great and you can read more about it on the web. But what's this about killing two birds with one stone? Well, by making a reasonably big modification to the Ardor software like this, you could also take the opportunity to fix the Ardor Address Problem. Currently the address derivation scheme prioritizes short human-readable addresses at the expense of security. You can win back that lost security by making an outgoing transaction from your Ardor Address/Account (or making sure the incoming transaction broadcasts the recipients public key). But even that's not ideal. If anyone followed the development of Bitcoin they'll know that moving from Pay-to-Pub-Key to P2PKH was a big step up. But with Ardor it seems like you have to regress to increase your account security, even though you've lost the security benefit of the extra Address being derived (hashing) from the public-key step.
So, while making the change of adding support for ed25519, that would be the perfect time to update the Ardor Address format (make the addresses longer to remove the collision problem with the short addresses). The market seems to have decided that long difficult-to-read addresses are not a problem. Wallets and the infrastructure around them has meant that people don't often have to resort to typing out these addresses anyway. If we do this right we can have stronger cold-storage than Bitcoin does and a more flexible DSA than Bitcoin does. Not to mention a more scalable Blockchain, faster block-times, a decentralized exchange, increased transaction capacity, less wasteful consensus algorithm... etc. etc. =D
Let me know what you, the community, think. I'm happy to take any questions.
submitted by ardorer to Ardor [link] [comments]

Investigating the work behind bitcoin: An history of Schnorr signatures within Bitcoin.

Introduction

Schnorr signatures are currently on the Bitcoin core roadmap and an implementation was supposed to be released before the end of this year. Being a mathematician I have been inquiring about Schnorr signature, the math behind it and its implications for bitcoin if it is ever implemented. This post is a list of links if anyone also wants source on the subject.
TLDR: To sum it up, Schnorr signature were introduced first as a potential optimization (batch verifications) and then as a possible scheme for signature aggregation. None of this has been implemented yet as many theoretical issue remain. To know more on these issues and on what “signature aggregation means” please refer to the links in this post.

An history of Schnorr signature within Bitcoin

As you may or may not know:
Schnorr algorithm has long been at the top of the wish list for many Bitcoin developers.
And indeed, it has been a long time... Are they top priority for Bitcoin core? I do not know, but they seem to be pretty high up on the priority list. Here is a quick timeline:
  1. Hal Finney talks about speeding up signature verification by implementing “batch signature verification”. This does not refer to Schnorr, but it is the starting point. February 2011.
  2. Mike Hearn elaborates on “batch signature verification”. He mentions a paper by the famous cryptograph D. Bernstein which successfully implemented such batch verification by using the twisted Edwards curve Ed25519 which relies on Schnorr signatures. August 2012.
  3. An anonymous user released a white paper proposing Boneh–Lynn–Shacham in order to implement signature aggregation. September 2013.
  4. Adam Back talks about his preference for Schnorr signatures over ECDSA due to the possible signature aggregation. October 2013.
  5. Gregory Maxwell and Adam Back talk about Schnorr signatures natively supporting multisig. March 2014.
  6. Gavin Andresen mentions it on his wish list in October 2014.
  7. Here is pretty good summary on Schnorr signatures advantages by David Harding. January 2015.
  8. Gregory Maxwell mentions it (quite negatively I might add) during his talk at the SF Bitcoin Devs Seminar in April 2015. Once again the reference is related to multisig and signature aggregation (from minute mark 20 to 40 ish).
  9. Pieter Wuille and Gregory Maxwell wrote a Schnorr API which was committed on July/August 2015. The latest change date from December 2015 and regards documentation.
  10. Gregory Maxwell referenced the post#3 of this list as a starting point to justify the implementation of Schnorr signatures. His justifications are towards batch verification and signature aggregation. February 2016.
  11. Pieter Wuille talks at Scaling Bitcoin 2016 Milan about Schnorr signatures, the history, the advantages and the problems they face. October 2016 (from minute mark 38 to 1H05 ish).
  12. Bitcoin Core technology roadmap announcing an upcoming whitepaper on Schnorr signature but also a BIP which would be announced by the end of 2017. March 2017.
  13. Pieter Wuille says that there will be a concrete proposal and implementation in 2018. November 2017.
Edit: formatting.
submitted by Azeroth7 to btc [link] [comments]

Nice Article About How HPB Perform Vs EOS (and so ETH)

HPB: Unique Blockchain Infrastructure
Now most public chains will mention that the problem of tps development is the problem of the blockchain. This is also because the traditional blockchain has the problem of poor performance. In order to reach consensus, the efficiency is sacrificed. But if you want to build an ecosystem of countless DAPPs based on the public chain, there is no guarantee of performance that is almost impossible.
The dream of building a DAPP ecosystem is that Bitcoin has not been completed and it is not necessary to complete it. Bitcoin is only a digital currency and it has initially fulfilled its historical mission. It has become a value storer, and it has opened the world of the blockchain. .
Ethereum started with the goal of building a world-wide computer that provided the infrastructure for building decentralized applications, but so far it has only succeeded in the crowdfunding field. Due to performance, cost, scalability, and other issues, it is not yet possible to become a DAPP infrastructure. By the end of 2017, a simple encrypted cat game would have caused Ethereum to jam. Ethereum tried to get rid of the predicament through techniques such as fragmentation, Plasma, and PoS consensus.
Newcomers, such as EOS, are highlighting their high performance, emphasizing the possibility of reaching mega-level tps. Then, in the future, an infrastructure is needed to build a prosperous DAPP ecosystem on this decentralized infrastructure to meet the user or business needs of different scenarios.
What kind of program is a better choice? This is what blue fox has been paying attention to. Blue Fox focuses on an HPB blockchain project that uses a completely different search path than other public chains or infrastructure. This path is worth paying attention to all the buddies who pay attention to the blockchain.
This path is a combination of hardware and software. It is more demanding and the practice is more difficult. However, if it is truly grounded, it may be a good path.
HPB to become a high-performance blockchain infrastructure
Whether HPB or EOS have the same goals, they must provide a high-performance infrastructure for the decentralized ecosystem. why? Mainly from the blockchain to the mainstream business scene point of view. The current blockchain has achieved some success in security and decentralization, but there are natural constraints in terms of efficiency. This hinders its application scenario to the mainstream.
This is also a direction that Blockchain 3.0 has been exploring. Through higher performance, lower costs, and better scalability to meet the needs of more decentralized application scenarios.
The current bitcoin and Ethereum's throughput are both worrying. Bitcoin supports about 7 transactions per second on average, and Ethereum has about 15 throughputs. If you make the block bigger, you can also increase the throughput, but it will cause the problem of block bloat. Last year, an encrypted cat game made everyone see the blockchain congestion problem. From a performance point of view, it takes a long time for blockchains to reach the mainstream.
In addition to the lack of tps performance, the transaction cost of the blockchain is high. Both ordinary users and developers cannot afford gas costs that are too high. For example, before Ethereum's crypto-games became hot, there were even transaction fees compared to encrypted cats. It is also expensive.
The HPB and EOS goals are similar, but their paths are completely different. HPB uses a combination of hardware and software, has its own dedicated chip hardware server, which makes it theoretically have higher performance.
HPB is also trying to create an operating system architecture that can build applications. This architecture includes accounts, identity and authorization management, policy management, databases, asynchronous communications, program scheduling on CPUs, FPGAs, or clusters, and hardware accelerated technology. Realizes low delay and high concurrency and realizes mega-level tps to meet the needs of commercial scenarios.
It is different from EOS. Its architecture, in addition to its software architecture and its hardware architecture, is a combination of hardware and software blockchain architecture that combines high-performance computing and cloud computing concepts. The hardware system includes a distributed core node composed of high performance computing hardware, a general communication network, and a cloud terminal supported by high performance computing hardware.
The core node supports a standard blockchain software architecture, including consensus algorithms, network communications, and task processing. It also introduces a hardware acceleration engine. It works with software to achieve high-performance tps through BOE technology (Blockchain Offload Engine) and consensus algorithm acceleration, data compression, and data encryption.
BOE makes HPB unique
In the HPB's overall architecture, compared with other blockchain infrastructures, there are obvious differences. One of the important points is its BOE technology.
BOE mentioned above, is the blockchain offload engine. The BOE engine includes BOE hardware, BOE firmware, and matching software systems. It is a heterogeneous processing system that achieves high performance and high concurrent computational acceleration by combining CPU serial capabilities with the parallel processing capabilities of the FPGA/ASIC chip.
In the process of parsing TCP packets and UDP packets, the BOE module does not need to participate in the CPU, which can save CPU resources. The BOE module performs integrity checking, signature verification, and account balance verification on received messages such as transactions and blocks, performs fragment processing on large data to be transmitted, and encapsulates the fragments to ensure the integrity of received data. At the same time, statistics work will be performed according to the received traffic of the TCP connection, and corresponding incentives will be provided according to the system contribution.
BOE has played its own role in signature verification speed, encryption channel security, data transmission speed, network performance, and concurrent connections.
The BOE acceleration engine embeds the ECDSA module. The main purpose of this module is to improve the speed of signature verification. ECDSA is also an elliptic curve digital signature algorithm. Although it is a mature algorithm that is widely used at present, the pure software method can only be performed thousands of times per second and cannot meet the high performance requirements. So the combination of BOE and ECDSA is a good attempt.
In the process of data transmission between different nodes, BOE needs to establish an encrypted channel. In this process, it uses a hardware random number generator to implement the security of the encrypted channel, because the seed of the random number of the key exchange becomes unpredictable.
The BOE acceleration engine also uses block data fragmentation broadcasting technology. Block fragmentation includes a complete block header, which facilitates the broadcast of newly generated blocks to all nodes. With block data fragmentation, network data can be quickly transmitted between different nodes.
The BOE technology can perform traffic statistics of node connections based on hardware, and can calculate network bandwidth data provided by different nodes. Only providing network bandwidth to the system will have the opportunity to become a high contribution value node. In this way, incentives for the contribution of the nodes are provided.
In terms of concurrency, BOE is expected to maintain more than 10,000 TCP sessions and handle 10,000 concurrent sessions through an acceleration engine. BOE's dedicated parallel processing hardware replaces the traditional software serial processing functions such as transaction data broadcasting, unverified blockwide network broadcasting, transaction confirmation broadcasting, and the like.
According to HPB estimates, through the BOE acceleration engine, the session response speed and the number of session maintenance can reach more than 100 times the processing power of the common computing platform node. If the actual environment can be achieved, it is a very significant performance improvement.
Consensus algorithm for internal and external bi-level elections
HPB not only significantly improves performance through BOE, but also adopts a dual-layer internal and external voting mechanism in consensus algorithms. It attempts to achieve more efficient consensus efficiency on the premise of ensuring security and privacy.
Outer election refers to the selection of high-contribution-value node members from many candidate nodes, and the election will use node contribution value evaluation indicators. Inner-layer election refers to an anonymous voting mechanism based on a hash queue. When a block is generated, it calculates which high-contribution value node preferentially generates a block. Nodes with high priority have the right to generate blocks preferentially.
So, how to choose high contribution value node? Here is the first indicator to evaluate the contribution value. The indicators include whether a BOE acceleration engine is configured, network bandwidth contribution (data throughput over a fixed period of time), reputation, and total node token holding time. Among them, the creditworthiness of the node is obtained through the analysis of participating transactions and data analysis such as packaged blocks and transaction forwarding. The total holding time of the node token can be obtained by real-time statistics on the account information.
The outer election adopts an adaptive and consistent election plan. That is, by maintaining the consistency of “books” to ensure the consistency of outer elections, this can reduce network synchronization, and can also use the data of each node on the chain. The first is to put the above-mentioned four evaluation indicators into the block. By keeping the account books consistent, you can calculate the current ranking of all the participating candidate nodes. The higher-ranking high-contribution value nodes will become the official high contribution in the next round. Value node.
With the formal high contribution value node, the goal of the inner election is to find the high contribution value node corresponding to each block as soon as possible. The entire process is divided into three phases: nominations, statistics, and calculations. These three phases combine security, privacy, and performance.
The first is the nomination. At the beginning of the voting period, the BOE acceleration engine generates a random Commit. The high contribution value node submits its Commit, and the Commit synchronizes with the chain generated by the high-performance node. After the voting period is over, the Commit in the blockchain is started and the ticket pool is created. The last is the calculation. The calculation is mainly based on the weight algorithm to calculate the node's generation priority in the block. Generate the highest-priority high-contribution value node and obtain the block package right.
Other nodes can verify the random number and address signature according to the principle of verifiable random function, which not only guarantees security, but also guarantees the unpredictability and privacy of high contribution value nodes.
In general, HPB's consensus algorithm combines security, privacy, and speed through a combination of hardware and software. Using the BOE acceleration engine to generate random numbers, contribution value evaluation indicators, coherence ledgers, anonymous voting mechanisms, weight algorithms, signature verification, etc., privacy, reliability, security, and high efficiency are achieved.
Universal virtual machine design: support for different blockchains
The HPB virtual machine adopts a plug-in design mechanism and can support multiple virtual machines. It can implement the combination of the underlying virtual machine and upper level program language translation and support, and support the basic application of virtual machines. In addition, the external interface of the virtual machine can be realized through customized API operations, which can interact with the account data and external data.
The advantage of this mechanism is that it can realize the high performance of native code execution when the smart contract runs, and it can also implement the common virtual machine mechanism supporting different blockchains. For example, it can support Ethereum virtual machine EVM. The smart contract on EVM can also be used on HPB.
Neo's virtual machine NeoVM can also be used on HPB. When high-performance scenarios are needed, users of both EVM and NeoVM need only a few adaptations to interact with other HPB applications.
The HPB smart contract has also made some improvements, such as the management of the life cycle, auditing and forming a common template. No progress can realize the full lifecycle management of smart contracts, such as the complete and controllable process management and integration rights management mechanism for intelligent contract submission, deployment, use, and logout.
In smart contract auditing, HPB conducts a protective audit that combines automated tool auditing with professional code design. In terms of templates, HPB gradually formed a generic smart contract template to support the flexible configuration of various common business scenarios.
Incentives for a positive cycle of token economy
When the high-contribution value node generates a block, it will receive a token reward from the system. From the design of the HPB, the system will issue a token of no more than 6% per year, and the additional token will be proportional to the total number of high-contribution nodes and candidate nodes.
In order to obtain the token reward from the system, it must first become a high contribution value node, and only the high contribution value node has the right to generate a block.
In order to obtain the right to generate a block, it is necessary to contribute, including holding a certain number of HPB tokens, having a BOE hardware acceleration engine, and contributing network bandwidth to the system.
From its mechanism, we can see that HPB's token economic system design is considered from the formation of a positive incentive system. It maintains the overall HPB system by holding the HPB token, having a BOE hardware acceleration engine, and contributing network bandwidth to the system. safe operation.
HPB landing: supports a variety of high-frequency scenes
In essence, HPB is a high-performance blockchain platform and is an infrastructure where various blockchain applications can be explored. Including blockchain finance, blockchain games, blockchain entertainment, blockchain big data, blockchain anti-fake tracking, blockchain energy and many other fields.
In terms of finance, decentralized lending, decentralized asset management, etc. can all be built on the HPB platform to meet high-frequency lending and transaction scenarios.
In terms of games, although all game operations are not practical, the up-chaining and trading of assets such as game props are important scenes. Once the realization of the game product chain, you can ensure that the game assets are transparent, unique, can not be tampered with, never disappeared, etc., providing great convenience for the transaction between the game products.
Compared with traditional centralized service providers, there are many advantages. For example, there is no need to worry about the loss, confiscation, or change of virtual game products. The transaction process is also simple and convenient. Since HPB has a high-performance blockchain, it is expected to support millions of concurrents, and many high-frequency scenarios can also be satisfied.
For blockchain entertainment, it can support the securitization of star assets, such as star-related token assets. In terms of blockchain big data, it can support the data right, ensure that the data owner controls the data ownership, ensure the authenticity of the data, traceability, can not be modified, and finally realize data transactions according to the needs of different entities. , to ensure personal privacy and data security.
Based on HPB's blockchain infrastructure, based on its high performance, blockchain applications can be built in multiple scenarios. The HPB design provides a blockchain application program interface and application development package. In the HPB blockchain base layer, it provides blockchain data access and interactive interfaces, and supports various applications and development languages ​​using JSON-RPC and RESTful APIs. It also supports multi-dimensional blockchain data query and transaction submission, and the interactive access interface can be integrated with the privilege control system.
The application development package includes comprehensive functional service packages that operate on blockchains based on different development languages. For example, it provides functional interfaces such as encryption, data signature, and transaction generation, and can seamlessly support integration and function expansion of various language service systems. , supports multiple language SDKs such as Java, JavaScript, Ruby, Python, and .NET.
Conclusion
If the future blockchain wants to enter the mainstream population, it must have high-performance public-chain or infrastructure support to form a true application ecosystem. Ethereum's dream to build a decentralized ecosystem cannot be achieved on an existing basis. Ethereum is trying to improve performance and expand scalability through fragmentation, plasma, and pos consensus mechanisms.
At the same time, the current status quo has also spawned other public-linked efforts, including eos, HPB, etc. Among them, HPB has adopted a unique combination of hardware and software, dedicated BOE hardware acceleration, signature verification speed, encryption channel security, data transmission Speed, network performance, and high concurrent support all have their own advantages over simple software solutions.
In the software architecture, consensus algorithms for internal and external elections, flexible virtual machine design, application program interfaces, and development packages are also used to provide infrastructure for the development of blockchain application scenarios.
From the overall design of HPB, its goal is to provide high-performance infrastructure for the entire blockchain to mainstream people. With a high-performance infrastructure, blockchains can only be implemented in many high-frequency scenarios to create more application ecosystems and have the opportunity to reach mainstream people.
The HPB team focused on the technical background, including the founder Wang Xiaoming who was an early evangelist in the blockchain and once participated in the establishment of UnionPay Big Data, Beltal, and Beltal CTO. Co-founder CTO Xu Li has more than 10 years of experience in chip industry R&D and management. He was responsible for the logic design, R&D, and FPGA chip marketing of the core products of the world's top qualified equipment suppliers and the world's largest component distributor. Technical VP Shu Shanlin once worked for Inspur, a well-known Chinese server manufacturer, as an embedded chief engineer, and has extensive R&D experience in embedded software and underlying software. Another co-founder, Li Jinxin, is a former blockchain analyst of Guotai Junan and has extensive experience in digital asset investment.
The background of the team members is in line with the HPB's soft and hard path. According to the latest monthly report, the basic PCB layout design of the BOE board, the overall architecture design of the BOE, and the ECC acceleration scheme have also been completed. At the same time, several tests have been completed for the BOE hardware acceleration engine.
It is hoped that HPB will develop rapidly and will embark on a path with its own characteristics in the future of blockchain infrastructure competition. It will provide support for more decentralized applications and eventually build a prosperous ecosystem.
Risk Warning: All Blue Fox articles do not constitute investment recommendations, investment risks, it is recommended to conduct in-depth inspection of the project, and carefully make their own investment decisions.
Source: https://mp.weixin.qq.com/s/RSuz6R6MTotEL_U__Al_Wg
submitted by azerbajian to HPBtrader [link] [comments]

Advice to the noobs (from a recent former noob)

As stated by a few others here, my sincere suggestion to you is that you spend your time peeling back the layers under Bitcoin and learning about how it works under the hood instead of reacting to GDAX swings and memes. I thought it might help to list some questions that you can look at and answer for yourselves by learning about bitcoin from the various resources here and elsewhere on the internet. I just came up with it in the last 10 minutes so there may be some key aspects missing, but if you can answer these for yourselves, I think you can feel good about moving up a notch. I still personally consider myself very much a newcomer in the space, but with every new thing I learn, I find myself having more and more aha moments about things going on in crypto and bitcoin. Hope this helps!
Crypto and Keys:
Structure of Transactions and Blocks:
Mining:
Full and SPV nodes/clients:
Security:
You already know by now how the cryptographic portion of the security works. But what about malicious miners and actors.
Topic du jour: How to scale bitcoin?
Warning: controversial topic and the source of the discrepancy between BTC and BCH. Just focus on understanding the concerns from a technical pov first.
[Disclosure: I find more merit in the BTC scaling argument than the BCH scaling argument, but at this point, I do not understand the deep dive details behind LN yet. Work in progress.]
[edit: formatting] [edit 2: sorry, this is inadvertently the second instance of this post. I already posted this last night]
submitted by wittysoul76 to Bitcoin [link] [comments]

Hardware Wallet Standard | Jonas Schnelli | Aug 16 2016

Jonas Schnelli on Aug 16 2016:
Hi
Unfortunately, there is no standard in how desktop- or mobile-wallets
can interact with a hardware device resulting in wallet vendors adding
plugins with proprietary code for non-standardized interfaces.
I started a BIP (extreme draft, feel free to improve language, grammar
and content) to address this missing part of the ecosystem.
I think it would be extremely helpful if @ledger, @trezor,
@voisin/@breadwallet, @electrum, @bitpay (and more?!) would help working
on a such standard.
The BIP describes two approaches how to communicate (pipe and
URI-scheme) with the signing-devices app, although, in my opinion, all
major platform do support the URI approach (maybe we could drop the pipe
approach then).
The URI approach means that there is no need to configure the
application location in order to start a inter-process(-app) communication.
Mediawiki:
https://github.com/jonasschnelli/bips/blob/8abb51f0b21b6664388f6e88f6fd642c90d25dca/bip-undef-0.mediawiki
---- BIP (rough early stage draft)
BIP: ???
Title: Detached Signing
Author: Jonas Schnelli
Status: Draft (early stage!)
Type: Standards Track
Created: 2016-08-02
== Abstract ==
This BIP describes a way how wallet applications can decouple sensitive
privatekeys from the internal keychain and interact with a
signing-devices (hardware wallet, "cold" storage) over a generic
interface in order to get signatures.
== Motivation ==
It seems like that the current approach for allowing signing-devices to
interact with third party wallets is to build a plugin [1][2][3]. Adding
plugins for each hardware wallet type will increase possible security
issues and result in multiple proprietary-third-party code within the
wallet application with very similar structures.
A generic interface how wallets can interact with signing-devices would
result in better user experience, less critical code and simpler
adaption for various signing-devices.
== Specification ==
In order to support desktop- and smartphone-wallet-applications, this
BIP describes two slightly different approaches (process pipe and URI
call) in how to interact with the signing-devices. If possible, the
modern URI approach should be chosen.
=== Signing-Device-Controller-Application ===
To allow a generic interface while still allowing different ways how to
internally communicate with the signing device itself (USB, TCP/IP,
air-gapped Qr-Code scanning, etc.) a controller-application is required.
=== General signing process ===
The wallets signing process must be according the following principal:
or message together with metadata (scriptPubKey, hd-keypath of the inputs)
signing-device-controller-application
signing-request-object, eventually shows UI, user can sign or cancel
signing-response-object with signatures or an error
creating process (example: add signatures to transaction and broadcast)
=== Desktop Process Intercommunication ===
Desktop wallets can interact with a signing device over process
intercommunication (pipe) together with a
signing-device-controller-application.
As specified below, the signing-request-object is a URI string passed
through the pipe. The desktop wallet needs to wait (with a recommended
timeout between 1 and 5 minutes) until the signing-response-object will
be sent back by the signing-device-controller-application.
=== Smartphone/URI App Intercommunication ===
Smartphones and modern operating systems are trying to sandbox
applications and interprocess communication (on pipe level) is mostly
disallowed.
On smartphones, we must use URI-schemes.
The wallet can pass information to the
signing-device-controller-application by using a predefined URI scheme.
detatchedsigning://?&returnurischeme;=
The querystring must be URI encoded.
RFC 2616 does not specify a maximum length of URIs (get request). Most
modern smartphone operating system allow URIs up to serval megabytes.
Signing complex data-structure is therefore possible.
The returnurischeme must contain a URI schema where the
result of the signing process should be returned to.
The returnurischeme must be populated and "opened" once the signing
process has been completed (or cancled).
=== Signing Request ===
The signing request is a flexible URI-Query-String that will be used by
the Signing-device-controller-application for user confirmation as well
as for creating the signature.
The URI-query-string must conform to the following format:
detatchedsigning://sign?type=&data;=&inputscripts;=,,...&inputhdkeypath;=,,...&returnscheme;=
type = type of the data to sign
data = raw unsigned bitcoin transaction or text-message
(optional)inputscripts = scriptPubKey(s) of the inputs in exact order
(optional)inputhdkeypath = hd-keypath of the inputs in exact order
(optional)returnscheme = a URI scheme where the response must be sent to
(smartphone approach)
  • inputhdkeypath or inputscripts must be provided.
=== Signing Response ===
The signing response is a flexible URI-Query-String that will be sent
back to the wallet application and must contain the signatures or an
error code.
The URI-query-string can be opened (smartphone approach) or will be sent
back though the interprocess pipe.
://signresponse?errorcode=&signatures;=,,...
In case of ECDSA, the returned signatures must be normalized compact
signatures with the size of 64bytes (128 hex chars).
==== Possible error code ====
0 = no error
1 = user canceled
2 = timeout
10 = missing key identifier (missing HD keypath or input scriptpubkey)
11 = unsupported signing type
12 = could not resolve script
50 = unknown internal error
==== Examples ====
===== Simple p2pkh transaction =====
Unsigned raw transaction:
0100000001fd3cd19d0fb7dbb5bff148e6d3e18bc42cc49a76ed2bfd7d760ad1d7907fd9ce0100000000ffffffff0100e1f505000000001976a9149062e542a78d4fe00dcf7cca89c24a8013c381a388ac00000000
(input ced97f90d7d10a767dfd2bed769ac42cc48be1d3e648f1bfb5dbb70f9dd13cfd
vout:1, output: P2PKH mtgQ54Uf3iRTc9kq18rw9SJznngvF5ryZn 1 BTC)
signing-request URI must be:
detatchedsigning://sign?type=bitcoin-p2pkh&data=0100000001fd3cd19d0fb7dbb5bff148e6d3e18bc42cc49a76ed2bfd7d760ad1d7907fd9ce0100000000ffffffff0100e1f505000000001976a9149062e542a78d4fe00dcf7cca89c24a8013c381a388ac00000000&inputscripts=76a914531148ad17fdbffd4bac72d43deea6c7cf0387d088ac&inputhdkeypath=m/0'/0'/1&returnscheme;=myapp
The inputhdkeypath is optional in this case
signing-response URI must be:
detatchedsigning://signresponse?error=0&signatures=<128hex-chars>
===== Simple a bitcoin message =====
Message: Lorem ipsum dolor sit amet
signing-request URI must be:
detatchedsigning://sign?type=bitcoinmsg&data=Lorem+ipsum+dolor+sit+amet&inputhdkeypath=m/0'/0'/2
signing-response URI must be:
detatchedsigning://signresponse?error=0&signatures=<128hex-chars>
=== Support for multiple signing-devices ===
Must operating systems allow only one registered application per
URI-scheme. To support multiple signing-devices, wallets and
signing-devices can optional add support for brand based URI-schemes.
In addition to the standard URI scheme,
signing-devices-controller-applications can register an additional URI
scheme (with the identical request/response syntax and logic) including
a brand-identifier.
Registering a brand-identifier based URI scheme without registering the
default URI scheme is not allowed.
Wallets can detect if a certain brand based URI scheme is supported and
therefore gives user a selection if multiple signing-devices where
detected [4][5].
detatchedsigning://
Supported brand-identifiers are:
  • trezor
  • ledger
  • keepkey
  • digitalbitbix
== References ==
[1] https://github.com/spesmilo/electrum/pull/1662
[2] https://github.com/spesmilo/electrum/pull/1391
[3] https://github.com/bitpay/copay/pull/3143
[4]
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/
[5]
https://developer.android.com/reference/android/content/pm/PackageManager.html
== Acknowledgements ==
== Copyright ==
This work is placed in the public domain.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20160816/fe4471a9/attachment.sig
original: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-August/013008.html
submitted by dev_list_bot to bitcoin_devlist [link] [comments]

4A Coin Whitepaper

4A Coin: A web-based cryptocurrency network. Summary~ Because the first generation cryptocurrencies such as Bitcoin, Ethereum and Litecoin distribute the money issuing task according to the power of machines such as GPU and CPU, they accumulate the payments in the mempool and they mine by changing the nonce number randomly or by continuously increasing it and trying repeatedly until they find a hash summary that matches the difficulty they specify, instead of processing the payments made in real-time instantly. This solution is ingenious if you want to use digital currency as a value storage tool. But when you try to use these digital currencies to pay for coffee or purchase a product online, it stands out as a disadvantage since you have to pay commissions to those miners and have to wait too long. As you know, the power of large payment solutions, such as Paypal or Western Union, comes from their servers and software. We also started working on a noncentralized, blockchain-protected end-toend (P2P) cryptocurrency that works as a web service. In such a case, for the system to survive and ensure security, instead of paying for the server cost, we set up a system where servers, that are nodes in the system, can get paid, provided they just stay online for 44 hours instead of mining. People get paid for a useful service they provide instead of wasting their time. There will be a reason for people to install this system on their servers because they are rewarded as long as they remain as servers. When people send an end-to-end payment, the servers, by finding a summary of this payment (They find this summary in order for all systems to meet at a common point and validate payments, and because it is a necessity of the blockchain architecture), ending with 4A, including the time, the sender, the receiver, amount, summary of the previous transaction and the data contained in a digital signature indicating that the sender is actually sending it, without any difficulty and they add it to their databases. Because there are no such concepts as block size or mining involved in any way, the registration process is completed instantly. We use a task queue management library called Celery Project, which is used by companies such as Instagram and Mozilla to prevent complication that may occur if 100 transactions take place within the same second. Security~ If you noticed when you entered the site, I told you that it was safer than Visa. This may seem an ambitious sentence for many, but if you actually know what you're doing when you buy a product online, you are aware of the risks involved. Risk & Problem~ When you type information in the payment form, such as credit card, CVV, and so on, malicious people on the web can read the data you send through these forms. Just because of this, payment solutions require you to add an SSL certificates to your site. These SSL certificates actually save your data using cryptography and protect it until it reaches the recipient. Well, what if the seller has bad intentions? Solution~ 4A Coin encrypts your payments using the Elliptic Curve Digital Signature Algorithm (ECDSA) and sends a signature confirming that you want to pay instead of giving your digital password to the network. This is actually the idea of Satoshi Nakamoto and it is known as P2PKH in Bitcoin. So if we actually compare 4A Coin to a credit card, then no one will ever see your credit card details. In addition, SSL certificate is no longer needed because a malicious user who can tap into your network seeing your payment signature won't change anything, besides it is already publicly shared everywhere. Thus, we have already gotten rid of certificate issues like security and SSL in the first place. Commission Solution~ When you benefit from a local payment solution, you will have to pay a commission to the companies you work with, between 5% and 20% of your sales. The coins you use in 4A Coin are already generated by the nodes, so they do not ask for a commission. Thanks to this, you do not pay commissions for transactions nor for any other reason. Wallets ~ wallet_id ~ 4A01eaedb37fc09fdb94c6d632adf9f63d private_key ~ cbc949239a333559f5dd8b0b5cf3d32923c2cab3 7c2bde9c8042a3dafe59a6b9 Your wallet is actually an ECDSA key pair. At first, we used RSA for this, but we had to switch to ECDAS because the keys were too long in the RSA and were taking too much space. Users have public keys, private keys, and wallet addresses created by processing public keys. Public key is not visible to users on the system. Instead, they will see a short version of a summary generated by public key processing as their wallet. def generate_wallet_from_pkey(public_key): binmnmn = public_key.encode('utf-8') first_step = 34 - len(settings.CURRENCY) wallet_id = hashlib.sha256(binmnmn).hexdigest() wallet_id = wallet_id[-first_step:] wallet_id = "".join((settings.CURRENCY, wallet_id)) return wallet_id This function simply creates a wallet from the simply given public key's SHA-256 summary. Public keys are required for the approval of digital signatures, so it is necessary to keep the public key in transactions. Payments~ When a user makes a payment, the payment time (in epoch format & GMT), the sender's address, the recipient's address, the summary of the previous transaction and the amount sent are transferred to a dictionary. This dictionary can be sorted differently on different computers, and to prevent this, the contents of this dictionary must be organized in a way that is ordered from A to Z, and will give the same result in everyone. data = collections.OrderedDict(sorted(data.items())) With the above code, we can create a stable dictionary that can work globally. Finally, we take a summary of this dictionary and record it in our database, and broadcast it to other servers that we have recorded it. Peer to Peer~ We use the TCP port and web socket technology to ensure that the system is P2P. For the script to work, you need to use Python3. Because, we use the Twister Matrix Library and the Autobahn Python libraries to provide real time transactions. The port we use globally is the 9000th port. There are 3 different types of broadcasting in real time processes: The first one is “Hi, I'm a new node, please add me to your network” and the other one is “Hi, I'm a new process, please verify me”. This is parsed on the server side and necessary actions are taken. The third broadcasting type will be explained in the proof of cloud section. Mining ~ A total of 450 million of 4A Coins will be issued with 300.000.000 Pre-mined. 150 million coins will be mined by a method called Proof of Cloud. Proof of Cloud~ Proof of Cloud or POC refers to a method of earning based on time as a server instead of mining. Each node, by staying online for 44 hours, will send a message as "I have been online for 44 hours, so check my database to see if I have been online by reviewing my recent transactions." If it proves that you have approved transactions for the last 44 hours, you will be eligible to receive the reward. Celery & Redis~ We use Celery, a library that automatically controls tasks so that certain processes can be repeated at certain times in the system. Celery needs Redis to work. Redis is an open source NoSQL (NoSQL is the name given to database systems that store “non-relational” data schematically. NoSQL is literally being used in the sense of "not-only- SQL", which means "only SQL is not used".) software written on Linux as the pure version. Keeping the system up and running~ We use Gunicorn 'Green Unicorn' and Nginx, the Python WSI HTTP Server, to ensure that the system can handle high load and maintain its endurance; Nginx is a Web server designed to focus on high concurrency, high performance and low memory usage. It can also be used as a reverse proxy server, load balancer, and HTTP cache. We were actually using Supervisord to keep all these systems up and running, but since Supervisord did not work with Python3 we started using Circusd developed by the Mozilla Foundation and we were more satisfied with it than Supervisiord. It is much easier to install and use, requires Tornado framework to work on its own, and works correctly with the 4.5.3 version of Tornado. This version is already installed automatically in requirements.txt, but it is important that you know this detail.
submitted by 4acoin to u/4acoin [link] [comments]

4A Coin Whitepaper

4A Coin: A web-based cryptocurrency network. Summary~ Because the first generation cryptocurrencies such as Bitcoin, Ethereum and Litecoin distribute the money issuing task according to the power of machines such as GPU and CPU, they accumulate the payments in the mempool and they mine by changing the nonce number randomly or by continuously increasing it and trying repeatedly until they find a hash summary that matches the difficulty they specify, instead of processing the payments made in real-time instantly. This solution is ingenious if you want to use digital currency as a value storage tool. But when you try to use these digital currencies to pay for coffee or purchase a product online, it stands out as a disadvantage since you have to pay commissions to those miners and have to wait too long. As you know, the power of large payment solutions, such as Paypal or Western Union, comes from their servers and software. We also started working on a noncentralized, blockchain-protected end-toend (P2P) cryptocurrency that works as a web service. In such a case, for the system to survive and ensure security, instead of paying for the server cost, we set up a system where servers, that are nodes in the system, can get paid, provided they just stay online for 44 hours instead of mining. People get paid for a useful service they provide instead of wasting their time. There will be a reason for people to install this system on their servers because they are rewarded as long as they remain as servers. When people send an end-to-end payment, the servers, by finding a summary of this payment (They find this summary in order for all systems to meet at a common point and validate payments, and because it is a necessity of the blockchain architecture), ending with 4A, including the time, the sender, the receiver, amount, summary of the previous transaction and the data contained in a digital signature indicating that the sender is actually sending it, without any difficulty and they add it to their databases. Because there are no such concepts as block size or mining involved in any way, the registration process is completed instantly. We use a task queue management library called Celery Project, which is used by companies such as Instagram and Mozilla to prevent complication that may occur if 100 transactions take place within the same second. Security~ If you noticed when you entered the site, I told you that it was safer than Visa. This may seem an ambitious sentence for many, but if you actually know what you're doing when you buy a product online, you are aware of the risks involved. Risk & Problem~ When you type information in the payment form, such as credit card, CVV, and so on, malicious people on the web can read the data you send through these forms. Just because of this, payment solutions require you to add an SSL certificates to your site. These SSL certificates actually save your data using cryptography and protect it until it reaches the recipient. Well, what if the seller has bad intentions? Solution~ 4A Coin encrypts your payments using the Elliptic Curve Digital Signature Algorithm (ECDSA) and sends a signature confirming that you want to pay instead of giving your digital password to the network. This is actually the idea of Satoshi Nakamoto and it is known as P2PKH in Bitcoin. So if we actually compare 4A Coin to a credit card, then no one will ever see your credit card details. In addition, SSL certificate is no longer needed because a malicious user who can tap into your network seeing your payment signature won't change anything, besides it is already publicly shared everywhere. Thus, we have already gotten rid of certificate issues like security and SSL in the first place. Commission Solution~ When you benefit from a local payment solution, you will have to pay a commission to the companies you work with, between 5% and 20% of your sales. The coins you use in 4A Coin are already generated by the nodes, so they do not ask for a commission. Thanks to this, you do not pay commissions for transactions nor for any other reason. Wallets ~ wallet_id ~ 4A01eaedb37fc09fdb94c6d632adf9f63d private_key ~ cbc949239a333559f5dd8b0b5cf3d32923c2cab3 7c2bde9c8042a3dafe59a6b9 Your wallet is actually an ECDSA key pair. At first, we used RSA for this, but we had to switch to ECDAS because the keys were too long in the RSA and were taking too much space. Users have public keys, private keys, and wallet addresses created by processing public keys. Public key is not visible to users on the system. Instead, they will see a short version of a summary generated by public key processing as their wallet. def generate_wallet_from_pkey(public_key): binmnmn = public_key.encode('utf-8') first_step = 34 - len(settings.CURRENCY) wallet_id = hashlib.sha256(binmnmn).hexdigest() wallet_id = wallet_id[-first_step:] wallet_id = "".join((settings.CURRENCY, wallet_id)) return wallet_id This function simply creates a wallet from the simply given public key's SHA-256 summary. Public keys are required for the approval of digital signatures, so it is necessary to keep the public key in transactions. Payments~ When a user makes a payment, the payment time (in epoch format & GMT), the sender's address, the recipient's address, the summary of the previous transaction and the amount sent are transferred to a dictionary. This dictionary can be sorted differently on different computers, and to prevent this, the contents of this dictionary must be organized in a way that is ordered from A to Z, and will give the same result in everyone. data = collections.OrderedDict(sorted(data.items())) With the above code, we can create a stable dictionary that can work globally. Finally, we take a summary of this dictionary and record it in our database, and broadcast it to other servers that we have recorded it. Peer to Peer~ We use the TCP port and web socket technology to ensure that the system is P2P. For the script to work, you need to use Python3. Because, we use the Twister Matrix Library and the Autobahn Python libraries to provide real time transactions. The port we use globally is the 9000th port. There are 3 different types of broadcasting in real time processes: The first one is “Hi, I'm a new node, please add me to your network” and the other one is “Hi, I'm a new process, please verify me”. This is parsed on the server side and necessary actions are taken. The third broadcasting type will be explained in the proof of cloud section. Mining ~ A total of 450 million of 4A Coins will be issued with 300.000.000 Pre-mined. 150 million coins will be mined by a method called Proof of Cloud. Proof of Cloud~ Proof of Cloud or POC refers to a method of earning based on time as a server instead of mining. Each node, by staying online for 44 hours, will send a message as "I have been online for 44 hours, so check my database to see if I have been online by reviewing my recent transactions." If it proves that you have approved transactions for the last 44 hours, you will be eligible to receive the reward. Celery & Redis~ We use Celery, a library that automatically controls tasks so that certain processes can be repeated at certain times in the system. Celery needs Redis to work. Redis is an open source NoSQL (NoSQL is the name given to database systems that store “non-relational” data schematically. NoSQL is literally being used in the sense of "not-only- SQL", which means "only SQL is not used".) software written on Linux as the pure version. Keeping the system up and running~ We use Gunicorn 'Green Unicorn' and Nginx, the Python WSI HTTP Server, to ensure that the system can handle high load and maintain its endurance; Nginx is a Web server designed to focus on high concurrency, high performance and low memory usage. It can also be used as a reverse proxy server, load balancer, and HTTP cache. We were actually using Supervisord to keep all these systems up and running, but since Supervisord did not work with Python3 we started using Circusd developed by the Mozilla Foundation and we were more satisfied with it than Supervisiord. It is much easier to install and use, requires Tornado framework to work on its own, and works correctly with the 4.5.3 version of Tornado. This version is already installed automatically in requirements.txt, but it is important that you know this detail.
submitted by 4acoin to u/4acoin [link] [comments]

Ripple & Stellar // Ripple vs. Stellar

Ripple vs. Stellar.
The crypto universe and the blockchain technology provide a secure and fast method for performing payments, no matter where you are. With each passing year, more and more people are migrating to the digital platform, leaving behind archaic and obsolete means of payment. In the present article, we will talk about two online payments platforms that can link people with all kinds of financial institutions and services. Additionally, both have their digital tokens: Ripple has the XRP, and Stellar Lumine shows off its XLM. Ripple and Stellar have strong historical bonds but they currently function as two different enterprises with distinct business propositions, values, and resources. The latter resulted after a hard fork in the former's platform.
Ripple: robust links with the financial elite.
Ripple can be defined as a real-time gross settlement system, shortened to RTGS, created by the Ripple network. It serves, as a currency exchange and a remittance platform, and is also called the Ripple Transaction Protocol. With a broad network and strong relationships with banks and big financial institutions, Ripple is a for-profit initiative that promotes an environment in which these elements can be interconnected. Ripple is a payment provider, a digital asset exchange company. It is an efficient system that allows sending money anywhere. The distributed Internet protocol has its own cryptocurrency called XRP, or ripples. Ripple has served as a financial payment platform since 2012, endorsing a secure, quick and free (almost free, to be more exact) global financial network with no chargebacks. The Ripple platform supports not only cryptocurrency, but also mobile minutes, fiat currency, flier miles, commodities, and other resources. Ripple is backed by a public database, or a shared ledger, whose consensus process permits payments, assets exchange and remittance. Banks and payment services use Ripple because of its reliability, quickness, and safety that the platform provides. Many pundits and experts prefer Ripple to Bitcoin for its ease of use when dealing with financial systems as a whole. Right now, the XRP currency is the third largest coin by market capitalization.
Stellar Lumens: an altruistic approach to the digital payments platform.
To the contrary of what Ripple represents as a global financial network and platform to support and promote a safe environment for transactions that involve financial corporations and institutions, Stellar connects people with these banks and entities, with the primary objective of achieving financial inclusion in a positive atmosphere. The costs associated with using the Stellar network are almost non-existent. Stellar allows for integration with the intention of distributing money from one end to another in a quick and efficient manner.
Stellar has a relatively small staff of nearly 20 workers, but they are all top-notch experts when it comes to talent and skill. We are talking about a nonprofit organization that aims to expand access to financial products for unbanked people around the world. Technically speaking, Stellar Lumens is a distributed payments infrastructure of the open source variety that aims to connect people with payments systems and institutions, often targeting people in developing countries.
Stellar facilitates multi-currency operations and assets transactions in a quick manner. Thanks to Lumens, a crypto asset, serving as a bridge, the Stellar system is reliable and relatively cheap thanks to Lumens. Stellar was founded in early 2014, by the same Jed McCaleb who created the Ripple platform and, among others, eDonkey. Joyce Kim also contributed to the development and inception of this network.
In fact, both Stellar, XLM and the Stellar Development Foundation are the results of a hard fork in the Ripple platform. The separation led to two different networks, with distinct approaches and ways of doing business: Ripple philosophy is oriented at engaging banking and financial institutions and helping them connect with people in general in the same environment, whereas Stellar has a stronger altruistic focus.
Ripple vs. Stellar: a thorough comparison.
Both payments platforms have their pros and cons, but both provide secure and relatively quick and multi-currency environments in which people can perform basic and advanced exchange and trade operations with public ledger backup. The two networks are closely related, at least in their origins. However, their current philosophies and approaches are quite different. Here are the primary differences and a few similarities that these two companies reveal when compared with each other:
Differences.
Stellar, managed by the Stellar Development Foundation, is a nonprofit organization with aims at providing the unbanked people around the world with a platform for making basic and advanced transactions. Ripple has profit aims, and its primary intention is to create a payments network with financial organizations and institutions: it has relations with UBS, Bank of America, RBC, Standard Chartered, and many other financial organizations.
The XLM tokens and the Stellar ecosystem reflect the policies of open source and free distribution, which means that the community can contribute to timely updates and the system can be redistributed or changed by virtually anybody. XRP, on the contrary, is closed source, which makes it impossible for the general public to make any modifications. The Stellar Development Foundation, or SDF, launched the Stellar Core payment system protocol shortly after developing its own, independent path. In comparison with Ripple, the Stellar network offered a new approach. The Stellar Core represents a new twist when it comes to consensus algorithms, personified in the Stellar Consensus Protocol, or SCP. With its low latency, decentralized control, and flexible trust, the SCP is considered a safe and modern, consensus mechanism. Stellard and the Stellar Core do not share any aspects of the coding. The protocol implemented by Ripple uses a "Proof of Correctness" system, an algorithm applied in all nodes to maintain harmony in the network.The ledger is considered closed when consensus is reached.
XRP eradicates fees, which means the total supply is dwindling by the day. On the other hand, the Stellar coin is inflationary by nature, because 1% of coins is created every year, and all fees are recycled. Getting inside a more technical approach, the XLM implemented the Ed25519 signature scheme and 32-byte public keys as addresses, whereas the ECDSA signature scheme with 20-byte hashes as addresses is most commonly associated with Ripple. The Stellar system uses the Sun XDR standard data serialization format, while Ripple mixes Google protobufs and marshalling code that has been hand-written.
When it comes to administration and management, Ripple is regarded as a more centralized network than Stellar, which is not subjected to close scrutiny when it comes to decentralization. Regarding the amount of money made and reinvested, Ripple appears to have a significant edge, having raised almost $100 million in funding and reinvesting an enormous chunk of that in personnel: a team of nearly 200 professionals, fintech specialists, and financial executives belong to the squad. The resources raised by Stellar are significantly less, and its staff comprises about 20 people.
Ripple also has a firm hold of the marketing department in its field, using a significant part of its capital and dividends to engage people and make them know the brand name. Stellar is a little under the radar in this regard, with only modest marketing efforts. There is also a distinct difference between Ripple and Stellar's marketing strategies as the latter stellar prefers to target individuals, while Ripple’s goal is to engage big financial institutions.
In spite of being relatives, Ripple and Stellar, or XRP and XLM have few similarities. Yet, they share some similar features that have caught the attention of investors, traders and the whole crypto universe.
Both are assets exchange platforms or environments, and both were founded by the same man, Jed McCaleb. Additionally, both present similar technical functions and aspects, and both offer payment processing solutions to people.
In conclusion, it should be said that there are a few similar traits between Ripple and Stellar, and this is natural since one gave birth to another. Technologically speaking, both represent solid options as digital exchange and trade platforms, with similar approaches. However, the differences between them are notable, starting with technical specifications and modus operandi, marketing approach, personnel and staff, network, inflation rate, burning policy, and general objectives.
Stellar is focused on helping people get access to online financial services, with a reliable, economical platform, whereas Ripple is a profitable company with business intentions, which isn't bad at all. These two cousins have things in common, but each one has decided to follow its path.
submitted by Stasisnet to u/Stasisnet [link] [comments]

Miner communication (coinbase etc)

TL/DR : How can miners get more paper to communicate to the network?
 
I really think there may be good reasons for miners to stamp a slew of optional data onto their blocks, possibly exceeding 100 bytes, and with some degree of canonical formatting (specifically, breaking the formatting should not make the block invalid, it should all still count as arbitrary data). I'm pretty sure this will be very useful sooner or later. Examples:
  [field] [example] [needed space]
 
There's some delimiter between fields. Details about proposal signaling here: https://www.reddit.com/btc/comments/6z8vy0/formalized_bitcoin_upgrade_procedure/
 
For those of you that have followed the coinbase flags until now, you notice there have been very short text signals such as "SegWit", "EB=/AD=", "NYA". Name of "mint", such as "VIA-BTC" / "SBI". And some fun stuff like Satoshis newspaper headline on the first block. ('Which "NYA"', you ask? You'd have to guess. No one hashed a specification, and a decent hash would barely fit here anyway.)
 
This is what can be done today, with 100 bytes of arbitrary data allowed in coinbase input.
How can we extend this (to at least a few kB) to allow for miners to give us "real" data instead?
 
The availability of a proper manifest would allow each miner to learn about global proposals of "Nakamoto objective" interest / value and choose pool according to
It would allow end users to
 
This is all rudimentary, but I hope the general idea is clear.
 
Alternatively, the whole manifest could be hashed and referenced in coinbase even today, but my guess is that the full data wouldn't be a lot for most miners to provide directly (it's ~2 extra kilobytes on today's "~1500 to ~8000; expected to rise"), and each field is still optional.
 
How could we provide this option?
submitted by glodfisk to btc [link] [comments]

[uncensored-r/Bitcoin] Advice to the noobs (from a recent former noob)

The following post by wittysoul76 is being replicated because the post has been silently greylisted(for 12.3 hours).
(It was approved by the mods at: 2017-11-30T23:41:26.000Z)
The original post can be found(in censored form) at this link:
np.reddit.com/ Bitcoin/comments/7ginm5
The original post's content was as follows:
As stated by a few others here, my sincere suggestion to you is that you spend your time peeling back the layers under Bitcoin and learning about how it works under the hood instead of reacting to GDAX swings and memes. I thought it might help to list some questions that you can look at and answer for yourselves by learning about bitcoin from the various resources here and elsewhere on the internet. I just came up with it in the last 10 minutes so there may be some key aspects missing, but if you can answer these for yourselves, I think you can feel good about moving up a notch. I still personally consider myself very much a newcomer in the space, but with every new thing I learn, I find myself having more and more aha moments about things going on in crypto and bitcoin. Hope this helps!
Crypto and Keys:
  • What is a hash function? What is collision? How does SHA-256 work?
  • What is public key cryptography? How does RSA and (more relevant to Bitcoin) ECDSA work at a high level?
  • How do digital signatures work? It’s pretty amazing that one can confirm that a signature used a private key belonging to a known public key without revealing the private key. Understand why that is and how it works.
  • How do you get from a 256 bit random private key to a bitcoin address? How do hierarchical deterministic keys work within wallets? What is the process by which your 16 or 24 seed words can get you to your unique keys?
  • Side note: appreciate why a true random key is so important for this to all work. Weak pseudorandom stuff is highly insecure.
Structure of Transactions and Blocks:
  • What does a Bitcoin transaction look like?
  • Understand how you have to fully spend the coins in a transaction. Understand change addresses and how transaction fees are designated.
  • What are hash pointers? How are inputs linked to prior outputs?
  • How do locking and unlocking scripts work?
  • [Advanced] Study the common P2PKH (Pay-To-Public-Key-Hash) and P2SH (Pay-To-Script-Hash) pubkey scripts and the SCRIPT language important opcodes. Map out how they work by pushing opcodes and data on the stack and working through them for the above script types.
  • [Advanced] What is transaction malleability? What is Segwit? How does Segwit fix this problem (among other benefits)?
  • What does a bitcoin block look like?
  • How are blocks linked together in a blockchain?
  • How are transactions linked together in a block?
  • [Advanced] What is a Merkle tree? What is the advantage of a Merkle tree structure over a traditional linked list of transactions in a block?
Mining:
  • What is Bitcoin mining? What is its role in the ecosystem?
  • What is Proof of Work?
  • How does a miner create a block? What is their reward? *What is a coinbase transaction?
  • What happens if two miners simultaneously create a block? How does the blockchain extend?
  • How does pool mining work?
Full and SPV nodes/clients:
  • How do nodes communicate with each other over the Bitcoin network?
  • What are full nodes vs SPV clients?
  • How do SPV clients work without storing the full blockchain locally?
  • [Advanced] Mechanics of Bloom Filters
Security:
You already know by now how the cryptographic portion of the security works. But what about malicious miners and actors.
  • What is the double spend problem? How does bitcoin solve the double spend problem?
  • How does Bitcoin achieve distributed consensus? *Appreciate that this is a probabilistic solution.
  • [Advanced] Study Poisson processes and convince yourself why 6 confirmations are good enough
  • What is a 51% attack? How do the incentives in the system today make this unlikely? (except maybe malicious state actors who don't care about the massive capex. But how much hashpower would a malicious state actor need to gain control?]
Topic du jour: How to scale bitcoin?
Warning: controversial topic and the source of the discrepancy between BTC and BCH. Just focus on understanding the concerns from a technical pov first.
  • What is the scaling problem?
  • What is on chain scaling via blocksize increase? What are the concerns with this (linear solution to an exponential problem, more likely leads to mining centralization. Make up your own mind about whether you agree with those two assertions)?
[Disclosure: I find more merit in the BTC scaling argument than the BCH scaling argument, but at this point, I do not understand the deep dive details behind LN yet. Work in progress.]
  • What is the Lightning network? How does this scaling solution work?
  • Making transactions smaller would be another way to improve. How does Segwit work?
[edit: formatting] [edit 2: sorry, this is inadvertently the second instance of this post. I already posted this last night]
submitted by censorship_notifier to noncensored_bitcoin [link] [comments]

Fast bootstrapping with a pre-generated UTXO-set database | Jonas Schnelli | Feb 29 2016

Jonas Schnelli on Feb 29 2016:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi
I’ve been thinking around a solution to reduce nodes bootstrap time
(IBD) as well as a way to reduce the amount of bandwidth/network usage
per node.
Not sure if this idea was/is already discussed, haven’t found anything
in a quick research.
==Title==
Fast bootstrapping with a pre-generated UTXO-set database.
==Abstract==
This documents describes a way how bitcoin nodes can bootstrap faster
by loading a pre-generated UTXO-set datafile with moderate reduction
of the security model.
==Specification==
Bitcoin-core or any other full node client will need to provide a
feature to "freeze" the UTXO-set at a specified height (will require a
reindex). The frozen UTXO-set – at a specific height – will be
deterministic linearized in a currently not specified
data-serializing-format.
Additionally, a serialized form of the current chain-index (chain
containing all block-headers) up to the specified height will be
appended to the pre-generated UTXO-set-datafile.
The datafile will be hashed with a double SHA256.
The corresponding hash will be produced/reproduced and signed (ECDSA)
by a group of developers, ideally the same group of developers who are
also signing deterministic builds (binary distribution).
Full node client implementations that supports bootstrapping from a
pre-generated UTXO-set, need to include...
1.) a set of pubkeys from trusted developers
2.) the hash (or hashes) of the pre-generated UTXO-set-datafile(s)
3.) n signatures of the hash(es) from 2) from a subset of developers
defined in 1)
To guarantee the integrity of developers pubkeys & signatures, methods
like the current gitian build, used in bitcoin-core, must be used.
New nodes could download a copy of the pre-generated UTXO-set, hash
it, verify the hash against the allowed UTXO-sets, verify the ECDSA
signatures from various developers, and continue bootstrapping from
the specified height if the users accepts the amount of valid signatures
.
Sharing of the pre-generated UTXO-set can be done over CDNs,
bit-torrent or any other file hosting solution. It would also be
possible to extend the bitcoin p2p layer with features to
distribute/share a such pre-generated UTXO-set, in chunks and with the
according hashes to detect invalidity before downloading the whole
content (but would probably end up in something very similar to
bit-torrent).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJW1B1wAAoJECnUvLZBb1PsqzsP/iSdvyhUzy+BZVSZbKXNjk5P
2vrtirI6NvKQd8hHbrcFeLfyswzYc2JWRnX8sATlauIS0pYdr97JriwUGlvxvNrY
iVTDdf8MIVu8zScLQtJbMatpMvsewtqQEidn/yxWIhiCg4G2T5DZmlBU6O4XIKR6
5aPHElGOKZ15EWGHBG7z4owj3MiOaxhD9q5erBbfLPpcm08o6XAv5miqmGnnn3zh
gocg4Gxs6iDygh3b2dCJFwWIVPxF6UVJhyjv2kLZUmEHT2Y2QvdGcLIIewcWHDze
kgoZYmOEowujCbmeJ+LBwgOI0c1N6L/ciomPBne7ILmK4LyUEzyMLJKNYf/sZ8vI
sVlmwZwZZLfILC7mzMAM0pfj99IOW680WHch9v31lWFlxW/bLvLqAO7n3acQuD6s
xCZN2nAhmWC8FnMFxqB3EUz0lX8giV3qRJZjbQMS+ZrngYkAmVv2bAsoLndqf6MO
l9W8B+ICg1KZLGIOF2pUrInpkB6gUALDFnypV4CeIVdeqtk5l4LnCHK6c4++Hl5n
Bv5HQ/wTgKKNFtHBEJpWyYWvAjfFtgUZUKblR+Bh+D7/Gte1ehiYd02KYD4ds9Y4
3gfO8YbAz/I14Yuh2bIlvVKPWnLQBwL5BBioBfvmhV/r6rEpzWvB7H6Fmi1c759l
VlL0GiUV8ar2LlFhEmWk
=lZSy
-----END PGP SIGNATURE-----
original: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012478.html
submitted by dev_list_bot to bitcoin_devlist [link] [comments]

DE: Elliptic Curve Digital Signature Algorithm ECDSA  Teil 10 Kryptographie Crashkurs Bitcoin ECDSA- Elliptic curve Digital Signature Bitcoin 101 Elliptic Curve Cryptography Part 5 The Magic of Signing & Verifying Adaptor and Schnorr Signatures in Bitcoin. Digital ... Elliptic Curve Digital Signature Algorithm

Sign / Verify Messages using ECDSA - Examples in Python. After we explained in details how the ECDSA signature algorithm works, now let's demonstrate it in practice with code examples.. In this example, we shall use the pycoin Python package, which implements the ECDSA signature algorithm with the curve secp256k1 (used in the Bitcoin cryptography), as well as many other functionalities related ... The Distinguished Encoding Rules (DER) format is used to encode ECDSA signatures in Bitcoin. An ECDSA signature is generated using a private key and a hash of the signed message. It consists of two 32-byte numbers (r,s). As described by Pieter here the DER signature format has the following components: In bitcoin, an ECDSA signature is not encoded as a simple concatenation of and Instead, ... We described earlier how to encode an ECDSA signature into DER format. Given an pair, one can see that by diligently applying the DER encoding procedure, the resulting output will be unique. In particular, a strict implementation of DER would not allow prepending any number of 0 bytes to the octet ... Toggle navigation Bitcoin Signature Tool. Sign; Verify; BTC . BTC Bitcoin; Generator. Get Address From. ... Wallet Format. CSV JSON. Chain. Transactions. Build Transaction From. Private Key JSON Transaction Raw Transaction. Private Key. Source Address. BTC. Edit History. Use History From. BlockChain Info Bitcoin Block Explorer Download. Transaction History. Destination Address. BTC + – JSON ... Elliptic Curve Digital Signature Algorithm or ECDSA is a cryptographic algorithm used by Bitcoin to ensure that funds can only be spent by their rightful owners. A few concepts related to ECDSA: private key: A secret number, known only to the person that generated it. A private key is essentially a randomly generated number. In Bitcoin, someone with the private key that corresponds to funds on ...

[index] [30202] [9970] [578] [51199] [34908] [49845] [24313] [23139] [45268] [23543]

DE: Elliptic Curve Digital Signature Algorithm ECDSA Teil 10 Kryptographie Crashkurs

Elliptic Curve Digital Signature Algorithm ECDSA Part 10 Cryptography Crashcourse - Duration: 35:32. Dr. Julian Hosp - Bitcoin, Aktien, Gold und Co. 6,838 views Elliptic Curve Digital Signature Algorithm ECDSA Part 10 Cryptography Crashcourse - Duration: 35:32. Dr. Julian Hosp - Bitcoin, Aktien, Gold und Co. 5,803 views This video shows how easy it is to paste, verify, and sign a message using an ECDSA private key behind a Bitcoin address. There is nothing more magical in Bitcoin, or all of cryptography than digital signatures. And the most magical step of all is the verification. This is the step we focus on in this video ... Schorr Signatures are a new signature scheme that is much stronger than ECDSA (Elliptic curve digital signature algorithm) - which is currently used in Bitcoin.

#