HD & 4K Blockchain Videos: Royalty-Free Blockchain Stock ...

Trench Block a Blockfolio Clone App for Android and a cryptocurrency app template @99steem

TrenchBlock is am an amazing tool, which allows you to keep track of all of your crypto assets in one place. With the ability to get live rates and updates from Crypto Exchanges TrenchBlock provides you all the benefits in a single place. TrenchBlocks provide FREE Bitcoin & other cryptocurrency market updates from exchanges in real-time. Moving wallets to a new app can be highly insecure and you may want to avoid it at every possible level, with Trenchtimes you can keep your wallets in any place you like and still have the ability to see what's going on in the wallets. Like incoming and outgoing transactions, your current crypto value and rates in multiple fiat currencies also get detailed crypto price and market information and receive Signal updates directly from crypto team leaders. Bitcoin price tracking made easy with this crypto tracking app.
Note: This content is copied from 99steem.com for marketing purposes.

#blockchain #blockchainapp #cryptocurrency #cryptoapp #androidapp
submitted by 99steem to u/99steem [link] [comments]

Issuing money by global central banks is a great opportunity for stablecoins," says Digital Gold Advisor Dr. Walter Tonetto

Issuing money by global central banks is a great opportunity for stablecoins,
Last week we talked with our adviser and CEO at Nusantara Trust Dr Walter Tonetto. He answered a number of questions that interest our customers.
How did you land in the cryptocurrency / blockchain space?
I was advising startup businesses in the technology space, and when 2016 came around, I asked Scotty, the feisty chief engineer of the U.S.S. Enterprise, to beam me into the heart of the finance system; I felt more and more the irresistible tug towards remodeling the current toxic financial system. Purposive remodeling, of course, is going on all the time, and it’s a knife that cuts into two directions. The vast majority of the ‘woke’ crowd actually believe that they can ‘disrupt’ the power of the elites that control all money flows. Bathing limestone statues – registering about 4 on the Mohs scale and 0 on the scale of reason -- of past leaders in district waters may give you a feeling of breathing the air of revolution and tiring unknown muscle-groups in your shanks, but think of it like a father watching his child toss around shovels of soil in a sandbox; he smiles benignly from afar, knowing it won’t change a thing; all the luxurious appointments at home won’t get touched. It is a grave illusion to suppose that by playing around with payment systems and technologies we will actually change the role and the emission of money. You may be permitted to become the shoe-shine boy in the royal household, but don’t think you will marry the princess and dilute the royal blood! But understanding the constitutive parts of power aggregation, and working over significant time-frames, allows for approaches and solutions; -- but these should come not from another adversarial position, thus merely marking a displacement of the incumbent, a change of guard, but from an authentic re-orientation, of making benefits much more widely possible and not creating monetary systems that are grossly imbalanced and highly destructive. That, and not building tech stacks, is the challenge!
What was your initial reaction to bitcoin?
Well, I was following the file-sharing service Napster since it started, around 1999 – when the U.S.S. Enterprise was sitting pier-side at Huntington Ingalls Newport shipyard, rusted and gutted, and to me the P2P sharing paradigm was always present in my mind, shining buffed and radiant, so even the centralized Napster was something wholly natural to me – Dr Sheldrake calls it morphic resonance. We live with a great deal of blurriness, though. On the one hand, we think of the virtues of sharing; on the other, there is a seemingly indefatigable impulse to control and dominate. Sean Parker, after founding and floundering with Napster, became a cocaine-snorting egotist and president of Facebook. Collecting money for a charity, he gets aggressive with people who do not follow suit. A control-freak in overdrive. Notwithstanding the technical variations, BTC, seemingly freeing us up from fiscal controls and yet showing our craving for money, exemplifies the flawed perception at the root of things. Monero, which sounds like a much faster, highoctane vehicle, a CV8-Z of the crypto-track, beats BTC in regard to privacy and fungibility, though BTC has advantages in other areas.
Which is a much more common trend nowadays?
It’s hard to make out the shapes of wild-life in the current kangaroo market we’re in. The bulls and bears have mauled one another, and the kangaroo, bereft of oxygen on account of wearing a tight mask, is hopping wildly everywhere. But clearly the possibilities of digital currencies became un-tethered via Bitcoin and the querulous and hidden Satoshi. I like to think of him more as an idea rather than as a person; an idea is generally more malleable and consequential. For instance, rather than laud the benefits of crypto for FX and cross-border payments, the possibilities of a central-bank issued digital currencyENCOMPASS THE POTENTIAL to inscribe new roles for programmable money; for how money is issued, how it is used, and what role custodial mechanisms (traditionally in the hand of commercial banks) might have. I see HUGE potential for private firms to enter the equation here, but we need more open-minded and intelligent regulators that do not always look for the rungs of the career-ladder in any move they make! A DAO could be most helpful here, but we are currently under the terror of algorithms that are not concerned with the welfare of the greatest number of people. If I had the time I would coauthor a book on this theme with a skilful mathematician (perhaps with my son, who is completing a Ph.D in near-term Quantum Algorithms).

In 2018 I was keynote speaker at the BlueWhale forum in Seoul, and I spoke about an Algorithm of Peace. I had a clutch of people approach me straight after the talk, some from Korea, others from the U.S., and ask me to develop my ideas in book form.
Where do you see the price of bitcoin going over the next few years?
I wouldn’t speculate, but since everyone is shilling it, it is bound to keep pushing north, occasional blockages otwithstanding. I always look for twists and incongruities in the usual narratives on offer. Many BTC fans talk about the unbanked, but BTC is held by what will become another elite in due course, and the unbanked will later be serving them the chilled drinks between innings, as usual.
Do you think that there’s a time for altcoins to break out and move away from the movements of bitcoin? What’s that tipping point that needs to take place?
I have some notions under which alt-coins can take the lead and leave bitcoin behind, but it’s too complex to explain the conditions for that to occur. Once very solid use-cases have been established with a clutch of alt-coins, bitcoin might begin quavering in his boots. That alt-coins should take BTC as a benchmark speaks volumes about the lack of maturity of this young and over-eager market. The fuzzy umbilical cord is always present like a foot-tangle; alt-coins must find their own ground, and clip the connection to a vagrant father. Finance needs clarity and not fuzziness. Keep in mind that many sovereign nations bridle at the calamitous influence of the US on payment systems, so nations are building their own messaging systems outside SWIFT, and their own securities exchanges are following. But remember: these are all crumbs: the U.S. can shut down payments to any recipient accounts by informing the payments company and doling out threats. And since all alt-coins and fiat currencies are connected to payment gateways in some form, the U.S. would have to begin reforming its archaic ACH structure to enable efficiencies in the financial pipes, which does not offer real-time payments functionality. This accounts for the relative simplicity (and success) of the PayPal business model (which Venmo and Dwolla later emulated without using credit cards). But understand that the elites will always protect the real crown jewels, and incite wars (or street battles and racial squabbles, as we’re witnessing in the U.S. in mid 2020) so that they can get away with major financial heists in broad daylight. It’s all smoke and mirrors, and scorched talons if you look closely: you cannot trust the reflection you will receive on a smoky pane. Only the big players know the predetermined outcome.
One fundamental misprision occurs amongst alt-coin apologetes: they fail to understand how markets move and what the designated role of money is in markets. Even if you want to displace something, you first need to understand exactly what you’re dealing with, but that is rarely the case. Yes, banks are structurally and constitutionally part of the problem, but no government will dare cross swords with them: there is still too much aggregated power. Ripple and Stellar are two Blockchains that are working with, and not against, banks, and that likely makes them much better candidates for wide acceptance.
What’s one must-read book you recommend to everyone?
That depends so very much on who’s sitting opposite me! I wouldn’t push what is not naturally aligned. But I would push a couple of films urgently, as essential viewing for everyone:
“Vaxxed: From Cover-Up to Catastrophe” (and a sequel), which profoundly shocked me, but confirmed my suspicions. Talking about books: one gets a good sense of the kind of books I would counsel people not to touch, unless an overweening impulse bade them otherwise. For instance Steve Pinker, a favourite author of Bill Gates. Pinker in Gates’ hands explains a lot about the character of the reader, the latter of whom I consider one of the most dangerous people on the planet at the moment. If we stay with Pinker for a moment, since he’s famous and fashionable (Harvard professor with a Medusa hairdo and an effete libertarian air, who in “Better Angels of Our Nature” has affirmed that man is not innately good), we note in his presentation in regard to his ineptly titled book “Enlightenment” that he falls prey to the very flaws he chastises, the classic Münchhausen trilemma (in Jakob Fries’ phrase). Picture Baron Münchhausen pulling himself out of quicksand by his own hair! That he is beholden to neoliberal befuddlement becomes clear when two of the opening images of his talk show Vladimir Putin with a rifle andDonald Trump speaking on a podium. The classic neoliberal Harvard think-tank shows reason to be failing and drowning in pious gestures to the cognoscenti and anointed. I like to look for effective counters for specious and shallow argument: for instance, Rupert Sheldrake’s “The Science Delusion” is a splendid book that bucks the Dawkins’, Pinkers and other materialists of this age. You see, if one listens to Pinker with the head alone, his pedestrian epistemology might not irk, and some ideas might appear plausible enough in a desultory encounter, but if you really want to know the meaning of things, and discover how it relates to the heart, you feel betrayed and given short shrift by him. Among the platitudes he gives out in carefully parsed syllables, the movement of his forehead and eyes betray the spirit behind the façade. Yet I always look, like Yeats, for those who “had changed their throats and had the throats of birds”!
What’s the rainbow trout of the year? Nut-like flavour, the eye still gleaming, with tender, flaky flesh? There are many books I could cite for different genres. The vast majority of modern writers, for all their accomplishments, lack genius, don’t really understand the art of writing, and so cannot hold my attention for long. For those who are open-minded and spiritual, “A Course in Miracles” cannot be bested, but don’t touch it unless you’re really willing to dive deep. There is no need to save the world, since it is nothing but projection; there is no world. You might experience the deepest sigh of relief, as if Atlas had cast off a burden after the Titanomachy. Paul Celan once remarked that “reality is not simply there, it must be sought for and won.” Snorkeling near the surface and blowing bubbles won’t cut it.
We are living in times of great manufactured unrest, which will only heighten in coming months and years, and so I would offer a guernsey to Seamus Heaney. I had met him many years ago, alas cursorily, at a symposium at Waseda University where I was working as a Gaikokujinkoshi, an Associate Professor, where another Nobel laureate, Kenzaburō Ōe and he were giving a reading. Heaney was inspired to write “The Grauballe Man” on the basis of the bog man that he had seen in a book of prehistoric times, but the troubles in Ulster were alive in him, too:
As if he had been poured in tar, he lies on a pillow of turf and seems to weep
the black river of himself. The grain of his wrists is like bog oak, the ball of his heel
like a basalt egg. His instep has shrunk cold as a swan’s foot or a wet swamp root.
Talking of Japan here, methinks, is an aculeate observation of Japan:
Cross the intersection at Shibuya Station in Tokyo on a forbidding wintry evening — touted as the world’s busiest cloverleaf — and you will feel this is Eliot’s London Bridge revisited, with quaggas (think half zebras) preserved in the tar of the five crossings; — flattened ebon bones dreaming the dreams of Pleistocene mammoths — as the mass of the dead mill past you, chasing some mirage, and often accompanied by a revenant that must have been disgorged from a Pachinko parlour. Blanched lilacs float in minarets of light beyond these bituminous quaggas, bidding the odd-toed ungulates in their psychotropic dernier cri and fuddy-duddies in theirstygian suits to sup here or buy over yonder: all tethered to their devices. One might be surprised that no cracks are forming at these arced crossings with strange requisitions folding into the hiemal air. And yet it is still more odd that so few people see this as a primped and pimped potter’s field, a graveyard for those who’ve lost their way. We’re living in an age where the multitude of the dead are pacing among us in perdurable trysts with other zombies.
The above text is from one of my unpublished works; again it speaks to me – and perhaps to you – about the quiddities of this age. There is a distinct sense of zombification taking place on the planet at the moment. Is your lineage that of Dolly, or are you magnificent and free?
Do you have any theories about who Satoshi is?
I don’t really, though I follow the haughty chit-chat at times, especially in the jejune forums LinkedIN provides. I think the person has a good reason to remain concealed (forever), but that is also a major factor why I have never fully trusted bitcoin as an investment proposition.
Keeping the provenance concealed suggests a number of things, none of them conducive to embracing bitcoin as a common form of payment.
What do you think about the prospects of gold in connection with the uncontrolled money printing by different Central Banks?
Gold is what BTC can never become, especially when its provenance remains totally unclear – as well as its likely endgame! Central Banks engage in quasi-criminal activity – and one hopes the future prudent regulator won’t be making it too difficult for people to hold gold bullion. The Perth Mint might be a splendid little dot on the global map, but beware of holding your assets in the form of gold coins: many governments will regard them as forms of payment, and may impose all manner of restrictions on the possession of it.
Let's dream a little. How stablecoins can be used after 5 years from now?
I believe the great RESET is coming – even Davos and the U.N. are alerting us to that. The Covid19 panic has been declared by more than 1500 German physicians as a “global Mafia-style deception”, and while Big Pharma and Bill Gates will likely earn trillions of dollars by the useless and potentially dangerous vaccines that will be foisted on “free” citizens, the finance system as a whole will need to be RESET. We are already receiving an inkling of how draconian and void of reason and concern for the people most governments of the world are reacting to a harmless lab-manufactured virus (virologist Prof Luc Montagnier, Nobel Laureate in medicine in 2008, said that), so it’s possible that regulators may become more tyrannical, and under some pretext or other forbid the use of alt-coins. STABLECOINS can be over-collateralized, allowing absorption of pricing fluctuations, but it will be hard to call. I believe many are bound to fail, and that even earlier, despite all their most valiant efforts: as soon as the RESET comes, which is likely to come with all manner of encumbrances. There are many reasons for the issuance of stablecoins, some having opposing views, but all are dependent on trust – and we don’tknow yet if digital currencies that governments will issue will by regulatory over-reach (including absurd compliance requirements) displace other contenders, but you can assume that the tyrannical forms of governance we are currently experiencing suggest that all kinds of skullduggery are possible.
Do you see the problem of fiat stablecoins in the fact that annual inflation constantly depreciates them? An investor who bought $1000 USDT now and sold these tokens in 10 years for $ 1000 will receive much less money.
The problem occurs if we’re converting things back into payment forms that are fundamentally flawed. Inflation and Black Swan events are the major threats to stablecoins, and tethered crypto-values to natively burdened propositions recalls my earlier idea that we have not yet cut the umbilical cord to bitcoin. On the other hand, stablecoins in their current flavour are perhaps best viewed as transitional schemata that will need later revisitation.
You are a very successful Crypto and ICO Advisor, what is the secret behind this success?
I’m not sure if I’m very successful, but I always try to shoot a straight ball. Here are two instances where my input has not been heeded in any way.
I recall one of the first ICOs I advised. I was sitting with the owner on a Telegram Channel, and after some power Q&A sessions online, we were literally hearing the millions of dollars tumble in neat digital hashes into the inbox within a couple of hours of the ICO opening. He had a bottle of Scotch on his table, and by the end of the session he had reached his hard cap and was besotted to boot! The age of digital money had placed the foolscap on his pate, but the script was no longer legible. I cannot determine if his sobriety ever returned. The prudential advice I had been giving him previously – and that we had discussed in great depth -- was over coming weeks thrown out of the window, and I assume other bottles of Scotch ended up on his desk and didn’t last long.
Here is another example. At one time a well-known ambitious individual in the U.S. cryptospace, a young lawyer, asked me if I wanted to start a crypto compliance organisation with him.
When I think of him now and the feathery assistants he congregated around him, I think of the lines in Dickens’s “Bleak House”: “Mr. Tangle’s learned friends, each armed with a little summary of eighteen hundred sheets, bob up like eighteen hammers in a pianoforte, make eighteen bows, and drop into their eighteen places of obscurity.”
Simply to continue serving wine from the same sour vats won’t do. I saw that as a prospective idea, and offered some important advice to get the ball rolling. Soon we had recruited many eager beavers to the exercise, and there was talk of it becoming an influential body. I was naïve enough to assume at the time that my co-founder, a black college asketballer with body tattoos who had a write-up in a major paper on account of his ambition and aggression, was actually interested in asking some fundamental revisionary questions about compliance in relation to the freedom of the citizen. When I suggested we don’t just copy the traditional compliance template and rather probe more deeply, he became insolent and very aggressive. That confirmed my instinct that most ambitious players in the crypto-space are actually dyed-in-the-wool bourgeois, and don’t care about improving the system itself.
What is your advice for upcoming Crypto startups and investors?
You might know the technology well, but do you know the business? Does it really deeply address, even solve, a problem? How much life experience do you have, and how well do you know the market? Can you create a market for your product or services? If yes, how will you do that? Have you only got yes-men around you, or are you willing to listen to those who speak Tacheles to you? If you’ve come to water the plant of your ego, your business will flounder. Most achievers keep their ego initially in check, and get the work done.
For investors the answer I would give is rather complex, but here’s a brief response: often the mandate of investors is very narrowly girded, and they trust their old boy networks, and rarely venture out and follow their instincts. That is foolish, and also the recipe for a dull life.
Perhaps a general observation that everybody might ponder with profit is the idea that we know really so very little of the world; that the news and information we are are offered and digest, even when it is tendered by so-called ‘experts’, is often seriously ignorant. It seems our perspective is getting narrower all the time, as if our mind is shrinking and we block out knowledge.
Let me give another current reference point. In 2020 everyone is fearful of viruses. Viruses currently have a bad rap! We have no idea what they actually are. We are always hobbling around with our fearful partisan gaze, and what is good today becomes bad tomorrow. Yet viruses are adroit and malleable messengers of inter-species DNA, in some sense regulating vast populations of organisms. Think of them as cellular simpletons: mere protein shells with few genes, but endowed with the ability to replicate easily despite their paucity of genetic instructions! They form alliances, you might say, with other forms of life. And they are deeply mysterious to our acquisitive and ignorant segmenting intelligence: how can the papillomavirus cause horns to grow on rabbits; and at the same time cause hundreds of thousands of cases of cervical cancer every year? Is one good and the other bad? It would seem so. Such simple summary, like Pinker’s reductionist view of the world, might becalm for a moment, but does not offer lasting satisfactions. To read the world along the axes of like and dislike, as the Buddha had warned us, leads to great suffering.
I’m told by someone who met Bill Gates a long time ago that the man was apparently even then obsessively fearful of viruses (imagine a pendant to Lady Macbeth, continually cleansing his hands). But do we have any clue what viruses actually are, and how they benefit us all in so many incalculable ways? When the child crawls around, it picks up antigens (bacteria and viruses) and on that basis builds its immune system. At various points of that contact and exchange new forms grow, and other forms decay and die. Like CO2, viruses are suddenly declared dangerous and that we need to shield ourselves against them. Yet how many people know that marine phages rule the world, and rule the sea? This was not discovered until 1986. An electron microscope showed that every litre of seawater contained up to one hundred billion viruses, almost as much in dollars as BillGates expects to make off vaccines in 2020. If you put these viruses end to end, they would stretch out forty-two million light-years! Viruses offer stunning genetic variety, and they are the very pulse of life! When viruses swallow oceanic microbes, they release a billion tons of carbon every day: imagine squalls of marine snowfalls, powdering the porous sand of the deep. Imagine the white nights of St Petersburg under water, celebrating the magic of life with the same skill and abandon as the Mariinsky Theatre, to an audience of gastropods, deep-water fish and lovelorn mermaids.
Seamus Heaney, when he passed in 2013, spoke the word Noli timere (“Do not fear”) to his wife as he breathed his last. Instead of being fearful, we might do well to assert that we understand nothing of the manifold wonders of this world! Let us cultivate the virtue of wonderment, and fear will find no habitation in our house:
And lonely as it is that loneliness Will be more lonely ere it will be less— A blanker whiteness of benighted snow With no expression, nothing to express.
They cannot scare me with their empty spaces Between stars—on stars where no human race is. I have it in me so much nearer home To scare myself with my own desert places.
Website : https://gold.storage/ Whitepaper: https://gold.storage/wp.pdf
Follow us on social media: Twitter: https://twitter.com/gold_erc20 Telegram: https://t.me/digitalgoldcoin Steemit: https://steemit.com/@digitalgoldcoin Reddit: https://www.reddit.com/golderc20/ Bitcointalk: https://bitcointalk.org/index.php?topic=5161544
submitted by digitalgoldcoin to golderc20 [link] [comments]

FlowCards: A Declarative Framework for Development of Ergo dApps

FlowCards: A Declarative Framework for Development of Ergo dApps
Introduction
ErgoScript is the smart contract language used by the Ergo blockchain. While it has concise syntax adopted from Scala/Kotlin, it still may seem confusing at first because conceptually ErgoScript is quite different compared to conventional languages which we all know and love. This is because Ergo is a UTXO based blockchain, whereas smart contracts are traditionally associated with account based systems like Ethereum. However, Ergo's transaction model has many advantages over the account based model and with the right approach it can even be significantly easier to develop Ergo contracts than to write and debug Solidity code.
Below we will cover the key aspects of the Ergo contract model which makes it different:
Paradigm
The account model of Ethereum is imperative. This means that the typical task of sending coins from Alice to Bob requires changing the balances in storage as a series of operations. Ergo's UTXO based programming model on the other hand is declarative. ErgoScript contracts specify conditions for a transaction to be accepted by the blockchain (not changes to be made in the storage state as result of the contract execution).
Scalability
In the account model of Ethereum both storage changes and validity checks are performed on-chain during code execution. In contrast, Ergo transactions are created off-chain and only validation checks are performed on-chain thus reducing the amount of operations performed by every node on the network. In addition, due to immutability of the transaction graph, various optimization strategies are possible to improve throughput of transactions per second in the network. Light verifying nodes are also possible thus further facilitating scalability and accessibility of the network.
Shared state
The account-based model is reliant on shared mutable state which is known to lead to complex semantics (and subtle million dollar bugs) in the context of concurrent/ distributed computation. Ergo's model is based on an immutable graph of transactions. This approach, inherited from Bitcoin, plays well with the concurrent and distributed nature of blockchains and facilitates light trustless clients.
Expressive Power
Ethereum advocated execution of a turing-complete language on the blockchain. It theoretically promised unlimited potential, however in practice severe limitations came to light from excessive blockchain bloat, subtle multi-million dollar bugs, gas costs which limit contract complexity, and other such problems. Ergo on the flip side extends UTXO to enable turing-completeness while limiting the complexity of the ErgoScript language itself. The same expressive power is achieved in a different and more semantically sound way.
With the all of the above points, it should be clear that there are a lot of benefits to the model Ergo is using. In the rest of this article I will introduce you to the concept of FlowCards - a dApp developer component which allows for designing complex Ergo contracts in a declarative and visual way.
From Imperative to Declarative
In the imperative programming model of Ethereum a transaction is a sequence of operations executed by the Ethereum VM. The following Solidity function implements a transfer of tokens from sender to receiver . The transaction starts when sender calls this function on an instance of a contract and ends when the function returns.
// Sends an amount of existing coins from any caller to an address function send(address receiver, uint amount) public { require(amount <= balances[msg.sender], "Insufficient balance."); balances[msg.sender] -= amount; balances[receiver] += amount; emit Sent(msg.sender, receiver, amount); } 
The function first checks the pre-conditions, then updates the storage (i.e. balances) and finally publishes the post-condition as the Sent event. The gas which is consumed by the transaction is sent to the miner as a reward for executing this transaction.
Unlike Ethereum, a transaction in Ergo is a data structure holding a list of input coins which it spends and a list of output coins which it creates preserving the total balances of ERGs and tokens (in which Ergo is similar to Bitcoin).
Turning back to the example above, since Ergo natively supports tokens, therefore for this specific example of sending tokens we don't need to write any code in ErgoScript. Instead we need to create the ‘send’ transaction shown in the following figure, which describes the same token transfer but declaratively.
https://preview.redd.it/id5kjdgn9tv41.png?width=1348&format=png&auto=webp&s=31b937d7ad0af4afe94f4d023e8c90c97c8aed2e
The picture visually describes the following steps, which the network user needs to perform:
  1. Select unspent sender's boxes, containing in total tB >= amount of tokens and B >= txFee + minErg ERGs.
  2. Create an output target box which is protected by the receiver public key with minErg ERGs and amount of T tokens.
  3. Create one fee output protected by the minerFee contract with txFee ERGs.
  4. Create one change output protected by the sender public key, containing B - minErg - txFee ERGs and tB - amount of T tokens.
  5. Create a new transaction, sign it using the sender's secret key and send to the Ergo network.
What is important to understand here is that all of these steps are preformed off-chain (for example using Appkit Transaction API) by the user's application. Ergo network nodes don't need to repeat this transaction creation process, they only need to validate the already formed transaction. ErgoScript contracts are stored in the inputs of the transaction and check spending conditions. The node executes the contracts on-chain when the transaction is validated. The transaction is valid if all of the conditions are satisfied.
Thus, in Ethereum when we “send amount from sender to recipient” we are literally editing balances and updating the storage with a concrete set of commands. This happens on-chain and thus a new transaction is also created on-chain as the result of this process.
In Ergo (as in Bitcoin) transactions are created off-chain and the network nodes only verify them. The effects of the transaction on the blockchain state is that input coins (or Boxes in Ergo's parlance) are removed and output boxes are added to the UTXO set.
In the example above we don't use an ErgoScript contract but instead assume a signature check is used as the spending pre-condition. However in more complex application scenarios we of course need to use ErgoScript which is what we are going to discuss next.
From Changing State to Checking Context
In the send function example we first checked the pre-condition (require(amount <= balances[msg.sender],...) ) and then changed the state (i.e. update balances balances[msg.sender] -= amount ). This is typical in Ethereum transactions. Before we change anything we need to check if it is valid to do so.
In Ergo, as we discussed previously, the state (i.e. UTXO set of boxes) is changed implicitly when a valid transaction is included in a block. Thus we only need to check the pre-conditions before the transaction can be added to the block. This is what ErgoScript contracts do.
It is not possible to “change the state” in ErgoScript because it is a language to check pre-conditions for spending coins. ErgoScript is a purely functional language without side effects that operates on immutable data values. This means all the inputs, outputs and other transaction parameters available in a script are immutable. This, among other things, makes ErgoScript a very simple language that is easy to learn and safe to use. Similar to Bitcoin, each input box contains a script, which should return the true value in order to 1) allow spending of the box (i.e. removing from the UTXO set) and 2) adding the transaction to the block.
If we are being pedantic, it is therefore incorrect (strictly speaking) to think of ErgoScript as the language of Ergo contracts, because it is the language of propositions (logical predicates, formulas, etc.) which protect boxes from “illegal” spending. Unlike Bitcoin, in Ergo the whole transaction and a part of the current blockchain context is available to every script. Therefore each script may check which outputs are created by the transaction, their ERG and token amounts (we will use this capability in our example DEX contracts), current block number etc.
In ErgoScript you define the conditions of whether changes (i.e. coin spending) are allowed to happen in a given context. This is in contrast to programming the changes imperatively in the code of a contract.
While Ergo's transaction model unlocks a whole range of applications like (DEX, DeFi Apps, LETS, etc), designing contracts as pre-conditions for coin spending (or guarding scripts) directly is not intuitive. In the next sections we will consider a useful graphical notation to design contracts declaratively using FlowCard Diagrams, which is a visual representation of executable components (FlowCards).
FlowCards aim to radically simplify dApp development on the Ergo platform by providing a high-level declarative language, execution runtime, storage format and a graphical notation.
We will start with a high level of diagrams and go down to FlowCard specification.
FlowCard Diagrams
The idea behind FlowCard diagrams is based on the following observations: 1) An Ergo box is immutable and can only be spent in the transaction which uses it as an input. 2) We therefore can draw a flow of boxes through transactions, so that boxes flowing in to the transaction are spent and those flowing out are created and added to the UTXO. 3) A transaction from this perspective is simply a transformer of old boxes to the new ones preserving the balances of ERGs and tokens involved.
The following figure shows the main elements of the Ergo transaction we've already seen previously (now under the name of FlowCard Diagram).
https://preview.redd.it/9kcxl11o9tv41.png?width=1304&format=png&auto=webp&s=378a7f50769292ca94de35ff597dc1a44af56d14
There is a strictly defined meaning (semantics) behind every element of the diagram, so that the diagram is a visual representation (or a view) of the underlying executable component (called FlowCard).
The FlowCard can be used as a reusable component of an Ergo dApp to create and initiate the transaction on the Ergo blockchain. We will discuss this in the coming sections.
Now let's look at the individual pieces of the FlowCard diagram one by one.
  1. Name and Parameters
Each flow card is given a name and a list of typed parameters. This is similar to a template with parameters. In the above figure we can see the Send flow card which has five parameters. The parameters are used in the specification.
  1. Contract Wallet
This is a key element of the flow card. Every box has a guarding script. Often it is the script that checks a signature against a public key. This script is trivial in ErgoScript and is defined like the def pk(pubkey: Address) = { pubkey } template where pubkey is a parameter of the type Address . In the figure, the script template is applied to the parameter pk(sender) and thus a concrete wallet contract is obtained. Therefore pk(sender) and pk(receiver) yield different scripts and represent different wallets on the diagram, even though they use the same template.
Contract Wallet contains a set of all UTXO boxes which have a given script derived from the given script template using flow card parameters. For example, in the figure, the template is pk and parameter pubkey is substituted with the `sender’ flow card parameter.
  1. Contract
Even though a contract is a property of a box, on the diagram we group the boxes by their contracts, therefore it looks like the boxes belong to the contracts, rather than the contracts belong to the boxes. In the example, we have three instantiated contracts pk(sender) , pk(receiver) and minerFee . Note, that pk(sender) is the instantiation of the pk template with the concrete parameter sender and minerFee is the instantiation of the pre-defined contract which protects the miner reward boxes.
  1. Box name
In the diagram we can give each box a name. Besides readability of the diagram, we also use the name as a synonym of a more complex indexed access to the box in the contract. For example, change is the name of the box, which can also be used in the ErgoScript conditions instead of OUTPUTS(2) . We also use box names to associate spending conditions with the boxes.
  1. Boxes in the wallet
In the diagram, we show boxes (darker rectangles) as belonging to the contract wallets (lighter rectangles). Each such box rectangle is connected with a grey transaction rectangle by either orange or green arrows or both. An output box (with an incoming green arrow) may include many lines of text where each line specifies a condition which should be checked as part of the transaction. The first line specifies the condition on the amount of ERG which should be placed in the box. Other lines may take one of the following forms:
  1. amount: TOKEN - the box should contain the given amount of the given TOKEN
  2. R == value - the box should contain the given value of the given register R
  3. boxName ? condition - the box named boxName should check condition in its script.
We discuss these conditions in the sections below.
  1. Amount of ERGs in the box
Each box should store a minimum amount of ERGs. This is checked when the creating transaction is validated. In the diagram the amount of ERGs is always shown as the first line (e.g. B: ERG or B - minErg - txFee ). The value type ascription B: ERG is optional and may be used for readability. When the value is given as a formula, then this formula should be respected by the transaction which creates the box.
It is important to understand that variables like amount and txFee are not named properties of the boxes. They are parameters of the whole diagram and representing some amounts. Or put it another way, they are shared parameters between transactions (e.g. Sell Order and Swap transactions from DEX example below share the tAmt parameter). So the same name is tied to the same value throughout the diagram (this is where the tooling would help a lot). However, when it comes to on-chain validation of those values, only explicit conditions which are marked with ? are transformed to ErgoScript. At the same time, all other conditions are ensured off-chain during transaction building (for example in an application using Appkit API) and transaction validation when it is added to the blockchain.
  1. Amount of T token
A box can store values of many tokens. The tokens on the diagram are named and a value variable may be associated with the token T using value: T expression. The value may be given by formula. If the formula is prefixed with a box name like boxName ? formula , then it is should also be checked in the guarding script of the boxName box. This additional specification is very convenient because 1) it allows to validate the visual design automatically, and 2) the conditions specified in the boxes of a diagram are enough to synthesize the necessary guarding scripts. (more about this below at “From Diagrams To ErgoScript Contracts”)
  1. Tx Inputs
Inputs are connected to the corresponding transaction by orange arrows. An input arrow may have a label of the following forms:
  1. [email protected] - optional name with an index i.e. [email protected] or u/2 . This is a property of the target endpoint of the arrow. The name is used in conditions of related boxes and the index is the position of the corresponding box in the INPUTS collection of the transaction.
  2. !action - is a property of the source of the arrow and gives a name for an alternative spending path of the box (we will see this in DEX example)
Because of alternative spending paths, a box may have many outgoing orange arrows, in which case they should be labeled with different actions.
  1. Transaction
A transaction spends input boxes and creates output boxes. The input boxes are given by the orange arrows and the labels are expected to put inputs at the right indexes in INPUTS collection. The output boxes are given by the green arrows. Each transaction should preserve a strict balance of ERG values (sum of inputs == sum of outputs) and for each token the sum of inputs >= the sum of outputs. The design diagram requires an explicit specification of the ERG and token values for all of the output boxes to avoid implicit errors and ensure better readability.
  1. Tx Outputs
Outputs are connected to the corresponding transaction by green arrows. An output arrow may have a label of the following [email protected] , where an optional name is accompanied with an index i.e. [email protected] or u/2 . This is a property of the source endpoint of the arrow. The name is used in conditions of the related boxes and the index is the position of the corresponding box in the OUTPUTS collection of the transaction.
Example: Decentralized Exchange (DEX)
Now let's use the above described notation to design a FlowCard for a DEX dApp. It is simple enough yet also illustrates all of the key features of FlowCard diagrams which we've introduced in the previous section.
The dApp scenario is shown in the figure below: There are three participants (buyer, seller and DEX) of the DEX dApp and five different transaction types, which are created by participants. The buyer wants to swap ergAmt of ERGs for tAmt of TID tokens (or vice versa, the seller wants to sell TID tokens for ERGs, who sends the order first doesn't matter). Both the buyer and the seller can cancel their orders any time. The DEX off-chain matching service can find matching orders and create the Swap transaction to complete the exchange.
The following diagram fully (and formally) specifies all of the five transactions that must be created off-chain by the DEX dApp. It also specifies all of the spending conditions that should be verified on-chain.

https://preview.redd.it/fnt5f4qp9tv41.png?width=1614&format=png&auto=webp&s=34f145f9a6d622454906857e645def2faba057bd
Let's discuss the FlowCard diagram and the logic of each transaction in details:
Buy Order Transaction
A buyer creates a Buy Order transaction. The transaction spends E amount of ERGs (which we will write E: ERG ) from one or more boxes in the pk(buyer) wallet. The transaction creates a bid box with ergAmt: ERG protected by the buyOrder script. The buyOrder script is synthesized from the specification (see below at “From Diagrams To ErgoScript Contracts”) either manually or automatically by a tool. Even though we don't need to define the buyOrder script explicitly during designing, at run time the bid box should contain the buyOrder script as the guarding proposition (which checks the box spending conditions), otherwise the conditions specified in the diagram will not be checked.
The change box is created to make the input and output sums of the transaction balanced. The transaction fee box is omitted because it can be added automatically by the tools. In practice, however, the designer can add the fee box explicitly to the a diagram. It covers the cases of more complex transactions (like Swap) where there are many ways to pay the transaction fee.
Cancel Buy, Cancel Sell Transactions
At any time, the buyer can cancel the order by sending CancelBuy transaction. The transaction should satisfy the guarding buyOrder contract which protects the bid box. As you can see on the diagram, both the Cancel and the Swap transactions can spend the bid box. When a box has spending alternatives (or spending paths) then each alternative is identified by a unique name prefixed with ! (!cancel and !swap for the bid box). Each alternative path has specific spending conditions. In our example, when the Cancel Buy transaction spends the bid box the ?buyer condition should be satisfied, which we read as “the signature for the buyer address should be presented in the transaction”. Therefore, only buyer can cancel the buy order. This “signature” condition is only required for the !cancel alternative spending path and not required for !swap .
Sell Order Transaction
The Sell Order transaction is similar to the BuyOrder in that it deals with tokens in addition to ERGs. The transaction spends E: ERG and T: TID tokens from seller's wallet (specified as pk(seller) contract). The two outputs are ask and change . The change is a standard box to balance transaction. The ask box keeps tAmt: TID tokens for the exchange and minErg: ERG - the minimum amount of ERGs required in every box.
Swap Transaction
This is a key transaction in the DEX dApp scenario. The transaction has several spending conditions on the input boxes and those conditions are included in the buyOrder and sellOrder scripts (which are verified when the transaction is added to the blockchain). However, on the diagram those conditions are not specified in the bid and ask boxes, they are instead defined in the output boxes of the transaction.
This is a convention for improved usability because most of the conditions relate to the properties of the output boxes. We could specify those properties in the bid box, but then we would have to use more complex expressions.
Let's consider the output created by the arrow labeled with [email protected] . This label tells us that the output is at the index 0 in the OUTPUTS collection of the transaction and that in the diagram we can refer to this box by the buyerOut name. Thus we can label both the box itself and the arrow to give the box a name.
The conditions shown in the buyerOut box have the form bid ? condition , which means they should be verified on-chain in order to spend the bid box. The conditions have the following meaning:
  • tAmt: TID requires the box to have tAmt amount of TID token
  • R4 == bid.id requires R4 register in the box to be equal to id of the bid box.
  • script == buyer requires the buyerOut box to have the script of the wallet where it is located on the diagram, i.e. pk(buyer)
Similar properties are added to the sellerOut box, which is specified to be at index 1 and the name is given to it using the label on the box itself, rather than on the arrow.
The Swap transaction spends two boxes bid and ask using the !swap spending path on both, however unlike !cancel the conditions on the path are not specified. This is where the bid ? and ask ? prefixes come into play. They are used so that the conditions listed in the buyerOut and sellerOut boxes are moved to the !swap spending path of the bid and ask boxes correspondingly.
If you look at the conditions of the output boxes, you will see that they exactly specify the swap of values between seller's and buyer's wallets. The buyer gets the necessary amount of TID token and seller gets the corresponding amount of ERGs. The Swap transaction is created when there are two matching boxes with buyOrder and sellOrder contracts.
From Diagrams To ErgoScript Contracts
What is interesting about FlowCard specifications is that we can use them to automatically generate the necessary ErgoTree scripts. With the appropriate tooling support this can be done automatically, but with the lack of thereof, it can be done manually. Thus, the FlowCard allows us to capture and visually represent all of the design choices and semantic details of an Ergo dApp.
What we are going to do next is to mechanically create the buyOrder contract from the information given in the DEX flow card.
Recall that each script is a proposition (boolean valued expression) which should evaluate to true to allow spending of the box. When we have many conditions to be met at the same time we can combine them in a logical formula using the AND binary operation, and if we have alternatives (not necessarily exclusive) we can put them into the OR operation.
The buyOrder box has the alternative spending paths !cancel and !swap . Thus the ErgoScript code should have OR operation with two arguments - one for each spending path.
/** buyOrder contract */ { val cancelCondition = {} val swapCondition = {} cancelCondition || swapCondition } 
The formula for the cancelCondition expression is given in the !cancel spending path of the buyOrder box. We can directly include it in the script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = {} cancelCondition || swapCondition } 
For the !swap spending path of the buyOrder box the conditions are specified in the buyerOut output box of the Swap transaction. If we simply include them in the swapCondition then we get a syntactically incorrect script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = { tAmt: TID && R4 == bid.id && @contract } cancelCondition || swapCondition } 
We can however translate the conditions from the diagram syntax to ErgoScript expressions using the following simple rules
  1. [email protected] ==> val buyerOut = OUTPUTS(0)
  2. tAmt: TID ==> tid._2 == tAmt where tid = buyerOut.tokens(TID)
  3. R4 == bid.id ==> R4 == SELF.id where R4 = buyerOut.R4[Coll[Byte]].get
  4. script == buyer ==> buyerOut.propositionBytes == buyer.propBytes
Note, in the diagram TID represents a token id, but ErgoScript doesn't have access to the tokens by the ids so we cannot write tokens.getByKey(TID) . For this reason, when the diagram is translated into ErgoScript, TID becomes a named constant of the index in tokens collection of the box. The concrete value of the constant is assigned when the BuyOrder transaction with the buyOrder box is created. The correspondence and consistency between the actual tokenId, the TID constant and the actual tokens of the buyerOut box is ensured by the off-chain application code, which is completely possible since all of the transactions are created by the application using FlowCard as a guiding specification. This may sound too complicated, but this is part of the translation from diagram specification to actual executable application code, most of which can be automated.
After the transformation we can obtain a correct script which checks all the required preconditions for spending the buyOrder box.
/** buyOrder contract */ def DEX(buyer: Addrss, seller: Address, TID: Int, ergAmt: Long, tAmt: Long) { val cancelCondition: SigmaProp = { buyer } // verify buyer's sig (ProveDlog) val swapCondition = OUTPUTS.size > 0 && { // securing OUTPUTS access val buyerOut = OUTPUTS(0) // from [email protected] buyerOut.tokens.size > TID && { // securing tokens access val tid = buyerOut.tokens(TID) val regR4 = buyerOut.R4[Coll[Byte]] regR4.isDefined && { // securing R4 access val R4 = regR4.get tid._2 == tAmt && // from tAmt: TID R4 == SELF.id && // from R4 == bid.id buyerOut.propositionBytes == buyer.propBytes // from script == buyer } } } cancelCondition || swapCondition } 
A similar script for the sellOrder box can be obtained using the same translation rules. With the help of the tooling the code of contracts can be mechanically generated from the diagram specification.
Conclusions
Declarative programming models have already won the battle against imperative programming in many application domains like Big Data, Stream Processing, Deep Learning, Databases, etc. Ergo is pioneering the declarative model of dApp development as a better and safer alternative to the now popular imperative model of smart contracts.
The concept of FlowCard shifts the focus from writing ErgoScript contracts to the overall flow of values (hence the name), in such a way, that ErgoScript can always be generated from them. You will never need to look at the ErgoScript code once the tooling is in place.
Here are the possible next steps for future work:
  1. Storage format for FlowCard Spec and the corresponding EIP standardized file format (Json/XML/Protobuf). This will allow various tools (Diagram Editor, Runtime, dApps etc) to create and use *.flowcard files.
  2. FlowCard Viewer, which can generate the diagrams from *.flowcard files.
  3. FlowCard Runtime, which can run *.flowcard files, create and send transactions to Ergo network.
  4. FlowCard Designer Tool, which can simplify development of complex diagrams . This will make designing and validation of Ergo contracts a pleasant experience, more like drawing rather than coding. In addition, the correctness of the whole dApp scenario can be verified and controlled by the tooling.
submitted by Guilty_Pea to CryptoCurrencies [link] [comments]

FlowCards: A Declarative Framework for Development of Ergo dApps

FlowCards: A Declarative Framework for Development of Ergo dApps
Introduction
ErgoScript is the smart contract language used by the Ergo blockchain. While it has concise syntax adopted from Scala/Kotlin, it still may seem confusing at first because conceptually ErgoScript is quite different compared to conventional languages which we all know and love. This is because Ergo is a UTXO based blockchain, whereas smart contracts are traditionally associated with account based systems like Ethereum. However, Ergo's transaction model has many advantages over the account based model and with the right approach it can even be significantly easier to develop Ergo contracts than to write and debug Solidity code.
Below we will cover the key aspects of the Ergo contract model which makes it different:
Paradigm
The account model of Ethereum is imperative. This means that the typical task of sending coins from Alice to Bob requires changing the balances in storage as a series of operations. Ergo's UTXO based programming model on the other hand is declarative. ErgoScript contracts specify conditions for a transaction to be accepted by the blockchain (not changes to be made in the storage state as result of the contract execution).
Scalability
In the account model of Ethereum both storage changes and validity checks are performed on-chain during code execution. In contrast, Ergo transactions are created off-chain and only validation checks are performed on-chain thus reducing the amount of operations performed by every node on the network. In addition, due to immutability of the transaction graph, various optimization strategies are possible to improve throughput of transactions per second in the network. Light verifying nodes are also possible thus further facilitating scalability and accessibility of the network.
Shared state
The account-based model is reliant on shared mutable state which is known to lead to complex semantics (and subtle million dollar bugs) in the context of concurrent/ distributed computation. Ergo's model is based on an immutable graph of transactions. This approach, inherited from Bitcoin, plays well with the concurrent and distributed nature of blockchains and facilitates light trustless clients.
Expressive Power
Ethereum advocated execution of a turing-complete language on the blockchain. It theoretically promised unlimited potential, however in practice severe limitations came to light from excessive blockchain bloat, subtle multi-million dollar bugs, gas costs which limit contract complexity, and other such problems. Ergo on the flip side extends UTXO to enable turing-completeness while limiting the complexity of the ErgoScript language itself. The same expressive power is achieved in a different and more semantically sound way.
With the all of the above points, it should be clear that there are a lot of benefits to the model Ergo is using. In the rest of this article I will introduce you to the concept of FlowCards - a dApp developer component which allows for designing complex Ergo contracts in a declarative and visual way.

From Imperative to Declarative

In the imperative programming model of Ethereum a transaction is a sequence of operations executed by the Ethereum VM. The following Solidity function implements a transfer of tokens from sender to receiver . The transaction starts when sender calls this function on an instance of a contract and ends when the function returns.
// Sends an amount of existing coins from any caller to an address function send(address receiver, uint amount) public { require(amount <= balances[msg.sender], "Insufficient balance."); balances[msg.sender] -= amount; balances[receiver] += amount; emit Sent(msg.sender, receiver, amount); } 
The function first checks the pre-conditions, then updates the storage (i.e. balances) and finally publishes the post-condition as the Sent event. The gas which is consumed by the transaction is sent to the miner as a reward for executing this transaction.
Unlike Ethereum, a transaction in Ergo is a data structure holding a list of input coins which it spends and a list of output coins which it creates preserving the total balances of ERGs and tokens (in which Ergo is similar to Bitcoin).
Turning back to the example above, since Ergo natively supports tokens, therefore for this specific example of sending tokens we don't need to write any code in ErgoScript. Instead we need to create the ‘send’ transaction shown in the following figure, which describes the same token transfer but declaratively.
https://preview.redd.it/sxs3kesvrsv41.png?width=1348&format=png&auto=webp&s=582382bc26912ff79114d831d937d94b6988e69f
The picture visually describes the following steps, which the network user needs to perform:
  1. Select unspent sender's boxes, containing in total tB >= amount of tokens and B >= txFee + minErg ERGs.
  2. Create an output target box which is protected by the receiver public key with minErg ERGs and amount of T tokens.
  3. Create one fee output protected by the minerFee contract with txFee ERGs.
  4. Create one change output protected by the sender public key, containing B - minErg - txFee ERGs and tB - amount of T tokens.
  5. Create a new transaction, sign it using the sender's secret key and send to the Ergo network.
What is important to understand here is that all of these steps are preformed off-chain (for example using Appkit Transaction API) by the user's application. Ergo network nodes don't need to repeat this transaction creation process, they only need to validate the already formed transaction. ErgoScript contracts are stored in the inputs of the transaction and check spending conditions. The node executes the contracts on-chain when the transaction is validated. The transaction is valid if all of the conditions are satisfied.
Thus, in Ethereum when we “send amount from sender to recipient” we are literally editing balances and updating the storage with a concrete set of commands. This happens on-chain and thus a new transaction is also created on-chain as the result of this process.
In Ergo (as in Bitcoin) transactions are created off-chain and the network nodes only verify them. The effects of the transaction on the blockchain state is that input coins (or Boxes in Ergo's parlance) are removed and output boxes are added to the UTXO set.
In the example above we don't use an ErgoScript contract but instead assume a signature check is used as the spending pre-condition. However in more complex application scenarios we of course need to use ErgoScript which is what we are going to discuss next.

From Changing State to Checking Context

In the send function example we first checked the pre-condition (require(amount <= balances[msg.sender],...) ) and then changed the state (i.e. update balances balances[msg.sender] -= amount ). This is typical in Ethereum transactions. Before we change anything we need to check if it is valid to do so.
In Ergo, as we discussed previously, the state (i.e. UTXO set of boxes) is changed implicitly when a valid transaction is included in a block. Thus we only need to check the pre-conditions before the transaction can be added to the block. This is what ErgoScript contracts do.
It is not possible to “change the state” in ErgoScript because it is a language to check pre-conditions for spending coins. ErgoScript is a purely functional language without side effects that operates on immutable data values. This means all the inputs, outputs and other transaction parameters available in a script are immutable. This, among other things, makes ErgoScript a very simple language that is easy to learn and safe to use. Similar to Bitcoin, each input box contains a script, which should return the true value in order to 1) allow spending of the box (i.e. removing from the UTXO set) and 2) adding the transaction to the block.
If we are being pedantic, it is therefore incorrect (strictly speaking) to think of ErgoScript as the language of Ergo contracts, because it is the language of propositions (logical predicates, formulas, etc.) which protect boxes from “illegal” spending. Unlike Bitcoin, in Ergo the whole transaction and a part of the current blockchain context is available to every script. Therefore each script may check which outputs are created by the transaction, their ERG and token amounts (we will use this capability in our example DEX contracts), current block number etc.
In ErgoScript you define the conditions of whether changes (i.e. coin spending) are allowed to happen in a given context. This is in contrast to programming the changes imperatively in the code of a contract.
While Ergo's transaction model unlocks a whole range of applications like (DEX, DeFi Apps, LETS, etc), designing contracts as pre-conditions for coin spending (or guarding scripts) directly is not intuitive. In the next sections we will consider a useful graphical notation to design contracts declaratively using FlowCard Diagrams, which is a visual representation of executable components (FlowCards).
FlowCards aim to radically simplify dApp development on the Ergo platform by providing a high-level declarative language, execution runtime, storage format and a graphical notation.
We will start with a high level of diagrams and go down to FlowCard specification.

FlowCard Diagrams

The idea behind FlowCard diagrams is based on the following observations: 1) An Ergo box is immutable and can only be spent in the transaction which uses it as an input. 2) We therefore can draw a flow of boxes through transactions, so that boxes flowing in to the transaction are spent and those flowing out are created and added to the UTXO. 3) A transaction from this perspective is simply a transformer of old boxes to the new ones preserving the balances of ERGs and tokens involved.
The following figure shows the main elements of the Ergo transaction we've already seen previously (now under the name of FlowCard Diagram).
https://preview.redd.it/06aqkcd1ssv41.png?width=1304&format=png&auto=webp&s=106eda730e0526919aabd5af9596b97e45b69777
There is a strictly defined meaning (semantics) behind every element of the diagram, so that the diagram is a visual representation (or a view) of the underlying executable component (called FlowCard).
The FlowCard can be used as a reusable component of an Ergo dApp to create and initiate the transaction on the Ergo blockchain. We will discuss this in the coming sections.
Now let's look at the individual pieces of the FlowCard diagram one by one.
1. Name and Parameters
Each flow card is given a name and a list of typed parameters. This is similar to a template with parameters. In the above figure we can see the Send flow card which has five parameters. The parameters are used in the specification.
2. Contract Wallet
This is a key element of the flow card. Every box has a guarding script. Often it is the script that checks a signature against a public key. This script is trivial in ErgoScript and is defined like the def pk(pubkey: Address) = { pubkey } template where pubkey is a parameter of the type Address . In the figure, the script template is applied to the parameter pk(sender) and thus a concrete wallet contract is obtained. Therefore pk(sender) and pk(receiver) yield different scripts and represent different wallets on the diagram, even though they use the same template.
Contract Wallet contains a set of all UTXO boxes which have a given script derived from the given script template using flow card parameters. For example, in the figure, the template is pk and parameter pubkey is substituted with the `sender’ flow card parameter.
3. Contract
Even though a contract is a property of a box, on the diagram we group the boxes by their contracts, therefore it looks like the boxes belong to the contracts, rather than the contracts belong to the boxes. In the example, we have three instantiated contracts pk(sender) , pk(receiver) and minerFee . Note, that pk(sender) is the instantiation of the pk template with the concrete parameter sender and minerFee is the instantiation of the pre-defined contract which protects the miner reward boxes.
4. Box name
In the diagram we can give each box a name. Besides readability of the diagram, we also use the name as a synonym of a more complex indexed access to the box in the contract. For example, change is the name of the box, which can also be used in the ErgoScript conditions instead of OUTPUTS(2) . We also use box names to associate spending conditions with the boxes.
5. Boxes in the wallet
In the diagram, we show boxes (darker rectangles) as belonging to the contract wallets (lighter rectangles). Each such box rectangle is connected with a grey transaction rectangle by either orange or green arrows or both. An output box (with an incoming green arrow) may include many lines of text where each line specifies a condition which should be checked as part of the transaction. The first line specifies the condition on the amount of ERG which should be placed in the box. Other lines may take one of the following forms:
  1. amount: TOKEN - the box should contain the given amount of the given TOKEN
  2. R == value - the box should contain the given value of the given register R
  3. boxName ? condition - the box named boxName should check condition in its script.
We discuss these conditions in the sections below.
6. Amount of ERGs in the box
Each box should store a minimum amount of ERGs. This is checked when the creating transaction is validated. In the diagram the amount of ERGs is always shown as the first line (e.g. B: ERG or B - minErg - txFee ). The value type ascription B: ERG is optional and may be used for readability. When the value is given as a formula, then this formula should be respected by the transaction which creates the box.
It is important to understand that variables like amount and txFee are not named properties of the boxes. They are parameters of the whole diagram and representing some amounts. Or put it another way, they are shared parameters between transactions (e.g. Sell Order and Swap transactions from DEX example below share the tAmt parameter). So the same name is tied to the same value throughout the diagram (this is where the tooling would help a lot). However, when it comes to on-chain validation of those values, only explicit conditions which are marked with ? are transformed to ErgoScript. At the same time, all other conditions are ensured off-chain during transaction building (for example in an application using Appkit API) and transaction validation when it is added to the blockchain.
7. Amount of T token
A box can store values of many tokens. The tokens on the diagram are named and a value variable may be associated with the token T using value: T expression. The value may be given by formula. If the formula is prefixed with a box name like boxName ? formula , then it is should also be checked in the guarding script of the boxName box. This additional specification is very convenient because 1) it allows to validate the visual design automatically, and 2) the conditions specified in the boxes of a diagram are enough to synthesize the necessary guarding scripts. (more about this below at “From Diagrams To ErgoScript Contracts”)
8. Tx Inputs
Inputs are connected to the corresponding transaction by orange arrows. An input arrow may have a label of the following forms:
  1. [email protected] - optional name with an index i.e. [email protected] or u/2 . This is a property of the target endpoint of the arrow. The name is used in conditions of related boxes and the index is the position of the corresponding box in the INPUTS collection of the transaction.
  2. !action - is a property of the source of the arrow and gives a name for an alternative spending path of the box (we will see this in DEX example)
Because of alternative spending paths, a box may have many outgoing orange arrows, in which case they should be labeled with different actions.
9. Transaction
A transaction spends input boxes and creates output boxes. The input boxes are given by the orange arrows and the labels are expected to put inputs at the right indexes in INPUTS collection. The output boxes are given by the green arrows. Each transaction should preserve a strict balance of ERG values (sum of inputs == sum of outputs) and for each token the sum of inputs >= the sum of outputs. The design diagram requires an explicit specification of the ERG and token values for all of the output boxes to avoid implicit errors and ensure better readability.
10. Tx Outputs
Outputs are connected to the corresponding transaction by green arrows. An output arrow may have a label of the following [email protected] , where an optional name is accompanied with an index i.e. [email protected] or u/2 . This is a property of the source endpoint of the arrow. The name is used in conditions of the related boxes and the index is the position of the corresponding box in the OUTPUTS collection of the transaction.

Example: Decentralized Exchange (DEX)

Now let's use the above described notation to design a FlowCard for a DEX dApp. It is simple enough yet also illustrates all of the key features of FlowCard diagrams which we've introduced in the previous section.
The dApp scenario is shown in the figure below: There are three participants (buyer, seller and DEX) of the DEX dApp and five different transaction types, which are created by participants. The buyer wants to swap ergAmt of ERGs for tAmt of TID tokens (or vice versa, the seller wants to sell TID tokens for ERGs, who sends the order first doesn't matter). Both the buyer and the seller can cancel their orders any time. The DEX off-chain matching service can find matching orders and create the Swap transaction to complete the exchange.
The following diagram fully (and formally) specifies all of the five transactions that must be created off-chain by the DEX dApp. It also specifies all of the spending conditions that should be verified on-chain.

https://preview.redd.it/piogz0v9ssv41.png?width=1614&format=png&auto=webp&s=e1b503a635ad3d138ef91e2f0c3b726e78958646
Let's discuss the FlowCard diagram and the logic of each transaction in details:
Buy Order Transaction
A buyer creates a Buy Order transaction. The transaction spends E amount of ERGs (which we will write E: ERG ) from one or more boxes in the pk(buyer) wallet. The transaction creates a bid box with ergAmt: ERG protected by the buyOrder script. The buyOrder script is synthesized from the specification (see below at “From Diagrams To ErgoScript Contracts”) either manually or automatically by a tool. Even though we don't need to define the buyOrder script explicitly during designing, at run time the bid box should contain the buyOrder script as the guarding proposition (which checks the box spending conditions), otherwise the conditions specified in the diagram will not be checked.
The change box is created to make the input and output sums of the transaction balanced. The transaction fee box is omitted because it can be added automatically by the tools. In practice, however, the designer can add the fee box explicitly to the a diagram. It covers the cases of more complex transactions (like Swap) where there are many ways to pay the transaction fee.
Cancel Buy, Cancel Sell Transactions
At any time, the buyer can cancel the order by sending CancelBuy transaction. The transaction should satisfy the guarding buyOrder contract which protects the bid box. As you can see on the diagram, both the Cancel and the Swap transactions can spend the bid box. When a box has spending alternatives (or spending paths) then each alternative is identified by a unique name prefixed with ! (!cancel and !swap for the bid box). Each alternative path has specific spending conditions. In our example, when the Cancel Buy transaction spends the bid box the ?buyer condition should be satisfied, which we read as “the signature for the buyer address should be presented in the transaction”. Therefore, only buyer can cancel the buy order. This “signature” condition is only required for the !cancel alternative spending path and not required for !swap .
Sell Order Transaction
The Sell Order transaction is similar to the BuyOrder in that it deals with tokens in addition to ERGs. The transaction spends E: ERG and T: TID tokens from seller's wallet (specified as pk(seller) contract). The two outputs are ask and change . The change is a standard box to balance transaction. The ask box keeps tAmt: TID tokens for the exchange and minErg: ERG - the minimum amount of ERGs required in every box.
Swap Transaction
This is a key transaction in the DEX dApp scenario. The transaction has several spending conditions on the input boxes and those conditions are included in the buyOrder and sellOrder scripts (which are verified when the transaction is added to the blockchain). However, on the diagram those conditions are not specified in the bid and ask boxes, they are instead defined in the output boxes of the transaction.
This is a convention for improved usability because most of the conditions relate to the properties of the output boxes. We could specify those properties in the bid box, but then we would have to use more complex expressions.
Let's consider the output created by the arrow labeled with [email protected] . This label tells us that the output is at the index 0 in the OUTPUTS collection of the transaction and that in the diagram we can refer to this box by the buyerOut name. Thus we can label both the box itself and the arrow to give the box a name.
The conditions shown in the buyerOut box have the form bid ? condition , which means they should be verified on-chain in order to spend the bid box. The conditions have the following meaning:
  • tAmt: TID requires the box to have tAmt amount of TID token
  • R4 == bid.id requires R4 register in the box to be equal to id of the bid box.
  • script == buyer requires the buyerOut box to have the script of the wallet where it is located on the diagram, i.e. pk(buyer)
Similar properties are added to the sellerOut box, which is specified to be at index 1 and the name is given to it using the label on the box itself, rather than on the arrow.
The Swap transaction spends two boxes bid and ask using the !swap spending path on both, however unlike !cancel the conditions on the path are not specified. This is where the bid ? and ask ? prefixes come into play. They are used so that the conditions listed in the buyerOut and sellerOut boxes are moved to the !swap spending path of the bid and ask boxes correspondingly.
If you look at the conditions of the output boxes, you will see that they exactly specify the swap of values between seller's and buyer's wallets. The buyer gets the necessary amount of TID token and seller gets the corresponding amount of ERGs. The Swap transaction is created when there are two matching boxes with buyOrder and sellOrder contracts.

From Diagrams To ErgoScript Contracts

What is interesting about FlowCard specifications is that we can use them to automatically generate the necessary ErgoTree scripts. With the appropriate tooling support this can be done automatically, but with the lack of thereof, it can be done manually. Thus, the FlowCard allows us to capture and visually represent all of the design choices and semantic details of an Ergo dApp.
What we are going to do next is to mechanically create the buyOrder contract from the information given in the DEX flow card.
Recall that each script is a proposition (boolean valued expression) which should evaluate to true to allow spending of the box. When we have many conditions to be met at the same time we can combine them in a logical formula using the AND binary operation, and if we have alternatives (not necessarily exclusive) we can put them into the OR operation.
The buyOrder box has the alternative spending paths !cancel and !swap . Thus the ErgoScript code should have OR operation with two arguments - one for each spending path.
/** buyOrder contract */ { val cancelCondition = {} val swapCondition = {} cancelCondition || swapCondition } 
The formula for the cancelCondition expression is given in the !cancel spending path of the buyOrder box. We can directly include it in the script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = {} cancelCondition || swapCondition } 
For the !swap spending path of the buyOrder box the conditions are specified in the buyerOut output box of the Swap transaction. If we simply include them in the swapCondition then we get a syntactically incorrect script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = { tAmt: TID && R4 == bid.id && @contract } cancelCondition || swapCondition } 
We can however translate the conditions from the diagram syntax to ErgoScript expressions using the following simple rules
  1. [email protected] ==> val buyerOut = OUTPUTS(0)
  2. tAmt: TID ==> tid._2 == tAmt where tid = buyerOut.tokens(TID)
  3. R4 == bid.id ==> R4 == SELF.id where R4 = buyerOut.R4[Coll[Byte]].get
  4. script == buyer ==> buyerOut.propositionBytes == buyer.propBytes
Note, in the diagram TID represents a token id, but ErgoScript doesn't have access to the tokens by the ids so we cannot write tokens.getByKey(TID) . For this reason, when the diagram is translated into ErgoScript, TID becomes a named constant of the index in tokens collection of the box. The concrete value of the constant is assigned when the BuyOrder transaction with the buyOrder box is created. The correspondence and consistency between the actual tokenId, the TID constant and the actual tokens of the buyerOut box is ensured by the off-chain application code, which is completely possible since all of the transactions are created by the application using FlowCard as a guiding specification. This may sound too complicated, but this is part of the translation from diagram specification to actual executable application code, most of which can be automated.
After the transformation we can obtain a correct script which checks all the required preconditions for spending the buyOrder box.
/** buyOrder contract */ def DEX(buyer: Addrss, seller: Address, TID: Int, ergAmt: Long, tAmt: Long) { val cancelCondition: SigmaProp = { buyer } // verify buyer's sig (ProveDlog) val swapCondition = OUTPUTS.size > 0 && { // securing OUTPUTS access val buyerOut = OUTPUTS(0) // from [email protected] buyerOut.tokens.size > TID && { // securing tokens access val tid = buyerOut.tokens(TID) val regR4 = buyerOut.R4[Coll[Byte]] regR4.isDefined && { // securing R4 access val R4 = regR4.get tid._2 == tAmt && // from tAmt: TID R4 == SELF.id && // from R4 == bid.id buyerOut.propositionBytes == buyer.propBytes // from script == buyer } } } cancelCondition || swapCondition } 
A similar script for the sellOrder box can be obtained using the same translation rules. With the help of the tooling the code of contracts can be mechanically generated from the diagram specification.

Conclusions

Declarative programming models have already won the battle against imperative programming in many application domains like Big Data, Stream Processing, Deep Learning, Databases, etc. Ergo is pioneering the declarative model of dApp development as a better and safer alternative to the now popular imperative model of smart contracts.
The concept of FlowCard shifts the focus from writing ErgoScript contracts to the overall flow of values (hence the name), in such a way, that ErgoScript can always be generated from them. You will never need to look at the ErgoScript code once the tooling is in place.
Here are the possible next steps for future work:
  1. Storage format for FlowCard Spec and the corresponding EIP standardized file format (Json/XML/Protobuf). This will allow various tools (Diagram Editor, Runtime, dApps etc) to create and use *.flowcard files.
  2. FlowCard Viewer, which can generate the diagrams from *.flowcard files.
  3. FlowCard Runtime, which can run *.flowcard files, create and send transactions to Ergo network.
  4. FlowCard Designer Tool, which can simplify development of complex diagrams . This will make designing and validation of Ergo contracts a pleasant experience, more like drawing rather than coding. In addition, the correctness of the whole dApp scenario can be verified and controlled by the tooling.
submitted by eleanorcwhite to btc [link] [comments]

How I can write the for with fs::directory_iterator with parallel algortm

I have a function that works with 100% of the one core of CPU and now I'm trying to work with the parallel of an algorithm for move the work on the more core.
An example of my code without the parallel algorithm

template void SpyCBlock::convertData(T dao, const string &locationBitcoinCore, const string &destinationBitcoinCoreJson) { static_assert(std::is_base_of::value, "T must inherit from IDAOBlockchain"); int height = 0; string pathInput; bool isBitcoinDirectory = false; string fileExstension = exstensionFile(dao); while((pathInput = nameFileSearched(locationBitcoinCore)) != "") { try{ currentFile++; string fileNameOutput = getNameFile(pathInput); string pathOutput = destinationBitcoinCoreJson + fileNameOutput + fileExstension; dao.saveBlock(pathInput, pathOutput, height); isBitcoinDirectory = true; }catch(DAOException daoEx){ if(isBitcoinDirectory){ LOG(ERROR) << "The blk files are finished"; }else{ LOG(ERROR) << daoEx.what(); } } } } 
The core of the function is inside the method dao.saveBlock(pathInput, pathOutput, height);
I think this code can be moved with the multiprocessor and I'm learning on it, I know 2 libraries, on is OpenMP and I have raw in the C++17 the STL library for the parallel algorithms.

I have created my version parallel with the OpenMP library and the filesystem library with C++14, and I write this code I refactored the code with the code number 2
Code number 1
template void SpyCBlock::convertDataParallel(T dao, const string &locationBitcoinCore, const string &destinationBitcoinCoreJson) { static_assert(std::is_base_of::value, "T must inherit from IDAOBlockchain"); fs::path bitcoinBlockPath(locationBitcoinCore); std::string fileExstension = exstensionFile(dao); int height = -1; #pragma omp parallel { #pragma omp single { for(auto fileBlk : fs::directory_iterator(bitcoinBlockPath)) { std::string fileName = fileBlk.path().filename(); if(!fs::is_directory(fileBlk) && fileName.find("blk") != std::string::npos){ std::string pathFileOut = getNameFile(fileBlk.path().string()); #pragma omp task dao.saveBlock(fileBlk.path().string(), destinationBitcoinCoreJson + pathFileOut + fileExstension, height); } } } } } 
========| UPDATE |======
I have refactored the code multiprocessor with this code
code number 2
template void SpyCBlock::convertDataParallel(T &dao, const string &locationBitcoinCore, const string &destinationBitcoinCoreJson) { static_assert(std::is_base_of::value, "T must inherit from IDAOBlockchain"); if(locationBitcoinCore.empty() || destinationBitcoinCoreJson.empty()){ LOG(ERROR) << "The input argument are empty"; throw exception(); } //With execution parallel is not posssible set the real height of block, if I set the height = -1 the //dao insert inside the information of the link the hash block. LOG(ERROR) << "Location path " << locationBitcoinCore; fs::path bitcoinBlockPath(locationBitcoinCore); std::string fileExstension = exstensionFile(dao); int height = -1; int fileCount = 0; for(auto fileBlk : fs::directory_iterator(bitcoinBlockPath)) { std::string fileName = fileBlk.path().filename(); if(!fs::is_directory(fileBlk) && fileName.find("blk") != std::string::npos){ fileCount++; } } bool isBitcoinDirectory = false; #pragma omp parallel for for(int i = 0; i < fileCount; i++){ try{ string pathInput = nameFileSearched(locationBitcoinCore, i); LOG(INFO) << pathInput; string fileNameOutput = getNameFile(pathInput); string pathOutput = destinationBitcoinCoreJson + fileNameOutput + fileExstension; LOG(INFO) << pathOutput; if(compressionForm && !std::is_same::value){ dao.saveBlockCompress(pathInput, pathOutput, height); }else{ dao.saveBlock(pathInput, pathOutput, height); } isBitcoinDirectory = true; }catch(DAOException daoEx){ if(isBitcoinDirectory){ LOG(ERROR) << "The blk files are finished"; }else{ LOG(ERROR) << daoEx.what(); } //break; //If I introducing this I have introducing a condition on the value of block. //If i introducing the value break I don't have the possibility to read the value with irregular index } } } 

Now I'm asking if my code is better or is improvable or I'm wrong all.

also, with the C++17 and the STL parallel algorithm, my solution is better than the solution with OpenMP
submitted by crazyjoker96 to cpp_questions [link] [comments]

The History, The Current State And The Future Of NavCoin

The History, The Current State And The Future Of NavCoin

This is it. If you're interested to see what NAV is all about, this is the ultimate guide for you. You will learn about the history of NavCoin and how it evolved. You will learn about the current state and features of NavCoin and you will learn about the exciting new features that are planned and coming up in the (near) future.
So buckle up, this is going to be a long ride!

Table Of Content


Introduction - What is NavCoin?


The History

Introduction
The following chapter will summarize and break down the history of NavCoin in a few sentences. NAV started a long time ago, went through rebrandings and changes of the core team before it became what it is today.

SummerCoin
NavCoin was initially first introduced under the name SummerCoin on April 23 in 2014. SummerCoin was a fork of the Bitcoin blockchain. It used to have a PoW/PoS hybrid algorithm with a block time of 45 seconds.

SummerCoinV2 /NavajoCoin
Soon after the initial launch of SummerCoin, the original developer left and SoopY (soopy452000 on bitcointalk) took over as the main developer and rebranded the project to SummerCoinV2 respectively NavajoCoin and introduced new features.
The name NavajoCoin was chosen in honor of the Navajo Code Talker. The unbreakable Navajo code was used to encrypt highly classified military information and commands and decrypt the same in WW II.
SoopY introduced a technology which allowed sending transactions anonymously and private. This technology was called "Navajo Anonymous Technology". SoopY also released a new wallet and set the Proof of Stake rewards at 10% for the first year, 5% for the second year and 2% for every year after.

NavCoin
On August 12, 2014, Craig (current lead core developer, pakage on bitcointalk) started to get involved with NAV by helping to set up a website [10].
It was officially announced that Craig joined the core team as a "Wallet & Web Developer" on November 06, 2014.
The last tokenswap and restart of the blockchain of NAV happened on May 12, 2016.
Soon later, SoopY stopped showing up and Craig stepped into the role of the lead core developer. Since then, Craig has assembled a strong team with which he built NavCoin into what it is today.
Currently, Craig and the NavCoin Core team is located in New Zealand and they are actively developing many ground-braking features which differentiate NAV from other cryptocurrencies. You will read more about that later in this article.

The Current State

Introduction
The year 2018 has been a thriving year for the NavCoin ecosystem. Despite the USD price of NAV not reflecting it, in 2018 the core team has developed a whole bunch of new features. Also the core content creators published the first official guidelines that function as an orientation guide for community content creators. This chapter will give you an overview of the current team, the features, the prior mentioned guidelines and the community of NavCoin.

Core Team [1]
Last year, the core team has grown alot. It contains of developers, content creators and interns. The core team are employees of Encrypt S, the New Zealand's leading blockchain R&D lab. Encrypt S is developing blockchain solutions since 2014 and values building open-source software highly.

Craig MacGregor - Chief Executive Officer
Craig is the CEO of Encrypt S and the founder of NavCoin. He is one of the world's most experienced blockchain developers. Craig founded NavCoin in 2014 and is developing software for it since then. He has assembled a strong team of like-minded people. Craig also speaks at seminars and conferenced. Some of the companies and conferences he did blockchain education sessions at are Oracle, Xero, Air New Zealand, Blok Tex and trademe. Together with the team, he is also doing a education series on YouTube where he explains upcoming features in-depth for the community.

Alex Vazquez - Chief Technical Officer
Alex is the CTO of Encrypt S and the most active contributor to the NavCoin core Github. He has incredible knowledge of blockchains and proposes and implements solutions for challenges and features. He supports community developers frequently and answers any questions of the community thoroughly. Like Craig, Alex is developing software for the NavCoin ecosystem for a very long time. Alex speaks at universities at times and educates students about the blockchain technology.

Paul Sanderson - Lead Software Engineer
Paul is the Lead Software Engineer at Encrypt S. He has a flair for technology. His technical and management skills are perfectly suited for consultancy and investment advising. He also frequently contributes to the NavCoin core source code.

Rowan Savage - Senior Software Engineer
Rowan is a full stack software engineer with more than a decade experience in developing complex front-end web applications. He joined Encrypt S in February 2018 and has since been involved in the Valence Plattform, the Kauri Wallet and NavCoin Core. You will read more about these feature/projects later.

Carter Xiao - Lead UX/UI Designer
Carter specializes in user-centric design and is also very talented with 3D animation, motion graphics and programming. One of NavCoins core principle is "Simplifying Crypto" and UX/UI is a very important part of that.

Matt Paul - Software Engineer
Like Rowan, Matt is a full stack Software Engineer. He joined the core team in Mai 2017 and has since worked on NavPay, NavPi, the Kauri Wallet and NavCoin Core. Kieren Hyland - Chief Strategy Officer Kieren is one of the employees that are working for Encrypt S for a very long time. He is the CSO and is a digital strategist and growth hacker with a passion for new technology and has a lot of experience in online marketing. Laura Harris - Creative Director Laura has a combination of commercial and creative flair. She manages the social media accounts for NavCoin and ensures, that NavCoins' message is always powerful, relevant and distinctive. John Darby - Content Creator John is an internationally awarded Technology and Financial sector marketing communications specialist. He is one of the Core Content Creators for NavCoin.

Features of NavCoin [2]
The following features are currently available and have been developed in the last months and years. It is sorted from newest to oldest.

Static Block Reward
The soft-fork for the enabling of static block rewards have been accepted and became active recently at 5th January 2019. This means, that the block reward was changed from a percentage based reward to a static reward. This will incentivize the stakers to have their node online 24/7 which increased the security of the network. It also aligns NavCoin with the PoSv3 specification. With this implementation, the yearly inflation will be 3.6% currently and will exponentionally decrease because of the static value of the rewards. Every staked block will now give the staker 2 NAV. Depending on how many people are staking, the yearly percentage varies. With the network weight currently being around 20'000'000 NAV, stakers earn around 10% rewards from staking 24/7.

Cold staking
To provide extra security to participants in the staking process in the NavCoin network, the core team decided to implement cold staking. This allows to store NAV offline and still be able to sign staking inputs. Looking forward, a possible integration into the Ledger Nano S would mean, that one can stake NAV securely from a offline hardware wallet. How cool is that?

OpenAlias
One of the core principle of NAV is to simplify cryptocurrencies. Many non-technical people are deterred from the long, cryptic addresses used in wallets. When sending funds, you have to make sure that every single letter and digit is correct which is nerve-wracking for the average person. NavCoin has implemented OpenAlias, which allows to transform the wallet address into a email-like form. Everyone can register a name like "[[email protected]](mailto:[email protected])". Funds can then be sent to this name, which makes sending crypto much easier and less error-prone.

Community Fund
This is the one big feature I was most excited about. NavCoin core has implemented the first fully decentralized community fund. Acceptance of proposals and release of funds is all approved by the decentralized network. No central authority has access to the fund. The community fund enables everyone to propose their ideas to the NavCoin community and to get paid to implement these ideas. Everyone can propose whatever they like (of course there is a higher rate of success if the proposal contributes to the NavCoin ecosystem ;-)). In fact, this article was sponsored by the NAV-Community by voting "yes" for my proposal. The fund works like this:
For a fee of 50 NAV, everyone can create and present his idea/proposal to the entire NavCoin network. The fee is here to help prevent spam attacks. Proposals can literally be anything - be it development, marketing or anything else you can some up with.
After creating the proposal, everyone contributing to the NavCoin network can then decide if they like the proposal of not. They vote with "Yes" or "No" for the acceptance of the proposal. Voting happens via staking. Every transaction that gets validated by you gives you one vote. This means that the more NAV you are staking, the higher your voting weight is.
The proposal stays in the state "Pending" until it is accepted or rejected. To be accepted, a proposal has to have a participation of at least 50% of all staked blocks and at least 75% of these votes have to be "Yes"-votes. Like-wise to be rejected a proposal need 50% participation of the network and 75% of these votes have to be "No"-votes. Additionally, if a proposal didn't pass after 6 voting cycles (about 6 weeks) it is also rejected.
After a proposal has been accepted, the creator of the proposal can start his work. When the work is finished, or at in the proposal defined checkpoints, the proposal creator can create a payment request for the full or part of the requested funds.
The NavCoin network can then again decide, if the work is what the creator promised to do and vote for the funds or reject the payment request because it was not what he promised. This mechanism ensures, that the funds are only release if the creator of the proposal did what he promised. The NavCoin network decides everything, there is no central authority which makes the community fund 100% decentralized.
The community fund is quite new but there have already been some proposals that were accepted like paying for the development & hosting of NAV block explorer, the creation and distribution of NAV car stickers to the community for free (or paid by the community fund), the funding of interns for NavCoin Core, translation of the website into other languages and YouTube videos. What ideas could you come up with? By the way: this article was also sponsored by the community fund :-)

Proof of Stake
Like said before, NavCoin uses the Proof of Stake algorithm to create and validate blocks. Participants of the NavCoin network can earn rewards by putting their coins to stake and thus validating blocks and securing the network. The reward used to be 4% fixed but recently changed with the implementation of PoSv3. Currently, rewards for stakers that are staking 24/7 is about 10% but it is dependent on how many people are staking. If more nodes come online, this reward will go down. If 90% of all NAVs would be at stake, stakers would still earn 4%.

Tutorials And Guidelines [3]
The NavCoin Core team pushes the community to contribute to the NavCoin ecosystem constantly. They emphasize that NavCoin is an open source project and everyone can contribute. The team tries to make it as easy as possible for the average person to contribute and thus created different tutorials and guidelines.

Tutorials To Contribute To The Website
The whole website is open source. Everyone can contribute to the website. The team created different guides for people to follow [4].

The NavCoin Developer Manifesto
The content creator core team has build a developer manifesto. It defines the values that should be uphold like for example that they will always operate in the best interest of the network. If defines the principles, purposes, scope of involvement and operational requirements [5].

The NavCoin Content Creation Manifesto
Similar to the developer manifesto, there is also a content creation manifesto. Again it defines the principles for creating content, the purpose, the scope of involvement and the operational requirements [6].

NavCoin Brand Guidelines
In addition to the content creation manifesto, there is also a brand guideline booklet. This should help content creators to create images, videos, articles etc. in the same style as the core team. It defines the NAV brand. The brand guidelines contain definitions, the language to use (words to use, words not to use), the tone of voice, what the community aspires to be and what we discourage to be. It also contains the logo pack which can be used in graphics etc. It describes correct logo spacing, logo placement, the colors of NAV and different web assets. It gives tips about gradients and overlays, the typefaces (with a font pack) and many more. Check it out yourself [7].

NavCoin Educational Series
The core team has decided to actively involve the community in the creation of new features. For this reason and to allow users to ask questions, they created the NavCoin Educational Series. The core team schedules an online live meetup which can be joined by everyone. On YouTube they do live-streams and explain upcoming features. Examples of these series are explanations for cold staking, static rewards (PoSv3) and the community fund. The community can ask questions live and the core team will answer them immediately.

Community
During the last year there have been an influx of software developers from the community starting to create features for NAV.

navexplorer.com
An examples is navexplorer.com which is programmed by community developer prodpeak and is a block explorer for NavCoin. Additionally, it functions as a interface to see what is going on in the community fund. It shows pending proposals and payment requests.

NEXT Wallet
The NEXT Wallet is an alternative wallet for NAV and other cryptocurrencies. It has a beautiful user interface and is additionally the easiest interface to interact with the community fund (create proposals, create payment requests and vote for proposals and payment requests). It is programmed by community developer sakdeniz who put hundreds of hours into it during last year.

There were also some marketing activities starting to emerge with the release of the community fund. Some of these were for example free stickers for everyone in the NAV community to stick to their car / shop / window etc. or YouTube videos of CryptoCandor and Cryptomoonie that explained the details of NAV. I am sure, that with the 500'000 NAV available in the community fund per year there will be an influx of gread ideas - development as well as marketing activities - that will be funded.

The Future

Introduction
These features are planned for the future. Many of the following features are part of the 2019 roadmap. Some will not be described in great detail because not much is known about them yet. I've still listed them as they are part of what is yet to come.

Features
Rimu - Improved Privacy Solution
NavCoin used to be a optional privacy coin. That means, that you could choose to send a transaction in private. NavCoin was criticized for the way it handles private payments because it relied on a few servers which didn't make it that decentralized. The technology was called "NavTech" and was a secondary blockchain that obscured the transaction and the amount that was sent. NavCoin Core is currently developing a new improved privacy solution that will make the private payment system completely trustless and districuted and runs at a protocol level. Alex of the NavCoin Core team has published a paper that describes this new privacy solution. It's called Zero Confidential Transactions and can be found here: https://www.researchgate.net/publication/330366788_ZeroCT_Improving_Zerocoin_with_Confidential_Transactions_and_more. What I want to highlight is the collaboration between Alex as the proposer of the solution and the Veil team, a Bitcoin Core developer and Moneros main cryptographer as reviewers. When the best work together, it will be interesting to see what the outcome is!

Valence Plattform [8]
Valence is an applied Blockchain platform that can help businesses realise the tangible benefits of blockchain. You can think of Valence as a platform with which you can build Anonymous Distributed Applications (aDapps) with. But Valence is a different kind of platform that enables developers to create new types of blockchain applications. The problem with current (turing complete) dApp platforms are their complexity and rigid nature. Security holes in smart contracts and scaling issues happen frequently [9].
Valence provides transitional pathways that let businesses migrate only part of their activities to the blockchain without having to restructure their entire business model [9].
Valence will provide a spectrum of blockchain application solutions which sit along the decentralized spectrum, offering businesses simple ways to dip their toes into the blockchain at minimal risk or complexity [9].
Thanks to the proof of stake nature of the Valence blockchain, more of a node's resources can be used for processing and routing application data which makes the platform faster and scalable.
Valence aims to make building blockchain applications as accessible to the general public as WordPress or Squarespace has made building websites.
The developers NavCoin and Valence aim to make Valence extremely easy to work with:
A Valence application could be an open source mobile or web application that submits unencrypted or encrypted data directly to the blockchain. The only configuration necessary for the app developer would be setting up the data structure. Once they've done that they can start writing to the blockchain immediately.
The Valence blockchain interface is language agnostic, meaning developers are free to build applications in whichever language they're familiar with, which greatly reduces the barrier to entry.
As the platform progresses, Valence will introduce more and more smart contract templates in collaboration with the development community. These will be like plugins that users can simply select and configure for their application, without having to reinvent the wheel and risk contract errors or spend countless hours of research to program them.

NavShopper
The following information is taken from the latest weekly news: NavShopper is a new project which will allow people to spend NavCoin on a growing list of retailers and service providers. NavShopper sits between traditional retailers accepting fiat and NavCoin users and purchases products on behalf of the user by managing the crypt-fiat conversion, payment and shipping. This project will unlock many more ways for people to spend NAV on existing websites/marketplaces without requiring each site to individually accept cryptocurrencies. Some of the prototypes we are working on include crediting your Uber account, buying products on Amazon and donating to charities.

Kauri Wallet
The Kauri Wallet aims to be an open-source, multi-currency wallet which functions as a foundation for other features.

Kauri Enhanced
Enhancements to the Kauri Wallet will allow multiple accounts, pin numbers, recurring payments and more.

Kauri DAEx
The Kauri DAEx is a Decentralised Atomic Exchange that utilises the features of the Kauri Wallet and enables users to create safe peer to peer atomic exchanges for any currency supported by the Kauri Wallet. NavDelta NavDelta will be a payment gateway that allows users to spend NAV at any business which accepts currencies supported by the Kauri Wallet. NavMorph NavMorph is a fusion of Rimu and Kauri DAEx and will allow to privately send every cryptocurrency supported by the Kauri Wallet.

Outro

If you have made it this far: Congratulations! You have learned about how NAV evolved, what its current state is and what the future will bring. To sum all up: NavCoin has made incredible progress during last year and released many long awaited features despite the bear market. Many more exciting features are yet to come and it's going to be very interesting to see where we will stand on this day next year.

Giveaway

Unfortunately, the giveaway was not possible in the cryptocurrency-subreddit because of their rules, so I'm doing it here :-) As a surprise, in the next 2 hours I am going to send some NAV to everyone who wants to try out the awesome features and NavPay you read about above.
To get your NAVs, all you have to do is the following:
If you liked the experience, I'd be happy to hear back from you :)

References

[1] https://encrypt-s.com/company/
[2] https://navcoin.org/en/roadmap/
[3] https://navhub.org/get-involved/
[4] https://navhub.org/how-to-guide/
[5] https://navhub.org/assets/NavCoinDeveloperManifesto.pdf
[6] https://navhub.org/assets/NavCoinContentManifesto.pdf
[7] https://navhub.org/assets/NavCoinBrandGuidelines.pdf
[8] https://valenceplatform.org/
[9] https://valenceplatform.org/learn/business-on-the-blockchain-made-easy/
[10] https://bitcointalk.org/index.php?topic=679791.msg8320228#msg8320228
submitted by crypto_sIF to NavCoin [link] [comments]

Will Bitcoin really rise again?

Hello, I feel I should introduce myself first.
I got into Bitcoin back mid-2017. I bought in at about 1.8k if I remember correctly. I was also invested in Ethereum at this time, and got in between 60-120 (my friend sent me some at 60, but I continued to buy around 120).
As many of you know. Bitcoin has been in a bear market for the past several months. And over these past several months concerns have popped into my mind in regards to the overall health and future of Bitcoin:
None of what I mentioned above was an issue in 2013, or 2015 when we saw our previous bear markets in Bitcoin. This makes me truly believe that we're unlikely to see a bull run like we did in 2017 ever again. Not to mention the fact that Cryptocurrencies in and of themselves are more regulated than ever before, which could in turn lead to lower levels of volatility now and in the years to come. I'm sure Bitcoin will have its pops and bull runs, but nothing parabolic like we've seen in the past.

Please tell me I'm wrong, because I'd rather be wrong than right in this case.
submitted by 7Leven to Bitcoin [link] [comments]

[For Hire] MSP Documentation Specialist - Connectwise PSA/RMM & IT Glue

It has taken most of my adult life to find something I enjoy doing.That something is MSP Documentation. Having run my own MSP for 12 years and then selling it. I was then asked to look at IT Glue, something I had not heard of. That was 5 years ago & since then I have helped a number of businesses transition from anarchy to a standardised platform across all clients.
My preference is to be engaged as either a casual employee or as a contractor over a useful period of time so as to complete the undertaking of making your documentation & associated records trusted, used by staff and agile.
I see so many opportunities because very few businesses devote much time to this area yet once you start getting 10 or 15 technical staff, even small changes in efficiency make the investment insignificant.
Documentation is nearly always a "when you have some spare time" job for technical staff that is already pushed to the limit in what they can achieve in a day. So let's face it, the job within most MSPs is an afterthought & not given the attention it deserves.
The other issue is that nobody is made accountable or responsible. This position absolutely benefits from a contractor or staff member who has the responsibility for standards and training regarding the health and shape of the documentation system. They are accountable for recommending, getting the approval & that the standards are being followed.
I have a good mixture of a technical background with being a previous owner of an MSP & I have a unique point of view that complements the multitude of tasks required to overhaul how your company manages the information it holds to service clients.
Hire me & you will have access to the templates I have created over the years along with someone who has enormous enthusiasm for this area of the MSP business.
I have owned the Kaseya platform in the past, used Solar Winds however most of my experience is with the following suite of applications & they are the ones I want to continue working with.

The Issues

What Is Provided?

Results


My rate is $60 US for contract work or as a temporary employee and this is prepaid in 50/100/300/500 hour blocks (discounts in $5p/h increments)I consider myself a global resource and am not concerned about the location of head office. I have experience working with several US-based MSPs & have a US bank account & happy to also accept Bitcoin payments. Hours worked, both in volume & the times are not an issue for me. I can work synced to your hours of operation if required.
I am available immediately.

Thank you for reading.
submitted by MSP-Documentation to mspjobs [link] [comments]

An extensive list of blockchain courses, resources and articles to help you get a job working with blockchain.

u/Maximus_no and me spent some time at work collecting and analyzing learning material for blockchain development. The list contains resources for developers, as well as business analysts/consultants looking to learn more about blockchain use-cases and solutions.

Certifications and Courses

IIB Council
Link to course: IIB council : Certified Blockchain Professional
C|BP is an In-Depth, Industry Agnostic, Hands-On Training and Certification Course specifically tailored for Industry Professionals and Developers interested in implementing emerging technologies in the Data-Driven Markets and Digitized Economies.
The IIB Council Certified Blockchain Professional (C|BP) Course was developed to help respective aspiring professionals gain excessive knowledge in Blockchain technology and its implication on businesses.
WHO IS IT FOR:

Professionals

C|BP is developed in line with the latest industry trends to help current and aspiring Professionals evolve in their career by implementing the latest knowledge in blockchain technology. This course will help professionals understand the foundation of Blockchain technology and the opportunities this emerging technology is offering.

Developers

If you are a Developer and you are willing to learn blockchain technology this course is for you. You will learn to build and model Blockchain solutions and Blockchain-based applications for enterprises and businesses in multiple Blockchain Technologies.

Certified Blockchain Business Foundations (CBBF)

This exam is designed for non-technical business professionals who require basic knowledge about Blockchain and how it will be executed within an organization. This exam is NOT appropriate for technology professionals seeking to gain deeper understanding of Blockchain technology implementation or programming.

A person who holds this certification demonstrates their knowledge of:

· What is Blockchain? (What exactly is it?)
· Non-Technical Technology Overview (How does it work?)
· Benefits of Blockchain (Why should anyone consider this?)
· Use Cases (Where and for what apps is it appropriate?)
· Adoption (Who is using it and for what?)
· Future of Blockchain (What is the future?)

Certified Blockchain Solution Architect (CBSA)

A person who holds this certification demonstrates their ability to:

· Architect blockchain solutions
· Work effectively with blockchain engineers and technical leaders
· Choose appropriate blockchain systems for various use cases
· Work effectively with both public and permissioned blockchain systems

This exam will prove that a student completely understands:

· The difference between proof of work, proof of stake, and other proof systems and why they exist
· Why cryptocurrency is needed on certain types of blockchains
· The difference between public, private, and permissioned blockchains
· How blocks are written to the blockchain
· Where cryptography fits into blockchain and the most commonly used systems
· Common use cases for public blockchains
· Common use cases for private & permissioned blockchains
· What is needed to launch your own blockchain
· Common problems & considerations in working with public blockchains
· Awareness of the tech behind common blockchains
· When is mining needed and when it is not
· Byzantine Fault Tolerance
· Consensus among blockchains
· What is hashing
· How addresses, public keys, and private keys work
· What is a smart contract
· Security in blockchain
· Brief history of blockchain
· The programming languages of the most common blockchains
· Common testing and deployment practices for blockchains and blockchain-based apps

Certified Blockchain Developer - Ethereum (CBDE)

A person who holds this certification demonstrates their ability to:

· Plan and prepare production ready applications for the Ethereum blockchain
· Write, test, and deploy secure Solidity smart contracts
· Understand and work with Ethereum fees
· Work within the bounds and limitations of the Ethereum blockchain
· Use the essential tooling and systems needed to work with the Ethereum ecosystem

This exam will prove that a student completely understands how to:

· Implement web3.js
· Write and compile Solidity smart contracts
· Create secure smart contracts
· Deploy smart contracts both the live and test Ethereum networks
· Calculate Ethereum gas costs
· Unit test smart contracts
· Run an Ethereum node on development machines

Princeton: Sixty free lectures from Princeton on bitcoin and cryptocurrencies. Avg length ~15 mins

Basic course with focus on Bitcoin. After this course, you’ll know everything you need to be able to separate fact from fiction when reading claims about Bitcoin and other cryptocurrencies. You’ll have the conceptual foundations you need to engineer secure software that interacts with the Bitcoin network. And you’ll be able to integrate ideas from Bitcoin in your own projects.

MIT : BLOCKCHAIN TECHNOLOGIES: BUSINESS INNOVATION AND APPLICATION

· A mid / basic understanding of blockchain technology and its long-term implications for business, coupled with knowledge of its relationship to other emerging technologies such as AI and IoT
· An economic framework for identifying blockchain-based solutions to challenges within your own context, guided by the knowledge of cryptoeconomics expert Christian Catalini
· Recognition of your newfound blockchain knowledge in the form of a certificate of completion from the MIT Sloan School of Management — one of the world’s leading business schools
Orientation Module: Welcome to Your Online Campus
Module 1: An introduction to blockchain technology
Module 2: Bitcoin and the curse of the double-spending problem
Module 3: Costless verification: Blockchain technology and the last mile problem
Module 4: Bootstrapping network effects through blockchain technology and cryptoeconomics
Module 5: Using tokens to design new types of digital platforms
Module 6: The future of blockchain technology, AI, and digital privacy

Oxford Blockchain Strategy Programme

· A mid / basic understanding of what blockchain is and how it works, as well as insights into how it will affect the future of industry and of your organization.
· The ability to make better strategic business decisions by utilizing the Oxford Blockchain Strategic framework, the Oxford Blockchain Regulation framework, the Oxford Blockchain Ecosystem map, and drawing on your knowledge of blockchain and affiliated industries and technologies.
· A certificate of attendance from Oxford Saïd as validation of your newfound blockchain knowledge and skills, as well as access to a global network of like-minded business leaders and innovators.
Module 1: Understanding blockchain
Module 2: The blockchain ecosystem
Module 3: Innovations in value transfer
Module 4: Decentralized apps and smart contracts
Module 5: Transforming enterprise business models
Module 6: Blockchain frontiers

Resources and Articles

Introduction to Distributed Ledger Technologies (DLT) https://www.ibm.com/developerworks/cloud/library/cl-blockchain-basics-intro-bluemix-trs/
Tomas’s Personal Favourite: 150+ Resources for going from web-dev to blockchain engineer https://github.com/benstew/blockchain-for-software-engineers
Hyperledger Frameworks Hyperledger is widely regarded as the most mature open-source framework for building private & permissioned blockchains.
Tutorials: https://www.hyperledger.org/resources/training
R3 Corda Open-source developer frameworks for building private, permissioned blockchains. A little better than Hyperledger on features like privacy and secure channels. Used mostly in financial applications.
Ethereum, Solidity, dApps and Smart-Contracts
Ethereum & Solidity Course (favourite): https://www.udemy.com/ethereum-and-solidity-the-complete-developers-guide/
An Introduction to Ethereum’s Token Standards: https://medium.com/coinmonks/anatomy-of-an-erc-an-exhaustive-survey-8bc1a323b541
How To Create Your First ERC20 Token: https://medium.com/bitfwd/how-to-do-an-ico-on-ethereum-in-less-than-20-minutes-a0062219374
Ethereum Developer Tools [Comprehensive List]: https://github.com/ConsenSys/ethereum-developer-tools-list/blob/masteREADME.md
CryptoZombies – Learn to code dApps through game-development: https://cryptozombies.io/
Intro to Ethereum Development: https://hackernoon.com/ethereum-development-walkthrough-part-1-smart-contracts-b3979e6e573e
Notes from Consensys Academy Participant (free): https://github.com/ScottWorks/ConsenSys-Academy-Notes
AWS Ethereum Templates: https://aws.amazon.com/blogs/aws/get-started-with-blockchain-using-the-new-aws-blockchain-templates/
Create dApps with better user-experience: https://blog.hellobloom.io/how-to-make-a-user-friendly-ethereum-dapp-5a7e5ea6df22
Solidity YouTube Course: https://www.youtube.com/channel/UCaWes1eWQ9TbzA695gl_PtA
[UX &UI] Designing a decentralized profile dApp: https://uxdesign.cc/designing-a-decentralized-profile-dapp-ab12ead4ab56
Scaling Solutions on Ethereum: https://media.consensys.net/the-state-of-scaling-ethereum-b4d095dbafae
Different Platforms for dApps and Smart-Contracts
While Ethereum is the most mature dApp framework with both the best developer tools, resources and community, there are other public blockchain platforms. Third generation blockchains are trying to solve Ethereum’s scaling and performance issues. Here is an overview of dApp platforms that can be worth looking into:
NEO - https://neo.org/ The second most mature dApp platform. NEO has better scalability and performance than Ethereum and has 1’000 TPS to ETH’s 15 by utilizing a dBFT consensus algorithm. While better infrastructure, NEO does not have the maturity of Ethereum’s developer tools, documentation and community.
A writeup on why a company chose to develop on NEO and not Ethereum: https://medium.com/orbismesh/why-we-chose-neo-over-ethereum-37fc9208ffa0
Cardano - https://www.cardano.org/en/home/ While still in alpha with a long and ambitious roadmap ahead of it, Cardano is one of the most anticipated dApp platforms out there. IOHK, the research and engineering company that maintains Cardano, has listed a lot of great resources and scientific papers that is worth looking into.
An Intro to Cardano: https://hackernoon.com/cardano-ethereum-and-neo-killer-or-overhyped-and-overpriced-8fcd5f8abcdf
IOHK Scientific Papers - https://iohk.io/research/papers/
Stellar - https://www.stellar.org/ If moving value fast from one party to another by using smart-contracts is the goal, Stellar Lumens is your platform. Initially as an open-source fork from Ripple, Stellar has become one of the mature frameworks for financial applications. Stellar’s focus lies in interoperability with legacy financial systems and cheap/fast value transfer. It’s smart-contract capability is rather limited in comparison to Ethereum and HyperLedger, so take that in consideration.
Ripplewww.ripple.com Ripple and its close cousin, Stellar, is two of the most well-known cryptocurrencies and DLT frameworks meant for the financial sector. Ripple enables instant settlement between banks for international transactions.

Consensus Algorithms

[Proof of Work] - very short, cuz it's well-known.
[1] Bitcoin - to generate a new block miner must generate hash of the new block header that is in line with given requirements.
Others: Ethereum, Litecoin etc.
[Hybrid of PoW and PoS]
[2] Decred - hybrid of “proof of work” and “proof of stake”. Blocks are created about every 5 minutes. Nodes in the network looking for a solution with a known difficulty to create a block (PoW). Once the solution is found it is broadcast to the network. The network then verifies the solution. Stakeholders who have locked some DCR in return for a ticket* now have the chance to vote on the block (PoS). 5 tickets are chosen pseudo-randomly from the ticket pool and if at least 3 of 5 vote ‘yes’ the block is permanently added to the blockchain. Both miners and voters are compensated with DCR : PoS - 30% and PoW - 60% of about 30 new Decred issued with a block. * 1 ticket = ability to cast 1 vote. Stakeholders must wait an average of 28 days (8,192 blocks) to vote their tickets.
[Proof of Stake]
[3] Nxt - The more tokens are held by account, the greater chance that account will earn the right to generate a block. The total reward received as a result of block generation is the sum of the transaction fees located within the block. Three values are key to determining which account is eligible to generate a block, which account earns the right to generate a block, and which block is taken to be the authoritative one in times of conflict: base target value, target value and cumulative difficulty. Each block on the chain has a generation signature parameter. To participate in the block's forging process, an active account digitally signs the generation signature of the previous block with its own public key. This creates a 64-byte signature, which is then hashed using SHA256. The first 8 bytes of the resulting hash are converted to a number, referred to as the account hit. The hit is compared to the current target value(active balance). If the computed hit is lower than the target, then the next block can be generated.
[4] Peercoin (chain-based proof of stake) - coin age parameter. Hybrid PoW and PoS algorithm. The longer your Peercoins have been stationary in your account (to a maximum of 90 days), the more power (coin age) they have to mint a block. The act of minting a block requires the consumption of coin age value, and the network determines consensus by selecting the chain with the largest total consumed coin age. Reward - minting + 1% yearly.
[5] Reddcoin (Proof of stake Velocity) - quite similar to Peercoin, difference: not linear coin-aging function (new coins gain weight quickly, and old coins gain weight increasingly slowly) to encourage Nodes Activity. Node with most coin age weight have a bigger chance to create block. To create block Node should calculate right hash. Block reward - interest on the weighted age of coins/ 5% annual interest in PoSV phase.
[6] Ethereum (Casper) - uses modified BFT consensus. Blocks will be created using PoW. In the Casper Phase 1 implementation for Ethereum, the “proposal mechanism" is the existing proof of work chain, modified to have a greatly reduced block reward. Blocks will be validated by set of Validators. Block is finalised when 2/3 of validators voted for it (not the number of validators is counted, but their deposit size). Block creator rewarded with Block Reward + Transaction FEES.
[7] Lisk (Delegated Proof-of-stake) - Lisk stakeholders vote with vote transaction (the weight of the vote depends on the amount of Lisk the stakeholder possess) and choose 101 Delegates, who create all blocks in the blockchain. One delegate creates 1 block within 1 round (1 round contains 101 blocks) -> At the beginning of each round, each delegate is assigned a slot indicating their position in the block generation process -> Delegate includes up to 25 transactions into the block, signs it and broadcasts it to the network -> As >51% of available peers agreed that this block is acceptable to be created (Broadhash consensus), a new block is added to the blockchain. *Any account may become a delegate, but only accounts with the required stake (no info how much) are allowed to generate blocks. Block reward - minted Lisks and transaction fees (fees for all 101 blocks are collected firstly and then are divided between delegates). Blocks appears every 10 sec.
[8] Cardano (Ouroboros Proof of Stake) - Blocks(slots) are created by Slot Leaders. Slot Leaders for N Epoch are chosen during n-1 Epoch. Slot Leaders are elected from the group of ADA stakeholders who have enough stake. Election process consist of 3 phases: Commitment phase: each elector generates a random value (secret), signs it and commit as message to network (other electors) saved in to block. -> Reveal phase: Each elector sends special value to open a commitment, all this values (opening) are put into the block. -> Recovery phase: each elector verifies that commitments and openings match and extracts the secrets and forms a SEED (randomly generated bytes string based on secrets). All electors get the same SEED. -> Follow the Satoshi algorithm : Elector who have coin which corresponded to SEED become a SLOT LEADER and get a right to create a block. Slot Leader is rewarded with minted ADA and transactions Fee.
[9] Tezos (Proof Of Stake) - generic and self-amending crypto-ledger. At the beginning of each cycle (2048 blocks), a random seed is derived from numbers that block miners chose and committed to in the penultimate cycle, and revealed in the last. -> Using this random seed, a follow the coin strategy (similar to Follow The Satoshi) is used to allocate mining rights and signing rights to stakeholders for the next cycle*. -> Blocks are mined by a random stakeholder (the miner) and includes multiple signatures of the previous block provided by random stakeholders (the signers). Mining and signing both offer a small reward but also require making a one cycle safety deposit to be forfeited in the event of a double mining or double signing.
· the more coins (rolls) you have - the more your chance to be a minesigner.
[10] Tendermint (Byzantine Fault Tolerance) - A proposal is signed and published by the designated proposer at each round. The proposer is chosen by a deterministic and non-choking round robin selection algorithm that selects proposers in proportion to their voting power. The proposer create the block, that should be validated by >2/3 of Validators, as follow: Propose -> Prevote -> Precommit -> Commit. Proposer rewarded with Transaction FEES.
[11] Tron (Byzantine Fault Tolerance) - This blockhain is still on development stage. Consensus algorithm = PoS + BFT (similar to Tendermint): PoS algorithm chooses a node as Proposer, this node has the power to generate a block. -> Proposer broadcasts a block that it want to release. -> Block enters the Prevote stage. It takes >2/3 of nodes' confirmations to enter the next stage. -> As the block is prevoted, it enters Precommit stage and needs >2/3 of node's confirmation to go further. -> As >2/3 of nodes have precommited the block it's commited to the blockchain with height +1. New blocks appears every 15 sec.
[12] NEO (Delegated Byzantine Fault Tolerance) - Consensus nodes* are elected by NEO holders -> The Speaker is identified (based on algorithm) -> He broadcasts proposal to create block -> Each Delegate (other consensus nodes) validates proposal -> Each Delegate sends response to other Delegates -> Delegate reaches consensus after receiving 2/3 positive responses -> Each Delegate signs the block and publishes it-> Each Delegate receives a full block. Block reward 6 GAS distributed proportionally in accordance with the NEO holding ratio among NEO holders. Speaker rewarded with transaction fees (mostly 0). * Stake 1000 GAS to nominate yourself for Bookkeeping(Consensus Node)
[13] EOS (Delegated Proof of Stake) - those who hold tokens on a blockchain adopting the EOS.IO software may select* block producers through a continuous approval voting system and anyone may choose to participate in block production and will be given an opportunity to produce blocks proportional to the total votes they have received relative to all other producers. At the start of each round 21 unique block producers are chosen. The top 20 by total approval are automatically chosen every round and the last producer is chosen proportional to their number of votes relative to other producers. Block should be confirmed by 2/3 or more of elected Block producers. Block Producer rewarded with Block rewards. *the more EOS tokens a stakeholder owns, the greater their voting power
[The XRP Ledger Consensus Process]
[14] Ripple - Each node receives transaction from external applications -> Each Node forms public list of all valid (not included into last ledger (=block)) transactions aka (Candidate Set) -> Nodes merge its candidate set with UNLs(Unique Node List) candidate sets and vote on the veracity of all transactions (1st round of consensus) -> all transactions that received at least 50% votes are passed on the next round (many rounds may take place) -> final round of consensus requires that min 80% of Nodes UNL agreeing on transactions. It means that at least 80% of Validating nodes should have same Candidate SET of transactions -> after that each Validating node computes a new ledger (=block) with all transactions (with 80% UNL agreement) and calculate ledger hash, signs and broadcasts -> All Validating nodes compare their ledgers hash -> Nodes of the network recognize a ledger instance as validated when a 80% of the peers have signed and broadcast the same validation hash. -> Process repeats. Ledger creation process lasts 5 sec(?). Each transaction includes transaction fee (min 0,00001 XRP) which is destroyed. No block rewards.
[The Stellar consensus protocol]
[15] Stellar (Federated Byzantine Agreement) - quite similar to Ripple. Key difference - quorum slice.
[Proof of Burn]
[16] Slimcoin - to get the right to write blocks Node should “burn” amount of coins. The more coins Node “burns” more chances it has to create blocks (for long period) -> Nodes address gets a score called Effective Burnt Coins that determines chance to find blocks. Block creator rewarded with block rewards.
[Proof of Importance]
[17] NEM - Only accounts that have min 10k vested coins are eligible to harvest (create a block). Accounts with higher importance scores have higher probabilities of harvesting a block. The higher amount of vested coins, the higher the account’s Importance score. And the higher amount of transactions that satisfy following conditions: - transactions sum min 1k coins, - transactions made within last 30 days, - recipient have 10k vested coins too, - the higher account’s Important score. Harvester is rewarded with fees for the transactions in the block. A new block is created approx. every 65 sec.
[Proof of Devotion]
[18] Nebulas (Proof of Devotion + BFT) - quite similar to POI, the PoD selects the accounts with high influence. All accounts are ranked according to their liquidity and propagation (Nebulas Rank) -> Top-ranked accounts are selected -> Chosen accounts pay deposit and are qualified as the blocks Validators* -> Algorithm pseudo-randomly chooses block Proposer -> After a new block is proposed, Validators Set (each Validator is charged a deposit) participate in a round of BFT-Style voting to verify block (1. Prepare stage -> 2. Commit Stage. Validators should have > 2/3 of total deposits to validate Block) -> Block is added. Block rewards : each Validator rewarded with 1 NAS. *Validators Set is dynamic, changes in Set may occur after Epoch change.
[IOTA Algorithm]
[19] IOTA - uses DAG (Directed Acyclic Graph) instead of blockchain (TANGLE equal to Ledger). Graph consist of transactions (not blocks). To issue a new transaction Node must approve 2 random other Transactions (not confirmed). Each transaction should be validate n(?) times. By validating PAST(2) transactions whole Network achieves Consensus. in Order to issue transaction Node: 1. Sign transaction with private key 2. choose two other Transactions to validate based on MCMC(Markov chain Monte Carlo) algorithm, check if 2 transactions are valid (node will never approve conflicting transactions) 3. make some PoW(similar to HashCash). -> New Transaction broadcasted to Network. Node don’t receive reward or fee.
[PBFT + PoW]
[20] Yobicash - uses PBFT and also PoW. Nodes reach consensus on transactions by querying other nodes. A node asks its peers about the state of a transaction: if it is known or not, and if it is a doublespending transaction or not. As follow : Node receives new transaction -> Checks if valid -> queries all known nodes for missing transactions (check if already in DAG ) -> queries 2/3 nodes for doublepsending and possibility -> if everything is ok add to DAG. Reward - nodes receive transaction fees + minting coins.
[Proof of Space/Proof of Capacity]
[21] Filecoin (Power Fault Tolerance) - the probability that the network elects a miner(Leader) to create a new block (it is referred to as the voting power of the miner) is proportional to storage currently in use in relation to the rest of the network. Each node has Power - storage in use verified with Proof of Spacetime by nodes. Leaders extend the chain by creating a block and propagating it to the network. There can be an empty block (when no leader). A block is committed if the majority of the participants add their weight on the chain where the block belongs to, by extending the chain or by signing blocks. Block creator rewarded with Block reward + transaction fees.
[Proof of Elapsed Time (POET)]
[22] Hyperledger Sawtooth - Goal - to solve BFT Validating Nodes limitation. Works only with intel’s SGX. PoET uses a random leader election model or a lottery based election model based on SGX, where the protocol randomly selects the next leader to finalize the block. Every validator requests a wait time from an enclave (a trusted function). -> The validator with the shortest wait time for a particular transaction block is elected the leader. -> The BlockPublisher is responsible for creating candidate blocks to extend the current chain. He takes direction from the consensus algorithm for when to create a block and when to publish a block. He creates, Finalizes, Signs Block and broadcast it -> Block Validators check block -> Block is created on top of blockchain.
[23] Byteball (Delegated Byzantine Fault Tolerance) - only verified nodes are allowed to be Validation nodes (list of requirements https://github.com/byteball/byteball-witness). Users choose in transaction set of 12 Validating nodes. Validating nodes(Witnesses) receive transaction fees.
[24] Nano - uses DAG, PoW (HashCash). Nano uses a block-lattice structure. Each account has its own blockchain (account-chain) equivalent to the account’s transaction/balance history. To add transaction user should make some HashCash PoW -> When user creates transaction Send Block appears on his blockchain and Receive block appears on Recipients blockchain. -> Peers in View receive Block -> Peers verify block (Double spending and check if already in the ledger) -> Peers achieve consensus and add block. In case of Fork (when 2 or more signed blocks reference the same previous block): Nano network resolves forks via a balance-weighted voting system where representative nodes vote for the block they observe, as >50% of weighted votes received, consensus achieved and block is retained in the Node’s ledger (block that lose the vote is discarded).
[25] Holochain - uses distributed hash table (DHT). Instead of trying to manage global consensus for every change to a huge blockchain ledger, every participant has their own signed hash chain. In case of multi-party transaction, it is signed to each party's chain. Each party signs the exact same transaction with links to each of their previous chain entries. After data is signed to local chains, it is shared to a DHT where every neighbor node validate it. Any consensus algorithms can be built on top of Holochain.
[26] Komodo ('Delegated' Delayed Proof of Work (dPoW)) - end-to-end blockchain solutions. DPoW consensus mechanism does not recognize The Longest Chain Rule to resolve a conflict in the network, instead the dPoW looks to backups it inserted previously into the chosen PoW blockchain. The process of inserting backups of Komodo transactions into a secure PoW is “notarization.” Notarisation is performed by the elected Notary nodes. Roughly every ten minutes, the Notary nodes perform a special block hash mined on the Komodo blockchain and take note of the overall Komodo blockchain “height”. The notary nodes process this specifc block so that their signatures are cryptographically included within the content of the notarized data. There are sixty-four “Notary nodes” elected by a stake-weighted vote, where ownership of KMD represents stake in the election. They are a special type of blockchain miner, having certain features in their underlying code that enable them to maintain an effective and cost-efcient blockchain and they periodically receives the privilege to mine a block on “easy difculty.”
Source: https://www.reddit.com/CryptoTechnology/comments/7znnq8/my_brief_observation_of_most_common_consensus/
Whitepapers Worth Looking Into:
IOTA -http://iotatoken.com/IOTA_Whitepaper.pdf
NANO -https://nano.org/en/whitepaper
Bitcoin -https://bitcoin.org/bitcoin.pdf
Ethereum: https://github.com/ethereum/wiki/wiki/White-Paper
Ethereum Plasma (Omise-GO) -https://plasma.io/plasma.pdf
Cardano - https://eprint.iacr.org/2016/889.pdf
submitted by heart_mind_body to CryptoCurrency [link] [comments]

What is inside a Bitcoin block? Programmer explains. How Bitcoin Works in 5 Minutes. (Technical) How To Create BlockChain Bitcoin Bitcoin and cryptocurrency mining explained - YouTube How Does Bitcoin Work? - YouTube

The mining software constructs a block using the template (described below) and creates a block header. It then sends the 80-byte block header to its mining hardware (an ASIC) along with a target threshold (difficulty setting). The mining hardware iterates through every possible value for the block header nonce and generates the corresponding hash. If none of the hashes are below the threshold ... bitcoin-cli RPC 命令总结. 当我们安装好bitcoin客户端之后,会自己在家目录下面生成一个.bitcoin文件,然后我们可以在这个目录下面建议一个配置文件,形如:. rpcuser=rpc rpcpassword=xxxxxxx rpcport=18332 daemon=1 server=1 testnet=1 whitelist=1.1.1.1 rpcallowip=1.1.1.1 difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn’t one (1) Since the value of this field must be 1, its size is effectively fixed at 1 byte. (2) The coinbase field has an enforced minimum size of 100 bytes. Also, block construction typically reserves some space for the coinbase. For example, in the Bitcoin Cash Node software a maximum of 1000 bytes are reserved for the coinbase by default - this ... The Bitcoin.com Explorer provides block, transaction, and address data for the Bitcoin Cash (BCH) and Bitcoin (BTC) chains. The data is displayed within an awesome interface and is available in several different languages.

[index] [46497] [35237] [247] [16460] [30299] [27014] [21029] [17268] [49568] [25309]

What is inside a Bitcoin block? Programmer explains.

WARNING! BITCOIN MAY CRASH SOON! DON'T GET TRAPPED! I Trade Bitcoin for a living, to me Bitcoin Price looks bearish! BULLTRAP! Todays Crypto News consists of Block One, the inventors of EOS ... What it really takes to mine a Bitcoin in 10 Minutes. Firstly I'll show you a special free method to mine Bitcoin and send funds directly to your wallet in 1... Thanks to Away for sponsoring this video! Go to https://www.awaytravel.com/techquickie and use promo code techquickie to get $20 off your next order! Bitcoin... How To Create BlockChain Bitcoin Tel : +821049644992 bitcoin, swiscoin cambodia, cryptocurrency list, onecoin cambodia, swiscoin, cryptocurrency values, cryptocurrency market, cryptocurrency news ... Squarespace link: Visit http://squarespace.com/techquickie and use offer code TECHQUICKIE to save 10% off your first order. Why did Bitcoin's value crash aft...

#