Giter Club home page Giter Club logo

Comments (12)

NicolasDorier avatar NicolasDorier commented on July 18, 2024

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 :

  1. if a IssuanceCoin or ColoredCoin was on a big BTC coin, this would have been sent to the miner.
  2. 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.

dthorpe avatar dthorpe commented on July 18, 2024

Colored coins can be used to do two things:

  1. Carry metadata and quantities representing non-BTC assets in the block chain for a token ("dust") BTC cost
  2. 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.

andre-amorim avatar andre-amorim commented on July 18, 2024

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.

NicolasDorier avatar NicolasDorier commented on July 18, 2024

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.

andre-amorim avatar andre-amorim commented on July 18, 2024

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.

NicolasDorier avatar NicolasDorier commented on July 18, 2024

where do they talk about it

from nbitcoin.

andre-amorim avatar andre-amorim commented on July 18, 2024

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

To: [email protected]

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.

NicolasDorier avatar NicolasDorier commented on July 18, 2024

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.

andre-amorim avatar andre-amorim commented on July 18, 2024

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.

NicolasDorier avatar NicolasDorier commented on July 18, 2024

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.

NicolasDorier avatar NicolasDorier commented on July 18, 2024

@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.

NicolasDorier avatar NicolasDorier commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.