lundi, mai 24, 2021

La vigne au 22 mai 2021

 

Avant le passage de la tondeuse

Après le passage de la tondeuse. Reste à faire entre les ceps.
J'ai prélevé vingt feuilles pour faire une analyse par fluorimétrie
Les résultats de l'analyse : il y a une carence en azote





samedi, mai 15, 2021

La vigne au 14 mai 2021

 Quelques photos de la vigne au 14 mai :

.
On voit les raisins en formation

J’ai profité de l’éclaircie pour « monder » la parcelle

Vu de la colline de Brouilly depuis la parcelle

J’ai compté 9 raisins sur un cep



dimanche, mai 02, 2021

Polygon



  • Polygon is a Commit Chain.
  • Commit chains (extract from Mastering Blockchain):
    • are a more generic term for Vitalik Buterin's plasma proposal. (http://plasma.io)
    • are referred as non-custodial side chains but without a new consensus mechanism, as it is the case for side chains. They rely on main chain consensus mechanism, so they can considered as safe as the main chain. The operator of the commit chain is responsible for facilitating communication between transacting participants and sending regular updates to the main chain. See https://eprint.iacr.org/2018/642.pdf

Useful links


Mastering Blockchain - Imran Bashir - Part II

 


 


Chapter 11: Ethereum 101

  • Vitalik Buterin conceptualized Ethereum (https://ethereum.org)
  • Decentralized Applications (DApps): this concept is in contrats to Bitcoin, where the scripting language is limited and only allows necessary operations.
  • Ethereum 1.x: Proof-of-Work (PoW)
  • Ethereum 2.x: Proof-of-Stake (PoS)
  • Serenity release is ETH2.0.
  • Ethereum, just like any blockchain, can be visualized as a transaction-based state machine.
  • The transaction is digitally signed by the sender as proof that he is the owner of the ether.
  • The transaction is then picked up by nodes called miners on the Ethereum network for verification and inclusion in the block.
  • The details of the transaction can be visualized: https://etherscan.io/
  • This hash is the unique ID of the transaction that can be used to trace this transaction throughout the blockchain network.
  • The Ethereum network is a peer-to-peer network where nodes participates in order to maintain the blockchain and contribute to the consensus algorithm.
  • Ethereum client is Geth: provides various functions such as mining and account management.
  • Keys and addresses: The private key is a generated randomly and is kept secret; whereas public key is derived from the private key. Addresses are derived from public keys and are 20-byte codes to identify accounts. 
  • Accounts are one of the main building blocks of the Ethereum blockchain. They are defined by pairs of private and public keys.
  • Ethereum is a transaction-driven state machine.
  • In case of transaction failure due to insufficient account balance or gas, all state changes are rolled back except for the feee payment, which is paid to the miners.
  • The Contracts Accounts: the code is executed by the EVM (Ethereum Virtual Machine) by each mining node on the Ethereum network.
  • Accounts allow interaction with the blockchain via transactions.
  • A transaction in Ethereum is a digitally signed data packet using a private key that contains the instructions that either result in a message call or contract creation.
  • Nonce: the nonce is a number that is incremented by one every time a transaction is sent by the sender. It must be equal to the number of transactions sent and is used as a unique identifier for the transactions.
  • Gas price: the gas price represents the amount of Wei required to execute the transaction.
  • A block is a data structure that contains batches of transactions. Transactions can be found in either transactions pools or blocks. In transaction pools, they wait for verification by a node, and in blocks, they are added after successful verification.
  • Ehtereum's PoW is called Ethash and was originally designed to be ASIC resistant.
  • Recursive Length Prefix (RLP) is linked to serialization and deserialization which are also referred as marshaling and un-marshaling respectively. Some commonly used serialization formats include XML, JSON, YAML, protocol buffers and XDR.
  • Message calls result in a state transition. A message call is the act of passing a message from one account to another. If the destination account as an associated EVM code, then the EVM will start upon the receipt of the message to perform the required operations.
  • Messages are similar to transactions; however, the main difference is that they are produced by the contracts.
  • A call basically runs message call transactions locally on the client and never costs gas nor results in a state change.
  • At a fundamental level, the Ethereum blockchain is a transaction and consensus-driven state machine.
  • Code hash: this is an immutable field that contains the hash of the smart contract code that is associated with the account.
  • After the Decentralized Autonomous Organization (DAO) hack, a hard fork was proposed: Ethereum classic and its currency represented by ETC, whereas the hard-forked version is ETH.
  • The EVM is a simple stack-based execution machine that runs byte code instructions to transferm the system state from one state to another. Last In First Out (LIFO).
  • EVM optimization is an active area of research.
  • WebAssembly (Wasm) was developed by Google, Mozilla and Microsoft.
  • Precompiled contracts can potentially become native extensions and might be included in the EVM opcodes in the future.
  • Next hard fork release of Ethereum called Berlin will introduce new pre-compiled contracts for BLS12-381 curve operations with other updates.

Links

Acronyms

  • OOG: Out of Gas
Translation
  • immutable: immuable

samedi, mai 01, 2021

Mastering Blockchain - Imran Bashir

 

  • Préambule

    • Un livre référence pour qui s'intéresse à la blockchain d'un point de vue fondamental.
    • Un mois de lecture du 12 mars au 14 avril.
    • Une approche approfondie qui va des bases du concept de livre des transactions partagées, aux protocoles de consensus, aux applications distribuées, aux cryptos monnaies, à l'ethereum, au web3 etc...
    • Mes notes de lecture en résumé ci-dessous.

  • Chapter 1: Blockchain 101

    • Multiple confirmations of a transaction over time provide consistency in Bitcoin. For this purpose, the process of mining was introduced in Bitcoin. 
    • Mining is a process that facilitates the achievement of consensus by using the PoW algorithm.
    • With physical cash, it is almost impossible to trace back spending to the individual who actually paid the money.
    • Smart contract: code needed to execute a required function when certain conditions are met.
    • Smart property: it is possible to link a digital or physical asset to the blockchain in such a secure and precise manner that it cannot be claimed by anyone else.
    • Enterprise Ethereum Alliance
    • Hyperledger

  • Chapter 2: Decentralization
    • Many exiting applications and ideas emerge from the decentralized blockchain technology, such as decentralized finance and decentralized identity.
    • A significant innovation in the decentralized paradigm is decentralized consensus.
    • Blockchain can serve as a decentralized health record management system where health records can be exchanged securely  and directly between different entities.
    • Not everything can or needs to be decentralized.
    • There are systems that pre-date blockchain and Bitcoin, including BitTorrent and the Gnutella file-sharing system.
    • IPFS and BigChainDB are more suitable for storing large amounts of data in a decentralized way.
    • Many services hat a government commonly offers can be delivered via blockchains such as government identity card systems, passports, and records of deeds, marriages and births.
    • Web 3 = decentralized internet
  • Chapter 3: Symmetric cryptography

    • Symmetric cryptography refers to a type of cryptography where the key that is used to encrypt the data is the same one that is used for decrypting the data.
    • Hash functions play a vital role in blockchain.
    • The SHA-256 algorithm is used in Bitcoin's PoW algorithm.

  • Chapter 4: Public key cryptography
    • Asymmetric cryptography refers to a type of cryptography where the key that is used to encrypt the data is different from the key that is used to decrypt the data. These keys are called private and public keys.

    • Digital signatures are used to provide data origin authentication and non-repudiation.

    • Hash functions are used to build Merkle trees.
    • Hash functions are of particular importance in blockchains, as they are key to constructing Merkle trees, which are used in blockchains for the efficient and fast verification of large datasets.

  • Chapter 5: Consensus algorithm
    • In distributed systems, a common goal is to achieve consensus (agreement) among nodes on the network even in the presence of faults.
    • State machine replication is a standard technique to achieve fault tolerance in distributed systems.
    • In an asynchronous environment, the deterministic consensus is impossible.
    • Liveness means that the protocol can make progress even if the network conditions are not ideal.
    • PBFT (Practical Byzantine Fault Tolerant) provides immediate and deterministic transaction finality. This is in contrast with the PoW protocol, where a number of confirmations are required to finalize a transaction with high probability.
    • IBFT (Istanbul Byzantine Fault Tolerant): validators can be added or removed by voting between members of the network.
    • Nakamoto consensus, or PoW, is the longest-running blockchain network. 
    • The PoW is designed to mitigate Sybil attacks. 
    • A Sybil attack is a type of attack that aims to gain a majority influence on the network to control the network. Its a type of attack where a single adversary creates a large number of nodes with fakes identities on the network, which are used to gain influence on the network. This attack is also prevented in Bitcoin by using PoW, where miners are required to consume a considerable amount of computing power to earn rewards.
    • The key idea behind PoW as a solution to the Byzantine generals problem is that all honest generals (miners in the Bitcoin world) achieve agreement on the same state (decision value). Note that this is a probabilistic solution and not deterministic.
    • PoS (Proof of Stake) mechanisms generally select a stake holder and grant appropriate rights based on their staked assets.
    • Create a system that meets all the requirements without compromising the core safety and liveness properties of the system.

  • Chapter 6: Introducing Bitcoin

    • Bitcoin is quite unstable and highly volatile.
    • PoW concept: the money is created by broadcasting the solution to a previously unsolved computational problem. PoW is used to secure the blockchain. This is a proof that enough  computational resources have been spent in order to build a valid block.
    • The PoW problem, also known as the partial hash inversion problem consumes a high amount of resources, including computing power and electricity. This process also secures the system against fraud and double-spending attacks while adding more virtual currency to the Bitcoin ecosystem.
    • Hal Finney was the first person to receive Bitcoin from Satoshi Nakamoto.

    • In the Bitcoin network, users have to wait for six blocks, which is equivalent to an hour, to get the right level of confidence that a transaction is final.
    • Trustless refers to the distribution of trust between users, rather than a central entity.
    • Network is owned collectively by its users instead of a single entity. The more users use the network, the more valuable it becomes.
    • The double spending problem arises when a user sends coins to two different users at the same time and they are verified independently as valid transactions. The double spending problem is resolved in Bitcoin by using a distributed ledger (the blockchain) where every transaction is recorded permanently.
    • The sender enters the receiver's address.
    • The transaction fee is calculated based on the size of the transaction and on the fee rate.
    • The higher the transaction fee, the greater the chance that your transaction will be picked up as a priority and included in the block.
    • Bitcoin transactions are serialized for transmission over the network and encoded in hex format.
    • Public keys can be represented in an uncompressed or compressed format, and are fundamentally x and y coordinates on an elliptic curve.
    • Transaction malleability has been solved with the so-called SegWit soft-fork upgrade of the Bitcoin protocol.
    • The paper wallets can be stored physically as an alternative to the electronic storage of private keys.
    • Transactions are not encrypted and are publicly visible on the blockchain.
    • The mining is the process through which the blockchain is secured and new coins are generated as a reward for the miners who spend appropriate computational resources. 
    • Mining is a process by which new blocks are added to the blockchain. Blocks, once mined and verified, are added to the blockchain, which keeps the blockchain growing.
    • Transaction pool, also known as memory pools, are basically created in local memory (computer RAM) by nodes (Bitcoin clients) in order to maintain a temporary list of transactions that have not yet been added to a block.
    • The time for transaction confirmation usually ranges from 10 minutes to over 12 hours in some cases.
    • Bitcoin uses a simple stack-based language called Script. Scripting is quite limited and can only be used to program one thing: the transfer of bitcoins from one address to other addresses.
    • In simple words, locking means providing Bitcoins to somebody, whereas unlocking means consuming the acquired Bitcoins.
    • A coinbase transaction or generation transaction is always created by a miner and is the first transaction in a block. It is used to create new coins.
    • Nonce is an arbitrary number that miners change repeatedly to produce a hash that is lower than the difficulty target.
    • New blocks are added to the blockchain approximately every 10 minutes.
    • Miners are rewarded with new coins if and when they discover new blocks by solving the PoW. 
    • The rate of creation of new bitcoins decreases by 50% every 210000 blocks, which is roughly every four years.
    • After 210000 blocks, the block reward halves. In November 2021 it halved down to 25 bitcoins. Currently, since May 2020, it is 6.25 bitcoins per block.
    • Mining difficulty increases over time and bitcoins that could once be mined by a single-cpu laptop computer now require dedicated mining centers to solve the hash puzzle.
    • The difficulty is calculated every 2016 blocks (around two weeks) and adjusted accordingly.
    • The Bitcoins miners have to calculate hashes to solve the PoW algorithm.
    • The hash rate basically represents the rate of hash calculation per second.
    • As the core principle behind mining is based on the double SHA256 algorithm, over time, experts have developed sophisticated systems to calculate the hash faster and faster. 
    • ASICs were designed to perform SHA-256 operations.
    • Currently mining is out of the reach of individuals due to the vast amount of energy and money needed to be spent in order to build a profitable mining platform.
    • Solo mining is not very profitable now.

  • Chapter 7: the Bitcoin network and payment

    • The Bitcoin network is a peer-to-peer (P2P) network where nodes perform transactions.
    • There are different types of nodes on the network. The two main types of nodes are full nodes and simple payment verification (SPV) nodes.
    • SPV nodes only download the headers of the blocks while syncing with the network.
    • SPV clients are used to verify payments without requiring the download of the full blockchain.
    • On a Bitcoin network, there are full clients (nodes), which perform the function of storing a complete blockchain. If you cannot run a full node, then SPV clients can be used to verify that particular transactions are present in the block by only downloading the block headers instead of the entire blockchain. At times, even running an SPV node is not feasible (especially on low-resource devices such as mobile phone) and the requirement is only to send and receive Bitcoin somehow. For tis purpose, wallets (wallet software) are used that do not require downloading even the block headers.
    • Since version 0.10.0, the initial block download method named headers-first was introduced. This resulted in major performance improvement, and blockchain synchronization that used to take days to complete started taking only a few hours.
    • The wallet software is used to generate and store cryptographic keys. It performs various useful functions, such as receiving and sending Bitcoin, backing up keys, and keeping track of the balance available. 
    • Private keys are used by wallets to sign the outgoing transactions. Wallet do not store any coins, and there is no concept of wallets storing balance or coins for a user. In fact, in the Bitcoin network, coins do not exist; instead, only transaction information is stored on the blockchain (more precisely, UTXO, unspent outputs), which are then used to calculate the number of bitcoins.
    • Paper wallets can be generated on line from various service providers such as https://bitcoinpaperwallet.com or https://www.bitaddress.org/
    • Lightning network is a solution for scalable off-blockchain instant payments. It was introduced in early 2016 and allows off-blockchain payments.
    • Innovation in Bitcoin: improvement proposals are usually made in the form of Bitcoin Improvement proposals (BIPs).
    • Excellent ideas have emerged from research and innovation efforts related to Bitcoin.
    • The Bitcoin network can only process approximately three to seven transactions per second which is a tiny number compared to Visa network which can process on average 24,000 transactions per second. PayPal can process approximately 200 transactions per second whereas Ethereum can process up to, on average 20.
    • The Segregated Witness (SegWit): the key idea behind SegWit is the separation of signature data from transaction data (that is, a transaction Merkle tree), which results in the size of the transaction being reduced.
    • Not only has the original Bitcoin evolved quite significantly since its introduction, but there are also new blockchains that are either forks of Bitcoin or novel implementations of the Bitcoin protocol with advanced features.
    • Bitcoin cash (BCH) uses Proof of Work (PoW) as a consensus algorithm, and mining hardware is still ASIC-based.
    • Bitcoin Gold is hard fork and uses the Equihash algorithm as its mining algorithm instead of PoW.
    • Market orders means that as soon as the prices match, the order will be fulfilled immediately. Limit orders allow for buying and selling a set number of bitcoins at a specified price or better.

  • Chapter 8: Bitcoin Clients and APIs

  • Chapter 9: Alternative Coins
    • Alternative approaches to Bitcoin can be divided broadly into two categories, based on the primary purpose of their development. If the primary goal is to build a decentralized blockchain platform, they are called alternative chains; if the sole purpose of the alternative project is to introduce a new virtual currency, it is called an altcoin.
    • Namecoin: the primary purpose is to provide decentralized naming and identity services instead.
    • Ethereum classic is the old chain and Ethereum is the new chain after the fork. Such a contentious hard fork is not desirable.
    • Altcoins must be able to attract new users, trades and miners.
    • Currency gains its value, especially in the virtual currency space, due to the network effect and its acceptability by the community.
    • The power is shifting toward miners or mining pools who can afford large-scale ASIC farms. This power shift challenges the core philosophy of the decentralization of Bitcoin.
    • PoW does have various drawbacks, and the biggest of all is energy consumption. It is estimated that the total electricity consumed by Bitcoin miners currently is more than that of Greece at 59.61 Terawatt hash (TWh)
    • Proof of Stake (PoS): users are required to demonstrate the possession of a certain amount of currency (coins), thus proving that they have a stake in the coin.
    • In Bitcoin, the difficulty is adjusted every 2016 blocks.
    • Privacy and anonymity: as the blockchain is a public ledger of all transactions and is openly available, it becomes easy to analyze it. This is a big concern from a privacy point of view. Various proposals have been made to address the privacy issue in Bitcoin. These proposals fall into three categories: mixing protocols, third-party mixing networks and inherent anonymity.
    • Dandelion is a proposal that aims to make transactions on a Bitcoin network untraceable. The Dandelion protocol is composed of an anonymity phase and a spreading.
    • Colored coins: coloring a bitcoin refers colloquially to updating it with some metadata representing a digital asset (smart property). The coin still works and operates as a Bitcoin, but additionally carries some metadata that represents some assets.
    • Colored coins can be used to represent a multitude of assets, including, but not limited to, commodities, certificates, shares, bonds and voting.
    • Counterparty is another service that can be used to create custom tokens.
    • Counterparty works based on the same idea as colored coins by embedding data into regular Bitcoins transactions, but provides a much more productive library and a set of powerful tools to support the handling of digital assets.
    • Counterparty allows the development of smart contracts on Ethereum using the Solidity language and allows interaction with the Bitcoin blockchain.
    • Development of altcoins: Altcoin projects can be started very quickly from a coding point of view by simply forking the Bitcoin or another coin's source code, but this is probably not enough. Usually, the code base is written in C++, as was the case for Bitcoin, but almost any language can be used to develop coin projects; for example Golang or Rust.
    • Reward halving rate: Bitcoin is halved every 4 years and now is set to 12.5 Bitcoin.
    • Total supply of coins: this number sets the total limit of the coins that can be ever be generated.In Bitcoin, the limit is 21 million, whereas in Dogecoin, it's unlimited.
    • Token versus cryptocurrency: A cryptocurrency is a native coin for a standalone blockchain. In contrast, a token is a representation of the value of some asset.
    • Initial Coin Offering (ICO) is a method for crowdfunding. The first successful ICO was that of Ethereum, which raised 18 million USD in 2014. A recent success is Tezos, which made 232 million USD in a few weeks. Another example is Filecoin, which raised more than 250 million USD. A more recent example is EOS, which raised a record of over 4 billion USD.
    • Ethereum has become a platform of choice for ICOs due to its ability to create new tokens and with the ERC20 (Ethereum Request for Comments)standard, it has become even more accessible.
    • Cryptocurrencies are a very attractive area for research.

  • Chapter 10: Smart Contracts

    • Smart contracts are now on going and intense area of research in the blockchain space.
    • Smart contracts can bring many benefits such ad increased security, cost-saving and transparency to industries (especially the finance industry).
    • Nick Szabo forts theorized smart contracts in the 1990's.
    • A smart contract is a secure and unstoppable computer program representing an agreement that is automatically executable and enforceable.
    • Code is the law.
    • Certain inputs that need to be provided by people can and should be also automated. Oracles can be used for that purpose.
    • English law recognized crypto assets as traceable property and smart contracts as enforceable agreements. This announcement was made by the UK Jurisdiction Taskforce (UKJT) (https://technation.io/news/uk-takes-significant-step-in-legal-certainty-for-smart-contracts-and-cryptocurrencies)
    • If humans and machines can both understand the code written in a smart contract, it might become acceptable in legal situations, as opposed to just a piece of code that no one understands except for programmers.
    • Legal Knowledge Interchange Format (LKIF)
    • Smart contract have the following properties:
      • automatically executable
      • enforceable
      • deterministic
      • semantically sound
      • unstop-able
    • Ricardian contracts (https://iang.org/papers/fc7.html) fundamental: write a document that is understood and accepted by both a court of law and computer software.
    • Consider a smart contract as a standalone entity that is capable of encoding legal prose and code (business logic)
    • Solidity is a language that has been introduced with the Ethereum blockchain to write smart contracts.
    • Tibco StreamBase product is a Java based system used for building event-driven, high frequency trading systems is an equivalent to DApp (Decentralized App)
    • An inherent limitation with smart contracts is that they are unable to access any external data. The concept of oracles was introduced to address this issue. An oracle is an off-chain source of information that provides the required information to the smart contracts on the blockchain.
    • The limitation with smart contracts is that they cannot access external data because blockchains are closed systems without any access to the real world.
    • An oracle can be defined as an interface that delivers data from an external source to smart contracts.
    • TLS notary provides a piece of irrefutable evidence to an auditor that specific web traffic has occurred between a client and a server. In is based on TLS (Transport Layer Security).
    • To prove the authenticity of the data retrieved by oracles from external resources, attestation such as the TLSNotary are used.
    • Ledger proof, Ledger Nanao S: the primary purpose of these devices is a secure hardware cryptocurrency. These devices run a particular OS called Blockchain Open Ledger Operating system (BOLOS)
    • A trusted hardware assisted proof is Town Crier (https://www.town-crier.org) which provides an authenticated data feed for smart contracts. It uses Intel SGX to provide a security guarantee that the requested data has come from an existing trustworthy source.
    • Various other blockchain platforms support smart contracts such as Monax, Lisk, Counterparty, Stellar, Hyperledger fabric, Axoni core, Neo, EOSIO and Tezos.
    • DAO: Decentralized Autonomous Organization was a smart contract written to provide a platform for investment.
    • DAO: due to a bug, called the reentrancy bug, it was hacked in June 2016. An equivalent to approximately 3.6 million ether was siphoned out of the DAO into another account. This incident resulted in a hard fork on the Ethereum blockchain, which was introduced to recover from the attack. Subsequently, resistance against this hard fork resulted in the creation oof Ethereum Classic, where a large number of users decided to keep the mining on the old chain.
    • The security of smart contracts is an area of deep interest for researchers.
    • Ricardian contracts are concerned with the definition of the contract, whereas smart contracts are geared toward the actual execution of the contract.

  • Chapter 11: Ethereum 101
    • Ethereum has its own decentralized and distributed ecosystem that uses Swarm for storage and the Whisper protocol for communication.
    • USDT token (Tethers) using the ERC 20 standard.
    • Merkle-Patricia trees are used in the Ethereum blockchain.
    • Ethereum with its Serenity release will soon transition to a PoS based consensus algorithm.

  • DeFi

  • Des liens nouveaux et intéressants 

  • Acronymes

    • AML: Anti Money Laundering
    • BFT: Byzantine Fault Tolerance
    • CAP Theorem : Consistency, Availability and Partition
    • DAO: Decentralized Autonomous Organization
    • EVM : Ethereum Virtual Machine
    • ECC: Elliptic Curve Cryptography
    • KYC: Know Your Customer
    • Nonce: a nonce is a number that is generated and used only once.
    • Merkle root: In a blockchain block, it is the combined hash of the transactions in the block
    • PBFT: Practical Byzantine Fault Tolerance

  • Translation

    • escrow: dépôt
    • unredeemable: non réclamable
    • tumbler: acrobate