Kaia 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 35쪽 중 8쪽

like below (as typical Blockchain platforms did): Get the public key from ecrecover(txhash, txsig) . Get the address of the public key. The address is the sender. Attributes ​ Attribute Type Description Type uint8 (Go) The type of AccountKeyLegacy. This must be 0x01 . RLP Encoding ​ 0x01c0 AccountKeyPublic ​ AccountKeyPublic is used for accounts having one public key. If an account has an AccountKeyPublic object, the transaction validation process is done like below: Get the public key derived from ecrecover(txhash, txsig) . Check that the derived public key is the same as the corresponding account's public key. Attributes ​ Attribute Type Description Type uint8 (Go) The type of AccountKeyPublic. This must be 0x02 . Key [33]byte (Go) Key should be a compressed public key on S256 curve. RLP Encoding ​ 0x02 + encode(CompressedPubKey) NOTE : CompressedPubKey is a public key in a compressed format defined in SEC1 . In short, 0x02 {PubkeyX} if PubkeyY is an even number or 0x03 {PubkeyX} otherwise. RLP Encoding (Example) ​ prvkey 0xf8cc7c3813ad23817466b1802ee805ee417001fcce9376ab8728c92dd8ea0a6b pubkeyX 0xdbac81e8486d68eac4e6ef9db617f7fbd79a04a3b323c982a09cdfc61f0ae0e8 pubkeyY 0x906d7170ba349c86879fb8006134cbf57bda9db9214a90b607b6b4ab57fc026e RLP: 0x02a102dbac81e8486d68eac4e6ef9db617f7fbd79a04a3b323c982a09cdfc61f0ae0e8 AccountKeyFail ​ If an account has the key AccountKeyFail, the transaction validation process always fails. It can be used for smart contract accounts so that a transaction sent from the smart contract account always fails. Attributes ​ Attribute Type Description Type uint8 (Go) The type of AccountKeyFail. It must be 0x03 . RLP Encoding ​ 0x03c0 AccountKeyWeightedMultiSig ​ AccountKeyWeightedMultiSig is an account key type containing a threshold and WeightedPublicKeys which contains a list consisting of a public key and its weight. In order for a transaction to be valid for an account associated with AccountKeyWeightedMultiSig, the following conditions should be satisfied: The weighted sum of the signed public keys should be larger than the threshold. The invalid signature should not be included in the transaction. The number of signed public keys should be less than the number of weightedPublicKeys. note The following multiSig validation logic has been added with the IstanbulEVM hardfork. The invalid signature should not be included in the transaction. The number of signed public keys should be less than the number of weightedPublicKeys. Attributes ​ Attribute Type Description Type uint8 (Go) The type of AccountKeyWeightedMultiSig. This must be 0x04 . Threshold uint (Go) Validation threshold. To be a valid transaction, the weight sum of signatures should be larger than or equal to the threshold. WeightedPublicKeys []{uint, [33]byte} (Go) A list of weighted public keys. A weighted public key contains a compressed public key and its weight. RLP Encoding ​ 0x04 + encode([threshold, [[weight, CompressedPubKey1], [weight2, CompressedPubKey2]]]) RLP Encoding (Example) ​ Threshold 3 Key0 Weight: 1 PubkeyX 0xc734b50ddb229be5e929fc4aa8080ae8240a802d23d3290e5e6156ce029b110e PubkeyY 0x61a443ac3ffff164d1fb3617875f07641014cf17af6b7dc38e429fe838763712 Key1 Weight: 1 PubkeyX 0x12d45f1cc56fbd6cd8fc877ab63b5092ac77db907a8a42c41dad3e98d7c64dfb PubkeyY 0x8ef355a8d524eb444eba507f236309ce08370debaa136cb91b2f445774bff842 Key2 Weight: 1 PubkeyX 0xea9a9f85065a00d7b9ffd3a8532a574035984587fd08107d8f4cbad6b786b0cd PubkeyY 0xb95ebb02d9397b4a8faceb58d485d612f0379a923ec0ddcf083378460a56acca Key3 Weight: 1 PubkeyX 0x8551bc489d62fa2e6f767ba87fe93a62b679fca8ff3114eb5805e6487b51e8f6 PubkeyY 0x4206aa84bc8955fcbfcc396854228aa63ebacd81b7311a31ab9d71d90b7ec3d7 RLP: 0x04f89303f890e301a102c734b50ddb229be5e929fc4aa8080ae8240a802d23d3290e5e6156ce029b110ee301a10212d45f1cc56fbd6cd8fc877ab63b5092ac77db907a8a42c41dad3e98d7c64dfbe301a102ea9a9f85065a00d7b9ffd3a8532a574035984587fd08107d8f4cbad6b786b0cde301a1038551bc489d62fa2e6f767ba87fe93a62b679fca8ff3114eb5805e6487b51e8f6 AccountKeyRoleBased ​ AccountKeyRoleBased represents a role-based key. The roles are specified at Roles . Attributes ​ Attribute Type Description Type uint8 (Go) The type of AccountKeyRoleBased. It must be 0x05 . Keys [] {AccountKey} (Go) A list of keys. A key can be any of AccountKeyNil, AccountKeyLegacy, AccountKeyPublic, AccountKeyFail, and AccountKeyWeightedMultiSig. Roles ​ Roles of AccountKeyRoleBased are defined as below: Role Description RoleTransaction Index 0. Default key. Transactions other than TxTypeAccountUpdate should be signed by the key of this role. RoleAccountUpdate Index 1. TxTypeAccountUpdate transaction should be signed by this key. If this key is not present in the account, TxTypeAccountUpdate transaction is validated using RoleTransaction key. RoleFeePayer Index 2. If this account wants to send tx fee instead of the sender, the transaction should be signed by this key. If this key is not present in the account, a fee-delegated transaction is validated using RoleTransaction key. RLP Encoding ​ 0x05 + encode([key1, key2, key3]) Note that key1, key2, and key3 can be any of above keys (AccountKeyNil, AccountKeyLegacy, AccountKeyPublic, AccountKeyFail, and AccountKeyWeightedMultiSig). Omissible and Expandable Roles ​ The roles can be omitted from the last index, and the omitted roles are mapped to the first role. However, a role in the middle cannot be omitted, which means RoleTransaction and RoleFeePayer cannot be set without RoleAccountUpdate. For example, if a role-based key is set to 0x05 + encode([key1, key2]) , RoleFeePayer works as if the key is set like 0x05 + encode([key1, key2, key1]) . This feature allows for more roles to be added in the future. If a new role is provided, the new role of accounts already created with old roles is mapped to the first role. RLP Encoding (Example) ​ RoleTransaction Key PubkeyX 0xe4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512d PubkeyY 0x0a5735a23ce1654b14680054a993441eae7c261983a56f8e0da61280758b5919 RoleAccountUpdate Key Threshold: 2 Key0 Weight:1 PubkeyX 0xe4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512d PubkeyY 0x0a5735a23ce1654b14680054a993441eae7c261983a56f8e0da61280758b5919 Key1 Weight:1 PubkeyX 0x36f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06 PubkeyY 0x6fdf9fc87a16ac359e66d9761445d5ccbb417fb7757a3f5209d713824596a50d RoleFeePayer Key PubkeyX 0xc8785266510368d9372badd4c7f4a94b692e82ba74e0b5e26b34558b0f081447 PubkeyY 0x94c27901465af0a703859ab47f8ae17e54aaba453b7cde5a6a9e4a32d45d72b2 RLP: 0x05f898a302a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512db84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a102c8785266510368d9372badd4c7f4a94b692e82ba74e0b5e26b34558b0f081447 Account Key Type ID ​ Below are the Account Key Type ID assigned to each Account Key Type. Account Key Type Account Key Type ID AccountKeyLegacy 0x01 AccountKeyPublic 0x02 AccountKeyFail 0x03 AccountKeyWeightedMultiSig 0x04 AccountKeyRoleBased 0x05 Kaia Accounts Overview of Account, State, and Address Decoupling Key Pairs From Addresses Multiple Key Pairs and Role-Based Keys Kaia Wallet Key Format Kaia Account Types Kaia Account Type ID Account Key AccountKeyNil AccountKeyLegacy AccountKeyPublic AccountKeyFail AccountKeyWeightedMultiSig AccountKeyRoleBased Account Key Type ID ## /learn/consensus-mechanism On this page A consensus mechanism (algorithm) is a way of reaching a consensus between trustless entities. In blockchain technology, it is used to reach a consensus about if a block is valid or not. The performance of blockchain networks relies on the performance of the adopted consensus mechanisms, and it has a significant impact on the perceived usability of the Blockchain Applications. Kaia Mainnet exhibits the following performance. Handles 4,000 transactions per second. Immediate transaction finality. One-second block generation time. Over 50 consensus nodes can participate in the consensus process. In the document, we will go over how Kaia implemented the high-performing consensus process. Background ​ Bitcoin is using PoW (Proof-of-Work), whereas Ethereum has recently shifted to PoS (Proof-of-Stake), which decides on the block generating nodes by the stake of the node. Usually, these algorithms involve no communication between nodes in determining the validities of blocks. So in these systems, a fork can happen which means two or more different blocks can be made on the same height. Usually, the "Longest chain wins" rule is applied to solve the fork condition. It means that those forks will be merged into a single canonical chain eventually, but it also means a list of blocks can be reverted in some period of time when it belongs to the shorter chain. So in these algorithms, there is no guarantee of the finality of blocks and transactions. The finality can only be achieved probabilistically after a period of time, which is still can't be 100% guaranteed. This lack of finality is a very difficult issue in customer-facing services that use blockchain platforms. Because it has to wait until forks are resolved and enough blocks are stacked after the transfer to believe the transaction is not reversible. This has a negative effect both on users and service providers. A simple example of this issue can be demonstrated in financial services. Say a user transferred money to someone, and the service can't verify that the transfer is valid until 30 to 60 minutes have passed. Because it has to wait until the forks have been merged into a single chain and several blocks are stacked after the transfer to be sure that the transaction is not reversible. PBFT (Practical Byzantine Fault Tolerance) ​ To prevent the above issues, we need other algorithms that guarantee the finality. BFT algorithm is one of those, first published in 1982 by Lamport, Shostak, Pease. In 1999, Miguel Castro and Barbara Liskov introduced "Practical Byzantine Fault Tolerance" ( PBFT ) which provides high-performance state machine replication. In the PoW algorithm stated above, though each node receives and validates blocks, there are no message exchanges between nodes to reach a consensus. But in PBFT, each node communicates with other participating nodes to reach a consensus and the finality of the block can be guaranteed as soon as nodes were able to reach a consensus. The communication between nodes basically progresses as shown below. But there are some variants which reflect each system's characteristics. As shown above, a participating node in PBFT basically communicates with all nodes in the network in several phases. This characteristic limits the number of nodes because the communication volume increases exponentially as the number of nodes increases. Consensus Mechanism in Kaia ​ Kaia is aiming to be an Enterprise-ready and Service-centric platform. Therefore we need to solve the finality problem written above and the network should be able to allow many nodes to participate in the network. To make this possible, Kaia is using an optimized version of Istanbul BFT, which implements PBFT with modifications to deal with blockchain network's characteristics. In Kaia, there are three types of nodes, CN (Consensus Node), PN (Proxy Node) and EN (Endpoint Node). CNs are managed by CCOs (Core Cell Operators) and are in charge of block generation. These blocks are verified by all nodes in the network. Please refer to here to know more about this network topology. Kaia achieves fast finality by adopting and improving Istanbul BFT. Because validation and consensus are done for each block there is no fork and the block's finality is guaranteed instantly as soon as the consensus is made. And also the issue of increasing communication volume in the BFT algorithm is solved by utilizing randomly selected Committee . CNs collectively form a Council and on each block generation, part of them are selected as a member of Committee using a VRF (Verifiable Random Function). Because consensus messages are exchanged only between the committee members, the communication volume can be limited under the designed level even though the total number of CNs increases. Currently, Kaia Mainnet can provide a high throughput of 4,000 transactions per second with one-second block generation interval. More than 50 consensus nodes can participate in the CNN (Consensus Node Network) at the moment and the number will continuously increase as Kaia continues to aggressively optimize the algorithm. Background PBFT (Practical Byzantine Fault Tolerance) Consensus Mechanism in Kaia ## /learn/token-economics/kaia-native-token On this page KAIA ​ KAIA is the main internal transferable cryptocurrency of Kaia and is used to pay transaction fees when creating or executing smart contracts or when transferring KAIA. KAIA is a necessary element--a fuel--for operating the Kaia distributed application platform. It is a form of payment made by the clients of the platform to the consensus nodes (CNs) executing the requested operations. To put it another way, KAIA is an incentive; it ensures that developers write high-quality applications (wasteful code costs more) and that the network remains healthy (CNs are compensated for the resources they contribute). Units of KAIA ​ Kaia uses the following unit system for KAIA. kei is the smallest currency unit. A Gkei is 10^9 kei. A KAIA is 10^18 kei. Unit kei value kei kei 1 kei 1 Gkei 10^9 kei 1,000,000,000 KAIA 10^18 kei 1,000,000,000,000,000,000 Historical Pricing ​ You can download historical price data for the former KLAY and FNSA tokens using the following links: Download KLAY historical pricing Download FNSA historical pricing KAIA Units of KAIA Historical Pricing ## /learn/token-economics/token-economy On this page Overview ​ Kaia’s token economy is designed to create sustainable funding structures for empowering its ecosystem, growth initiatives, and strategic investments. Many public blockchain projects have monetary systems that solely incentivize their node operators (miners or block producers), focusing only on the technical aspect of network maintenance. However, such designs miss out on the importance of incentivizing other types of participants who contribute to the growth of the network’s token economy or invest in long-term growth prospects. In contrast, Kaia’s token economy is designed to compensate more diverse forms of contributions from a wider range of participants, and has built-in funding structure to procure sustained resources to fuel future growth initiatives and strategically sourced investment projects in addition to maintaining its blockchain nodes. Funding Structure ​ Kaia’s funding structure runs continuously with Kaia network’s block generation. With every new block, newly issued KAIA and the sum of transaction fees used in the block (collectively called “block reward”) are aggregated and distributed to the following three destination accounts in accordance to the predetermined ratio: Validators and Community: 50% Contribution rewards: 20% of the 50% (10% of total) Staking rewards: 80% of the 50% (40% of total) Kaia Ecosystem Fund (KEF): 25% Kaia Infrastructure Fund (KIF): 25% 9.6 KAIA will be minted for every new block. This implies that approximately 300 million KAIA will be minted annually, which is equivalent to 5.2% annual inflation against the total KAIA tokens in the market (the annual inflation rate is subject to change through the Kaia Governance Process). Transaction fee is charged and metered according to the pre-determined fee tables. For detailed information about the transaction fees, please refer to Transaction Fees . Kaia Governance Council Reward ​ Kaia Governance Council is the collective group of Core Cell Operators (CCOs). Council members are responsible for maintaining Core Cells (CCs), which makes the Council an essential body in the Kaia ecosystem responsible for providing the underlying infrastructure. To become a Council member, the candidate must undergo a qualification review by the Kaia Governance Process and must stake at least 5 million KAIA. The Kaia Governance Council Reward is a structure for incentivizing Council members to continue to provide a stable foundation for the Kaia ecosystem. Kaia Governance Council Reward Mechanism ​ For each block in the Kaia blockchain, a Committee is formed by randomly selecting members from the Kaia Governance Council (GC). This Committee consists of a single member who is assigned the role of Proposer, while the remaining Committee members take on the role of Validators. Once a block is successfully created and appended to the Kaia blockchain, the block reward is distributed among the Council members and various funds according to the previously mentioned ratios. All Council members have an equal probability of being selected as the Proposer for a given block, and the contribution reward is accumulated in the Kaia Performance Fund (KPF) and distributed based on measurable on-chain contribution. However, the GC staking reward is allocated proportionally based on the amount of KAIA staked by each member, minus the minimum requirement of 5 million KAIA. This means that Council members who stake a larger amount of KAIA beyond the minimum threshold will receive a greater share of the staking reward compared to those who stake less. As a result, Council members are incentivized to stake more KAIA to maximize their potential rewards from the GC staking award portion of the block reward distribution. As long as the minimum 5 million KAIA staking requirement is met, Kaia Governance Council members can freely stake or unstake his or her own KAIA. Staking information is updated every 86,400 blocks, and newly staked KAIA comes info effect two update cycles later from when the staking is completed. Withdrawing staked KAIA requires one week of delay to prevent malicious members from immediately exiting. Penalty for Misbehaving Council Members ​ A Council member may be subject to penalties for conducting misbehaviors defined below. In the future, more penalty rules can be established and refined through the Kaia Governance Process. Causing Safety Failure: A Council member selected as Proposer may not create more than one block in the same height A Council member selected as Proposer may not intentionally omit certain transactions Causing Liveness Failure: A Council member selected as Proposer must create a valid block A Council member selected as Validator must validate the block proposed by the Proposer Kaia Ecosystem Fund ​ The Kaia Ecosystem Fund (KEF) was established to support Kaia's mission of enabling greater transparency and verifiability. It is funded by 25% of the total KAIA issued when creating a block. The Kaia Ecosystem Fund will be used to fund activities that improve the Kaia ecosystem, such as: Service Contribution Reward (SCR) : The KEF will provide rewards to service developers or users operating on the integrated ecosystem, as compensation for directly or indirectly contributing to the enhancement of the ecosystem's value. Building our Developer Community : The KEF will support various initiatives including hackathons, development education programs, collaborative research with academia, and collaboration with various DAOs to foster and grow the Kaia developer community. Fostering Ecosystem Services and Infrastructure : The KEF will support essential ecosystem infrastructure, alongside the development of services with clear utility and provide marketing support. Kaia Eco Fund Indirect Investment : The KEF will make indirect mid-to long-term investments by entrusting specialized crypto VCs. A portion o
프로젝트로 돌아가기