Author

Topic: Veteran programmer - Newbie BitCoin dev - questions (Read 209 times)

newbie
Activity: 4
Merit: 2
Thanks nullius.  I hope somebody soon clarifies the non-Ethereum smart contract choices like Simplicity, Ivy, and Rootstock soon.  It's hard to know where to put your programming effort these days.  I'll read the Simplicity PDF and see what it offers.

roschler
copper member
Activity: 630
Merit: 2614
If you don’t do PGP, you don’t do crypto!
- The book seems to favor Python, but the book is over 2 years old, a lifetime in this industry.  What is the "most favored" dev environment for BitCoin dev right now?
    + IDE? (E.g. - PyCharm for Python, or WebStorm for JS/TS, or whatever.  Doesn't have to be JetBrains, I just happen to like their stuff)
    + Programming language?  Python, JS (or TS)?, etc.

I have no idea.  I’m a C programmer; and I prefer to write code in vi(1).  Not “Vim”.  nvi.

The best language for writing Bitcoin-related code is C the language at which you yourself most excel.  Well, as long as it’s not COBOL, MUMPS, or BF, I suppose.

- How does the blockchain network prevent errors in the miner's calculations from corrupting the transactions?  For example, suppose a bunch of miners are using the same CPU or GPU that has a known defect in, for example, the overflow/underflow handling in the arithmetic logic units or perhaps a flaw in the transcendental functions on a GPU card, etc.?  I know a lot of miners use ASICs but I don't see why that architecture would be immune to such problems?

There is a common misconception that miners provide the security of the network.  This is patently false.  Miners have exactly one job:  To provide Byzantine fault-tolerant ordering of transactions, thus preventing double-spends.  It is a valuable and resource-intensive job; and that is why they get paid for it.  But it is still only one function in a machine with many moving parts.

This ACM Queue article provides an excellent overview of how Bitcoin fits together against the backdrop of decades of academic research.  As its centre, it explains how Satoshi Nakamoto repurposed Adam Back’s HashCash to create the first-ever practical implementation of a Byzantine fault-tolerant decentralized database with excellent Sybil resistance.  That is the purpose of mining, and its only purpose.

Validation security is provided by full nodes.  Each individual full node provides validation security for its owner; and all full nodes collectively enforce the consensus rule validation security of the entire network.  Thus here as everywhere else, Bitcoin aligns the individual’s selfish interest with the common good:  People who want the highest security will run a full node to secure themselves, and thus help secure everybody else, also.

In the scenario you describe, I do expect that hashing and signature validation would catch the errors; and the block containing corrupted transactions would be discarded by full nodes as if it had never existed.  A full node does not blindly follow “the longest chain”, as you may have heard:  Rather, a full node follows the independently validated and fully valid chain with the highest total proof-of-work.

This also applies to malicious mining of deliberately corrupted transactions, attempted thefts, ridiculously huge blocks, etc.  Sometimes you may see nonsensical FUD claiming that miners could seize money by planting theft transactions in blocks, e.g. by ignoring Segwit validation rules; no, they would get exactly the same result as if they filled blocks with the output of /dev/random.

- Regarding smart contracts directly on the BitCoin network (i.e. - not Ethereum based), I see two projects in the field: Ivy and Rootstock.  How does Ivy relate to Rootstock if at all?

I have not been following development of those lately, so I can’t say.

If you are interested in smart contracts, you may appreciate a peek at current R&D which may potentially someday become the future of Bitcoin smart contracts:  Simplicity (PDF).  Powerfully expressive smart contracts written with in a formally verifiable DSL, running on a formally verified VM, would have none of the exploding clown car disasters inevitably resulting from the stupidity of bolting a Turing-complete VM onto a blockchain.

- Please list your favorite tools and tutorials.

Tools depend on what job you need done; and I don’t really know any good tutorials off the top of my head.  But here are some educational links:


HTH.
newbie
Activity: 4
Merit: 2
Thanks!  Need my morning coffee.  Fortunately I do have the 2017 book you mentioned, not the older 2014.  The 2014 year stuck in my head from the first search I did on Amazon for Anton's book.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
the book is over 2 years old, a lifetime in this industry.

There is Mastering Bitcoin: Unlocking Digital Cryptocurrencies which is from 2014.
There is also a second edition Mastering Bitcoin: Programming the Open Blockchain which is from 2017.

Sorry the rest of your questions are out of the scope of my knowledge!
newbie
Activity: 4
Merit: 2
Hey all.  Happy Holidays.  I'm a veteran software developer, but brand new to BitCoin coding.  I'm reading Mastering BitCoin at the moment and I have a few questions:

- The book seems to favor Python, but the book is over 2 years old, a lifetime in this industry.  What is the "most favored" dev environment for BitCoin dev right now?
    + IDE? (E.g. - PyCharm for Python, or WebStorm for JS/TS, or whatever.  Doesn't have to be JetBrains, I just happen to like their stuff)
    + Programming language?  Python, JS (or TS)?, etc.

- How does the blockchain network prevent errors in the miner's calculations from corrupting the transactions?  For example, suppose a bunch of miners are using the same CPU or GPU that has a known defect in, for example, the overflow/underflow handling in the arithmetic logic units or perhaps a flaw in the transcendental functions on a GPU card, etc.?  I know a lot of miners use ASICs but I don't see why that architecture would be immune to such problems?

- Regarding smart contracts directly on the BitCoin network (i.e. - not Ethereum based), I see two projects in the field: Ivy and Rootstock.  How does Ivy relate to Rootstock if at all?

- Please list your favorite tools and tutorials.

Thanks in advance.
Jump to: