ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Solana 101

2022-02-06 10:59:43  阅读:274  来源: 互联网

标签:slot Solana SOL accounts entry 101 block


Solana还具有一个称为SOL的令牌,可以将其传递给Solana区块链上的节点以运行链上程序或验证其输出。尽管网络允许部分SOL交易,但SOL令牌的总数限制为10亿个。
一个SOL最多可拆分34次。分数SOL称为Lamport。它是为纪念Solana最大的技术影响力Leslie
Lamport而命名的。一盏灯的价值约为0.0000000000582 sol(2 ^ -34)

Solana 是一个单链、权益证明协议,它通过独特的历史证明(PoH)机制提高整体网络效率,从而在不牺牲可扩展性的情况下发挥去中心化的优势。目前,Solana 可以处理 50,000 TPS,单笔交易成本低至 0.0001 美元。

https://img.jinse.com/5099766_image3.png
lamport:1 lamport = 10^−9SOL
shred:A fraction of a block; the smallest unit sent between validators。为block的一部分,validators之间传输的最小单元。
ledger entry:账本上的entry要么为tick要么为transactions entry。其中tick用于:estimates wallclock duration;而transactions entry 是指:A set of transactions that may be executed in parallel。
slot:The period of time for which each leader ingests transactions and produces a block.【A leader produces at most one block per slot. 即每个slot最多只有一个区块。Solana中,设置1个slot对应64个ticks。】
Collectively, slots create a logical clock. Slots are ordered sequentially and non-overlapping, comprising roughly equal real-world time as per PoH.

/// Slot is a unit of time given to a leader for encoding,
/// is some some number of Ticks long.
pub type Slot = u64;
···
skipped slot:A past slot that did not produce a block, because the leader was offline or the fork containing the slot was abandoned for a better alternative by cluster consensus. A skipped slot will not appear as an ancestor for blocks at subsequent slots, nor increment the block height, nor expire the oldest recent_blockhash.
Whether a slot has been skipped can only be determined when it becomes older than the latest rooted (thus not-skipped) slot.
transaction:One or more instructions signed by the client using one or more keypairs and executed atomically with only two possible outcomes: success or failure.
Solana的交易中会封装recent_hash,可通过getRecentBlockhash rpc 接口获得

transaction id:The first signature in a transaction, which can be used to uniquely identify the transaction across the complete ledger.
transaction confirmations:The number of confirmed blocks since the transaction was accepted onto the ledger. A transaction is finalized when its block becomes a root.
transactions entry:A set of transactions that may be executed in parallel.
epoch:目前Solana一个epoch对应43.2万个slot。【若一个slot对应400ms,则一个epoch对应48小时。】
blockhash:A preimage resistant hash of the ledger at a given block height. Taken from the last entry id in the slot。Slot中的最后一个entry id作为block hash。即:【粒度为:一个slot内若没有交易,则对应为64个tick;若有交易,一个slot对应有多个entry,每个entry对应多笔交易,每个entry会切分为多个shreds便于传输,会对每个shred进行签名sign_shred()。】

什么是SOLANA?

Solana是一个开源项目,它实现了一个全新的高性能无许可区块链。Solana基金会位于瑞士日内瓦,维护着开源项目。

什么是SOL?

SOL是Solana原生代币的名称,可以将其传递给Solana集群中的节点,以换取运行链上程序或验证其输出。 系统可以执行分数SOL的微支付,称为lamports。 它们的名称是为了纪念Solana的最大技术影响力Leslie Lamport。 1 Lamport的值为0.000000001 SOL。

官网地址
GitHub: https://github.com/solana-labs
官网: https://solana.com
区块浏览器:https://explorer.solana.com/

Solana链上的信息是记录在文件中,这个文件在Solana上表现为Account,所以用户所需要支付的就是一个文件存储所需要的花费,是以SOL计价的。如果想要关闭删除文件的话,那么只要把这个Account的SOL都转走,那么这个Account对应的地址,在链上就没有钱来买位置了,也就会被删除掉了。

私钥
私钥是私自保管不可示人的。私钥是一串乱码,不好记,与之对应有一串助记词。助记词可以通过算法推出私钥,所以实际上我们在使用钱包时,只要记住助记词。好比你使用支付宝的时候,不用输入支付密码,只需要伸出手指头或者露脸扫描以下。那么手指头就相当于是支付密码的助记物。

公钥
公钥是可以展示给别人看的,公钥也是合约的地址。在solana上智能合约一般称为“Onchain Program”,所以公钥也叫programId。

交易签名
当交易存在相应的数字签名时,表示该账户的私钥持有人已签名并因此“授权”了该交易。

Transaction介绍

Transaction
Transaction是由客户端向solana节点发起请求的单元,一个Transaction可能包含有多个Instruction。Solana节点在收到一个客户端发起的Transaction后,会先解析里面的每个Instruction,然后根据Instruction里面的programId字段,来调用对应的智能合约,并将Instruction传递给该智能合约。

Fact Sheet

Accounts are used to store data
Each account has a unique address
Accounts have a max size of 10mb
PDA accounts have a max size of 10kb
PDA accounts can be used to sign on behalf of a program
Account size is static
Account data storage is paid with rent
Default account owner is the System Program

Account Model
There are 3 kinds of accounts on Solana:

Data accounts store data
Program accounts store executable programs
Native accounts that indicate native programs on Solana such as System, Stake, and Vote

Within data accounts, there are 2 types:
System owned accounts
PDA(Program Derived Address) accounts

标签:slot,Solana,SOL,accounts,entry,101,block
来源: https://blog.csdn.net/FENGQIYUNRAN/article/details/122560522

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有