Whiteboard Series with NEAR | Ep: 36 Muneeb Ali, Aaron Blankstein, Diwaker Gupta from Blockstack
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
Blockstack's Muneeb Ali ( / @muneeb , Aaron Blankstein ( / aaronblankstein ) and Diwaker Gupta ( / @diwakergupta ) join NEAR's Alex Skidanov ( / alexskidanov ) to discuss Blockstack's technology and approach in the 36th episode of the Whiteboard Series.
Blockstack apps give users direct ownership of their internet assets and protect user privacy.
------ About Whiteboard Series --------
The Whiteboard Series with NEAR is a set of video interviews with Founders who are building scalable solutions for Blockchain. We deep dive into their story, what they're developing and how it is helping the ecosystem.
Follow the latest from NEAR Protocol on,
Website: near.org Discord: near.ai/discord Medium: near.ai/medium Twitter: near.ai/twitter GitHub: near.ai/github
#WhiteboardSeries #Blockchain #FutureIsNEAR
Transcript
10,087 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:03
hi everyone this is Alex from near with me today our Erin Mooney and Dee Walker from blog stack and we will have we will talk today about the technology and the motivation behind block stack guys would you like to introduce yourself and tell us what block stack is and what do you guys trying to soften how you approach it thanks thanks for having us these whiteboard sessions are pretty cool I've
- 0:29
seen at least one of them before so I'm money from block stack and you should think of block stack as a user owned Internet the project really started that Princeton University back in the days I think it's like 2013 or so and our approach has been more to we way some venture capital to explicitly like R&D first so we were pretty much an RD stage for a while then build out the public
- 0:53
infrastructure and you should think of this as like a platform where people can publish smart contracts and build about three amps but the underlying architecture is very different right it's almost a little bit of a inverse of a world computer where we try to keep minimal state at the blockchain level and most of the rest of the complexity is outside of the watching that we'll get into some of those details and in the whiteboard session awesome and so so
- 1:18
when you say these block channel layer is it the custom block chain or is block stack building on top of one of the existing ones yeah so let me let me introduce Aaron and the Walker as well so Aaron did his ph.d with me at Princeton University we actually shared the same advisor Mike Friedman for a while and Aaron has been working at block stack since joining 70s so and he's the person is it's a saturate interesting like when Aaron joined is
- 1:43
when I stopped doing kid hub commits I don't know how it happened but Aaron has literally taken over he's the one who is who's building the blockchain and I think he'll drive most efficient and then we have the Walker who's our head of engineering and he was he was at Dropbox before that the Walker and Aaron what what did you guys like chime in as well sure thanks Miriam and thanks again
- 2:06
for an ear for hosting us I'm mostly here to observe I think it's better for sort of engineer to generic communication in these whiteboard sessions and happily jump in to answer any questions as many mentioned I joined blackjack last year I was a drop box before that spend ten years in Silicon Valley and moved out to the East Coast last year to be with blocks tech and it's been a hell of a journey so far I think like some of the
- 2:31
folks at near you know you come from the mem sequel database community I was at a database startup maybe you heard of it as a company called Astra data back in the day or some of the first companies that were building massively parallel databases and so it's interesting to come from that perspective into the crypto world it's you know every day I feel like I'm learning new things so it's really it's pretty incredible journey so far cool yeah
- 2:54
and I'm Erin and like I mentioned I came out of PhD program at Princeton with him my experience prior to joining blocks AK was primarily in distributed systems and security with like a little bit of sort of applied language work some compiler work and stuff like that and since joining block stack I've worked on all sorts of things but have been primarily working on the stacks blockchain and our
- 3:29
smart contracting language clarity cool and for the question about the custom blockchain so yes it is a it is a custom watching and I think the need for it really started going back back to the early days like we were looking at the Bitcoin blockchain and wanted to actually create other types of digital asset store even you know some simple smart contracts back then and this is like for people who have been in crypto for a while there was a watching called name client that added like very simple
- 4:00
domain name type registrations to Bitcoin we wanted to do something similar on top of the coin so ended up designing this almost like a virtualization layer where you could create like almost like a virtual blockchain on top of Bitcoin and then later refine that design so that's tax 1.0 that basically all of the data is written on the Bitcoin blockchain itself but sax 2.0 is it's very interesting like it is a separate box in but it it interconnects with Bitcoin and I think
- 4:32
those are some of the things that Aaron has some slides and we can and so when you say stacks 1.0 2.0 is it is a different layer so block stacks or is it evolution of block stacks it's more like evolution so 1.0 is the the first design that as I said it's a it's a virtualized blockchain on top of Bitcoin and 2.0 is going to replace 1.0 and then the rest of our stack is outside of the blockchain there so there's a storage system there's authentication layer and and and the rest of the pieces are
- 5:05
outside of the box and so 11.0 is what is running now and two is coming soon okay and so you mentioned before before the video that you guys have a short presentation to introduce all the consoles do you want to to go through it right now all right do you see my screen over here it should be some sort of yes yes great all right so what I'm gonna talk about a little bit during this whiteboarding session is d stacks blockchain 2.0 or v2 I call it
- 5:45
here and I'm gonna focus on the consensus algorithm but first I'll talk about I guess like what our design goals were or the stacks blockchain so the version 2 of our blockchain we wanted it to be basically an open membership blockchain so anyone can mine on it blocks are propagated through its own peer-to-peer network the consensus algorithm which is what mostly talked about is something we call proof of transfer which is a novel concept to the stacks Bob Kane this consensus algorithm
- 6:30
uses single leader election to form blocks and then all of this block gain is to support sort of clarity smart contracting system and other sort of like stacks transaction types stack token transfers things like that they said before stacks consensus protocol a single leader election protocol which goes more detail in a minute and election happens through burning or transferring Bitcoin it's the proof of transfer concept and fork selection is done similar to like other Bock ends
- 7:12
where there's like a longest valid chain concept and and notes sort of select that and present that view to clients yeah so proof of transfer it's a consensus algorithm that's similar to proof of earn which is also a concept that I think I'm going to need to explain but has been used in other Watkins before where rather than burning the base cryptocurrency the base group concurrency is like transferred to holders of the new cryptocurrency so you
- 7:45
can think of proof of transfer almost is like maybe a more efficient version of proof birth yep Aaron I'm quickly going to chime in here look at that the the problem here that we were trying to solve was that you know Bitcoin has a limited scripting language by design Bitcoin is very hard to change by design and those those are features and if we want to have like full smart contracts or if you want to add certain features to a Bitcoin like protocol trying to
- 8:16
start a new proof of work chain is something that we were a little bit skeptical off right because especially in the early days you wouldn't have a lot of mining power there so we looked at things like merge mining and it has its whole set separate sets of issues but we're basically trying to solve the problem of how do you bootstrap a secure ball chain right and and and we were circling around basically how do we
- 8:40
reuse the security of the coin so that you don't have to go through the initial phase of like getting a lot of hash power on your Washington so that it's it's actually secure but obvious question is there's a theorem right and the theorem has smart contracts so why would the film not work as a base layer yeah I think aetherium it's a little bit like blocks like predates etherium and we
- 9:05
just happen to be in a very different school of thought in terms of the technical design like aetherium is in the camp of they're very comfortable with the world computer type approach that you know everything can be done at the Block in there they're trying to scale the blocks in there and I know that you know obviously they've launched a successful proof of work network that has reasonable security attachment it
- 9:28
but but repeating those events like are it's a little hard that the long tail of proof of work chains are actually not that secure it doesn't take that long or that much money to actually attack the long tail of who-ville work Netflix and atheneum in general like building on top of etherium is a little bit like going against the rest of our design principles where we think that the blockchain itself is very bloated very complex whereas we want to keep it very
- 9:53
simple and have the rest of the complexity outside of the box make sense as I guess a first step towards understanding how stacks be to consensus algorithm works I'll provide like a little bit of an overview of what our sort of model of like burn is and then I'll show how that can be modified to implement proof of transfer so in our consensus algorithm our proof of burn a proof of burn system the system where in
- 10:30
order to mine a block would be miners announce a block commitment on the Bitcoin chain what this block commitment is is like the hash of the stats block that they would like to form and it's announced to the rest of the network through the Bitcoin chain so the Bitcoin chain supplies you with sort of a strict ordering of these announcements and it also ensures that you no other network
- 11:01
participants all see it at the same time now along with this commitment this hash commitment each miner is committing some amount of Bitcoin to this block that they're building the reason that they do this is so that there's some sort of like capital expenditure associated with block formation so people can't just like assemble blocks will be an element now these block commitments are scored according to how much Bitcoin they've
- 11:32
transferred and then there's a random selection process based on those scores to select which of those block commitments won that particular epoch once a block is one it's added to the stacks blockchain and you repeat this process to build the next block so one of the sort of key benefits of this is that stacks nodes are actually able to verify the entire history these elections entirely with data available in the Bitcoin blockchain so there's this like sort of one directional flow
- 12:11
of information from the paper but on the Bitcoin chain you understood the head the question of the block right correct so so could it be a problem if if only a subset of participants has the full block and everybody else don't have access to it yeah so what would happen in that case is nodes that don't have access to that stack spot would continue to try to make progress on the stacks blockchain so like if this block was
- 12:42
hidden to them they would mine off of the previous block to that one and so then you would have these contending miners that would ultimately either result in a fork or enough other nodes in the network would eventually receive the block that they would start mining again on the chain yeah that makes sense I also also what happens if is is the is this tax blockchain sort of conditioned
- 13:14
on the is it specific to every particular possible Bitcoin chain and so for example if these of you working in Bitcoin does it magically rework the blocks tax I say yes so if there is like a fork or reorg in the Bitcoin chain it will like invalidate some of those block commits the block payments will get like moved around and the elections would these leader elections would be calculated on the now-now reorg Bitcoin chain so would it
- 13:47
be a valid way to think about that like what I want to think of it would be to to consider a particular Bitcoin chain right so every node by looking at the particular Bitcoin chain head will deterministically determine every single Luther election from the Genesis all the way up and over chain right so if the Bitcoin yours there is deterministic way to derive a new block stiix chain which
- 14:10
is different yes exactly so again this this process for proof of burn is basically that you know a miner is going through this sort of three-step thing where they're committing some amount of Bitcoin to a burn address so it's an address that can't ever spend that Bitcoin in order to get to participate as a miner these are used as inputs to leader election that everyone can see and it uses a process of cryptographic sortition using verifiable random
- 14:44
function so that every node in the network is sort of computing the same random value and then once one of these commitments is selected you're able to assemble the block onto the stack swatching so what prevents me from being able to grind the random value yes so the input to the random value so this does to sort of major inputs to the random value so one is a seed which was a PRF output from the prior round so the winner of the prior round they used their vrf public key to generate the
- 15:24
next seed based on the privacy so there's some randomness there the second is the Bitcoin block ash is used as an input to the cryptographic sortition and what that input does is it says sure you could try to grind on this random seed but every time you try to grind on it you're essentially trying to discover a new Bitcoin block and so it's very hard yeah that's expensive so just understand
- 16:02
better why would just the Bitcoin block has not be sufficient without the CRF right so the reason that the Bitcoin block just by itself isn't sufficient is because we don't want like a Bitcoin miner to be in a situation where they sort of exclusively know what the next seed is going to be without like the stack block having already been announced so in this case effectively the the block producer has one bit of influence right because they can choose not to put all the V RF outputs right and so the
- 16:37
network crew have to operate somehow right so it will be skipped and the Bitcoin miner has one bit of influence because they can choose not to publish the block if they don't like it right but but at least for the latter of them it will take it will cause them six BGC not to publish the book or actually when we say Bitcoin women BTC right not be yes okay there are disagreements in the community yes so this would be BTC have
- 17:03
an example here of how a leader a leader election might might look so in this example we have three miners trying to compete to assemble the next block miner a burns two BTC and then miners B and C both earned three BTC and so they get these scores these scores are then converted into like a range from zero to one where if the sortition value falls within that range their commitment is the the winning commitment so what's a
- 17:43
the random sortition value was point five five then minor B would be selected and since minor B was like committing to building on top of chain tip three their next block will turn the chain the stack watch chain into a length four chain and it'll sort of progress that way so in this case imagine that that a or rather imagine that a was building on tip to see was building on tip three and B was building
- 18:14
on tip one yes will the chain shorten if they won so no it would not because ultimately nodes are going to follow the longest chain or by default honest nodes are are following the longest chain so if minor c like what's a minor c was committing to chain tip one if they were honest like maybe they're doing that because they just haven't received blocks two and three yet then what that'll do is it'll introduce like a new
- 18:54
chain but it'll be shorter other nodes in the network that see it and see the other king would choose the other chain instead right so so effectively block will be produced trying to just that it will not change the tip but so I guess well maybe it will cover it later right but I presume this happens in some sort of time intervals right so so will the time interval be effectively skipped in
- 19:19
this case so in a in a certain sense yes so like it'll have a impact on me like I guess the like block length of a block canonical chain and the height growth rate of the canonical chain will be shortened but this number of the same number of blocks will be produced you could think about it as if like a Bitcoin miner was mining off of a like very very old chain tip so they're assembling what they know is going to be a shorter chain that's in some sense
- 20:01
wasting hash throughput of the Bitcoin network and so it it sort of slows it down in that sense as well yeah that makes sense so here in this example it was like if random sortition actually returned by point one five and minor a one then they would assemble this block which would be a fork or you have two possible length reach gains and that gets into this question of like how do you do chain selection so the chain selection rule
- 20:35
and the stacks boxing like I just said is you select the chain with the most blocks and in the event of a tie you have to select one randomly so why randomly and note for example the one that was earlier because that leads to like an easier greedy mining yeah like that was like the that's like the classic 25% yeah ultimately what will happen here is like whichever miner wins the next election like whichever one they sort of randomly selected would tend to be the dominant chain so like
- 21:16
the next one is building off of this fork and then if the rest of the network is operating honestly one of the fort's will will come to dominate and how frequently does the does the process happen so it happens at every Bitcoin block so roughly every 10 minutes and so if there's no effectively in every Bitcoin block there are proposals for a for a next block an aspirin processing every Bitcoin block with choosing the next block and if nobody proposed I
- 21:46
guess then there's no block correct if nobody proposes a block turn Bitcoin block then yeah you would have no sortition for that and this is thanks to a point all right so this is not life yet correct that's see though we do have a working test net for this so so so what is the incentive to like presumably that cost me quite a bit of money right it cost me the transaction cost plus the Bourne slash
- 22:16
transfer so what is the incentive for me yeah so as a miner when you win a block you receive a tax coinbase and transaction fees for transactions that you've mined both of those are denominated in stacks so one way to think about the way that miner is functioning is like they are burning or using BTC and receiving stacks and does the amount of transfer matter or whomever transferred the most will will win the move in the block and
- 22:57
what happens to the transfer of those could you do move in right so the answer the first question is there's a this random function that's choosing who the winner is but it's weighted by the amount that you earn or transfer all right yes yeah yes I chose the biggest it's right proportional okay yeah and then to the second question if even if you don't win your committment is lost like you've transferred this Bitcoin right so so there's certain risk it's
- 23:38
hard for me to tell right now without like doing computations from the only paper but if it happens that the coin base avoir of blocks tax becomes less and value than a single transaction fee on Bitcoin then the chain will stall right yes so that's an unfortunate event right but but bitcoin is like seven transactions per second it can the price can go very very high up right even so
- 24:04
they that would be a very large deterioration in the value of stacks basically because yeah the transaction fees in Bitcoin I think the biased they've we've seen in the past several years is like $20 a transaction yeah yeah that makes sense that was proof of burn works and like with that model burn basically what you get is this open membership bah chain you get a single leader election but in order to participate as a minor
- 24:40
you have to earn Bitcoin so in proof of transfer the like the sort of high-level intuition of group of transfer that rather than burning BTC we're going to send it to stacks holders so that bitcoin is going to be sent to holders of the new cryptocurrency so in this scheme the like sort of flow of operations is a little bit more complex so here what we have is there our stacks holders participating and proof of transfer or what they're doing is
- 25:22
basically broadcasting some signed messages indicating that they have some amount of STX they're locking it up for some period of time and they're voicing some support for particular stacks chain tips so these are we call these like stacking messages so stacks holders broadcast these stacking messages once they've done that they have Bitcoin addresses that are added to a reward set of Bitcoin addresses and now miners
- 25:57
rather than sending their Bitcoin commitments to earn address they are sending their Bitcoin commitments to addresses chosen out of the reward set and then once they've done that proof of transfer sort of functions very similarly to proof of burn and that you know these commitments are chosen based on their score and the random sortition value and so the work set effectively every is disc holder can can provide a
- 26:30
Bitcoin address so there is a shoulde for providing Bitcoin address because the way that these transfers are working is like they have to function at some level in the Bitcoin chain and throughput there is kind of limited right but good it could good it for example work in a way where everybody on the Stax chain provides the Bitcoin address and then it just uses vrf to choose a small subset of them every time
- 27:01
problem with that approach is that ultimately like even if there's not say a throughput problem at the Bitcoin level there's a throughput problem somewhere if you're trying to like track all of these submissions make sense but in the current implementation the word set so there's a certain threshold and every time this textbook is mined everybody in the word set gets gets a percentage of the Bitcoin know there's a reward cycle it's like a thousand blocks
- 27:43
long over which reward set is traversed yes so effectively if there is some number K how many how many addresses getting paid every block then the threshold selects 1,000 cage yes is effectively okay yeah so this is sort of like the is the high level what proof of transfer is trying to achieve the tricky thing about this design is that nodes have to agree on the reward set and the reward set could be disputed by nodes
- 28:27
for two major reasons but there's a lot of reasons they could end up disputing what the rewards it is a particular report set is only valid in the context of specific stacks blocks like these reward sets are governed by like stacks holders and your stats holding is governed by the stacks blockchain not the Bitcoin however leader election and mining that's all occurring on the Bitcoin chain so miners before they send their Bitcoin to potentially invalid addresses
- 29:00
they need to have like some sense about like what the reward said what a valid rewards that is going to be but but that doesn't sound like a problem right because if I'm if I am a miner on this tax chain right when I'm proposing something first of all there's a particular Bitcoin chain which are observing right now but more importantly I'm also saying this is the last Staggs look on top efficient building right so
- 29:26
I never say my stacks look to be blocked number 500 which is building on top of 499 as of that block 499 is the very specific set of holders right of sorry of the reward set and naturally I should be sending to that you word set because if I am to win the building the the block then the the rewards that sounds deterministic to me in that case no yes so in that case the reward set would be deterministic but you would have a
- 29:51
particular sort of like degenerate incentive for miners where if there was like so let's say I'm a miner and I have a large holding of stacks I can send those stacks to somebody on the canonical chain but I am still empowered to mine prior to that with a different reward set in which like I have large holdings right but but by prior so the way I understand that's right so let's say the particular chip right now is 499 right so I can choose I can I don't have that many choices in terms of
- 30:30
what to build on right I'm building on $4.99 or 498 and hope I will win or if I build on 497 then my block will not I will not be respected by anyone right so so so the fact that that will move Bitcoin to my own address that's of course is very good but but my block will not be respected I will not get stacks in this case right it will not go on the communica chain the only way for me to get them to the communica channels
- 30:52
taxes to do 500 right sort of like it would have this problem where all right so even if I'm building on 496 or something and it's not going to end up being the canonical stocks stats chain like if I win the leader election in that round I'm either denying the network the ability to make forward progress or I'm able to if I do this enough win enough of these elections I'm able to come to dominate the chain yeah makes sense so ultimately you want it to be the case that every in every
- 31:32
sortition there is like everybody that's participating in that sort ition has the same view of what valid reward addresses are so effectively you want the reward set to be specific to the certain note to the tip of this tax chain because during this tradition different blood producers have a different head in mind potentially right but you but you want all of them the awards have to be the
- 31:56
same correct basic problems for achieving this even in honest cases is that there could be Forks which would alter people's views of the Lord set and there could also be stacks blocks that disappear for a while and then reappear if you have a stack spot that disappears for a while and then reappears there might be like a reward set that you thought was valid but then later becomes invalid or the Lord set changes right oh
- 32:28
those are sort of similar and the approach that we've come up with for dealing with this and ensuring that all miners have the same sort of view of where Bitcoin should be flowing is that we've broken up the proof of transfer consensus into a two-phase algorithm so in the first phase which we call the prepare phase Stax nodes come to an agreement on what the reward set is going to be for the next phase the
- 33:04
reward phase and the reward phase miners iterate over the reward set while committing while performing their block commitments and yeah these two phases can overlap so a reward phase might be occurring while the next phase is doing its prepare so the the key thing that's happening in this process is that during the prepare phase the stacked nodes are selecting what we call an anchor block which is the block that all of them will agree on is the block that contains the reward
- 33:45
addresses this block basically has the property that over the course of the prepare phase it was confirmed by a majority of the winning sortition x' during that window so let's say that prepare phase was 240 Bitcoin blocks long the anchor block was confirmed by at least 120 but like there's some sort of like tunable parameter here in the protocol for like what percentage needs
- 34:24
to have confirmed it but at least a majority but probably a supermajority of blocks so like if an anchor block was or if a BA was confirmed by like 180 blocks during the prepare phase then it'll be the anchor block for the subsequent row board cycle but so so effectively throughout those 220 Bitcoin blocks these are voting where so do we can we under consider both of the of the participants who want this situation right or of everybody who participated
- 34:54
institution right so you could do I have two things right so one is you could consider the vote of everybody who participates in sortition the other is you can consider just the winners the reason you might want to consider just the winners is because you know that these people are assembling ballot stacks blocks like you're getting sort of more of a signal from the winners but ultimately these have like sort of the same expected outcomes over over time
- 35:26
but as a when I'm proposing do I not have an incentive to choose an M curb block which has me in the reward set you are but you need to get confirmations so if you're like building off of a if you're building off like a very old block that block is unlikely to get a hundred and eighty confirmations during the prepare phase right but and so anchored look so do I wrote separately for the anchor block or my vote is the is the tip on which I'm building building but but throughout 240
- 36:09
blocks everybody will have like image and everything goes very well and everybody builds on top of the previous block then every person voted for a different block right right but it's confirmation so it's like the anchor block is the one with a hundred confirmation I see but in this case right imagine so imagine everybody builds on top of the the same chain right so by the end of the two hundred forty Bitcoin blocks we will have one
- 36:34
block like effectively the oldest block will have 240 confirmations right the block on top of it will have 200 239 etcetera all the way up to the block which has 180 confirmations but let's say that each of those blocks has very different reward sets right so it still feels to me that at the very tip at the very end right so like once we get to the border of the 240 blocks suddenly I can start making some small
- 36:57
perturbations like imagine that the block which is 180 back has me in the set but the one which has 181 has someone else dominating the set right oh so suddenly it becomes beneficial for me to either like skip the bid just by building on something old to intentionally be skipped right just so that the block is 180 blocks back not 181 right so it seems like the same problem right valid anchor block has to
- 37:30
have actually been mined before the prepare phase started before the I see so effectively in my example when there are 240 blocks all built properly the look it was only one of those 140 is just going to be the the tip of the chain before the and and the windows how is the window chosen the window is just blocks like is it just the height of the Bitcoin chain modulo 240 I see yeah yeah
- 38:01
modulo well it's like modulo 1000 minus 240 years old right it's the reward cycle and then a prepare phase for the reward cycle and they don't have like the same luck but then okay let me think so so effectively when the when they won did it when the prepare phase starts right probabilistically like I don't know how big hopefulness of the status next chain but from what we just discussed it it feels to me that this text chain will rarely have any Forks right because they have ten minutes to agree on the block right so this next
- 38:32
chain will will usually be chain right yes so so when I know just by looking in the Bitcoin height I know that that the the prepared face is about to start it is obvious it has obvious that whatever the reward set is going to be in the last block before the prepare set almost certainly is going to be the reward set which is going to be chosen right so again I have an incentive now I have an incentive to mess up with the block which comes right before the prepare set right right so you there are incentives
- 38:59
around when it is more or less beneficial to be holding stacks mm-hmm and like in order to get into the reward set you do need to lock your stacks for the duration over the reward cycle so like I couldn't get into the reward set and then like immediately sell the stacks that I had used I see because they're getting locked up but there is some sort of like time like there is a discrete like value to like when you
- 39:37
issue your stacks lock in mm-hmm and another question which which I had is when when I'm producing a block right I'm transferring Bitcoin I'm transferring a Bitcoin to the stacks holders since I myself an already a major stockholder right then I'm getting pretty large percentage of my Bitcoin back in Xfinity in expectation right so whichever way the words that is chosen I will be getting Bitcoin proportional to my to my step holding right so if I like if I'm a major states
- 40:11
tax holder let's say I have like thirty percent of all the stacks that means that for me producing a block only cost seventy percent of the of the cost while for another person who is completely random you know like they coming from outside for them it cost 100 percent of the cost right so does it not affect sort of the egalitarian part of the or egalitarian component of the system so
- 40:34
there's maybe two ways to think about it one is like yes these miners are getting a discount when they participate as miners and they're able to send phones to their stacks address that is true but like at the same time there's not an additional like there's not a high additional value that they're getting out of that participation then any other reward recipient would be getting right
- 41:09
so if there's like whatever they sending they're sending it to five addresses at a time like they're yes getting like a 20% discount but they're also still transferring like that same discount to other people and so in one sense it does reduce the Galant arianism of the system to a certain extent mostly because there's this threshold for participation but in another sense like it's it's
- 41:41
increasing the value of stacks two stacks holders so if you are participating in as a stacks holder like this is a process that is ultimately better than you yep so so how far away from the how many more consoles do we need to learn about the chain because I sort of also want to spend time actually kind of blocks tax right I presume blockchain is just a minor component at the bottom which powers it
- 42:09
uh yeah I mean I think this is like we've covered pretty much all of the concepts I think yeah awesome in this yeah so right and so also I guess an important question to understand is that the Block in the blocks tax the transactions on that block they they can do more complex than bitcoins Bitcoin scripts right correct yes so yeah they in the statusbar tenure you're able to write smart contracts
- 42:40
using clarity which is smart so so what are other components of the of the system so I was I was just going to comment a little bit on the on the STX holders were also aligning so one one thing over there is that it really depends on the current distribution of stacks as well and that's something that we were a bit careful off that we were actually putting limits on the maximum amount of capital any single party can put in than we did the offering in in 2017 and some of the other holders like
- 43:14
blocks at BBC itself actually wouldn't participate in mining like just as a as a policy and and I'll go back to it's it's in my mind it's a little bit of a cost of capital right so you are deciding to part your capital you could have done something else with it and you're getting some value by parking that capitalist a little bit like you know how people get loans on their Bitcoin right there they give Bitcoin to
- 43:39
somebody and they get a return on it so your parking capital as SDX to get to do more efficient mining yeah that they guess makes sense okay let's make sure we're in the same wet work so yeah so the block stack ecosystem as it exists today is sort of this multi layered stack that provides application developers with a way to build decentralized applications very easily without doing a lot of transactions on
- 44:16
our blockchain so the way that it's application and box act as built today is that they use a library of block stack j/s box fjs runs client-side in users web browsers and it does all of this like work of like building up applications and showing users data associated with them or other users through our decentralized storage system which is called Gaia so box IGS it's like primarily interacting with Gaia what Gaia is is
- 45:00
really just a method of looking up data for a given user at a sort of server location chosen by that user so what that would mean is like let's say I'm Aaron that ID is like my decentralized username I logged in to an application the application tries to do some work and it tries to look up some file from Aaron that IDs storage what it's going to do is send out a query to the blog section and system for Aaron ID the Box
- 45:41
Tech naming system will like return some server which is my Gaia server and once it's returned that server box type J as knows how to form a URL to then query that server for the particular file in question and let's say it's like food JPEG or whatever like it knows how to query the guy that's are there for food a JPEG and so in this case the blockchain naming system isn't just the nodes which is it the same nodes that operate the the blockchain yes exactly
- 46:17
so the box I'm naming system is like the V like in the stack watch-chain v1 there are basically two applications there's the naming system and there are stacks tokens the naming system is basically just a mapping of unique strings to small packets of information which we call zone files which are actually just DNS zone files that tell applications where to find a particular users gaya server so it's effectively the the looks like jst needs to locally know some like em kernels or something
- 46:59
to connect to yes so in bots @j s so like if I'm like writing a blog stack application I can supply like a default node that I want it to communicate with like that could be a public note there like I run or a public node run by some other entity but I can supply a default there however users when they sign into the app their sign-in includes where it's got like a JWT D JSON web token with a bunch of information in it and one of the pieces of information is
- 47:43
their preferred node to communicate with and then if that's supplied and you're using sort of the default box access distribution then block set J's will communicate to the user specified node rather than the application specified node of course this still does like depend on users like sort of trusting that application to a certain extent because like an application developer could choose to just always use their node however there are web extensions
- 48:20
and other sort of like tooling available which ensures that like if you're using a block stack application like the box a complication actually only ever communicates with the node that you specified and for storage storage a separate set of notes right or that's also the same notes corporate yeah so that's a separate set of nodes and the great thing about the storage is that it is like very much back-end agnostic like
- 48:54
because you're doing this sort of recursive look up where plotzed fjs asks the block stack naming system for information about where my data is stored because you have that that sort of indirection step I can specify all sorts of places like I just store all might choose to store all my data in like an AWS bucket because it gets very great performance and like I have a bucket that I pay for the blocks ijs is just sort of it's pretty agnostic to that it just needs to
- 49:33
be able to do a normal HTTP request and so when you say when you're saying I can choose so I in this case is the user of the application or the application developers it's the user of the application let's say so yeah so effectively user it's it's the responsibility of the user to figure out whether data support and an application can on behalf of user store dating to their preferred storage or what is the relationship between like the developer because developer one given the develop application they need to store data
- 50:11
somewhere right yes so so in the scheme like as designed all data should really only ever be stored on behalf of a user right if I'm not using this application like my data is mine it should be stored in my Gaia bucket if application developer wants to do things where they're storing information related just to the application or like storing things on like an application server
- 50:45
then really that has this effect that it it's sort of deteriorate some of the decentralization of the PAP itself right and this is where sort of the necessity of stacks v2 I think is sort of most apparent right in stacks b1 like you're somewhat limited as an application developer and how you can store sort of application specific data in a way that like all of your users would be able to see it however in stats me to know that we have
- 51:23
the ability to write like clarity smart contracts there's a lot more freedom for developers to harness the blockchain itself for storing data in like open verifiable secure way hmm and in the in this scheme right that we have on the whiteboard right now it is distance ability of the user to figure out whether they will be storing data right so it could be their own server it would be it could be other words I see so so so block stacks on itself does not try
- 51:58
to provide any storage solution like corn or whatnot yeah so today if users are like sort of signing up through the default sort of sign up flow in the block stack sign-in experience then like they get provisioned with storage that we're providing but ultimately they could choose to use something else and like we're not going to be providing storage forever for everyone and so yeah yeah that makes sense until naming
- 52:37
system what what is the rules of allocating domain names to people is it like first-come first-serve do that the STX for getting the domain names yes so the answer is yes to both of those questions like it is first-come first-serve and you pay to get a name and there's like rules governing how much it costs to get a name like shorter names cost more names without numbers cost more things like that yep
- 53:16
and all the names that the has not distort on the blockchain right correct so all the names themselves are stored on the blockchain The Associated data with the names those own pilots are not stored directly on the botching there's like a separate peering network that's sharing those zone files around the reason for that is because like the zone files themselves are not like consensus bearing right like you don't have to
- 53:49
wait until you have all of the zone files to continue processing operations on the blockchain but like it's good to have that data so and how does it ensure that the zone files don't get lost it's not if the whole peer network disappeared no you wouldn't be able to reconstruct it I see sort of actually let me thank you your that question that makes sense so so I guess one question is why so
- 54:21
even if I'm using the service right and I have and I know where my storage is why don't you will not need block blocks that Manning system why wouldn't I just locally say well use that storage right right so the reason is because like if you want to participate like if you want to use this application with other people right so it will say you and I we're gonna communicate and I'm airing that ID
- 54:43
and your standard ID right you've stored some really cool photo on your storage and you want to share it with me like I need to know how to read it from my client s ok so that is accessible to all the participants as well ok that makes sense so who in this case who has access like and everybody in the system change the zone files associated with names and if not then what what authenticates me how do you know that that's not someone else right so you know
- 55:17
to change the zone file hash associated with a name which is the thing that's getting stored on the boccie in order to change that you need to issue a signed transaction where the key that signs the transaction is like the owner key of the name so I quit certain name you assign it to an owner key and you mentioned before that that there are extensions right but but it's not the false implied that they can use blocks text without an extension so if I'm using it without an extension what is responsible for the
- 55:49
keys management so for key management there's a couple things that happen so one is that when you sign into an app the app is not given your like name owner key it's given an app specific key so if you're familiar with like a hierarchical derivation Keys so like all these keys are set P 256 k1 keys which means that you can do key derivation on them so what we do when a user signs
- 56:24
into an application is that we take their identity key and then we derive a path to an application-specific key so that the application is only ever given this app specific key so it couldn't like affect data from other applications now in the world where we you are using an extension the application would actually never even need to get this key either right like the extension is managing that key and the app is for sending right requests and signature
- 56:59
requests to the extension which is handling the sign language but that so does it imply that in order for me to start using an application I need to I need to use some client software locally to do like something locally on my an instrumented do the key management right on issue the access key to the to the application right so I need to have some third-party software installed right
- 57:23
correct yeah so what we have today is authenticate er which is what is actually like holding your keys and handles the like act sign in and then key generation sort of flow but with the effective without some extra work on the Abdullah / side right they will not be able to build an application which a person will just open in the browser without having like imagine I never heard of locks ties before right right and I want to start using blocks like application I will have to install blocks like first write the
- 58:03
Authenticator before I can use application sort of so what we have is there's a flow in which a user doesn't need to ever install anything and rather what happens is the application that's like using box tech Jas when it triggers this like sign up or login flow it generates the key in the application itself and then submits it to some server that like sends a recovery key to the user and then the user can begin using the application sort of immediately and in that scheme like as a
- 58:50
new user I'm placing a lot of trust of my identity in this particular application but in many cases that might make sense because like if I'm writing that has never heard of blocks that like the app is the thing that I trust first yeah so in this particular scheme so that scheme actually makes a lot of sense right if the user just joins the application and that way at that very
- 59:14
moment they they very willing to to trust that's right because application will lose more by like we're doing something if you write but as I'm as I'm using application for a while at some point my assets are like my my data in application like my attachment to it grows right so at some point I want to get full control of the key so is there a way for me to regain full control of the key such that the server who initially issued it has no way because
- 59:38
presumably if they can recover the key for me they can also recover the key for themselves right so is a way for me to completely replace the key on my account so yes there you can do a you can do like a name transfer operation so like a total rekeying is achievable and then if you do this rekey and we have like as a CLI tool but like theoretically you could have a very user-friendly tool that like handles the rekeying of all of your data like it it
- 1:00:11
sort of crawls your Gaia data storage movies all of it so that's like if you want to get sort of a full guarantee that this application that you signed up with even if they're storing your key if they've had like a key logger going when you sign in because there's like a password based unlocking that is supported you get this full guarantee by doing this transfer and rekey presumably I think like by the time by the time a person does the keying right they do that because they they sort of at this
- 1:00:45
point understand the value yes so so I guess at that point they would be willing to to go to the CLI tool yeah I mean mainly I think that there's there's a world in which you know like okay whatever there's three billion people using this right some of them would want to use maybe something other than the CLI tool but even if they were motivated yeah yeah yeah I guess I guess that makes sense cool okay so so so far that all makes sense
- 1:01:17
are there any other big parts that we haven't covered yet thank yes there's like a there's a lot of stuff we don't around this to make a lot of things easier to make like name registrations easier we have like various concepts around like how you can do batched registrations of names so that like a single Bitcoin transaction can actually register like a hundred names which reduces the cost of new users significantly we also have there's a lot
- 1:01:48
of like developer tooling that like helps to build applications in the style beyond just lots actually they have this notion of radix which is like an indexer for this decentralized data so that if I'm building this applet an application like it it makes a lot of sense to do point-to-point communication very easily right like if I know that I'm trying to communicate without centers that ID like I fetch their data but if I'm going to like crawl like a
- 1:02:19
profile like a feed of updates like if you think about like a Twitter like application then like suddenly you need the ability to index lots of different peoples data and so for that we have a piece of software called radix that helps developers Alec along with that mm-hmm and then of course Instax me too there's going to be a whole host of other things going on mostly I'd say the biggest piece of that is the smart contracting clarity yep yep yep I was gonna bring that up that I
- 1:02:54
think the clarity smart contract language is the big confident that we haven't be able to talk about yeah and I think that that is like sort of large enough in scope that it probably warrants its own session but I think that the the highest level features of clarity that are important to note are one that clarity smart contracts are are published on the blockchain in source form so in a sense that's like an
- 1:03:30
interpreted blockchain language the reason that we think that this is important is to prevent you know a whole class of bugs that could be devastating for the blockchain like compiler bugs and things like it's also inspectable which i think is sound can you PM does not possess correct yes it's inspectable both by other developers developer themselves and even like very motivated users there's a lot of benefits there you know the second
- 1:04:01
big design goal and and sort of feature of clarity is that it's a decidable language so it's not very complete so any smart contract that you publish in clarity has like very specific upper bound on the running time for all the operations in the smart contract that allows the blockchain itself to do like static analysis to determine the cost of operations before actually executing them it also enables like whole classes of analysis tools for developers
- 1:04:44
themselves to make writing smart contracts easier safer build more confidence for their users if men say the third most interesting feature of clarity is support for transaction conditional transactions like we call them post conditions but basically as a user if I'm calling a function on any given smart contract my wallet software or whatever tool I'm using to generate this transaction is able to add post constraints on to the transaction so these post constraints could say
- 1:05:31
something like I'm calling this function but abort this transaction if more than X amount of some tokens are transferred from my account or like if I'm in translation to an exchange it can I can specify specifically how much I'm expecting to spend and how much my expecting to receive yeah so exactly now this is an exchange called one inch random aetherium so they have a similar feature they sending a transaction to various exchanges but they also always validate at the end of the transaction went to
- 1:06:03
the expected price so it is doable in the theorem what you would have liked you can have Woollett extend the transaction itself it sends right but yes that's right so you get it as like a language feature like it's a first-class feature of the fax blockchain so awesome and I have one small question which is in in the block stack right every user has their own storage read so effectively I at my own discretion can at any point terminate my storage right which like an expectation that sounds to
- 1:06:43
me that for many applications that will create various of optimal user experience for the other users right for example what like you know if it's a if it's a sort of Instagram right silently other users that they see like missing pictures or or or whatnot right I guess maybe I the first is that application developers should be able to deal with these kinds of cases and not like displaying broken images and then the
- 1:07:17
second answer that is that like yes it might deteriorate the experience of other users if I decide to delete my Instagram account without informing Instagram but I would argue that it should be my right to do that yes yeah yeah yeah I agree cool okay so so I think we covered quite a bit today it was very interesting thanks a lot for joining me and and diving deep into a block stack mmm of
- 1:07:49
course I enjoyed it thank you yeah thanks so much