Bitcoin Forum

Other => Beginners & Help => Topic started by: brandon720 on July 12, 2012, 09:28:26 PM



Title: How to create custom script
Post by: brandon720 on July 12, 2012, 09:28:26 PM
I am working on am anonomized version of bitcoin.
I have added an OP_CODE to script.cpp and script.h, however have been unable to figure out how to create my own script to utilize it.
grep`ing the source code for bitcoind and bitcoind-qt for select OP_CODES did not produce results outside of the script.* files.


Title: Re: How to create custom script
Post by: brandon720 on July 13, 2012, 01:16:23 PM
We're trying to create a system were you can spend coins anonymously. We plan on doing this by adding OP_GEN_ANON_COIN and OP_VERIFY_AONON_COIN to the script op_codes, and then modifying the script to use them. We know how to do the first part, but have been unable to locate where the script is defined.


Title: Re: How to create custom script
Post by: brandon720 on July 13, 2012, 04:00:00 PM
Thanks for the link.
It looks like what they are doing is making is easier on the UI level to keep you bitcoin identities seperate. What we are working on is a protocol level change where you cannot determine the bitcoin identity of the sender in the first place.


Title: Re: How to create custom script
Post by: brandon720 on July 13, 2012, 08:31:17 PM
The plan is to create a new chain entirely. The main reason we were interested in bitcoin was using its existing code base to handle the block chain (and probably mining). Seeing as how this is proving much more difficult than we expected, we are giving up on using bitcoind code, and will start from scratch.


Title: Re: How to create custom script
Post by: brandon720 on July 14, 2012, 10:24:07 PM
Quote
1) Will your new cryptocoin be mineable on CPU or GPU ?
2) What kind of proof of work it will use ?
3) What else will differ it from Bitcoin ?

Is it possible to only be minable on 1? More to the point, the coins themselves are RSA keys, (p*q where p,q are both prime). There are two ways to add a coin to the chain, A) solve some problem, probably the same one bitcoin uses for mining, or B) prove that you you know p,q for some coin that already exists (you do not need to show which coin you know). 

The concept for spending a coin is that the receiver sends you p*q, and you use method B to add p*q as a coin to the chain, while providing a proof that you know (p,q) for a coin already in the chain, and some function of that coin so that you cannot spend it later.


Title: Re: How to create custom script
Post by: Slushpuppy on July 15, 2012, 05:48:00 AM
Quote
and some function of that coin so that you cannot spend it later.


wouldn't a public blockchain ensure this, like bitcoin?


Title: Re: How to create custom script
Post by: Foxpup on July 15, 2012, 11:57:21 PM
So far no mining algo was found only mineable on CPU or GPU, but not on both.
It looks like this challenge is quite hard.
Maybe you will be more lucky with this.

It's not just hard, it's impossible. CPUs and GPUs are both Turing complete (https://en.wikipedia.org/wiki/Turing_completeness), meaning that any function which can be computed by one can also be computed by the other. It's just a matter of which is faster. FPGAs and ASICs can be designed to compute any Turing computable function as well.


Title: Re: How to create custom script
Post by: John (John K.) on July 16, 2012, 06:38:54 AM
But, theoretically, we have possibility to design the mining algo, which :
1) will not give substantial speed up on GPUs against CPUs.
  and at the same time
2) will make construction of ASIC or FPGA or any specialased hardware
VERy-VERY expensive task ( i.e. economically impossible ).
Your CPU is an ASIC too.


Title: Re: How to create custom script
Post by: Foxpup on July 16, 2012, 07:19:38 AM
But, my CPU costs, say 100 USD, and "real" ASIC <-- how much  ?   :) :P

The same. It also costs about the same to design an ASIC as a CPU. Intel and AMD spend millions designing CPUs and GPUs only because there's such a large market for these chips. The reason we're only just starting to see the development of Bitcoin-mining ASICs is because the market for such hardware has only recently become large enough to justify the design costs. Note that ASICs will always be more efficient at the algorithm they're designed for than general-purpose hardware, and it is inevitable that they will be designed for any crypto-currency that has a large enough market. It is impossible to make an "ASIC-proof" coin, and it baffles me as to why anyone would want to, as ASICs (and any other technology that makes mining more efficient) provide more security for less cost.


Title: Re: How to create custom script
Post by: Foxpup on July 16, 2012, 08:25:09 AM
If you are right, why say Intel is not selling "special for Bitcoin" ASIC-on-one-chip right now ?!
They are in better position, than some marginal lab from the basement.
Keep in mind that Bitcoin is still experimental, and Intel will have a lot of hard questions to answer if they pour millions of research dollars into something that later turns out to be a complete failure.

All is possible, only probability of some of the options is a bitch  :)
but i like your "i am in this box forever !" style of thinking !  :P
What "box" are you talking about? CPUs and GPUs are general-purpose devices. A special-purpose device will always be more efficient than a general-purpose one, simply by not requiring the overhead of functionality which is not needed for the purpose in question. The idea that an function can be devised for a general-purpose machine that cannot be better performed by a machine specifically designed for that function is laughable.

If anyone's stuck in a box, it's the people who insist on using CPUs when more efficient devices exist. A CPU exists to do anything you can program, and do an average job of it. If you want to do one thing only, and do that thing well, a specialised device really is the answer.

"more security" ?!
yes, let's put security of the coinnet into the hands of the Big Money, which will buy majority
of the ASICs, will it be REALLY so good ?!
The "Big Money" could equally well buy a huge number of CPUs, so what's your point? In fact, they wouldn't even need to buy their CPUs: any "CPU-friendly" coin is also ipso facto "botnet-friendly". Will that be really so good?


Title: Re: How to create custom script
Post by: John (John K.) on July 16, 2012, 08:38:13 AM
If you are right, why say Intel is not selling "special for Bitcoin" ASIC-on-one-chip right now ?!
They are in better position, than some marginal lab from the basement.
Keep in mind that Bitcoin is still experimental, and Intel will have a lot of hard questions to answer if they pour millions of research dollars into something that later turns out to be a complete failure.

All is possible, only probability of some of the options is a bitch  :)
but i like your "i am in this box forever !" style of thinking !  :P
What "box" are you talking about? CPUs and GPUs are general-purpose devices. A special-purpose device will always be more efficient than a general-purpose one, simply by not requiring the overhead of functionality which is not needed for the purpose in question. The idea that an function can be devised for a general-purpose machine that cannot be better performed by a machine specifically designed for that function is laughable.

If anyone's stuck in a box, it's the people who insist on using CPUs when more efficient devices exist. A CPU exists to do anything you can program, and do an average job of it. If you want to do one thing only, and do that thing well, a specialised device really is the answer.

"more security" ?!
yes, let's put security of the coinnet into the hands of the Big Money, which will buy majority
of the ASICs, will it be REALLY so good ?!
The "Big Money" could equally well buy a huge number of CPUs, so what's your point? In fact, they wouldn't even need to buy their CPUs: any "CPU-friendly" coin is also ipso facto "botnet-friendly". Will that be really so good?

This exactly. CPU-friendly coins run the inherent risk of being mined using botnets. Hell, even GPU-friendly coins (the stage where bitcoin is still at now) are mined tremendously by botnets. IIRC a reddit post said the botnet controller earned over a couple of k's per week from his bitcoin mining botnet.


Title: Re: How to create custom script
Post by: Nomad Tom on July 16, 2012, 05:55:56 PM
This processing power equality/competition issue would be mute if in a couple years some super-cooled quantum bits produce something useful. I know quantum computing is years away, but not decades away. In the meantime the existence of bitcoins will act like an X-Prize for revolutionary computing.

When it does happen, it will be like the atomic age: the university team making the first discovery will have to test discovering the next blocks for hours or days against the entire network. It will be a shock, and then the usual volume of mining will resume (if all the bricks aren't discovered first). Like nations in the 1950s, the knowledge of a higher power will be haunting. Then the system will be in limbo until competing quantum computers appear. At least that's how I imagine the processing competition issue to resolve itself.


Title: Re: How to create custom script
Post by: Foxpup on July 16, 2012, 08:10:26 PM
This processing power equality/competition issue would be mute if in a couple years some super-cooled quantum bits produce something useful. I know quantum computing is years away, but not decades away. In the meantime the existence of bitcoins will act like an X-Prize for revolutionary computing.

When it does happen, it will be like the atomic age: the university team making the first discovery will have to test discovering the next blocks for hours or days against the entire network. It will be a shock, and then the usual volume of mining will resume (if all the bricks aren't discovered first). Like nations in the 1950s, the knowledge of a higher power will be haunting. Then the system will be in limbo until competing quantum computers appear. At least that's how I imagine the processing competition issue to resolve itself.

SHA-256 is not magically broken by quantum computing the way ECDSA might be. A quantum computer which is faster than a classical computer at SHA-256 will be faster than a classical computer at everything, and quantum computers are likely to be marketed to the general public long before the technology reaches that point.