Jump to content

Skaro

Members
  • Content Count

    254
  • Joined

  • Last visited

  • Days Won

    25

Reputation Activity

  1. Like
    Skaro got a reaction from Bicknellski in Freicoin Mining Calculator   
    So I got a website on crypto currencies that has 3 pages dedicated to Freicoin. Or maybe its a Freicoin website with a couple extra other  pages. It's my first foray in website programming, so its could use some improvements over time. it features:
    1) News feed
    2) Cryto-currency interactive statistics
    3) Multicoin coin trade optimizer
    4) a Freicoin mining calculator
    5) grouping of Freicoin public keys
    6) Summary of Freicoin Foundation transactions
    Currently, the Freicoin database is not updated automatically, but with MYSQL dumps. The website is here:
    http://statstec.x10host.com/
     
  2. Upvote
    Skaro reacted to Bicknellski in Making freicoind faster and safer with fewer dependencies (simpler demurrage calculations)   
    Thanks for the update and info. 
     
  3. Upvote
    Skaro reacted to Mark Friedenbach in Making freicoind faster and safer with fewer dependencies (simpler demurrage calculations)   
    > Is there still a need to have a refheight in the Freicoin transaction if so why?
    There's a couple of ways I can answer this question.
    First, there is always a need for refheight in Freicoin transactions just by definition: it would be a hard-forking consensus change to remove them. This is the technically correct answer but mention it only for completeness as I assume it's not what you meant.
    This doesn't affect the need for reference heights in any fundamental way. Reference heights address a problem that generally applies to demurrage in bitcoin-like block chains: the demurrage rate reduces the inputs of a transaction without affecting the outputs, so if naively evaluated at block height it would introduce a back-door transaction expiry as at some point (which can be calculated) the transaction will have less input than output, resulting in a negative fee and consensus violation if it were then included in a block. There are basically three approaches to fixing this: (1) allow negative fees so long as the block as a whole doesn't have negative fees in aggregate; (2) assign a specific height to a transaction, less than the current block height, and use that for demurrage calculations so it is independent of block height; or (3) forget demurrage in the protocol and have an exponentially inflating currency instead. The first approach didn't work in 2012 as child-pays-for-parent wasn't wasn't well supported, and still isn't to some degree. The third approach we rejected for experimental reasons, although it would have had the nice property of pulling demurrage calculations out of consensus code and block validation logic. The second approach is what we did and what we're stuck with, at least on the present and future soft-fork compatible incarnations of the Freicoin block chain.
    Reaching more into an aside, I will say that it was never necessary that Freicoin transactions have an explicit reference height field at all, which is what breaks compatibility with bitcoin tools. The semantics of the reference height are that it is a block number which must be greater than or equal to each of its inputs reference heights, and less than or equal to the current block height. This happens to be a more strict subset of the rules for transaction lock-time! So an extra refheight isn't really necessary and never was--we could have just double-purposed the nLockTime field to be a reference height, making its use mandatory and adding extra constraints and restrictions. But alas we didn't notice this until years after the initial release of Freicoin, and that ship has sailed leaving us stuck with reference heights as an explicit extra field. Oops.
    > Is the demurrage calculated on the uxto set, or on the transactions itself?
    Reference height of inputs are stored in the UTXO set; demurrage is calculated during transaction validation. In bitcoin there is a check that sum(inputs) >= sum(outputs) in any context where a transaction needs to be validated -- e.g. when adding to your mempool or when encountered in a block. In freicoin we do the exact same thing except in the summation of inputs we adjust each term by the demurrage rate calculated from the difference of the transaction's reference height from its input's reference height.
    > If on the transaction itself is then pruning of old transactions possible in Freicoin?
    Yes, there has never been any restrictions on pruning old blocks. There just hasn't been an official release that supports this feature, which was added in bitcoin v0.11.0.
  4. Upvote
    Skaro reacted to Arcurus in Making freicoind faster and safer with fewer dependencies (simpler demurrage calculations)   
    thx for your work!
    I have some questions to the implementation of demurrage in Freicoin:
    Is there still a need to have a refheight in the Freicoin transaction if so why?
    Is the demurrage calculated on the uxto set, or on the transactions itself?
    If on the transaction itself is then pruning of old transactions possible in Freicoin?
     
  5. Upvote
    Skaro reacted to Mark Friedenbach in Making freicoind faster and safer with fewer dependencies (simpler demurrage calculations)   
    A little bit of a technical update I want to share. As part of the refactoring and rebasing effort I've worked out a way to eliminate Freicoin's extra dependencies while at the same time achieving a 10x performance boost for the mathematical calculations we use these libraries for. I'm quite excited about this, although for reasons that might be obscure for those without a technical background. If you don't understand this post, that's okay. The TL;DR is that we can make Freicoin faster while further aligning the code base with bitcoin to minimize the maintenance burden.
    Freicoin uses the GNU MP and MPFR multi-precision arithmetic libraries for performing cross-platform portable demurrage calculations within consensus code. Calculating demurrage factors involves taking the per-block demurrage rate r = (2-20 - 1)/(2-20) and raising it to the nth power, where n is the relative depth of the output (next block height - output's refheight). The fastest way to do this on workstation or server-class hardware is to use the CPU's floating point unit to perform the exponentiation. Unfortunately there is just absolutely no way that this can be done safely and consistently inside of consensus code. CPU manufacturers do not guarantee the bit-for-bit accuracy of operations compared with other CPUs of the same target architecture, much less with reference values or cross-platform targets. There was at one time a dream of decimal floating point (IEEE 754-2008) which would have had reproducibility as a requirement, but alas that never took off.
    The solution we adopted in 2012 was to use GNU MP (a multi-precision exact big integer and rational arithmetic library) and GNU MPFR (a multi-precision software floating-point library with rigidly defined semantics) to implement precise, cross-platform software floating-point demurrage accounting. This has the advantage of getting the job done, but there are some downsides:
    Performance. Freicoin suffers from this use of external multi-precision arithmetic libraries. Although optimized for speed GNU MP simply cannot approach the raw performance of directly adding two 64-bit numbers in hardware, and the multi-precision heap allocations add overhead and indirect storage causing latency. MPFR on the other hand is designed for precise, cross-platform behavior in simulations, not frequent high performance calculations. It is also overkill given that we use the library for one single calculation only, for which a generic library like MPFR would not provide support for specialized optimizations. Reliability. Both GNU MP and MPFR use dynamic (heap allocated) memory for their bignum representations. That means that there potentially is allocation or reallocation happening every single time a call is made to GNU MP or MPFR arithmetic functions, and potentially an out of memory exception is generated. Originally this was every single time any kind of arithmetic was done on freicoin values. With the recent input-truncation soft-fork it is already possible to reduce this to just demurrage calculations. However that still means that there is the possibility for abnormal or transient exceptions to occur in code that in bitcoin consists of normal arithmetic operations. This code was not audited for failure modes as a result of this different behavior, and there is added risk of local node instability as a result. Maintenance. Bitcoin has special scripts to make reproducible builds of all of its dependencies. These scripts are custom developed and maintained by a sizable Bitcoin Core development team, and these build scripts are very frequently updated as bitcoin matures. These scripts would have to be modified to include reproducible builds of GNU MP and MPFR, and those changes maintained and re-integrated with each new release of bitcoin. This is a bit of a sore point for me because I originally fell off the wagon of providing regular maintenance updates to Freicoin on release 0.9, in which the build system changed quite drastically due to the switch to autotools. Legal. GNU MP and GNU MPFR are both distributed under the terms of the LGPL. Because official Freicoin binary distributions are statically linked, that meant that they are also GPL programs. Now I'm a strong advocate of libre software, user rights, and the GPL, so on the face of it this was not too concerning to me back in 2012. However the Freicoin software repository says like bitcoin that it is MIT/X11 software licensed, and these sort of viral software licensing traps are difficult to see, so I can see how someone might run into GPL license violations as a result, without intent of doing so. There is a permissively licensed fork / re-implementation of GNU MP that we could use, but not alternative for MPFR. Given that the rebase to bitcoin master (0.16 as of now) would require re-doing the pieces which use GNU MP and MPFR anyway, it seemed like an opportune time to look at replacing these dependencies with something faster, safer, in-house, and permissively licensed. Thanks to input truncation, all the regular accounting can be reverted back to 64-bit integer arithmetic instead of multi-precision rational numbers. The trickier part is the demurrage calculation, which still needs to do an internal real-number precise exponentiation.
    To remove the dependency on GNU MPFR I wrote an integer-math-only exponentiation of the freicoin demurrage rate using pre-calculated look-up tables, and through exhaustive testing proved it to be bit-for-bit identical in its results compared with the GNU MPFR version. I then went through and applied as many approximations and reductions of internal precision as I could without generating incorrect results, to get the absolute fastest implementation. Here's some raw numbers:
    The first column is the algorithm name. The "mpfr_mul" is the algorithm currently used in freicoin, and "mpfr_div" and "mpfr_small" are variations upon it. The "small" variation reduces internal precision to as low as can be done without errors in exhaustive testing, which would be a cheap one-line change to the existing method. The "apu" algorithm is the new integer-math-only implementation using pre-generated lookup tables for the exponentiation. The "f32"/"f64"/"f80" algorithms use single-precision (float), double precision, and extended precision (long double) floating-point math on the CPU, as a point of comparison for timing. The "div" variations calculate the inverse of the demurrage rate, which is potentially a faster exponentiation to perform albeit at the price of a slow division at the end. There is an "apu_div" method, but it is unfinished so I did not include numbers for it.
    The second column gives the average run time per evaluation of the demurrage calculation on my laptop. Neither the "mpfr" nor "apu" methods have constant time performance -- the runtime speed should have some logarithmic dependency on the number of set bits in the integer representation of the relative depth (the exponent in the demurrage calculation)--a point I'll get back to in a minute. For the "mpfr" family this effect is small, but for the "apu" family it is more pronounced and the worst case performance should be about twice what is reported here. But conversely the expected execution time depends on the average age of UTXOs, which would be way less than the exhaustive testing reported here. The hardware accelerated floating point operations should be constant-time on most CPUs. The numbers above were calculated based on an exhaustive test, for which the "average" age of a UTXO is about 1,000 years. Here are more realistic numbers with an average age of 1 year:
    Note that mpfr_small and apu_small are 22% and 30% faster, respectfully. (Also note that apu_small is about as fast as performing the exponentiation on actual floating point hardware! That was a nice surprise.)
    The final column gives a triplet of numbers reporting (1) the number of errors found in exhaustive testing in which the demurrage was greater; (2) the number of test cases which matched the reference implementation; and (3) the number of errors found in which the demurrage was less than the reference implementation (mpfr_mul). Note the intrinsic errors involved with using hardware floating point, even for "f64" and "f80" which unlike "f32" should have had sufficient internal precision to perform this calculation exactly. Hardware floating-point is not to be trusted.
    The clear winning approach is "apu_small", and I will be replacing the GNU GMPR demurrage calculation code with this technique, using an implementation that has been exhaustively tested to be 1:1 identical in results with the multi-precision implementation that is presently in the Freicoin consensus code.
    What I did not expect going into this is that this implementation is not just as good as MPFR's general approach, but is in fact nearly 20x more efficient in common use cases! And I am blown away that it is nearly as fast as computing demurrage directly in hardware floating point.
    While the difference is unlikely to have profound effects outside of a few special cases (e.g. calling 'getbalance" on a very large wallet), it will nevertheless reduce latency of various transaction processing and UI code, thereby delivering a better user experience. Far more critically it will improve the safety and security of the Freicoin reference implementation while significantly reducing the work that goes into keeping Freicoin up to date with upstream bitcoin. That's exciting to me at least
    You can expect a new version of freicoind with these improvements integrated to be out soon, as that is what I am currently working on.
  6. Upvote
    Skaro reacted to Bicknellski in Development update   
    I think this is something that can be an Freicoin Alliance bounty if required.
  7. Upvote
    Skaro reacted to Bicknellski in Development update   
    Freicoin-Qt going forward Anyone... anyone... BUHLER BUHLER?


    So is anyone looking at taking on the Frecoin-Qt? 
  8. Upvote
    Skaro reacted to Rik8119 in Development update   
    Looking into the Freicoin-Qt means that the deamon has to be finished first. I dont see this happen in the near or mid future. But when it comes to the point that it needs to be tested/bugfixed i sure can throw some time at it..
  9. Like
    Skaro got a reaction from Bicknellski in Development update   
    Would it be possible that Mark and Timon's bios could be updated on Freico.in to include founding BlockStream, developing for Bitcoin Core , SegWit, MAST, and Lightning ... (those small resume building summer jobs)
  10. Upvote
    Skaro reacted to Rik8119 in Development update   
    Hi @Mark Friedenbach,
    thank you a lot for the update! Is there any git-repository you use to keep track of the changes? I really like to contribute to the development, although my time is also limited and its possibly way above my skills ;-)
     
    @fedde does it make sense to implement the importprivkey method into the bot? In that way you can use your own keys without installing a wallet..
  11. Upvote
    Skaro reacted to fedde in Development update   
    Merry xmas to you and your family Mark! It's been a exciting year and with this update it looks like it can be even more fun  
    Take care and looking forward on some updates, let me know when some testing is needed.
    And of course, a happy new year!
  12. Upvote
    Skaro reacted to Mark Friedenbach in Development update   
    Merry Christmas everyone!
    It's been a while since I posted here. My apologies. I've been quite busy getting a proposal for MAST implemented and reviewed, which is exciting in its own right [0,1]. I now have a bit more free time to devote to freicoin in the coming months.
    Back in September we agreed to wind down the foundation and to burn the left over funds after finishing the remaining charitable matches. I pulled out the donation matching code and started updating it to work with the current versions of its dependencies. However there was one snag that caught me by surprise: the script expects the foundation keys to be loaded into the wallet of the node it uses, meaning that testing of the script requires a hot wallet of the foundation funds. I'd forgotten that watch-wallet support wasn't added to bitcoind until 0.10. So for safety reasons, as leaking this key material would be devastating, I'm working on the freicoind rebase right now instead.
    Rebasing to higher versions of the upstream bitcoind is made significantly easier in theory by the prior per-input value truncation soft-fork we deployed in the last release. In practice however we need to do a big chunk of work to refactor the freicoin patches to make use the simpler approach this allows, and then we will see the gains. I'm working on that right now, switching the code for the latest official release to use input truncation and taking advantage of the patch size reduction that allows before rebasing to more recent versions of bitcoind. I am also getting the upstream gitian build process working for freicoin rather than the custom solution I had been using in prior releases. I'll make a new post when these refactored and rebased releases are ready for testing and review.
    Also I have one more announcement: there will not be official support (from me) of Freicoin-Qt going forward, and it will not be included in the official release binaries. I'm sorry, but maintenance of GUI wallet takes a lot of time and I have limited resources to devote. Hopefully someone else is able to take up this burden and we can re-add support for it. But even if no one does, the reference wallet remains accessible from the command line and RPC, which is what services need, and consumer wallets are maintained by the Freicoin Alliance (Android and Electrum I believe?). One of the reasons for this is that I want to devote time to support hardware wallets, using the Ledger Nano S platform, so there is that benefit That project is waiting until the rebase to current bitcoin core is complete however.
    Onwards and upwards!
    [0] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014932.html "Merkle branch verification & tail-call semantics for generalized MAST"
    [1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/015028.html "An explanation and justification of the tail-call and MBV approach to MAST"
  13. Upvote
    Skaro reacted to Mark Friedenbach in The end of the foundation   
    The last few posts got sidetracked onto a separate unresolved issue, but I think the core question of this thread is resolved: the delayed coin matching will be performed, completing our obligations for 1:1 donation matching, and then the remaining funds will be provably destroyed. The two blockers on this are updating the coin matching scripts, since code atrophy means they no longer run on recent versions of linux. The bigger problem is making sure that the funds being sent out are sent to wallets people still hold the keys to and haven't been compromised. I'll be reaching out to the contact points for the larger donations to make sure that those funds aren't being black holed, or worse.
    The problem with volunteer effort is that it comes in fits and spurts though. The past month I've had ~zero disposable free time due to both our annual company meeting and a drive to get a new feature to crypto currency in general:
    https://www.coindesk.com/master-plan-better-bitcoin-smart-contracts-go-live-year/
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/014932.html
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/015028.html
    This approach to MAST and the opportunity to deploy it quickly presented itself rather unexpectedly, and most of my free time the last month was spent on that. We've hit a milestone though and work on it won't be as crazy going forward, meaning I have disposable volunteer time again. I'll get a dry run of the matching script running, and then reach out to the largest recipients to get signed messages proving key ownership. I can probably process them individually however, and destroy the funds which won't be needed, so the process isn't bottlenecked on a few missing responses.
  14. Upvote
    Skaro got a reaction from fedde in Coin supply   
    Hey I just felt like chatting to people about Solidar.
  15. Upvote
    Skaro got a reaction from Rik8119 in Coin supply   
    Hey I just felt like chatting to people about Solidar.
  16. Upvote
    Skaro reacted to Rik8119 in Coin supply   
    Update: There are now 70 registered bot users! Thanks to @magius but also @Skaro
  17. Upvote
    Skaro reacted to Rik8119 in What if Solidar we don't treated as money? [Philosophy and marketing]   
    Hi @magius, thank you a lot that is exactly what is needed to test the currency in principle. How is it possible to have a scale of 60,000 000 with only 100? And what should i verify from the Facebook page? Thank you!
  18. Upvote
    Skaro reacted to magius in What if Solidar we don't treated as money? [Philosophy and marketing]   
    We will try to experiment with Solidar on a "little" scale. We started to inform people of our italian network about it. The UBI subscriptions iin this week will be about 100 from Italy, that's  a scale of about 60,000,000 people (please @Rik8119 may you verify from the Solidar Facebook page?).  In the middle of 2018 we hope the scale will be littler, on an italian municipality and surrounds, about 600,000 people. 
  19. Upvote
    Skaro reacted to Rik8119 in What if Solidar we don't treated as money? [Philosophy and marketing]   
    Hi, i had asked @Bicknellski with his students if he and his students may want to experiment with it, but he said that they are not using Facebook, so in principle this is a great idea if you/anyone knows somewhere to start i'm with it..
  20. Upvote
    Skaro reacted to Victor in What if Solidar we don't treated as money? [Philosophy and marketing]   
    I've been thinking about a small scale real-world trial. Something like an economicaly active but still strugling vilage, or a small university campus that people can find their own use for Solidar. Let's let the tread open and see if someone comes with a good opportunity in the nearby future!
     
  21. Upvote
    Skaro reacted to Rik8119 in What if Solidar we don't treated as money? [Philosophy and marketing]   
    Absolutely not,
    i also think that donations for free musik/videos/e-learning/open source software/activists(like wikileaks) is a HUGE use case that can and should not be underestimated. As Solidar is comming for free everybody has the possibility to "vote" for the favorite free work that she/he wants to support.
    For that the idea was to organize some internetpage that will list all organizations/artists that will support solidar donations.
  22. Upvote
    Skaro reacted to Victor in What if Solidar we don't treated as money? [Philosophy and marketing]   
    Before someone hit the BAN button, consider this:
    I was in a meetup about basic income and crypto currencies that follow that path, and we got to a very interesting point.
    Money has three caracteristics:
    1- It is a store of value against time
    2- It is a counting system
    3- It is a mean of exchange.
    So, Bitcoin, a bit like gold, is a great store of value (1), but it is poor in the points 2 and 3 (for several reasons, some do not have to do with bitcoin itself but to its acceptance in the market as money). Euros and dollars try to tackle all the three, but side effects that are not so desirable. On top of my mind, inflation takes wealth from the people and transfer it to the monetary issuer.
    Solidar is by desing a poor store of value. It depreciates itself 20% a year. It is not so much a counting system because  1. there are no prices in Solidar (yet!), and it may be long before we can buy bread at a random corner with a cryptocurrency. BUT it is a great mean of exchange! It is designed to be so, in fact. 
    You get coins for free , and they desapear over time , the insentives are there for you to expend it. So, what if we have a approach on Solidar more as LIKES on facebook or a voting system and less like money. The difference now is that you can give people LIKES (SDRs) not for a post or a comment, but for any thing that they perform that you think it was of value for society. Or as a voting system when you want to ask a population about something, they will only give you SDRs if they think the proposal is worth it. 
    Now it comes the catch. Because we are not treating it as money, people stop wanting to store it (do you know anyone keeping LIKES for himself?!), and would rather use it somehow. The more people use it, the more intrinsic value Solidar will have. Just like LIKES on facebooks, you get infinite of them for free, but companies pay to have people liking their  content! The value of the coin then is not backed up by a exchange, but by people using it.
    Am I crazy?
  23. Upvote
    Skaro reacted to FreedomCare in Provide ICO to New alt coins   
    Perhaps we at Freicoin should turn the trend of alt coins asking for ICO and be the first to provide it to new alt coins who are committed to common good and socio economical change. It could be a great way of promoting Freicoin with a big feelgood wave after a long Freicoin hibernation time
  24. Upvote
    Skaro reacted to Rik8119 in Coin supply   
    Well, it is doable. But i want to keep it as simple as possible and therefore bounties/running costs are payed through donations made to the WINC association, so every coin from demurrage goes into basicincome..
  25. Upvote
    Skaro got a reaction from Rik8119 in Freicoin Resources   
    @Mark Friedenbach Our explorer runs on ABE, which I don't think is actively supported anymore. I was wondering what has to be done to accommodate Segwit and new tech. For example, could you send me a link to explain the new block structure? Any such helpful references would be appreciated.
×
×
  • Create New...