Comments (12)
I can't do that, because I use this trick so I have the same codebase for coin selection algorithm, and change with both CC and Non CC.
What I can do though, is to add ICoin.BTCAmount but this is not obvious reason to do that from outside perspective, it makes things more obscure.
I think that
spent += coin is IColoredCoin ? ((IColoredCoin)coin).Bearer.Amount : coin.Amount;
Will not be used anywhere else.
I did it only for one specific case:
At first, TransactionBuilder completely ignored the BTC amount of CC.
Which had 2 downsides :
- if a IssuanceCoin or ColoredCoin was on a big BTC coin, this would have been sent to the miner.
- If you had 2 issuance of CC, then 1200 satoshi needed to be spent, when most likely, the issuance had only 600 satoshi. That made Transaction correctly signed but with insufficient funds.
Aside for this specific use case, I don't believe that anyone need to know the amount of BTC of a colored coin. Because a colored wallet should not count those BTC in the BTC balance.
CoinPrism shows the BTC of colored coins in the BTC balance, but this is a mistake that Flavien should fix soon.
from nbitcoin.
Colored coins can be used to do two things:
- Carry metadata and quantities representing non-BTC assets in the block chain for a token ("dust") BTC cost
- Associate metadata with non-trivial BTC value in the block chain.
I have use cases for both. In some scenarios I create tokens with no inherent value to provide something that can easily be passed around. In other scenarios I need to actually color BTC with metadata.
For example, to indicate that a quantity of BTC is a deposit or security towards a previously agreed upon contract, it makes more sense to color the BTC with metadata indicating the context of the contract than to issue valueless tokens. If the contract is forfeited, the tokens are worthless so there is no disincentive to forfeit. Having real BTC in jeopardy under the metadata provides a financial incentive not to forfeit.
I've already implemented proof of concept of these models in raw code. I'm concerned that the comingling of BTC and non-BTC values in your ICoin / IColoredCoin interfaces will present a constant hazard of "burning" 100 BTC where 100 post-it notes was intended.
from nbitcoin.
I think we going to side-chain debate. My interest is on ring-signature schema, reason based on acronym CIA, standing for Confidentiality, Integrity and Accessibility. We want our information to be read by only the right people (confidentiality), we want it to stay the same all the time weβre not changing it (integrity), and we want to be able to read and use the information whenever we want (accessibility).
Steps;
1 - Convert original code (http://en.wikipedia.org/wiki/Ring_signature) in python into c#
2 - ...still working
3 - ........
from nbitcoin.
open a new issue for that, you are out of the topic. I don't see what is the relation between bitcoin and ring sig.
from nbitcoin.
Ok Nicolas as "Redmondians" researchers says, we don't want to cause "data-quake". Case Dismissed.
PS-. Nicolas you should read letters exchange between Satoshi and Hal Finney, don't let then make up your mind.
from nbitcoin.
where do they talk about it
from nbitcoin.
Well we need to dive into Microsoft PKI modules.. it's long history and
probably we going to end up into a infinity loop ...
---------- Forwarded message ----------
From: Satoshi Nakamoto [email protected]
Date: Sat, Jan 10, 2009 at 11:52 AM
Subject: RE:Crash in bitcoin 0.1.0
Normally I would keep the symbols in, but they increased the size of the
EXE from 6.5MB to 50MB so I
just couldn't justify not stripping them. I guess I made the wrong
decision, at least for this early
version. I'm kind of surprised there was a crash, I've tested heavily and
haven't had an outright
exception for a while. Come to think of it, there isn't even an exception
print at the end of
debug.log. I've been testing on XP SP2, maybe SP3 is something.
I've attached bitcoin.exe with symbols. (gcc symbols for gdb, if you're
using MSVC I can send you an
MSVC build with symbols)
Thanks for your help!
Hi Satoshi - I tried running bitcoin.exe from the 0.1.0 package, and
it crashed. I am running on an up to date version of XP, SP3. The
debug.log output is attached. There was also a file db.log but it was
empty.
The crash allowed me to start up a debugger, but there were no
symbols. The exception was at address 00930AF7. The displayed call
stack was 942316 called by 508936.
When I have a chance, I'll try building it, although it looks like it
:. Andre Amorim .:
Key-ID:
A70B444E
Fingerprint:
FAAD3B6556A8877B938EAB2FC05E2CB0A70B444E
On 4 February 2015 at 16:45, Nicolas Dorier [email protected]
wrote:
where do they talk about it
β
Reply to this email directly or view it on GitHub
#18 (comment)
.
from nbitcoin.
Man, are you alright ? what you say make no sense, and you just speak in github issues that have no relation with what you want.
from nbitcoin.
I'm completed all right, maybe to much coffee I confess... and maybe the
knowledge I care not fit on this discussion, while finishing my essay
Routh-Huwitz theorem on kernel ring 0 based protocol implementation. As I
said I apologise for any inconvenience and going into silence mode... It's
sad when you lost the ability to communicate...
On Wed, 4 Feb 2015 18:09 Nicolas Dorier [email protected] wrote:
Man, are you alright ? what you say make no sense, and you just speak in
github issues that have no relation with what you want.β
Reply to this email directly or view it on GitHub
#18 (comment)
.
from nbitcoin.
I was thinking about adding an abstract layer dealing with "assets" that could easily be used for handling normal Bitcoin, Open Asset Coins, or any other coins.
By coding colored coins services, there is too much place where I use "if(coin is ColoredCoin)", there ought to be a better way of doing it.
An "Asset" would have its own type of "Money" independent from Bitcoin, but also have an "Issuer".
For Bitcoin it would be a singleton representing "The BlockChain". For Open Asset it would be the AssetId.
I am incubating this idea for now, this would fix this issue and permit to add other colored coin protocols in the future.
from nbitcoin.
@dthorpe I worked on a big refactoring that did the following stuff :
- Transformed Asset class in AssetMoney (which support arithmetic operations and check for overflow) (8193beb)
- Introduce a IMoney interface used by both, AssetMoney and Money, then use it in place of Money in the transaction builder. (b330d70)
Would you have time to review and have anything to add ? it would fix this issue, while protecting against bugs mixing apples and oranges, and against overflow.
from nbitcoin.
I am closing that issue, now Money is not used for asset arithmetic. AssetMoney class was created with a common interface called IMoney.
from nbitcoin.
Related Issues (20)
- How to generate a Nostr keypair HOT 2
- Too small max transaction size HOT 2
- calling GetAddress() with ScriptPubKeyType.TaprootBIP86 generates incorrect address? HOT 3
- Support for `wtxidrelay` message
- `Array size too big` after receiving block containing Ordinal NFT HOT 6
- Need some code example on how to use RPC client on Bitcoin Test net. HOT 10
- Why test code not working for using NbitcoinTest? HOT 3
- How to find the peers in BTC blockchain? HOT 2
- Add bitcoin as a topic to this repository
- No call to TransactionBuilder.Send has been done which can support the fees HOT 1
- Link on the github readme page to ebook is not working
- Non-segwit inputs are not serialized in PSBTs HOT 4
- VerifyMessage does not exist HOT 7
- Hello, is there any sample code for taproot? HOT 1
- How to generate taproot NOMS internal key?
- Unable to create or compile to get NBitcoin.dll
- "Unknown transaction optional data" error when calling GetBlock() HOT 1
- Sign a text message with NBitcoin HOT 6
- RobiniaDocs API Explorer
- Failing to P2WPKH HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbitcoin.