Bitcoin Forum
June 26, 2024, 04:05:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 [65] 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 ... 206 »
1281  Bitcoin / Press / Re: 2012-06-29 forbes.com - Wikipedia's lame excuse for not accepting BTC on: June 30, 2012, 03:00:42 PM

Why hasn't any bitcoin fan forked wikipedia already ?

I was thinking the same thing.  If you don't like how the Wikimedia Foundation operates, create your own.  The CC-BY-SA the content of Wikipedia is licensed under allows this to be done.

Or we could also fuck the CC-BY-SA and make an illegal fork on Tor.

Because CC-BY-SA makes forking a real pain in the ass, and that is why there are so few forks of wikipedia.
1282  Bitcoin / Press / Re: 2012-06-29 forbes.com - Wikipedia's lame excuse for not accepting BTC on: June 30, 2012, 01:58:29 PM

Why hasn't any bitcoin fan forked wikipedia already ?
1283  Other / Politics & Society / Re: Guns on: June 29, 2012, 02:48:17 PM

France criminality rates are much lower than Brazil. And I'm pretty sure that this has nothing to do with gun laws. For multiple reasons which I'll not try to speculate here, average people in France are just less prone to initiate violence themselves than average people in Brazil. They are more "honest", we may say.

My guess is that they are just less desperate.  As soon as the french social security system collapses, I'm pretty sure it will quickly get ugly.

Quote
It really isn't a matter of France having better security forces or practices, of that I'm sure.

Good point.  Gunned violence is indeed not just a matter of gun regulation.
1284  Other / Politics & Society / Re: 10 top reasons why organised crime would be better than the State on: June 29, 2012, 01:50:58 PM
If you think kidnap, rape and murder are less intrusive than traffic rules, you have a funny sense of "style"

I may have a romantic idea of organised crime, but to me it is much more about racket, drug traffic and proxenetism.

By comparaison, state is about racket (taxes), sequestration (jail) and endoctrination (schools and publicly financed medias).
1285  Other / Off-topic / Re: [Idea] P2P Chess Solving + Mining Pool on: June 29, 2012, 01:39:51 PM
I once thought about an alternative protocol where miners, instead of crunching numbers, compete in chess.  A tournament occurs every ten minutes and only the winner is allowed to publish transactions.

The problem with this is that it would require a lot of disk space to store all the games of all tournaments, in order to verify the block chain.  Yet this data would not be totally useless as there might be some interesting chess games in it.
1286  Local / Discussions générales et utilisation du Bitcoin / Re: SatoshiDice - Meilleur jeu Bitcoin jamais réalisé! on: June 29, 2012, 01:31:34 PM
c'est un progrès de voir les transactions (grâce à bitcoin) mais il reste que le lancer des dés est opaque (comment je sais si c'est vraiment "random" ?). Donc je vais continuer à ne PAS jouer aux dés..

J'avais déjà proposé un schéma avec tirage vérifiable, mais c'est un peu compliqué.

En gros le tirage a lieu avant la mise.  Pendant la mise le joueur peu voir le hash du tirage.  Après la mise le joueur peut vérifier que le hash correspond.  Il peut donc s'assurer que le résultat n'a pas été choisi pour ne pas correspondre à sa mise.

Il y avait une subtilité quelque part qui faisait en sorte que le joueur devait aussi procurer un bruit avant chaque tirage, mais j'ai oublié pourquoi.


Un de ces quat' je réimplémenterai une preuve de concept.
1287  Other / Politics & Society / Re: Guns on: June 29, 2012, 01:18:36 PM
I live in europe, in a country where even possession of some larger knifes is prohibited by law. And you know what? It's one of the few things, I like about my country!

Yeah right.  Until you encounter someone who has a large knife despite law, and who is willing to use it:

http://galliawatch.blogspot.fr/2007/11/woman-fatally-stabbed-in-subway.html

Quote
I want to live in a peaceful world, without guns, bazookas or even nuke bombs.

Yeah and I want to live in a society where the weather is great everyday, beer is free and male-female ratio is one to ten.

Weapons are things that can be produced by human beings.  As long as they will be humans, you can not prevent those things to exist.

Quote
Often I read the argument, that people must possess guns to defend against the government. So you want to fight with your small guns against people with high end arms or even nuke bombs? Not very clever... If you want to change something about your government, change the people that give the power to the government.

Yeah it is probably not the best argument.  Recently in Mali I've heard that islamists have taken control on the north of the country, and have arrested armed citizens.

http://bdnews24.com/details.php?id=227315&cid=1

But still, I keep thinking it is probably more difficult, yet sadly not impossible, for a government to dictate law to an armed population.
1288  Other / Politics & Society / Re: 10 top reasons why organised crime would be better than the State on: June 29, 2012, 12:27:00 PM
First you have anarchy, then warlords and then one wins and that's your new government.

I think you missed the point of the old lady.

In a nuttshell: it's not a matter of scale, it's a matter of style.


Even when a mafia war ends up with a unique winner, it doesn't have to necessarly end up with a bureaucratic, private life intrusive government.  The lady speaker was not bashing the uniqueness of the government, but what it does and how it does it.
1289  Other / Politics & Society / Re: Guns on: June 29, 2012, 11:25:31 AM
Since the purpose of an object can change rapidly and be hidden easily (example: IEDs), any rules based on the intent of an object are highly impractical. Outlaw guns, and only outlaws will use guns Tongue people will just use knives, bombs, poison...

Why did you strike this sentence through?

« Outlaw guns, and only outlaws will use guns. »

This is just plain truth.  By outlawing guns, the State makes peaceful people defenseless against violent people.  It is just silly.
1290  Local / Discussions générales et utilisation du Bitcoin / Re: Prononciation du mot "bitcoin" on: June 28, 2012, 02:44:23 PM
la gueguerre du franci contre l angli ....
l anglais est a 80 % fait de francais du moyen age , qui est lui meme a 80 % du latin...

Ca n'est pas la question.  Si on prononce le mot bitcoin avec une prononciation française, ça n'enlève pas au mot son origine anglaise.

Ce n'est pas à moi qu'on peut faire la leçon sur le bien fondé qu'il y a à laisser les langues vivre et se créoliser.

Mais bitcoin à l'anglaise dans une phrase française ça me fait presque mal aux oreilles quand je l'entends, et à la machoire quand je le prononce.

Que les gens fassent comme ils veulent, comme je le disais la langue c'est un phénomène vivant et il faut le laisser évoluer librement.  N'empèche que j'ai très envie de plaider pour une prononciation française.  Y'en a sûrement qui hésitent et qui choisissent de faire "comme tout le monde".  Donc ça a un sens de donner son avis pour pouvoir convaincre les indécis.
1291  Other / Politics & Society / Re: Guns on: June 27, 2012, 03:51:33 PM
I carry most every day, but i can understand your uneasiness. Think about this.
To carry has cost me about $1200 in classes and equipment. It took about 4 months of waiting, I had to submit multiple sets of fingerprints to the FBI and states of Wisconsin and Utah. I had background checks for criminality, mental illness, drug abuse, etc.. And each handgun I buy involves another raft of paperwork
Now, it is not sensible to think that I went through all that so I could murder someone. Indeed, IMO you are safer when you see someone carrying nearby.  
Pepper-spray or mace or stun guns would never do in a gunfight. Using anything like that is a good way to get killed. As counterintuitive as it is, if everyone has a gun, peace breaks out. I saw it myself in Croatia during the war. The Serbs were slaughtering the Croats until the guns showed up. Suddenly they did not want to fight.

Great post.
1292  Local / Discussions générales et utilisation du Bitcoin / Re: Prononciation du mot "bitcoin" on: June 27, 2012, 03:26:01 PM
Pas en francais, Bitcoin n'a pas été inventé par un francais.

Il y a sûrement des tas de contre-exemples à cette idée selon laquelle on doit prononcer à l'anglaise un mot d'origine anglaise.

Un rapide coup d'oeil sur Google me donne cette page du Wiktionnary sur le sujet:

http://fr.wiktionary.org/wiki/Annexe:Mots_fran%C3%A7ais_d%E2%80%99origine_anglaise

« Les mots empruntés à l'anglais se prononcent généralement selon une phonétique anglaise simplifiée.»

Les exemples de "chèque", "cannette", "paquebot" et "redingote" me paraissent éloquents.

Le son "ojn" n'existe nul part en français et ça fait très bizarre de le prononcer dans une phrase française.  Le mot "coin" par contre est banal même s'il fait sourire parce qu'il fait penser au bruit du canard.  Mais c'est à peu près aussi idiot que de sourire à l'énoncé du mot "bit" en informatique.
1293  Local / Discussions générales et utilisation du Bitcoin / Re: Votre avis avant lancement du projet. on: June 27, 2012, 03:10:35 PM
Utilisation de mailinator, hidemyass, hushmail et des autres qui finissent ave .com dont le gouverneur est établi aux Etats-Unis n'est pas prudent si vous etes concerné de confidentialité de vos données privées.

Ben compte tenu du principe de fonctionnement, il serait particulièrement idiot d'utiliser ces services pour y recevoir des données confidentielles.

J'ai déjà essayé d'envoyer des données chiffrées vers mailinator, le mail n'est pas arrivé car le texte a été reconnu comme encodé, et le site n'accepte pas ce genre de données.
1294  Other / Politics & Society / 10 top reasons why organised crime would be better than the State on: June 27, 2012, 02:49:05 PM

Maybe you've already seen this video but if not, check it out:

http://www.youtube.com/watch?v=IErlI34-0so


1295  Bitcoin / Development & Technical Discussion / Re: SQL block database: about nested sets on: June 27, 2012, 08:26:52 AM
I wrote/improved-upon a nested-set implementation in Python using SQLAlchemy for this exact purpose. It's hosted on github.

It'll probably not be worth the effort to integrate it into your perl library directly (being in Python and on top of SQLAlchemy, etc.), but you can port it, or maybe you'll just find it a useful reference as you write your own.

EDIT: I suppose the codebase might be intimidating to someone who not versed in Python or the SQLAlchemy framework. You'll find the insertion/update/deletion code in 'sqlalchemy_tree/orm.py', and the higher-level methods for manipulating the tree in 'sqlalchemy_tree/manager/{class_,instance}.py'.


I'll have a look at it someday.  But meanwhile I've been working on neat stuff and I'd like to share it to everyone.  It's not implemented in SQL right now, but I should do it soon.

Here it is.

I've spent quite some time reading the work of a guy named Vadim Tropashko on
this subject.  It's quite fascinating, and I think his technique would be
perfect for a SQL model of the bitcoin block structure.

Tropashko uses rational values as borders for his intervals.  One of the main
advantage is that you can work on a fix global interval (0 to 1 for instance):
you don't have to shift half of the block tree each time you insert a new node.

One cool aspect of this technique is the relation with continued fractions.
As you know any fraction can be written as a finite continued fraction:

Code:
p          1      
- = ---------------
q            1 
    a + -----------
               1
        b + -------
           
            c + ...

The idea is that the a, b, c, ... sequence provides a natural path for the
node's branch.

For instance, a sequence such as 1, 1, 2, 1 would mean:  "take the second branch
at the third node from the root".

Now, nested intervals are all about intervals, so we can not be happy with just
one rational for each node.  We need an upper limit, assuming the rational
described above is the lower limit (it is not necessarly the case though, but
we'll deal with this problem later).

The idea is to associate a Möbius function of a variable x ranging from 0 to 1
(same as our global interval):

Code:
              1      
M(x) = ---------------
                1 
       a + -----------
                  1
           b + -------
   
               c  +  x

Then we have p/q = M(0).  The parent of f/p is then M(infinity).

This is actually already enough to understand that M(x) can be written:

Code:
        p + r x
M(x) =  -------
        q + s x

Where r/s is the parent node written as a rational.

I have no exact proof for that, but considerations on limits at infinity
and value at 0 clearly indicates it should be true.

Without the possibility to write M(x) like this, it would be pretty tough
to compute any M(x) value in SQL.

Anyway, what is important to remember is that to compute M(x) we only need
two rational numbers:  the one from the actual lowest edge of the node, and
the one from its direct parent.

The only thing which is lacking is a way to get the first child.  M(1) wouldn't
do as this is actually the first 'sibling'.

Tropashko then gets into quite a lot of complicated stuff and I had a lot of
difficulties grasping them, and when I managed to understand them I was
wondering if they would be useful anyway.  Yet there is one remark that he
makes at the very end of his last article, a remark that can make, in my
humble opinion, the whole thing much easier.

Tropashko remarks that simple continued fractions are notoriously known
not to be monotonuous.  Depending of the parity of the position of one of the
number a, b, c..., sometimes the whole value increases with the number,
sometimes it decreases.

He then proposes to use positive continued fractions
(mind the minus signs):

Code:
                 1
M(x) = ---------------------
                     1 
       a + 1 - -------------
                       1
           b + 1 - ---------
   
                   c + 1 - x

Althouth this expression seems more complicated at first glance,
it is actually much easier to visualize and to work with.

The main reason for this is that it's easy to convince yourself that this
function of x is growing (I mean:  x > y => M(x) > M(y) ).

This changes everything.  We now can be sure that the lowest
edge for an interval will be M(0), and the highest edge will be M(1).
We'll usually identify a node with M(0).

Parent is still M(infinity), so we can still write the function as:

Code:
        p - r x
M(x) =  -------
        q - s x

The only difference are the minus signs, but they are not a problem.

The first child of M(0) is easy to spot: it's M(1/2).  The second child (first
sibling of M(1/2)) is M(1/3), the third is M(1/4), and so on.

The first sibling of M(0) is M(-1), second sibling is M(-2), and so on.

Here is a small part of a genealogy tree, to make things clearer:

Code:
M(infinity)-->M(0)-------->M(1/2)--> M(1/(2-1/2)) --> ...asymptotically ends at M(1)
        | |          |  |
        | \-->M(-1)  |  \->M(1/3)----> M(1/(3-1/2)) --> ...asymptotically ends at M(1/2)
        |            |
        \---->M(-2)   \->M(1/4)---> M(1/(4-1/2))--> ...asymptotically ends at M(1/3)
                                |
                                \-> M(1/(4-1/3))--> ...asymptotically ends at M(1/(4-1/2))
                                       .
                                       .
                                       .

Then there is still a catch:  how do you compute the parent from the lower edge
of the interval?  Normally, as Tropashko explains it, you'd have to use the
extended euclidian algorithm, but we actually don't need to do that for a
bitcoin block tree, since each parent is present already in the database
anyway.  We can therefore retrieve the parent rational value, and use it to
compute the Möbius function, and thus the rest of the tree as we need it.

So, to summarize, it's pretty easy.  Each node tree will have two rational
numbers, defining an interval.  If the lower edge of node A is inside the
interval of node B, then B is an ancestor of node A.  To add a child to a node,
we just need to get the parent and compute the Möbius function for x = 1/(n+2),
where n is the number of already existing children.  It shouldn't be difficult
to get n, we basically just need to make a loop and test for the existence of M(1/(k+2))
in the database.

Moving a whole branch should not be too difficult either.  Imagine we have an
orphan block with children, and then suddenly the parent block of the orphan is
added to the database.  To patch the new branch to the database, we need to
change intervals for each node of the previously orphan branch.  It sure will
cost more than adding a single child to a leaf, but hopefully this situation
does not occur too often anyway.

One cool thing with the fact that positive continued fractions are increasing
functions, is that we will not have to store the ordinal value (height, depth,
however you name it) of each node.  If we sort our queries by rational lower
edges, then we'll automatically get the sequencial order of our chain.
1296  Local / Discussions générales et utilisation du Bitcoin / Re: Un FAI qui accepte les bitcoins ? on: June 26, 2012, 11:35:11 AM
Pourquoi ils ne disent pas que l'or ou la retraite par répartition  sont des "Ponzi" ?

Pour la retraite par répartition, je ne sais pas.  Par contre pour l'or, je ne serais vraiment pas étonné qu'on en trouve quelques uns pour clamer l'or, ça sert à rien, ou c'est une relique barbare.

1297  Bitcoin / Development & Technical Discussion / SQL block database: about nested sets on: June 22, 2012, 01:02:12 PM

As I try to implement a SQL bitcoin database for my perl library, I was looking for a way to efficiently store the tree block structure.  So I found out about an idea which is kind of neat:  nested sets.

Here is one document which explains it (it's not the one I actually used as the one I used is not in english, so I had to find an other one for you):  https://communities.bmc.com/communities/docs/DOC-9902

EDIT:  the wikipedia page seems fine also.


I think it's quite a cleaver method, but a bit tough to grasp.

Here is the mysql code I wrote so far (I didn't put here some views, but I did put the main tables, even if they are not related to the subject of this thread):

Code:
-- Table "blocks" actually only contains block headers
CREATE TABLE blocks (
    hash                char(32) binary primary key,

    version             integer default 1,
    hashPrev            char(32) binary not null,
    hashMerkleRoot      char(32) binary not null,
    nTime               integer unsigned not null,
    nBits               integer unsigned not null,
    nNonce              integer unsigned not null,

    key (hashMerkleRoot),
    key (hashPrev)
);

-- We'll insert the genesis block here as some triggers won't behave well
-- with an empty 'blocks' table.
INSERT INTO blocks values (
    unhex("6FE28C0AB6F1B372C1A6A246AE63F74F931E8365E15A089C68D6190000000000"),

    1,
    unhex("0000000000000000000000000000000000000000000000000000000000000000"),
    unhex("3BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A"),
    1231006505,
    486604799,
    2083236893
);

-- A view of orphan blocks
-- (notice that we don't use any "view" prefix in the name here)
CREATE VIEW orphan_blocks AS
SELECT a.*
FROM blocks a LEFT JOIN blocks b
ON a.hashPrev = b.hash
WHERE b.hash IS NULL;

-- Merkle transaction trees are stored in their own table
CREATE TABLE Merkle_trees (
    root                char(32) binary not null,
    idx                 integer unsigned not null,
    hash char(32) binary,
    primary key (root, idx),
    key (root)
);

-- Transactions
CREATE TABLE transactions (
    hash                char(32) binary primary key,
    version             integer,
    lockTime            integer unsigned,
);

-- Transaction inputs
CREATE TABLE tx_in (
    hash                char(32) binary,
    prevout_hash        char(32) binary,
    prevout_n           integer unsigned,
    scriptSig           blob,
    sequence            integer unsigned,

    primary key (hash, prevout_hash, prevout_n),
    key(hash)
)

-- Transaction outputs
CREATE TABLE tx_out (
    tx_out_id           integer unsigned primary key auto_increment,
    hash                char(32) binary,
    value               integer,
    scriptPubKey        blob,

    key (hash)
);

-- A function to compute target from nBits
CREATE FUNCTION target (bits float)
RETURNS REAL DETERMINISTIC
RETURN mod(bits, 0x1000000) * pow( 256, bits div 0x1000000 - 3 );

-- To create the block tree structure,
-- we'll use the interval model.
-- Each node (i.e. each block) will have a left
-- and a right edge.  We must ensure that descending
-- blocks have edges inside its parent's edges.

CREATE TABLE block_tree (
    node char(32) binary primary key,
    L           integer unsigned not null,
    R integer unsigned not null check (R > L),
    height integer unsigned not null
);

-- We insert the genesis node manually.
-- Left edge is 0, right edge is 1, height is 0.
INSERT INTO block_tree values (
    unhex("6FE28C0AB6F1B372C1A6A246AE63F74F931E8365E15A089C68D6190000000000"),
    0,
    1,
    0
);

CREATE TRIGGER add_block_in_tree AFTER INSERT ON blocks
FOR EACH ROW
BEGIN
    UPDATE block_tree t, block_tree r
    SET t.L=t.L+2
    WHERE r.node = new.hashPrev
    AND t.L >= r.D;

    UPDATE block_tree t, block_tree r
    SET t.D=t.D+2
    WHERE r.node = new.hashPrev
    AND t.D >= r.D;

    INSERT INTO block_tree (node, L, R, height)
    SELECT new.hash, r.D, r.D + 1, r.height + 1
    FROM block_tree r
    WHERE r.node = new.hashPrev;
END;

The trigger "add_block_in_tree" should work when a block whose parent is known is inserted.  But it will not work if  block is inserted before its parent is.  It should be possible to code this but it is a bit tricky.

Anyway if anyone is also interested in this model, I'd gladly hear suggestions.
1298  Local / Discussions générales et utilisation du Bitcoin / Un FAI qui accepte les bitcoins ? on: June 22, 2012, 12:23:53 PM
French Data Network, le fournisseur d'accès internet associatif, accessoirement le plus ancien FAI français, a développé depuis quelques années un système fédéraliste permettant à plus ou moins n'importe quelle association de se déclarer comme fournisseur d'accès, en suivant l'exemple de FDN.

Chez FDN, on n'aime pas bitcoin.  Souvent sur le thème "arnaque de Ponzi", pour faire simple.  Je le sais parce que je me suis déjà pas mal fait bousculé sur leur canal IRC.

Personne n'est parfait, comme on dit.  Moi j'ai énormément de respect pour leur assoc et pour leur président Benjamin Bayart, en grande partie parce que quand j'étais étudiant j'ai appris LaTeX en lisant le manuel qu'il avait écrit quand il était à l'ESIEE.

Donc si chez FDN, on n'aime pas bitcoin, c'est pas grâve.  Par contre ce serait drôlement cool si on pouvait suivre leur exemple pour créer un FAI acceptant les bitcoins comme paiement mensuel.  Le FAI paie le raccordement à un FAI "grossiste" (Nerim, je crois) en payant en euros, donc une conversion serait nécessaire, au moins pour cette partie des frais.  Mais pour le reste (administration, autres couts variables, que sais-je encore...), ça pourrait être payés en bitcoins constants.

J'ai bien peur qu'on soit encore loin de pouvoir mettre ça en place (déjà que le nombre d'utilisateurs de bitcoins est faible, alors ceux qui ont envie de changer de FAI pour un FAI "amateur" l'est probablement encore plus), mais l'idée vaut la peine d'être lancée.

Ca n'a même pas à être associatif (cad à but non lucratif).  Ca pourrait très bien être un vrai projet entreprenarial, vu que l'usage de bitcoin doit pouvoir (j'imagine) réduire certains couts (car les banques prennent des commissions sur les prélèvements automatiques je crois).
1299  Bitcoin / Development & Technical Discussion / Re: Roadmap to 1.0? on: June 21, 2012, 03:53:01 PM
I'll buy my grandma a terabyte drive for Christmas.

No, seriously, a better startup experience is part of "easy to use" -- waiting hours for the blockchain to sync sucks.


By the way, is there any plan to implement a "header-only" mode on the main client, as Satoshi described it in his white paper?

PS.  sorry I realize it has been discussed already.
1300  Bitcoin / Development & Technical Discussion / Re: Roadmap to 1.0? on: June 21, 2012, 01:15:23 PM
+ past the December block-reward-drops-to-25

 Shocked

I'm kind of surprised that even Gavin worries a bit about this.

It's not that he worries, it's just something that we need to prove as working in production.
There's a difference between testing something in a lab (testnet) and making it work in production ... we need to get this level of confidence.

Indeed.
Pages: « 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 [65] 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 ... 206 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!