Running Bitcoind – BitcoinWiki

Why Bitcoin is a long shot: an algorithmic explanation

Boolean willBitcoinWork() { if !is_outlawed if is_convenient if is_safe if is_accepted_by_merchants if !is_over_regulated if !is_51_percent_takeover if !is_diluted_by_altcoins if !is_replaced_by_FED if is_scalable if !is_hacked if !is_created_by_NSA if !is_other_fatal_flaw return BITCOIN_SUCCESS else return BITCOIN_FAIL } 
That's a lot of nested IFs. In probabilistic terms, the outcome of these dependencies is expressed as not the sum, but the product of individual events. As an example, if we define each of these conditions as probability .5, the chances that Bitcoin will ultimately work are ony 1 in 212 or 1 in 4096.
submitted by wonderkindel to Bitcoin [link] [comments]

05-14 20:43 - 'Well it's a boolean question. So you're for SegWit (enabling LN) then? / In such case, no need for bigger blocks.' by /u/metalzip removed from /r/Bitcoin within 1-11min

'''
Well it's a boolean question. So you're for SegWit (enabling LN) then?
In such case, no need for bigger blocks.
'''
Context Link
Go1dfish undelete link
unreddit undelete link
Author: metalzip
submitted by removalbot to removalbot [link] [comments]

test

Boolean willBitcoinWork() { if !is_outlawed if is_convenient if is_safe if is_accepted_by_merchants if !is_over_regulated if !is_51_percent_takeover if !is_diluted_by_altcoins if !is_replaced_by_FED if is_scalable if !is_hacked if !is_created_by_NSA if !is_other_fatal_flaw return BITCOIN_SUCCESS else return BITCOIN_FAIL }
submitted by wonderkindel to reddit_api_test [link] [comments]

test

Boolean willBitcoinWork() { if !is_outlawed if is_convenient if is_safe if is_accepted_by_merchants if !is_over_regulated if !is_51_percent_takeover if !is_diluted_by_altcoins if !is_replaced_by_FED if is_scalable if !is_hacked if !is_created_by_NSA if !is_other_fatal_flaw return BITCOIN_SUCCESS else return BITCOIN_FAIL } 
That's a lot of nested IFs.
submitted by wonderkindel to test [link] [comments]

test

Boolean willBitcoinWork()
{
if !is_outlawed
if is_convenient
if is_safe if is_accepted_by_merchants if !is_over_regulated if !is_51_percent_takeover if !is_diluted_by_altcoins if !is_replaced_by_FED if is_scalable if !is_hacked if !is_created_by_NSA if !is_other_fatal_flaw return BITCOIN_SUCCESS 
else
return BITCOIN_FAIL
}
That's a lot of nested IFs.
submitted by wonderkindel to test [link] [comments]

Unable to keep elements preserved in a vector after a boolean "do while" loop

I'm going to give reddit a shot since I didn't receive any response from StackOverflow.
I am in a process of making a bitcoin managing program for an intro CS class and here are my objectives (only mentioned ones that I need in this context): I have managed to complete the following objectives. My program has 4 menu options stored in class menu. The user can choose from the following:
  1. Find current Bitcoin value in USD
  2. Buy/sell Bitcoin
  3. Print current balance
  4. Print history of transactions
Let's say the user selections option 2 and inputs how much user wants to sell or buy. The program will so far do the following:
Currently I am having trouble with the following step:
So far, I've tried creating a vector and I tried using push_back.() every time the function is called.
class ledger // the log of all transactions //1) It will store the transaction strings just so we have //a record of the buy sell commands //2) It will be able to print out the transaction history if requested { public: vector bitcoin; void bitcoinHistory(string bitcoinAmnt, string date) { string btc, time; btc = bitcoinAmnt; time = date; bitcoin.push_back(btc + "BTC on " + time); for (unsigned int x = 0; x < bitcoin.size(); x++) { cout << bitcoin[x] << endl; } repeat = true; \\ boolean returns the user back to main menu 
```
A sample result from cout << bitcoin[x] I am successfully able to get: 0.035349BTC on Wed Mar 25 01:44:02 2020
However, once the program is looped, the previous transactions don't seem to save and the element seems to be replaced with the newer transaction data. Despite multiple transactions, the bitcoin.size() seems to be resetting, and I only see an output of a single transaction history only. I am not able to figure out why. If you'd like to see more part of the code, please let me know. Thank you.
submitted by I_need_2_learn_math to cpp_questions [link] [comments]

How to verify a signed message in bitcoinj?

Link to bitcoin stack exchange: https://bitcoin.stackexchange.com/questions/92406/how-to-verify-a-signed-message-in-bitcoinj

I want to verify, in Java, a signature produced with bitcoin core's signmessagewithprivkey (equivalent to the verifymessage). I noticed a bitcoinj method similar to the bitcoin core's verifymessage - org.bitcoinj.core.ECKey.verify. What follows is my implementation attempt and its test.
For testing I will generate a signature and check it in bitcoin core:
>bitcoin-cli signmessagewithprivkey $(bitcoin-cli dumpprivkey 1CwKH9PQPkFPjQagEv483FUM5ngk57L3Pp) "" H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic= > bitcoin-cli verifymessage "1CwKH9PQPkFPjQagEv483FUM5ngk57L3Pp" "H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic=" "" true 
So, signing an empty message with the RPC using the address 1CwKH9PQPkFPjQagEv483FUM5ngk57L3Pp (public key: 021c3be5fb7820c56d881ea2d02a906d87540ec8888bbe819b7abd2e39f6f6e512), produces the signature H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic=.
My Java implementation attempt:
import org.apache.commons.codec.binary.Hex; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Sha256Hash; import java.math.BigInteger; import java.util.Base64; public class Notebook { public static BigInteger[] ParseSig(byte[] sigBytes, int sigOff) { BigInteger r = new BigInteger( 1 ,sigBytes, sigOff, 32); BigInteger s = new BigInteger( 1, sigBytes, sigOff + 32, 32); return new BigInteger[] { r, s }; } public static void main(String[] args) throws Exception{ // Signature String signatureString = "H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic="; byte[] signatureBytes = Base64.getDecoder().decode(signatureString); BigInteger[] signatureRandS = ParseSig(signatureBytes, 1); ECKey.ECDSASignature signature = new ECKey.ECDSASignature(signatureRandS[0], signatureRandS[1]); // Public key String pubKeyString = "021c3be5fb7820c56d881ea2d02a906d87540ec8888bbe819b7abd2e39f6f6e512"; byte[] decodedPubKeyString = Hex.decodeHex(pubKeyString.toCharArray()); ECKey publicKey = ECKey.fromPublicOnly(decodedPubKeyString); // Message String message = "Bitcoin Signed Message:\n"; Sha256Hash messageHash = Sha256Hash.of(message.getBytes()); Sha256Hash messageDoubleHash = Sha256Hash.of(messageHash.getBytes()); // Test boolean result = publicKey.verify(messageDoubleHash, signature); System.out.println("Result: " + result); } } 
Notice that I used the salt Bitcoin Signed Message:\n before hashing the message - this is done by signmessagewithprivkey as shown here and here. The problem is the above implementation doesn't pass my test and I don't know why...
submitted by johnturtle to BitcoinBeginners [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]

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]

Groestlcoin 6th Anniversary Release

Introduction

Dear Groestlers, it goes without saying that 2020 has been a difficult time for millions of people worldwide. The groestlcoin team would like to take this opportunity to wish everyone our best to everyone coping with the direct and indirect effects of COVID-19. Let it bring out the best in us all and show that collectively, we can conquer anything.
The centralised banks and our national governments are facing unprecedented times with interest rates worldwide dropping to record lows in places. Rest assured that this can only strengthen the fundamentals of all decentralised cryptocurrencies and the vision that was seeded with Satoshi's Bitcoin whitepaper over 10 years ago. Despite everything that has been thrown at us this year, the show must go on and the team will still progress and advance to continue the momentum that we have developed over the past 6 years.
In addition to this, we'd like to remind you all that this is Groestlcoin's 6th Birthday release! In terms of price there have been some crazy highs and lows over the years (with highs of around $2.60 and lows of $0.000077!), but in terms of value– Groestlcoin just keeps getting more valuable! In these uncertain times, one thing remains clear – Groestlcoin will keep going and keep innovating regardless. On with what has been worked on and completed over the past few months.

UPDATED - Groestlcoin Core 2.18.2

This is a major release of Groestlcoin Core with many protocol level improvements and code optimizations, featuring the technical equivalent of Bitcoin v0.18.2 but with Groestlcoin-specific patches. On a general level, most of what is new is a new 'Groestlcoin-wallet' tool which is now distributed alongside Groestlcoin Core's other executables.
NOTE: The 'Account' API has been removed from this version which was typically used in some tip bots. Please ensure you check the release notes from 2.17.2 for details on replacing this functionality.

How to Upgrade?

Windows
If you are running an older version, shut it down. Wait until it has completely shut down (which might take a few minutes for older versions), then run the installer.
OSX
If you are running an older version, shut it down. Wait until it has completely shut down (which might take a few minutes for older versions), run the dmg and drag Groestlcoin Core to Applications.
Ubuntu
http://groestlcoin.org/forum/index.php?topic=441.0

Other Linux

http://groestlcoin.org/forum/index.php?topic=97.0

Download

Download the Windows Installer (64 bit) here
Download the Windows Installer (32 bit) here
Download the Windows binaries (64 bit) here
Download the Windows binaries (32 bit) here
Download the OSX Installer here
Download the OSX binaries here
Download the Linux binaries (64 bit) here
Download the Linux binaries (32 bit) here
Download the ARM Linux binaries (64 bit) here
Download the ARM Linux binaries (32 bit) here

Source

ALL NEW - Groestlcoin Moonshine iOS/Android Wallet

Built with React Native, Moonshine utilizes Electrum-GRS's JSON-RPC methods to interact with the Groestlcoin network.
GRS Moonshine's intended use is as a hot wallet. Meaning, your keys are only as safe as the device you install this wallet on. As with any hot wallet, please ensure that you keep only a small, responsible amount of Groestlcoin on it at any given time.

Features

Download

iOS
Android

Source

ALL NEW! – HODL GRS Android Wallet

HODL GRS connects directly to the Groestlcoin network using SPV mode and doesn't rely on servers that can be hacked or disabled.
HODL GRS utilizes AES hardware encryption, app sandboxing, and the latest security features to protect users from malware, browser security holes, and even physical theft. Private keys are stored only in the secure enclave of the user's phone, inaccessible to anyone other than the user.
Simplicity and ease-of-use is the core design principle of HODL GRS. A simple recovery phrase (which we call a Backup Recovery Key) is all that is needed to restore the user's wallet if they ever lose or replace their device. HODL GRS is deterministic, which means the user's balance and transaction history can be recovered just from the backup recovery key.

Features

Download

Main Release (Main Net)
Testnet Release

Source

ALL NEW! – GroestlcoinSeed Savior

Groestlcoin Seed Savior is a tool for recovering BIP39 seed phrases.
This tool is meant to help users with recovering a slightly incorrect Groestlcoin mnemonic phrase (AKA backup or seed). You can enter an existing BIP39 mnemonic and get derived addresses in various formats.
To find out if one of the suggested addresses is the right one, you can click on the suggested address to check the address' transaction history on a block explorer.

Features

Live Version (Not Recommended)

https://www.groestlcoin.org/recovery/

Download

https://github.com/Groestlcoin/mnemonic-recovery/archive/master.zip

Source

ALL NEW! – Vanity Search Vanity Address Generator

NOTE: NVidia GPU or any CPU only. AMD graphics cards will not work with this address generator.
VanitySearch is a command-line Segwit-capable vanity Groestlcoin address generator. Add unique flair when you tell people to send Groestlcoin. Alternatively, VanitySearch can be used to generate random addresses offline.
If you're tired of the random, cryptic addresses generated by regular groestlcoin clients, then VanitySearch is the right choice for you to create a more personalized address.
VanitySearch is a groestlcoin address prefix finder. If you want to generate safe private keys, use the -s option to enter your passphrase which will be used for generating a base key as for BIP38 standard (VanitySearch.exe -s "My PassPhrase" FXPref). You can also use VanitySearch.exe -ps "My PassPhrase" which will add a crypto secure seed to your passphrase.
VanitySearch may not compute a good grid size for your GPU, so try different values using -g option in order to get the best performances. If you want to use GPUs and CPUs together, you may have best performances by keeping one CPU core for handling GPU(s)/CPU exchanges (use -t option to set the number of CPU threads).

Features

Usage

https://github.com/Groestlcoin/VanitySearch#usage

Download

Source

ALL NEW! – Groestlcoin EasyVanity 2020

Groestlcoin EasyVanity 2020 is a windows app built from the ground-up and makes it easier than ever before to create your very own bespoke bech32 address(es) when whilst not connected to the internet.
If you're tired of the random, cryptic bech32 addresses generated by regular Groestlcoin clients, then Groestlcoin EasyVanity2020 is the right choice for you to create a more personalised bech32 address. This 2020 version uses the new VanitySearch to generate not only legacy addresses (F prefix) but also Bech32 addresses (grs1 prefix).

Features

Download

Source

Remastered! – Groestlcoin WPF Desktop Wallet (v2.19.0.18)

Groestlcoin WPF is an alternative full node client with optional lightweight 'thin-client' mode based on WPF. Windows Presentation Foundation (WPF) is one of Microsoft's latest approaches to a GUI framework, used with the .NET framework. Its main advantages over the original Groestlcoin client include support for exporting blockchain.dat and including a lite wallet mode.
This wallet was previously deprecated but has been brought back to life with modern standards.

Features

Remastered Improvements

Download

Source

ALL NEW! – BIP39 Key Tool

Groestlcoin BIP39 Key Tool is a GUI interface for generating Groestlcoin public and private keys. It is a standalone tool which can be used offline.

Features

Download

Windows
Linux :
 pip3 install -r requirements.txt python3 bip39\_gui.py 

Source

ALL NEW! – Electrum Personal Server

Groestlcoin Electrum Personal Server aims to make using Electrum Groestlcoin wallet more secure and more private. It makes it easy to connect your Electrum-GRS wallet to your own full node.
It is an implementation of the Electrum-grs server protocol which fulfils the specific need of using the Electrum-grs wallet backed by a full node, but without the heavyweight server backend, for a single user. It allows the user to benefit from all Groestlcoin Core's resource-saving features like pruning, blocks only and disabled txindex. All Electrum-GRS's feature-richness like hardware wallet integration, multi-signature wallets, offline signing, seed recovery phrases, coin control and so on can still be used, but connected only to the user's own full node.
Full node wallets are important in Groestlcoin because they are a big part of what makes the system be trust-less. No longer do people have to trust a financial institution like a bank or PayPal, they can run software on their own computers. If Groestlcoin is digital gold, then a full node wallet is your own personal goldsmith who checks for you that received payments are genuine.
Full node wallets are also important for privacy. Using Electrum-GRS under default configuration requires it to send (hashes of) all your Groestlcoin addresses to some server. That server can then easily spy on your transactions. Full node wallets like Groestlcoin Electrum Personal Server would download the entire blockchain and scan it for the user's own addresses, and therefore don't reveal to anyone else which Groestlcoin addresses they are interested in.
Groestlcoin Electrum Personal Server can also broadcast transactions through Tor which improves privacy by resisting traffic analysis for broadcasted transactions which can link the IP address of the user to the transaction. If enabled this would happen transparently whenever the user simply clicks "Send" on a transaction in Electrum-grs wallet.
Note: Currently Groestlcoin Electrum Personal Server can only accept one connection at a time.

Features

Download

Windows
Linux / OSX (Instructions)

Source

UPDATED – Android Wallet 7.38.1 - Main Net + Test Net

The app allows you to send and receive Groestlcoin on your device using QR codes and URI links.
When using this app, please back up your wallet and email them to yourself! This will save your wallet in a password protected file. Then your coins can be retrieved even if you lose your phone.

Changes

Download

Main Net
Main Net (FDroid)
Test Net

Source

UPDATED – Groestlcoin Sentinel 3.5.06 (Android)

Groestlcoin Sentinel is a great solution for anyone who wants the convenience and utility of a hot wallet for receiving payments directly into their cold storage (or hardware wallets).
Sentinel accepts XPUB's, YPUB'S, ZPUB's and individual Groestlcoin address. Once added you will be able to view balances, view transactions, and (in the case of XPUB's, YPUB's and ZPUB's) deterministically generate addresses for that wallet.
Groestlcoin Sentinel is a fork of Groestlcoin Samourai Wallet with all spending and transaction building code removed.

Changes

Download

Source

UPDATED – P2Pool Test Net

Changes

Download

Pre-Hosted Testnet P2Pool is available via http://testp2pool.groestlcoin.org:21330/static/

Source

submitted by Yokomoko_Saleen to groestlcoin [link] [comments]

(Please review) (Remote) Senior Talent Acquisition & Full-Life-Cycle Technical (& non-tech) Recruiter**.

Paul Goldenberg
San Diego, CA | 619.577.6751 | [[email protected]](mailto:[email protected])
TALENT ACQUISITION / COACHING / SENIOR RECRUITER
Specializes in: Full Life Cycle Recruiting and Operational Excellence
Innovative leader with strong candidate sourcing and talent acquisition skills. Experience recruiting for large and small organizations, start-ups, and venture capitals. Expert in integrating program capabilities with broader business goals to craft cohesive strategies. Effective critical thinker and problem-solver, ability to recognize issues or discrepancies and produce prompt resolutions.
Windows 7 & 10 Professional | Vurv Express | macOS | macOS High Sierra | Avature | Jobvite | Workday | BrassRing
Silk Roads | Deploy | iCIMS | Taleo | PC Recruiter | EZAccess | Resumix | Lever | Virtual Edge | Breezy HR | Greenhouse
Prophet Pro | Hiretual | LinkedIn Recruiter | Email Hunter | Hound | Lusha | HiringSolved | SeekOut | Hunter | Reddit
GitHub | Stack Overflow | Connectifier | GoogleDocs | Google Chrome | Thunderbird Email Host | Slack

Professional Highlights
§ Exceeds company averages in all metrics including time-to-fill, fill rate, and total revenue
§ Performs full-cycle recruiting & sourcing of an average of up to 50 job reqs up to 25 hires per month
§ Managed and led virtual teams of up to ten (10) team members while maintaining a 2:1 ratio for interviews to hire
§ Skilled in information technology (IT), engineering, healthcare, medical devices, finance, FinTech, hospitality, real estate, aerospace, and pharmaceutical C-suite
§ Trained 250+ hiring managers and peer interviewers on the techniques of behavioral interviews impacting first-year retention rates from 85% to 97% (AMN Healthcare)
§ Increased production by 75% through the utilization of Avature, Lever & Greenhouse ATS, HiringSolved, LinkedIn Recruiter, Boolean searches, Lusha and phone sourcing

Professional Experience
Independent Recruiting Projects (Upwork, Workana) 2018 – Present
Technical Executive Search Recruiter (Remote) | USA
§ Offering a SaaS solution that integrates all benefits, in a one stop shop, providing simplicity to complex plans
§ Headed a 10-week project placing 12 IT/Engineering hires for a late-stage start-up in the FinTech space
o Recruited DevOps, Engineering Manager, IT Director, Ruby/React Engineers, Full Stack, Back-End, and Web App Developers
§ Hired for C-Level Executives, IT/Tech/Engineering, Hospitality, Real Estate, Product Marketing, Accounting, Corporate Communications, Sales and Account Executives
§ Sourced 250+ candidates and placed 39 in a 12- month period. 2 1/2:1 ratio
§ Enhanced the overall candidate experience mandate for this project
Quantum Technical Solutions, Disney & DirecTV 2015 – 2018 Senior Technical Recruiter (Remote) (2016-2018) | San Diego, CA
IT Recruiter (Remote) (2015-2016) | San Diego, CA
§ Managed an average of 25 - 40 requisitions as the Sr. Technical Recruiter while performing both full life cycle recruiting and strategic sourcing for various information technologies (IT) positions at both Disney & DirecTV
o Recruited mobile iOS/Android Developers, Full-Stack Engineers, AWS, Cloud, Java Developers, Sales, ERP (SAP), Big Data and Hadoop Developers, Network Engineers, DBA’s, Cyber Security, DevOps, UI/UX Designers, Cloud Architects, .NET Developers, IT-based sales & marketing as well as non-technical corporate level roles
§ Exercised traditional and non-traditional sources such as LinkedIn Recruiter, social media (Twitter), Google/AIRS searches, Craigslist, internal applicant tracking system Avature, Lever, Greenhouse, Indeed, Zip Recruiter, Reddit, GitHub and Stack Overflow, Twitter, and Google/AIRS searches
AMN Healthcare 2016 – 2016
Recruitment/Sourcing Specialist RPO (Contract)| San Diego, CA
§ Utilized analytics to track and report progress and success rate of various sourcing strategies
§ Reached out to 250+ candidates weekly to pre-screen and submit to recruiters resulting in a 3:1 ratio
§ Sourced and recruited candidates for various healthcare opportunities including RN's, pharmacy techs, dialysis RN’s, clinical nurse specialists, scientists, medical lab technologists, ED nurses and corporate level positions
§ Created innovative sourcing strategies to recruit utilizing social media (Twitter, LinkedIn, Facebook), paid and free job boards, as well as sourcing tools (Hound, Prophet Pro, Email Hunter, HiringSolved)
Talent Fusion by Monster 2015 – 2015
RPO Recruiter (Remote) | San Diego, CA
§ Designed and executed aggressive sourcing strategies via the internet, social media, and networking channels
§ Sourced and recruited project managers, IT directors, UNIX administrators, JAVA developers, cloud architects, Big Data, front-end/back-end developers, sales, marketing business managers, and real estate construction managers
Independent Virtual Office 2010 – 2015
Recruiting/Sourcing Specialist (Remote) | San Diego, CA
§ Partnered with a bitcoin cryptocurrency start-up to fill thirty (30) C-suite and director level positions
§ Referral networking through social media reduced time-to-fill from 45 days to 27 improving start dates
§ Managed an average of 10 - 50 requisitions while providing high volume sourcing and lead generation for clients including T. Rowe Prices, BDS, Edward Life Sciences and Assurant/Comcast
§ Domestic and international placements in social media, healthcare, big data, call center, medical and pharmaceutical, retail, cybersecurity, business intelligence (BI), .NET, Hadoop, ERP (SAP), CRM, sales/marketing (all levels, OEM through solutions sales), hospitality, finance/investment banking, automotive, manufacturing, and virtual staffing
§ Integrated social media into recruiting strategies
o Amassed 14K followers on Twitter which boosted LinkedIn connections and incorporated sites (Empire Avenue, Google+, Instagram and clients career page)
o Exposure of job postings increased submittal of on-target applications by 70%

Additional Relevant Experience
§ Technical RecruiteBusiness Development Consultant, The Benefit Partnership, San Diego, CA (2010)
§ Virtual Recruiting/Sourcing Analyst, AON Hewitt, Los Angeles, CA (2007 – 2009)
§ Senior RecruiteSourcing Mgr., Enterprise Staffing Solutions, Phoenix/Los Angeles (1997 – 2007)
§ Senior Technical & Sales Recruiter, Volt Technical Services, Phoenix, AZ (1995 – 1997)

Education
Bachelor of Science, Hotel & Restaurant Management – University of Wisconsin-Stout
AIRS Certification

Professional Memberships
RecruitingBlogs, CyberSleuths Apprentice, Sourcer's Guild, LinkedIn Open Networker (LION) and XeeMe Open Power Networker (XOPN)
submitted by goodkarma67 to resumes [link] [comments]

down the Node-Red rabbit hole, part 5 - hold my beer

part1 part2 part3 part4
so, it's been 4 months since i started this journey and i gotta say that NR has really re-vitalized my personal interest in home-automation, as well as, my HA and whole house setup.
i've done more in the past 4 months, to streamline my setup and adding new automations than i've done in the three years since i started using HA somewhere around v0.24.x'ish. i got that shit dialed in now.
(also some credit to EspHome for being awesome, despite having meh documentation. yeah, i said it. meh👏doc👏u👏men👏ta👏shun)
at this point i have about 36 NR tabs. some are just testing, or playing around with a particular component/palette, but most have at least one flow on it that is live and in use.
so, i thought i'd break some of them down for you guys, 'barney style+':
(also, some of these are way to huge to post readable screenshots of, so i'm just gonna describe them. plus some of these i detailed in my previous posts.)
first up is my globals. where i set global.vars
arrive/away
morning/bedtime/naptime
alarm
sonos
ping
watchdog
battery (the nodes are very similar to above)
switch control
harmony
remote
long term away
spotify
washedryer
doorbell
disk space
gmail
calendar
alexa TTS (subflow)
drafthouse
twitter link
so, yeah. i'd like to see some of you post some of your flows/ideas if only so i could totally steal them.
.
.
+obscure skippy joke. it's from a book++.
++yes i read. well, i audiobook, but same diff+++.
+++i mean, it's just basic science!++++
++++i mean, that study coulda been bullshit, sponsored by "the audiobook council" or some shit, but i'm taking it at face value.
submitted by stoneobscurity to homeassistant [link] [comments]

**Available 1/20/20 : (Remote) Senior Talent Acquisition & Full-Life-Cycle Technical (& non-tech) Recruiter**

Paul Goldenberg
San Diego, CA | 619.577.6751 | [[email protected]](mailto:[email protected])
TALENT ACQUISITION / COACHING / SENIOR RECRUITER
Specializes in: Full Life Cycle Recruiting and Operational Excellence
Innovative leader with strong candidate sourcing and talent acquisition skills. Experience recruiting for large and small organizations, start-ups, and venture capitals. Expert in integrating program capabilities with broader business goals to craft cohesive strategies. Effective critical thinker and problem-solver, ability to recognize issues or discrepancies and produce prompt resolutions.
Windows 7 & 10 Professional | Vurv Express | macOS | macOS High Sierra | Avature | Jobvite | Workday | BrassRing
Silk Roads | Deploy | iCIMS | Taleo | PC Recruiter | EZAccess | Resumix | Lever | Virtual Edge | Breezy HR | Greenhouse
Prophet Pro | Hiretual | LinkedIn Recruiter | Email Hunter | Hound | Lusha | HiringSolved | SeekOut | Hunter | Reddit
GitHub | Stack Overflow | Connectifier | GoogleDocs | Google Chrome | Thunderbird Email Host | Slack

Professional Highlights
§ Exceeds company averages in all metrics including time-to-fill, fill rate, and total revenue
§ Performs full-cycle recruiting & sourcing of an average of up to 50 job reqs up to 25 hires per month
§ Managed and led virtual teams of up to ten (10) team members while maintaining a 2:1 ratio for interviews to hire
§ Skilled in information technology (IT), engineering, healthcare, medical devices, finance, FinTech, hospitality, real estate, aerospace, and pharmaceutical C-suite
§ Trained 250+ hiring managers and peer interviewers on the techniques of behavioral interviews impacting first-year retention rates from 85% to 97% (AMN Healthcare)
§ Increased production by 75% through the utilization of Avature, Lever & Greenhouse ATS, HiringSolved, LinkedIn Recruiter, Boolean searches, Lusha and phone sourcing

Professional Experience
Independent Recruiting Projects (Upwork, Workana) 2018 – Present
Technical Executive Search Recruiter (Remote) | USA
§ Offering a SaaS solution that integrates all benefits, in a one stop shop, providing simplicity to complex plans
§ Headed a 10-week project placing 12 IT/Engineering hires for a late-stage start-up in the FinTech space
o Recruited DevOps, Engineering Manager, IT Director, Ruby/React Engineers, Full Stack, Back-End, and Web App Developers
§ Hired for C-Level Executives, IT/Tech/Engineering, Hospitality, Real Estate, Product Marketing, Accounting, Corporate Communications, Sales and Account Executives
§ Sourced 250+ candidates and placed 39 in a 12- month period. 2 1/2:1 ratio
§ Enhanced the overall candidate experience mandate for this project
Quantum Technical Solutions, Disney & DirecTV 2015 – 2018 Senior Technical Recruiter (Remote) (2016-2018) | San Diego, CA
IT Recruiter (Remote) (2015-2016) | San Diego, CA
§ Managed an average of 25 - 40 requisitions as the Sr. Technical Recruiter while performing both full life cycle recruiting and strategic sourcing for various information technologies (IT) positions at both Disney & DirecTV
o Recruited mobile iOS/Android Developers, Full-Stack Engineers, AWS, Cloud, Java Developers, Sales, ERP (SAP), Big Data and Hadoop Developers, Network Engineers, DBA’s, Cyber Security, DevOps, UI/UX Designers, Cloud Architects, .NET Developers, IT-based sales & marketing as well as non-technical corporate level roles
§ Exercised traditional and non-traditional sources such as LinkedIn Recruiter, social media (Twitter), Google/AIRS searches, Craigslist, internal applicant tracking system Avature, Lever, Greenhouse, Indeed, Zip Recruiter, Reddit, GitHub and Stack Overflow, Twitter, and Google/AIRS searches
AMN Healthcare 2016 – 2016
Recruitment/Sourcing Specialist RPO (Contract)| San Diego, CA
§ Utilized analytics to track and report progress and success rate of various sourcing strategies
§ Reached out to 250+ candidates weekly to pre-screen and submit to recruiters resulting in a 3:1 ratio
§ Sourced and recruited candidates for various healthcare opportunities including RN's, pharmacy techs, dialysis RN’s, clinical nurse specialists, scientists, medical lab technologists, ED nurses and corporate level positions
§ Created innovative sourcing strategies to recruit utilizing social media (Twitter, LinkedIn, Facebook), paid and free job boards, as well as sourcing tools (Hound, Prophet Pro, Email Hunter, HiringSolved)
Talent Fusion by Monster 2015 – 2015
RPO Recruiter (Remote) | San Diego, CA
§ Designed and executed aggressive sourcing strategies via the internet, social media, and networking channels
§ Sourced and recruited project managers, IT directors, UNIX administrators, JAVA developers, cloud architects, Big Data, front-end/back-end developers, sales, marketing business managers, and real estate construction managers
Independent Virtual Office 2010 – 2015
Recruiting/Sourcing Specialist (Remote) | San Diego, CA
§ Partnered with a bitcoin cryptocurrency start-up to fill thirty (30) C-suite and director level positions
§ Referral networking through social media reduced time-to-fill from 45 days to 27 improving start dates
§ Managed an average of 10 - 50 requisitions while providing high volume sourcing and lead generation for clients including T. Rowe Prices, BDS, Edward Life Sciences and Assurant/Comcast
§ Domestic and international placements in social media, healthcare, big data, call center, medical and pharmaceutical, retail, cybersecurity, business intelligence (BI), .NET, Hadoop, ERP (SAP), CRM, sales/marketing (all levels, OEM through solutions sales), hospitality, finance/investment banking, automotive, manufacturing, and virtual staffing
§ Integrated social media into recruiting strategies
o Amassed 14K followers on Twitter which boosted LinkedIn connections and incorporated sites (Empire Avenue, Google+, Instagram and clients career page)
o Exposure of job postings increased submittal of on-target applications by 70%

Additional Relevant Experience
§ Technical RecruiteBusiness Development Consultant, The Benefit Partnership, San Diego, CA (2010)
§ Virtual Recruiting/Sourcing Analyst, AON Hewitt, Los Angeles, CA (2007 – 2009)
§ Senior RecruiteSourcing Mgr., Enterprise Staffing Solutions, Phoenix/Los Angeles (1997 – 2007)
§ Senior Technical & Sales Recruiter, Volt Technical Services, Phoenix, AZ (1995 – 1997)

Education
Bachelor of Science, Hotel & Restaurant Management – University of Wisconsin-Stout
AIRS Certification

Professional Memberships
RecruitingBlogs, CyberSleuths Apprentice, Sourcer's Guild, LinkedIn Open Networker (LION) and XeeMe Open Power Networker (XOPN)
submitted by goodkarma67 to wehiring [link] [comments]

Colin gives a rundown on Nexus layered architecture

This is an excerpt from a much larger impromptu Q&A on Nexus Telegram, and provides an excellent overview of Nexus architecture. (edited for clarity)
---------------------------------------------------------------------
Paul Screen, [10.09.19 22:03]
[In reply to CryptoJoker]
yes it is. There's no question that ethereum and it's direct competitors that offer turing-complete programmable contracts are very powerful. But when you actually look at the requirements of businesses trying to onboard to blockchain, we found that most of them just need simple requirements met and don't need all of the complexity and baggage that comes with it.

CryptoJoker, [10.09.19 22:04]
[In reply to Paul Screen]
ok so ca u run only simple multi conditional transactions on the nexus VM or facebook type DAPPs on nexus ?

Viz., [10.09.19 22:09]
[In reply to CryptoJoker]
Nah the VM is the interpreter so the language fits on top, we haven’t designed nexus to be a programming language this is an approach we didn’t agree with. It is APi based so you can code in any language and work with the functionality of the blockchain layer for what you need it to do. No you can’t port EVM code into Nexus

CryptoJoker, [11.09.19 00:22]
[In reply to Viz.]
when you make an api request, does this result in computations done on the blockchain ?

Viz., [11.09.19 00:23]
It depends on the API request, if you do let’s say users/list/notifications then no as this is reading data, but finance/credit/account would since it broadcasts a transaction with OP::CREDIT

CryptoJoker, [11.09.19 00:24]
[In reply to Viz.]
ok thanks , and can you provide me an idea of the flexbility of the VM on nexus ? can it run like facebook type dapps for example ?

Viz., [11.09.19 00:28]
It depends, it depends on what you want the blockchain to do and don’t. Dapp is an overused word and overstated in capability because a blockchain isn’t a computer and shouldn’t ever be, it’s a verifier. So, if you wanted to make a social network on nexus, trade tokens, chat, sure you could. A lot of functionality will be in the logical Layer as there’s no point to compute let’s say an image compression on the blockchain, you would on the logical Layer compress it, hash it, then build an object Register to hold the meta data associated with it that includes the checksum, include description. Then to update, you change the state in the object register, etc. If you wanted to do conditions in some of these interactions you could program the Boolean expression in such as, I’ll sell you this object for 5 NXS, someone is able to claim the transfer based on the condition of their debit, so on.

CryptoJoker, [11.09.19 00:29]
[In reply to CryptoJoker]
how does the functinonality of the nexus scripts compare to that of bitcoin scripts ?
is it fair to assume this:
bitcoin scripting < nexus scripting < ethereum type smart contracts ?
it seems like its mostly built to handle only transactions ...

Viz., [11.09.19 00:31]
[In reply to CryptoJoker]
Not really, our architecture is completely different, hard to compare functionality. Let’s just say bitcoin scripts are slow, clunky, and stack based and only handle a Boolean expression to spend inputs, ours is a register based system with primitive operations and conditions that all interact to provide contract functionality

Viz., [11.09.19 00:31]
[In reply to CryptoJoker]
You miss what the term register means then
And “programmable data structures”

CryptoJoker, [11.09.19 00:31]
[In reply to Viz.]
yes, this is the first time i am encountering this
i also dont have a programming background unfortunately

Viz., [11.09.19 00:33]
A register is a structure that on hardware is what your cpu uses to store numbers in low latency memory (close to the CPU in its internal cache).... hang on, switching to computer...

CryptoJoker, [11.09.19 00:34]
[In reply to Viz.]
ok this is all fine and good, but i guess for a layman like me i just wanna know what its functionalities are in comparison to EVM type VMs ...
what can it do in comparison to EVMs, and is it fasteslower, more expensive/cheaper ?

Viz., [11.09.19 00:36]
Let me explain it like this: Ethereum is like everything put in one bucket, it has a turing complete byte code because they imagined you could program it like a universal computer. The reality is though, that most people abstract away from the EVM and use it for pure data storage, or managing accounts and tokens. They include operations like EXP for example, and use what is termed "Big Numbers" which are numbers that are in the range of 2^256 which is a number with over a hundred zeros. This has led to significant bottlenecks, and little value in being turing complete even though this was their value propositiion.

Viz., [11.09.19 00:36]
Now we get to Bitcoin, which was deliberatly not turing complete, and its scripts were designed to control the conditions on spending inputs in the UTXO model, in which it has proven useful, and some scripts such as OP_RETURN have allowed people to store data on it, but then again it aws not useful for much more than that.

Viz., [11.09.19 00:37]
Then we get to us, think of us between bitcoin and ethereum, but building contracts to act like contracts between people, rather than computer code.

Viz., [11.09.19 00:41]
So think of us as a blend of the two concepts, but in a way that is practical and useful for developers. From my research of talking to many companies that were using blockchain, I deduced a simple common denominator: nobody used ethereum for the turing completeness, they used it to store data. This was the foundation of the architecture that I developed for tritium that is a seven layer stack. So I'm going to break this down, and hope this communicates how it functions to create smart contracts or dapps in just about any capacity that's needed:

Viz., [11.09.19 00:41]
  1. Network - this is responsible for end to end communication between nodes, handling the relaying and receiving of ledger level data

Viz., [11.09.19 00:43]
  1. Ledger - this is responsible for ensuring all data is formed under consensus and is immutable by nature. This is where your 'sigchain' or blockchain account exists. A sigchain is a decentralized blockchain account that allows you to login from any node with a username, password, and pin without the need for wallet.dat files or constantly rescanning the database. This is an important piece to how the layers above work as well, think of it as a personal blockchain that allows decentralized access through the login system that does not store any credentials, but rather deterministically creates a 'lock' mathematically that only your credentials can unlock, using a few different cryptographic functions I won't name here

Viz., [11.09.19 00:46]
  1. Register - this layer is the data retention layer, or the layer that stores information relating to users. A register takes two forms: state and object. A state register is jsut a simple register that can store data in any sequence with no formatting enforced by the ledger. This would be for applications that have a state they want to remain immutable whih they can record in a state register. The second form is an object register, which is a programmable data type. What this means is that I can specify the fields of this register, and set some of the fields to be mutable or immutable such as lets say S/N would be immutable, but notes mutable. This allows objects to take the form much like a struct or class in object oritented languages, that can be accessed by any node, and only written to by the owning sigchain. Now registers sit on top of the ledger, and they can be transferred between sigchains or users, allowing them to take a natural form as assets or simple objects that would be included in a decentralized application such as a crypto kitty, or a post yoj make on social media, etc. This layer is responsible for managing all these states and ensuring the specified fields in these states are immutable, while other fi9elds can be updated like a program would do as it operates.

Viz., [11.09.19 00:51]
  1. Operation - this layer is what gives context to a register and causes some action to take place. It includes two aspects to this layer, Primitive operations and Conditional operations. A contract object is a self contained object containing: a register pre-state (the register that is being operated on), a primitive operation (only one primitive operation per contract), and a set of conditions (any amount of conditional ops may be used for a fee of course). The primitive operations are basic ones like WRITE, APPEND, DEBIT, CREDIT, TRANSFER, CLAIM, CREATE, AUTHORIZE, TRUST, CONBASE, GENERATE. Each of these has a specific operation on the register it is initiated in. This is how you would maintain the state of a decentralized app, lets say crypto kitties, you have an object register that you create with OP::CREATE that has a specific meta data format associated with it, you then OP::TRANSFER it to someone else, but you gie a condition saying they must send 500 NXS beforehand, and this is the stiuplation of the TRANSFER being CLAIMABLE. When this ondition is satisfied you are able to claim the other point allowing for forms of exhange. Other stipulations or conditions could be arbitration, escrow, etc. Conditions are when there is an interaction between two actors or sigchains, which happens with a DEBIT or TRANSFER. Otherwise the other primitive oeprations act on the register such as changing its state.

Viz., [11.09.19 00:52]
  1. API - This layer is responsible for giving an interface for the programmer to build their DAPP. This gies them direct access to login, create registers, create accounts, send coins, read data, manage notifications, etc. This is the layer develoeprs will interact with when building applications.

Viz., [11.09.19 00:53]
  1. Logical - This is the first 'developer' layer, menaing that this is the layer that will give most of the logic to the application. This coudl be simple things like, send message to this user if they have this object that has a value of 'you're my friend' ,or antything else. This layer is the 'backend' of the dapp, and what provides a lot of the functionality. States can be read and written into the register layer, information from the ledger can be shared, stipulations on interactions can be applied. etc.

Viz., [11.09.19 00:54]
  1. Interface - This is the 'user' layer, where the user will interact with. This in the facebook example would be the website you go to, and all the buttons that do fun stuff. This is the last layer of the 'developer' application space.

CryptoJoker, [11.09.19 00:54]
thank you
big applause!!!!

CryptoJoker, [11.09.19 00:56]
ok so to summarize my understanding of this
3 allows for creation and transfer of digital assets/objects
4 governs the operations that on objects in 3
5 interface between dapp logic and registeoperations layer
  1. this is where the "dapp" is written by developers
am i right ?

Viz., [11.09.19 00:57]
So as you can see, all these layers together are what form the foundation of a dapp, with the blockchain doing some things, the application does other things. They togheter give the blockchain scability and easy to build on, and also give the appliation powerful tools to utilize. For example of an object register, your NXS account. It contains fields identifier and balance. The identifier identfies the token's contract-id or object register, and the balance keeps track of how much you have at stake. Object registers can be polymorphic though, so you can create an object register with tehse two base types, but add, notes, which you could fill with personal notes and the DEBIT and CREDIT operations would process it off of the base object, or the account menaing that you can expand from these basic objects and create many different types and uses, creating object oriented and polymorphic behavior

Viz., [11.09.19 00:57]
3 is simply where they are store, it takes 4 to create the object
5 yes
6 yes plus 7, the dapp space is layers 6 and 7 together. If the dapp developer is really good though, they make custom API's with more complex contracts under the hood to provide additional functionality to their dapp, but we currently abstract the developer away from this to prevent them making mistakes that could lose people a lot of money

CryptoJoker, [11.09.19 00:59]
whereas for the EVM, 3,4,5,6 and 7 are all bundles into one entitiy, am i right ?

Viz., [11.09.19 00:59]
And last note, on layer 4, the conditional statements. These also operate on a register based VM that processes the conditional statements, and they can be grouped with as many different conditions as desired, so they can grow into quite complex contracts like we would see with legal contracts.

Viz., [11.09.19 01:00]
EVM doesn't really have layers
It's just EVM opcodes, and then the compiler for solidity which creates the byte code, so maybe two layers
Same with bitcoin scripts
But bitcoin scripts dont have a compiler that creates the byte code so you have to program it as a type of assembly

Viz., [11.09.19 01:01]
So long story short is, our techniques and architecture are quite unique, and designed around years of market research to ensure that it was built as something that people could use easily, but also powerful enough to power the dapps people want to see

Viz., [11.09.19 01:03]
The login account is really important for adoption in my opinion, because users having to manage keys wont bode well for applications that expand, lets say like supply chains or other mobile applications. Managing keys in a file on your computer I think is a big hurdle to mainstream adoption, the other one is the complexity of EVM and how little practical appliation it has, even though it contains a lot of functionality, most of it us unused or abstracted away from
submitted by scottsimon36 to nexusearth [link] [comments]

Cosmic.plus Weekly Review / 2019-10-26 (repost)

https://cosmic.plus

This week I focused on implementing a way to control Cosmic.link widget interface.
It is now possible to pass a stylesheet to customize the interface, to control the default signing method and the display of the QRCode. This is meant to improve integration with services such as StellarPay.
I also continued my work on hardware wallets libraries. I'm harmonizing the API of both libraries and want to add helpers to ease secondary accounts discovery.
On the firmware side, I still have manageBuyOffer support waiting to get merged for both Ledger & Trezor.

The priorities for next week are:
  1. Add secondary accounts discovery in both hardware wallet libraries.
  2. Improve Cosmic.link & Stellar-Authenticator.org style.
  3. Finish the new webapp framework.

Application update: Cosmic.link 1.8.0

https://cosmic.link

Added

Note: The following options can be combined tother like normal query parameters. For example: https://cosmic.link/widget?setOptions#qrcode=true&handler=Sep7Wallet.

Fixed


Library update: ledger-wallet 1.3.0

https://cosmic.plus/#view:js-ledger-wallet

Deprecated

Added

Fixed


Links

Organization: Cosmic.plus | @GitHub | @NPM
Follow: Reddit | Twitter | Medium | Codepen
Talk: Telegram | Keybase
submitted by MisterTicot to Stellar [link] [comments]

BoolWallet, Your First Crypto Wallet, transfer BTCUSDTETHBSVBCHTRX MegaMesh for Unity3D Boolean feature Boolean operations Blockchain Implementation with C# Part 1 - YouTube Boolean Algebra part 2

BOOL to BTC Exchange Rate - 1 Boolean in Bitcoin. 0.0000001256 . BTC 0.00000013; ETH 0.0000051; Vol [24h] $3262,8816 . bool to btc converter . Exchange Pair Price 24h volume ; Hotbit ... Umwandeln von Boolean(BOOL) in Bitcoin Cash(BCH). Erhalte Live-Charts für Boolean in Bitcoin Cash. Umwandeln von Boolean(BOOL) in Bitcoin Cash(BCH). Trust Score Update Keeping you safer one step at a time with CyberSecurity Metrics. DE . Sprache. English Deutsch Español Français Italiano język polski Limba română Magyar nyelv Nederlands Português Svenska. Tiếng việt Türkçe ... Many of the boolean options can also be set to off by specifying them with a "no" prefix: e.g. -nodnseed. ... (for controlling a running Bitcoin/bitcoind process) # # server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands #server=0 # Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. # This option can be specified multiple times (default ... Bitcoin Core should also work on most other Unix-like systems but is not as frequently tested on them. From 0.17.0 onwards, macOS <10.10 is no longer supported. 0.17.0 is built using Qt 5.9.x, which doesn’t support versions of macOS older than 10.10. Additionally, Bitcoin Core does not yet change appearance when macOS “dark mode” is ... Der Boolean-Kurs ist in den letzten 24 Stunden um -1.45% gesunken und tendiert nach oben um 0.81% nach der letzten Stunde Transaktionen. Auch der wöchentliche Boolean-Kurs um -11.85% verringert. Wenn wir uns die monatliche Veränderung des Boolean-Kurs ansehen, ist sie um 3.21% gestiegen, während es um 0% nach seinem Kurs vor 1 Jahr gesteigert ist. Informationen zur

[index] [31935] [44381] [43469] [49296] [51307] [38204] [17391] [16020] [9186] [20331]

BoolWallet, Your First Crypto Wallet, transfer BTCUSDTETHBSVBCHTRX

Boolean Algebra 1 – The Laws of Boolean Algebra - Duration: 14:55. Computer Science 97,344 views. 14:55. Banking on Bitcoin YouTube Movies. 2017 · Documentary; 1:23:41. TOP 3 Ways to Make $100 ... This video is unavailable. Watch Queue Queue. Watch Queue Queue I started with a Stephen Sink fractal called 'Spherical Cubes1' from the Mandelbulber Facebook page. I keyframed at 1600 X 900 and added a revolving block background. Foreground and background are ... This mesh boolean system is part of the upcoming MegaMesh system for Unity. It allows multiple objects to be combined in different ways to show the intersection, difference of union of the meshes ... Bitcoin Protocol Explained 1 - Bitcoin paper broken down step by step. by sentdex. 29:35. Play next; Play now ; Andreas Antonopoulos on Bitcoin Wallet Encryption by Dana Wright. 1:15:32. Play next ...

#