区块链
Links to this note
Sui
TAGS: Blockchain
Sign Message
tags: Blockchain
Decode input data of Ethereum
tags: Ethereum,Blockchain,Tron source: https://ethereum.stackexchange.com/a/110498 const data = '0x7ff36ab50000000000000000000000000000000000000000000000bc18ba4144048bbab00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c0c5eb43e2df059e3be6e4fb0284c283caa5991900000000000000000000000000000000000000000000000000000000614d87a80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000008ba0619b1e7a582e0bce5bbe9843322c954c340'; ethers.utils.defaultAbiCoder.decode( ['uint256', 'address[]', 'address', 'uint256'], ethers.utils.hexDataSlice(data, 4) ) // gives: [e, ["0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "0x08ba0619b1e7A582E0BCe5BBE9843322C954C340"], "0xC0C5eb43E2dF059e3Be6E4fb0284C283CAa59919", e] (4) Online tools: Playground.
Tron
tags: Blockchain
DeFi from Scratch
tags: DeFi, Blockchain, Uniswap, Uniswap V3 I need derive price from decentralized exchanges, and I have finished some research about Uniswap v3. It’s brand new for me, and after that I want to share some ideas about DeFi, and I think it would be helpful for you to understand Uniswap and some other decentralized exchanges. DeFi from Scratch We exchange stuffs very often, and we can exchange tokens in a centralized exchange....
DeFi
tags: Blockchain
Uniswap
tags: Blockchain,Ethereum,DeFi
Non-Fungible Tokens vs. Fungible Tokens
tags: Blockchain,Ethereum source: “Graphical Guide to Understanding Uniswap - EthHub.” Accessed August 23, 2022. https://docs.ethhub.io/guides/graphical-guide-for-understanding-uniswap/. ERC20 tokens are the most common type of token built on top of Ethereum. They are fungible in nature, meaning that there isn’t a distinction between individual tokens. For example, if I have 100 metal marbles in my hand that are all the same size and color, it doesn’t matter which one I give you....
Move
tags: Starcoin Web3 StarTrek,Blockchain,Smart contracts
P2P
tags: Starcoin Web3 StarTrek,Blockchain
Addressable Merkle Tree(AMT)
tags: Merkle tree,Blockchain,Starcoin Web3 StarTrek source: Gao, Zhenhuan, Yuxuan Hu, and Qinfan Wu. “Jellyfish Merkle Tree,” n.d., 12. What is Addressable mean? It means the leaf node in the tree can be found by an address. The address encoded the path to the leaf node, for example, a leaf node in a binary tree, which has 3 level. Its address may be encoded to 010, the corresponding path is: left->right->left:...
Starcoin Blockchain from Scartch
tags: Starcoin Web3 StarTrek,Blockchain Overview Block is the basic element in a blockchain system, as we known blockchain system is just a ledger, which means a bookkeeping1 that recording of financial transactions. In the blockchain system, those transactions are stored in the blocks. In each block, the data stored in may look like: TXN FROM TO VALUE #0 God Cale 100 #1 Cale Alice 10 #2 Alice Bob 1 #3 Bob Mike 0....
Merkle tree
tags: Starcoin Web3 StarTrek,Blockchain source: Wikipedia: Merkle tree Starcoin Cookbook What is a Merkle tree. Merkle tree is a hash tree, named after Ralph Merkle, who patented in 1979. Most implementations of them are binary, which means two child nodes under each node. Why the merkle tree is important to the peer-to-peer network? The main purpose of a merkle tree is to ensure the data we received from a peer-to-peer network are undamaged and unaltered, it’s important as the data were splitted into many blocks and stored in multiple nodes in the network....
Blockchain: It's not still the early days
tags: Blockchain,Web3 source: White, Molly. “It’s Not Still the Early Days.” Molly White, January 14, 2022. https://blog.mollywhite.net/its-not-still-the-early-days/. For blockchains, some thoughts are false, like: “It’s the early days.” “Give it a chance.” The reason is long time have passed, but no bright changes happened, the long time means Bitcoin began to be used in 2009, and Ethereum lanched in 2015. To compare: Smartphones from 2009 to 2015: Nokia -> iPhone/Android....
Crypto: the good, the bad and the ugly
tags: Blockchain,Smart contracts,Web3 source: “Crypto: The Good, the Bad and the Ugly.” Accessed January 7, 2022. https://seldo.com/posts/crypto-the-good-the-bad-and-the-ugly. The good: Smart contracts allows anybody to execute arbitrary code in the network. And use money to avoid abuse, as every action in the smart contract cost money(computing resource). Finaacial engineering: new money. Entertainment: NFT, a big dream(culture) for everybody who loves crypto. True cloud computing: Smart contracts again. Web3 The bad:...
Smart contracts
tags: Blockchain,Ethereum source: https://ethereum.org/en/developers/docs/smart-contracts/ A type of Ethereum account. Some code deployed and running in some VM, like Ethereum Virtual Machine.
Decentralized autonomous organizations (DAOs)
tags: Ethereum,Smart contracts,Blockchain,Web3 source: https://ethereum.org/en/dao/ Based on smart contracts and use tokens for voting. Tokens can be exchanged in the market.
A not so gentle intro to web3
tags: Blockchain,Web3 source: https://www.kooslooijesteijn.net/blog/web3
Web3
tags: Blockchain
Ledger, the first peer-reviewed journal dedicated to the study of blockchains and cryptocurrencies!
tags: Blockchain
Proof-of-stake
tags: Blockchain,Blockchain Proof,Ethereum,Solana source: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/ Proof workflow: Users stake money(ETH) to become a validator. Validators are chosen at random to create blocks and are responsible for checking and confirming blocks they don’t create. user’s stake is also used as a way to incentivise good validator behavior. For example, a user can lose a portion of their stake for things like going offline (failing to validate) or their entire stake for deliberate collusion....
Ethereum
tags: Blockchain
Proof-of-work
tags: Blockchain Proof,Blockchain,Ethereum source: https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/ Wikipedia: https://en.wikipedia.org/wiki/Proof%5Fof%5Fwork A key feature of proof-of-work schemes is their asymmetry: the work – the computation – must be moderately hard (yet feasible) on the prover or requester side but easy to check for the verifier or service provider. With a hash function, let’s say SHA-1. For example, to do PoW, we need to generate a SHA-1 hash of the given data that must begins 52 binary zeros, that is 13 hexadecimal zeros:...
Blockchain Proof
tags: Blockchain
Shinobi Systems' Solana Proof of Stake + Proof of History Primer
tags: Blockchain,Solana,Proof-of-stake,Proof-of-history source: “Shinobi Systems’ Solana Proof of Stake + Proof of History Primer.” Accessed January 5, 2022. https://www.shinobi-systems.com/primer.html.
Solana
tags: 区块链 POST https://node.onekey.so/sol Content-Type: application/json { "id": 1, "jsonrpc": "2.0", "method": "getSignaturesForAddress", "params": ["35wyEANtpzPJMUvEKXkK8HRriieTxkSanQtKWk6H9ZoY"] } TX POST https://solana-mainnet.g.alchemy.com/v2/DLTabdbSnGUoSoFBu-xjjfpplQFdqsP7 Content-Type: application/json { "id": 1, "jsonrpc": "2.0", "method": "getTransaction", "params": ["4emUuam8KS2ZTMQiJek9FTVM5WWU8j6FBuFGpe9Y7nQkvBhfoAwb3k6yuNBA7Nxv2qF6Mz57FuyLKPTkt84yRRB3", {"encoding": "jsonParsed", "maxSupportedTransactionVersion": 0}] }
Blockchain Demo
tags: Video: Blockchain 101 - A Visual Demo,区块链, Online Tools source: https://andersbrownworth.com/blockchain/hash
Video: Blockchain 101 - A Visual Demo
tags: 区块链 source: https://youtu.be/%5F160oMzblY8 It’s like Git but not support merge. The progress of changing blocks like git rebase.
Distributed consensus (blockchain) simulation and visualization
tags: 分布式共识,Online Tools,区块链 source: https://web3scout.github.io/forcecons-sim/