Zcash 백서

Zcash

원문

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

•There are no changes to theblock version numberor format for NU6. •There are no changes to theblock version numberor format for NU6.1. The changes relative toBitcoinversion 4 blocks as described in [Bitcoin-Block] are: •Block versionsless than4are not supported. • The hashReserved / hashFinalSaplingRoot / hashLightClientRoot / hashBlockCommitments, solutionSize, and solution fields have been added. •The type of the nNonce field has changed from uint32 to byte[32]. •The maximumblocksize has been doubled to2000000bytes. 7.7 Proof of Work #pow ZcashusesEquihash [BK2016] as itsproof-of-work. The original motivations for changing theproof-of-workfrom SHA-256dused byBitcoinwere described in [WG2016]. Ablocksatisfies theproof-of-workif and only if: •The solution field encodes avalid Equihash solutionaccording to §7.7.1 ‘Equihash’ on p.139. •Theblock headersatisfies the difficulty check according to §7.7.2 ‘Difficulty filter’ on p.140. 7.7.1 Equihash #equihash An instance of theEquihashalgorithm is parameterized by positive integers 𝑛 and 𝑘, such that 𝑛 is a multiple of 𝑘+ 1. We assume𝑘≥3. TheEquihashparameters forMainnetandTestnetare𝑛= 200, 𝑘= 9. Equihashis based on a variation of the Generalized Birthday Problem [AR2017]: given a sequence 𝑋1..N of 𝑛-bit strings, find2 𝑘 distinct𝑋 𝑖𝑗 such that ⨁︀2𝑘𝑗=1𝑋𝑖𝑗 = 0. InEquihash,N = 2 𝑛 𝑘+1 +1, and the sequence𝑋 1..N is derived from theblock headerand a nonce. Letpowheader:= 32-bit nVersion 256-bit hashPrevBlock 256-bit hashMerkleRoot 256-bit hashReserved 32-bit nTime 32-bit nBits 256-bit nNonce For𝑖∈{1.. 𝑁}, let𝑋 𝑖 =EquihashGen 𝑛,𝑘(powheader, 𝑖). EquihashGenis instantiated in §5.4.1.11 ‘Equihash Generator’ on p.88. DefineI2BEBSP (ℓ N)×{0..2 ℓ−1}→B [ℓ] as in §5.1 ‘Integers, Bit Sequences, and Endianness’ on p.76. 139 Avalid Equihash solutionis then a sequence𝑖 {1.. 𝑁}2𝑘 that satisfies the following conditions: Generalized Birthday condition 2𝑘⨁︁ 𝑗=1 𝑋𝑖𝑗 = 0. Algorithm Binding conditions •For all𝑟∈{1.. 𝑘−1}, for all𝑤∈{0..2 𝑘−𝑟−1}: 2𝑟⨁︁ 𝑗=1 𝑋𝑖𝑤·2𝑟 +𝑗 has 𝑛·𝑟𝑘+1 leading zeros; and •For all𝑟∈{1.. 𝑘}, for all𝑤∈{0..2 𝑘−𝑟−1}:𝑖 𝑤·2𝑟+1..𝑤·2𝑟+2𝑟−1 < 𝑖𝑤·2𝑟+2𝑟−1+1..𝑤·2𝑟+2𝑟 lexicographically. Notes: • This does not include a difficulty condition, because here we are defining validity of anEquihashsolution independent of difficulty. • Previous versions of this specification incorrectly specified the range of 𝑟 to be{1.. 𝑘−1}for both parts of the algorithm binding condition. The implementation in zcashd was as intended. AnEquihashsolution with𝑛= 200and𝑘= 9is encoded in the solution field of ablock headeras follows: I2BEBSP21(𝑖1−1) I2BEBSP21(𝑖2−1) ··· I2BEBSP21(𝑖512−1) Recall from §5.2 ‘Bit layout diagrams’ on p. 76 that the bits in the above diagram are ordered from most to least significant in each byte. For example, if the first 3 elements of 𝑖 are [69,42,2 21], then the corresponding bit array is: I2BEBSP21(68) I2BEBSP21(41) I2BEBSP21(221−1) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8-bit0 8-bit2 8-bit32 8-bit0 8-bit10 8-bit127 8-bit255 ··· and so the first7bytes of solution would be[0,2,32,0,10,127,255]. Note: I2BEBSP isbig-endian, while integer field encodings in powheader and in the instantiation of EquihashGen arelittle-endian. The rationale for this is thatlittle-endianserialization ofblock headersis consistent withBitcoin, butlittle-endianordering of bits in the solution encoding would require bit-reversal (as opposed to only shifting). 7.7.2 Difficulty filter #difficulty LetToTargetbe as defined in §7.7.4 ‘nBits conversion’ on p.142. Difficulty is defined in terms of atarget threshold, which is adjusted for eachblockaccording to the algorithm defined in §7.7.3 ‘Difficulty adjustment’ on p.140. The difficulty filter is unchanged fromBitcoin, and is calculated usingSHA-256d on the wholeblock header(including solutionSize and solution). The result is interpreted as a 256-bit integer represented inlittle-endianbyte order, whichMUSTbe less than or equal to thetarget thresholdgiven byToTarget( nBits). 7.7.3 Difficulty adjustment #diffadjustment The desired time betweenblocksis called theblock target spacing.Zcashuses a difficulty adjustment algorithm based on DigiShield v3/v4 [DigiByte-PoW], with simplifications and altered parameters, to adjust difficulty to target the desiredblock target spacing. UnlikeBitcoin, the difficulty adjustment occurs after everyblock. The constants PoWLimit, PreBlossomHalvingInterval, PoWAveragingWindow, PoWMaxAdjustDown, PoWMaxAdjustUp, PoWDampingFactor, PreBlossomPoWTargetSpacing, and PostBlossomPoWTargetSpacingare specified in section §5.3 ‘Constants’ on p.77. 140 LetToCompactandToTargetbe as defined in §7.7.4 ‘nBits conversion’ on p.142. LetnTime(height)be the value of the nTime field in theheaderof theblockatblock heightheight. LetnBits(height)be the value of the nBits field in theheaderof theblockatblock heightheight. Block headerfields are specified in §7.6 ‘Block Header Encoding and Consensus’ on p.137. Define: mean(𝑆) := ∑︀length(𝑆) 𝑖=1 𝑆𝑖 length(𝑆) median(𝑆) :=sorted(𝑆) ceiling((length(𝑆)+1)/2) bound upperlower (𝑥) :=max(lower,min(upper, 𝑥))) trunc(𝑥) := {︃ floor(𝑥),if𝑥≥0 −floor(−𝑥),otherwise IsBlossomActivated(height N) := (height≥BlossomActivationHeight) BlossomPoWTargetSpacingRatio:= PreBlossomPoWTargetSpacingPostBlossomPoWTargetSpacing PostBlossomHalvingInterval:=floor(PreBlossomHalvingInterval·BlossomPoWTargetSpacingRatio) PoWTargetSpacing(height N) := {︃ PreBlossomPoWTargetSpacing,if notIsBlossomActivated(height) PostBlossomPoWTargetSpacing,otherwise AveragingWindowTimespan(height N) :=PoWAveragingWindow·PoWTargetSpacing(height) MinActualTimespan(height N) :=floor(AveragingWindowTimespan(height)·(1−PoWMaxAdjustUp)) MaxActualTimespan(height N) :=floor(AveragingWindowTimespan(height)·(1 +PoWMaxAdjustDown)) MedianTime(height N) :=median([ [nTime(𝑖)for𝑖frommax(0,height−PoWMedianBlockSpan)up toheight−1 ] ]) ActualTimespan(height N) :=MedianTime(height)−MedianTime(height−PoWAveragingWindow) ActualTimespanDamped(height N) := AveragingWindowTimespan(height) +trunc (︁ActualTimespan(height)−AveragingWindowTimespan(height) PoWDampingFactor )︁ ActualTimespanBounded(height N) :=bound MaxActualTimespan(height)MinActualTimespan(height) (ActualTimespanDamped(height)) MeanTarget(height N) := ⎧ ⎪⎨ ⎪⎩ PoWLimit,ifheight≤PoWAveragingWindow mean([ [ToTarget(nBits(𝑖))for𝑖fromheight−PoWAveragingWindowup toheight−1] ]), otherwise. Thetarget thresholdfor a givenblock heightheightis then calculated as: Threshold(height N) := ⎧ ⎪⎪⎨ ⎪⎪⎩ PoWLimit,ifheight= 0 min(PoWLimit,floor (︁ MeanTarget(height) AveragingWindowTimespan )︁ ·ActualTimespanBounded(height)), otherwise ThresholdBits(height N) :=ToCompact(Threshold(height)). Notes: • The convention used for the height parameters to the functions MedianTime, MeanTarget, ActualTimespan, ActualTimespanDamped, ActualTimespanBounded, Threshold, and ThresholdBits is that these functions use only information fromblocks preceding the givenblock height. 141 • When the median function is applied to a sequence of even length (which only happens in the definition of MedianTime during the first PoWAveragingWindow−1 blocksof theblock chain), the element that begins the second half of the sequence is taken. This corresponds to the zcashd implementation, but was not specified correctly in versions of this specification prior to v2019.0.0. OnTestnetfromblock height 299188 onward, the difficulty adjustment algorithm is changed to allow minimum- difficultyblocks, as described in [ZIP-205]. TheBlossomnetwork upgradechanges the minimum-difficulty time threshold to6times theblock target spacing, as described in [ZIP-208]. These changes do not apply toMainnet. 7.7.4 nBits conversion #nbits Deterministic conversions between atarget thresholdand a “compact" nBits value are not fully defined in the Bitcoin documentation [Bitcoin-nBits], and so we define them here: size(𝑥) :=ceiling (︁bitlength(𝑥) 8 )︁ mantissa(𝑥) :=floor (︁ 𝑥·256 3−size(𝑥) )︁ ToCompact(𝑥) := {︃ mantissa(𝑥) + 224·size(𝑥),ifmantissa(𝑥)<2 23 floor (︁mantissa(𝑥) 256 )︁ + 224·(size(𝑥) + 1),otherwise ToTarget(𝑥) := {︃ 0,if𝑥î2 23 = 223 (𝑥î(2 23−1))·256 floor(𝑥/224)−3,otherwise. 7.7.5 Definition of Work #workdef As explained in §3.3 ‘The Block Chain’ on p. 19, a node chooses the “best”block chainvisible to it by finding the chain of validblockswith the greatest total work. LetToTargetbe as defined in §7.7.4 ‘nBits conversion’ on p.142. The work of ablockwith valuenBitsfor the nBits field in itsblock headeris defined asfloor (︂ 2256 ToTarget(nBits) + 1 )︂ . 7.8 Calculating Block Subsidy, Funding Streams, Lockbox Disbursement, and Founders’ Reward #subsidies In §3.10 ‘Block Subsidy, Funding Streams, and Founders’ Reward’ on p. 24 theblock subsidy,miner subsidy, Founders’ Reward, andfunding streamsare defined. Their amounts inzatoshiare calculated from theblock height using the formulae below. Let the constants SlowStartInterval, PreBlossomHalvingInterval, PostBlossomHalvingInterval, BlossomActivationHeight, MaxBlockSubsidy, andFoundersFractionbe as defined in §5.3 ‘Constants’ on p.77. LetFundingStreamsbe as specified in §7.10.1 ‘ZIP 214 Funding Streams’ on p.146. LetZIP271ActivationHeightandZIP271DisbursementAmountbe as defined in [ZIP-271]. SlowStartShift N:= SlowStartInterval2 SlowStartRate N:= MaxBlockSubsidySlowStartInterval Halving(height N) := ⎧ ⎪⎪⎪⎨ ⎪⎪⎪⎩ 0,ifheight<SlowStartShift floor (︁ height−SlowStartShift PreBlossomHalvingInterval )︁ ,if notIsBlossomActivated(height) floor (︁BlossomActivationHeight−SlowStartShift PreBlossomHalvingInterval + height−BlossomActivationHeightPostBlossomHalvingInterval )︁,otherwise 142 BlockSubsidy(height N) := ⎧ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩ SlowStartRate·height,ifheight<SlowStartShift SlowStartRate·(height+ 1),ifSlowStartShift≤height andheight<SlowStartInterval floor (︁MaxBlockSubsidy 2Halving(height) )︁ ,ifSlowStartInterval≤height and notIsBlossomActivated(height) floor (︂ MaxBlockSubsidy BlossomPoWTargetSpacingRatio·2 Halving(height) )︂ ,otherwise FoundersReward(height N) := {︃ BlockSubsidy(height)·FoundersFraction,ifHalving(height)<1 0,otherwise forfs∈FundingStreams,fs.Value(height) :=⎧ ⎪⎪⎨ ⎪⎪⎩ 0,ifheight<CanopyActivationHeight floor (︁ BlockSubsidy(height)· fs.Numeratorfs.Denominator )︁ ,iffs.StartHeight≤heightandheight<fs.EndHeight 0,otherwise totalDeferredOutput(height) := ∑︀ fs∈FundingStreams:fs.Recipient(height) =DEFERRED_POOL fs.Value(height) totalDeferredInput(height) := {︃ ZIP271DisbursementAmount,ifheight=ZIP271ActivationHeight 0,otherwise. MinerSubsidy(height) :=BlockSubsidy(height)−FoundersReward(height)− ∑︀ fs∈FundingStreams fs.Value(height). 7.9 Payment of Founders’ Reward #foundersreward TheFounders’ Rewardis paid by atransparent outputin thecoinbase transaction, to one of NumFounderAddresses transparent addresses, depending on theblock height. ForMainnet,FounderAddressList 1..NumFounderAddresses is: [“ t3Vz22vK5z2LcKEdg16Yv4FFneEL1zg9ojd”,“ t3cL9AucCajm3HXDhb5jBnJK2vapVoXsop3”, “t3fqvkzrrNaMcamkQMwAyHRjfDdM2xQvDTR”,“ t3TgZ9ZT2CTSK44AnUPi6qeNaHa2eC7pUyF”, “t3SpkcPQPfuRYHsP5vz3Pv86PgKo5m9KVmx”,“ t3Xt4oQMRPagwbpQqkgAViQgtST4VoSWR6S”, “t3ayBkZ4w6kKXynwoHZFUSSgXRKtogTXNgb”,“ t3adJBQuaa21u7NxbR8YMzp3km3TbSZ4MGB”, “t3K4aLYagSSBySdrfAGGeUd5H9z5Qvz88t2”,“ t3RYnsc5nhEvKiva3ZPhfRSk7eyh1CrA6Rk”, “t3Ut4KUq2ZSMTPNE67pBU5LqYCi2q36KpXQ”,“ t3ZnCNAvgu6CSyHm1vWtrx3aiN98dSAGpnD”, “t3fB9cB3eSYim64BS9xfwAHQUKLgQQroBDG”,“ t3cwZfKNNj2vXMAHBQeewm6pXhKFdhk18kD”, “t3YcoujXfspWy7rbNUsGKxFEWZqNstGpeG4”,“ t3bLvCLigc6rbNrUTS5NwkgyVrZcZumTRa4”, “t3VvHWa7r3oy67YtU4LZKGCWa2J6eGHvShi”,“ t3eF9X6X2dSo7MCvTjfZEzwWrVzquxRLNeY”, “t3esCNwwmcyc8i9qQfyTbYhTqmYXZ9AwK3X”,“ t3M4jN7hYE2e27yLsuQPPjuVek81WV3VbBj”, “t3gGWxdC67CYNoBbPjNvrrWLAWxPqZLxrVY”,“ t3LTWeoxeWPbmdkUD3NWBquk4WkazhFBmvU”, “t3P5KKX97gXYFSaSjJPiruQEX84yF5z3Tjq”,“ t3f3T3nCWsEpzmD35VK62JgQfFig74dV8C9”, “t3Rqonuzz7afkF7156ZA4vi4iimRSEn41hj”,“ t3fJZ5jYsyxDtvNrWBeoMbvJaQCj4JJgbgX”, “t3Pnbg7XjP7FGPBUuz75H65aczphHgkpoJW”,“ t3WeKQDxCijL5X7rwFem1MTL9ZwVJkUFhpF”, “t3Y9FNi26J7UtAUC4moaETLbMo8KS1Be6ME”,“ t3aNRLLsL2y8xcjPheZZwFy3Pcv7CsTwBec”, “t3gQDEavk5VzAAHK8TrQu2BWDLxEiF1unBm”,“ t3Rbykhx1TUFrgXrmBYrAJe2STxRKFL7G9r”, “t3aaW4aTdP7a8d1VTE1Bod2yhbeggHgMajR”,“ t3YEiAa6uEjXwFL2v5ztU1fn3yKgzMQqNyo”, “t3g1yUUwt2PbmDvMDevTCPWUcbDatL2iQGP”,“ t3dPWnep6YqGPuY1CecgbeZrY9iUwH8Yd4z”, “t3QRZXHDPh2hwU46iQs2776kRuuWfwFp4dV”,“ t3enhACRxi1ZD7e8ePomVGKn7wp7N9fFJ3r”, “t3PkLgT71TnF112nSwBToXsD77yNbx2gJJY”,“ t3LQtHUDoe7ZhhvddRv4vnaoNAhCr2f4oFN”, “t3fNcdBUbycvbCtsD2n9q3LuxG7jVPvFB8L”,“ t3dKojUU2EMjs28nHV84TvkVEUDu1M1FaEx”, “t3aKH6NiWN1ofGd8c19rZiqgYpkJ3n679ME”,“ t3MEXDF9Wsi63KwpPuQdD6by32Mw2bNTbEa”, “t3WDhPfik343yNmPTqtkZAoQZeqA83K7Y3f”,“ t3PSn5TbMMAEw7Eu36DYctFezRzpX1hzf3M”, “t3R3Y5vnBLrEn8L6wFjPjBLnxSUQsKnmFpv”,“ t3Pcm737EsVkGTbhsu2NekKtJeG92mvYyoN”] 143 ForTestnet,FounderAddressList 1..NumFounderAddresses is: [“ t2UNzUUx8mWBCRYPRezvA363EYXyEpHokyi”,“ t2N9PH9Wk9xjqYg9iin1Ua3aekJqfAtE543”, “t2NGQjYMQhFndDHguvUw4wZdNdsssA6K7x2”,“ t2ENg7hHVqqs9JwU5cgjvSbxnT2a9USNfhy”, “t2BkYdVCHzvTJJUTx4yZB8qeegD8QsPx8bo”,“ t2J8q1xH1EuigJ52MfExyyjYtN3VgvshKDf”, “t2Crq9mydTm37kZokC68HzT6yez3t2FBnFj”,“ t2EaMPUiQ1kthqcP5UEkF42CAFKJqXCkXC9”, “t2F9dtQc63JDDyrhnfpzvVYTJcr57MkqA12”,“ t2LPirmnfYSZc481GgZBa6xUGcoovfytBnC”, “t26xfxoSw2UV9Pe5o3C8V4YybQD4SESfxtp”,“ t2D3k4fNdErd66YxtvXEdft9xuLoKD7CcVo”, “t2DWYBkxKNivdmsMiivNJzutaQGqmoRjRnL”,“ t2C3kFF9iQRxfc4B9zgbWo4dQLLqzqjpuGQ”, “t2MnT5tzu9HSKcppRyUNwoTp8MUueuSGNaB”,“ t2AREsWdoW1F8EQYsScsjkgqobmgrkKeUkK”, “t2Vf4wKcJ3ZFtLj4jezUUKkwYR92BLHn5UT”,“ t2K3fdViH6R5tRuXLphKyoYXyZhyWGghDNY”, “t2VEn3KiKyHSGyzd3nDw6ESWtaCQHwuv9WC”,“ t2F8XouqdNMq6zzEvxQXHV1TjwZRHwRg8gC”, “t2BS7Mrbaef3fA4xrmkvDisFVXVrRBnZ6Qj”,“ t2FuSwoLCdBVPwdZuYoHrEzxAb9qy4qjbnL”, “t2SX3U8NtrT6gz5Db1AtQCSGjrpptr8JC6h”,“ t2V51gZNSoJ5kRL74bf9YTtbZuv8Fcqx2FH”, “t2FyTsLjjdm4jeVwir4xzj7FAkUidbr1b4R”,“ t2EYbGLekmpqHyn8UBF6kqpahrYm7D6N1Le”, “t2NQTrStZHtJECNFT3dUBLYA9AErxPCmkka”,“ t2GSWZZJzoesYxfPTWXkFn5UaxjiYxGBU2a”, “t2RpffkzyLRevGM3w9aWdqMX6bd8uuAK3vn”,“ t2JzjoQqnuXtTGSN7k7yk5keURBGvYofh1d”, “t2AEefc72ieTnsXKmgK2bZNckiwvZe3oPNL”,“ t2NNs3ZGZFsNj2wvmVd8BSwSfvETgiLrD8J”, “t2ECCQPVcxUCSSQopdNquguEPE14HsVfcUn”,“ t2JabDUkG8TaqVKYfqDJ3rqkVdHKp6hwXvG”, “t2FGzW5Zdc8Cy98ZKmRygsVGi6oKcmYir9n”,“ t2DUD8a21FtEFn42oVLp5NGbogY13uyjy9t”, “t2UjVSd3zheHPgAkuX8WQW2CiC9xHQ8EvWp”,“ t2TBUAhELyHUn8i6SXYsXz5Lmy7kDzA1uT5”, “t2Tz3uCyhP6eizUWDc3bGH7XUC9GQsEyQNc”,“ t2NysJSZtLwMLWEJ6MH3BsxRh6h27mNcsSy”, “t2KXJVVyyrjVxxSeazbY9ksGyft4qsXUNm9”,“ t2J9YYtH31cveiLZzjaE4AcuwVho6qjTNzp”, “t2QgvW4sP9zaGpPMH1GRzy7cpydmuRfB4AZ”,“ t2NDTJP9MosKpyFPHJmfjc5pGCvAU58XGa4”, “t29pHDBWq7qN4EjwSEHg8wEqYe9pkmVrtRP”,“ t2Ez9KM8VJLuArcxuEkNRAkhNvidKkzXcjJ”, “t2D5y7J5fpXajLbGrMBQkFg2mFN8fo3n8cX”,“ t2UV2wr1PTaUiybpkV3FdSdGxUJeZdZztyt”] Note:ForTestnetonly, the addresses from index4onward have been changed from what was implemented at launch. This reflects an upgrade onTestnet, starting fromblock height53127. [Zcash-Issue2113] Each address representation inFounderAddressListdenotes atransparent P2SH multisig address. LetSlowStartShiftandHalvingbe defined as in the previous section. Define: FounderAddressChangeInterval:=ceiling (︁SlowStartShift+PreBlossomHalvingInterval NumFounderAddresses )︁ FounderAddressAdjustedHeight(height N) :={︃ height,if notIsBlossomActivated(height), BlossomActivationHeight+floor (︁height−BlossomActivationHeight BlossomPoWTargetSpacingRatio )︁ ,otherwise FounderAddressIndex(height N) := 1 +floor (︁FounderAddressAdjustedHeight(height) FounderAddressChangeInterval )︁ FoundersRewardLastBlockHeight:=max({height N|Halving(height)<1}). Let FounderRedeemScriptHash(height N) be thestandard redeem scripthash, as specified in [Bitcoin-Multisig], for theP2SH multisig addresswithBase58Checkform given byFounderAddressList FounderAddressIndex(height). Consensus rule:[Pre-Canopy] Acoinbase transactionat height∈{1..FoundersRewardLastBlockHeight} MUST include at least one output that pays exactly FoundersReward(height) zatoshiwith astandard P2SH scriptof the form OP_HASH160 FounderRedeemScriptHash(height) OP_EQUAL as its scriptPubKey. 144 Notes: • NoFounders’ Rewardis required to be paid for height>FoundersRewardLastBlockHeight (i.e. after the first halving), or forheight= 0(i.e. thegenesis block), or afterCanopyactivation. • TheFounders’ Rewardaddresses are not treated specially in any other way, and there can be other outputs to them, incoinbase transactionsor otherwise. In particular, it is valid for acoinbase transactionwith height∈{1..FoundersRewardLastBlockHeight} to have other outputs, possibly to the same address, that do not meet the criterion in the above consensus rule, as long as at least one output meets it. • The assertion FounderAddressIndex(FoundersRewardLastBlockHeight)≤NumFounderAddresses holds, ensuring that theFounders’ Rewardaddress index remains in range for the whole period in which theFounders’ Rewardis paid. Non-normative notes: •[Blossomonward]FoundersRewardLastBlockHeight= 1046399. •Blossomis not intended to change the totalFounders’ Rewardor the effective period over which it is paid. 7.10 Payment of Funding Streams, Deferred Lockbox, and Lockbox Disbursement #fundingstreams LetPostBlossomHalvingIntervalbe as defined in §5.3 ‘Constants’ on p.77. LetHalvingbe as defined in §7.8 on p.142. Let ZIP271ActivationHeight, ZIP271DisbursementAmount, ZIP271DisbursementChunks, and ZIP271DisbursementAddress be as defined for the relevant network (MainnetorTestnet) in [ZIP-271]. [ZIP-207] defines a consensus mechanism to requirecoinbase transactionsto includefunding streamoutputs, intended to provide funds from issuance for Zcash development. [ZIP-2001] extended this mechanism to support directing funds from issuance into a reserve, thedeferred development fund lockbox. [ZIP-271] defines a one-time disbursal of funds from this lockbox in order to support the Community And Coinholder Funding Model[ZIP-1016]. Thefunding streamsare paid to one of a pre-defined set of recipients, depending on theblock height. Each recipient identifier is either the string encoding of an address to be paid by an output in thecoinbase transaction, or the identifier DEFERRED_POOL. The latter indicates that the value is to be paid into thedeferred development fund lockbox. Afunding stream fs is defined by ablock subsidyfraction (represented as a numerator and denominator), a start block height(inclusive), an endblock height(exclusive), and a sequence of recipients: fs.Numerator N+ fs.Denominator N+ fs.StartHeight N fs.EndHeight N fs.Recipients (︀ BY Y[N]∪{DEFERRED_POOL} )︀[N+]. Define: HeightForHalving(halving N+) :=min({height N|Halving(height) =halving}) FSRecipientChangeInterval:=PostBlossomHalvingInterval/48 FSRecipientPeriod(height) :=floor (︁height−(HeightForHalving(1)−PostBlossomHalvingInterval) FSRecipientChangeInterval )︁ . 145 For eachfunding streamfs, define: fs.RecipientIndex(height) := 1 +FSRecipientPeriod(height)−FSRecipientPeriod(fs.StartHeight) fs.Recipient(height) :=fs.Recipients fs.RecipientIndex(height) fs.NumRecipients:=fs.RecipientIndex(fs.EndHeight−1). fs.Recipients MUSTbe of length fs.NumRecipients. Each element of fs.Recipients MUSTrepresent either atransparent P2SH addressas specified in §5.6.1.1 ‘Transparent Addresses’ on p. 116, or a Saplingshielded payment addressas specified in §5.6.3.1 ‘Sapling Payment Addresses’ on p.119, or the identifierDEFERRED_POOL. Afunding stream fs is “active” atblock height height when fs.Value(height)>0 , where fs.Value is defined in §7.8 ‘Calculating Block Subsidy, Funding Streams, Lockbox Disbursement, and Founders’ Reward’on p.142. Consensus rule:[Canopyonward] In eachblockwithcoinbase transaction cb atblock height height, cb MUST contain at least the given number of distinct outputs for each of the following: • for eachfunding stream fs active at thatblock heightwith a recipient identifier other than DEFERRED_POOL given by fs.Recipient(height), one output that pays fs.Value(height) zatoshiin theprescr
프로젝트로 돌아가기