Gnosis Chain 🛠Building on Gnosis Chain and Hashi - Auryn Macmillan
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join Auryn Macmillan from Gnosis Chain for a workshop titled "Building on Gnosis Chain and Hashi". Thank you to everyone who joined our first in-person appearance in 2023! We are incredibly grateful for the support and contributions of all the hackers, tech mentors, judges, partners, and volunteers who made the ETHGlobal Tokyo event such a huge success. Without your dedication and expertise, this event would not have been possible. We would also like to extend a special thank you to the attendees who traveled from over 59 countries to participate in the event. Your presence and involvement made it a truly international weekend, and we are thrilled to have had such a diverse group of participants. With over 1070 hackers it was a pleasure walking into Toranomon Hills and seeing such a talented pool of individuals. With over 22 workshops, 9 talks, and over $375,000 USD in prizes we hope you enjoyed the weekend full of hacking, meeting all our incredible partners and learning from enthusiasts of the space. We are proud to have welcomed over 35% of attendees who were new to Web3. We hope this event sparked your interest in the world of blockchain and provided you with valuable insights and knowledge. We cannot express enough gratitude to everyone who contributed to the success of ETHGlobal Tokyo. We are already looking forward to the next event and hope to see you all there! 🎉🚀 ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Music] hey folks I'm Warren I work at gnosis UH with that now I guess that's uh that is the steward of gnosis chain uh The Talk today is you know talking kind of briefly just about um kind of building our nurses chain uh what nurses chain is but then the bulk of it is going to be uh about Hashi which is a new uh you know Bridge Oracle aggregator um so kind of talk about what that is and why it exists uh for the bulk of the top today but just quickly uh talking about no such Australian kind of why it exists um and that's the chain is a is a kind of community run chain uh formerly known as X die uh we we kind of aim to have this environment that very closely mirrors the uh mainnet ethereum uh environment in terms of both the beacon chain and the uh execution layout um big differences uh essentially the the price for participation so running a validator on gnosis chain uh requires a one gno deposit which is a few hundred dollars as opposed to the kind of 32 Heath uh tens of thousands of dollars uh deposit to run a validator on mainnet ethereum so really it's intended to kind of open up uh at home staking to a much much larger audience of users uh on any kind of really low end Hardware well with very low stakes and and as a result we've we've had a really incredible response from the community uh more than a hundred thousand validators off and running um it's it's tooling compatible with with everything that you already use to write smart contracts for uh ethereum mainnet and the price of transactions is super super low uh the the native token on the network is die or kind of die bridge over to uh nurses chains or xdi um and yeah 100K gas is is a fraction of a cent um this is uh really really great for kind of testing things in production but also for a kind of high uh High throughput applications where uh you want to have yeah your users to be able to kind of participate in in some interesting thing on chain that that isn't necessarily uh uh I don't know financially dependent or is it isn't uh financially worthwhile necessarily to to run on uh on mainnet so we've seen a lot of really interesting uh things like games deployed on-chain games deploy two nurses chain because they can kind of Leverage uh on-chain mechanics uh without costing users ridiculous amounts of uh of money just to kind of participate um so we uh just a couple of weeks here for for uh kind of playing with nurses chain you can find the docks at uh docs.nosischain.com uh faucets for both mainnet and for their chiado testnet at nurses foster.com and then the RPC endpoints for uh interacting with mainnet uh with nurses change mainnet and for uh nurses chains chinato test net um yeah so I guess what what I'd like to do is just encourage folks if you're if you're building something uh here at the hackathon then um explore nurse's changes an option uh for a kind of deployment Target um if if you are doing something particularly if you're doing something that uh would benefit from really low-cost transactions uh and a really stable execution environment uh we have open surprises for applications built on and deployed to nurses chain and we'll talk about them at the end um I'm going to switch gears now switch topics and jump into uh Hashi which is this hash Oracle aggregator found so how she's a protocol for cross chain communication based on this kind of additive security so multiple inputs multiple oracles um at its core it's a hash Oracle aggregator and what I mean by that is it uh it allows you to have this kind of right hole which is This Acronym that I'm trying on I don't know if it'll if it'll stick but it's either to come to a raid if you've ever set up a kind of big storage devices of redundant array of hash oracles the idea here is to um part two distribute trusts for Bridges kind of on the mechanism level not put all of your uh systems trust into one Bridge article and the reason for that um is that uh Bridges have been responsible for this outrageous amount of loss over the last couple of years uh more than two billion dollars in 2022 was lost because of bridge exploits uh the top four of uh five items on the wrecked on news leaderboard are bridge related hacks um and I think what this really says to illustrate is that no Bridge implementation no Bridge mechanism is is kind of 100 secure there are always there's always a tax surface and there's always potential for bridge mechanisms to fall over to taking a break and to uh in doing so break any systems that are dependent on them and so Hashi is uh the system that essentially allows you to not have to trust one Bridge mechanism but rather to distribute trust over a number of different Bridges require that they agree or require that the threshold of them agree in order to kind of propagate any state change so the design principles here uh we wanted to kind of have standardization at that the kind of lowest possible level um the the hash for any kind of data or state change that you're wanting to propagate make it really modular and agnostic to the underlying mechanisms um and then yeah this idea of this ryjo redundant array of independent hash oracles uh analogous to a raid um it prioritizes security over latency so it moves kind of as fast as whatever your slowest Oracle is in uh in your threshold of oracles and then uh prioritize this kind of robustness and security of a execution costs so it's it's slower and more expensive uh than than a every other Bridge mechanism um because it requires redundancy but in doing so you gain uh that much better security model or much better security assumptions essentially what you're relying on is that an exploiter cannot uh break multiple mechanisms in parallel and convince them all to create the same kind of false output so even if you were able to break multiple in parallel it's going to be really really difficult kind of near impossible to have them report the same false outcome is uh is the kind of assumption here with something like Hashi um the goals uh diversification on the cross chain protocol implementations so we want Integrations with kind of multiple different uh header oracles uh what I mean by this is is kind of like client like uh Bridges we are bringing there the heter Oracle right the header block header from one chain uh over to another chain so that you can then do things like storage proofs on them um and then also Integrations with multiple message passage passing mechanisms and this is one reason that we're careful to call it a harsh Oracle rather than something like a head Oracle because it's really agnostic to what type of information is being passed or what type of information is being aggregated we're just we're aggregating hashes and that can be a hash that is a block header it can be a hash of some message it could be a hash of some uh outcome out in the real world uh you can kind of use this in in any number of different ways you're just basically creating this mechanism for multiple different Oracles to agree or to require multiple different articles to agree on a given hash for a given ID in some given context um and what we want to do is allow users to choose what combinations and what thresholds of of these combinations uh their system requires uh in order to kind of build custom trust assumptions for their system um it's a bit of a messy architectural overview here I think I have a mouse goes to call um so this is kind of drawing a kind of hypothetical example of a token Bridge um so we have this uh token bridge over here on the left side where you would kind of deposit tokens in um a just a little bit out of date actually we'd have a message dispatcher uh contract here that the token Bridge would then call to dispatch a message and that would relay it out then to various different Bridge mechanisms all of these Bridge mechanisms are effectively black boxes they they do whatever they do to kind of move information from one network to the other and then over on the destination Network you have adapters to each of these Bridge mechanisms that are then going to kind of feed into Hashi or Hashi will actually uh query each of these Bridge mechanisms to have them report their canonical hash for a given idea in a given context and then there's a few extra layers here to to enforce uh specific thresholds and uh specific sets of adapters um and then eventually a message executor plugging into the other side of the token bridge where a token would be minted for for kind of end users this is a bunch of redundancy and so we we probably see this being used more by uh where's the way to kind of create the canonical instance of your token and and then probably leveraging networks like connects network uh the kind of liquidity layers on top of this bridge for relatively lower value uh and uh relatively low value transfers across chain and the uh Hashi setup as your way to kind of secure the canonical uh mint and Bone functions for your tokens on either side so I think it um yeah it it definitely benefits from these kind of faster execution layers uh added on top of it um so main main components here are main things that we're built in them that we're looking for for others to build uh very interested in in applications like token Bridges governance Bridges nft bridges uh kind of built on top of this uh very interested in uh hash oracles so like mechanisms for passing um messages or passing block headers from one chain to another chain uh very interested in um in Oracle adapters so if for any existing oracles that are out there adapters for plugging Hashi into those and interested in uh things like uh the message dispatching contracts message uh executing contracts and and any other novel uh um use cases that you can come up with um I guess we kind of covered that so we can skip over um and yeah just links here to a couple of resources uh the repos at github.com I can drop this into I can just drop the whole presentation into uh their their discount server somewhere so you can uh track it down there um and if you want to find out more about nurses chain in general then we've got a bunch of links here as well um if we've got time I think we do have a bit of time I can I can happily answer any questions now but we can also just go and poke through the uh the code and and get a bit of a better feel for how the whole thing works if you guys like um and I can conflict you drive it a little bit from there oh I should talk about prizes really quickly for nurses chain um so there's there's a handful of prizes here um for just applications built on top of notice chain um the the kind of top three applications built on and then kind of deployed on notice chain uh we'll get prizes as well as best project built uh using Hashi or kind of utilizing Hashi in some way and best project uh utilizing uh safe in some way um but yeah let's go play with some code I guess does anyone have any questions no yeah I looked at um succinct I I looked at succincts um telepathy ZK bridge and there they can provide the state route like on ethereum and uh you can't access that from a smart contract on L1 right like you you only have the block hash but um is is it I don't know how um so so when Hashi is being used and aggregate aggregating these values is is the assumption that like if the ZK Bridge isn't working or someone passed a false proof that the block hash then therefore would would be different or like what what values in the block headers can you compare or is there a way that the amb can also pass the state route from L1 yeah that's a that's a great question so I think that's this probably two two questions bundled in there is like what what are the other mechanisms that might uh pass that you might use for redundancy in this uh and then the other kind of question that feels like is bundled in there is like how do you get from uh blockheader to actually proving some data and so the first the first question there um yes you can do uh use the A and B for uh passing uh block headers we built this really crude little uh header reporter contract here which um is essentially going to allow anyone to report a block header uh if it's within the the range that you can actually get the block headers which is like 256 blocks into the past um and it's going to push that over the bridge um via the A and B is going to uh required a pass message function so we can kind of coerce the A and B into sending block headers over the bridge for us and then once you have a header we also have the ability to thanks to uh Laura uh here uh the ability to um kind of recursively prove historic block headers so if you want to kind of go back in time further you can uh proved the kind of previous block header because it's encoded into the the camera block head off and you can do that as far back as you like it's pretty inefficient to go really far back in history but it works uh if you know if you want to go to just a few hops back then it's uh probably easier route than kind of coerassing the bridge to to kind of pass another header uh in terms of how you actually extract States from uh from a block header there's a handful of uh protocols for doing this uh Axiom is one uh that has built a system for doing ZK proofs uh on a block header uh to to be able to then validate that some states exists in the uh in the block that this block header was uh was uh produced from and so uh yeah I think the Assumption here with um with the header Oracle aggregation is that it's going to work in tandem with some way of of proving State something like uh uh Axiom um we can also Imagine a system here where you might have kind of multiple iterations through Hashi to ultimately kind of get uh to some states so you might have um Hashi pass say the the heter oracles via various different mechanism uh I'm sorry how should you pass the uh the block headers via various different mechanisms um have those mechanisms agree on what the block headers are and then have uh another set of uh Oracle mechanisms that are going to be queried for uh the state at a different uh block height so with uh this the state that is approvable from a given uh block header and so uh that you take this kind of second iteration through for each of those oracles based on the um the header that was reported in there in the kind of previous iteration um and so yeah we're very interested in sort of any any additional mechanisms for doing this kind of stay proofs um or event proofs based on on Blockheads I think the the two systems that I'm aware of for doing this uh Axiom and then there's another one called uh dandruff um and yeah I'm sure there's many many more out there but those are the two that we've uh that have kind of been flagged uh already as well something you probably want to have Integrations with could could you open up this uh okay if if you go back to um the header reporter yeah and the utils header storage yeah yeah um yeah I don't know why it's not uh letting me click into it that way but and this can add it here so head of storage would be on the destination chain and this is just where we're going to uh pass in the headers that we've reported uh from uh from the origin chain right and so okay what what contract is on the origin chain um On the Origin chain you'll be this uh header reporter here right right which uses the header storage and it calls store block header which only stores the block hash yes okay so only the block hash and then oh okay yeah I mean as long as I can use Axiom to make a state proof using a block hash so the ad storage is used in the origin chain right not in the destination um how am I mixing it up however right yeah yeah so we're using sorry it's totally right so on the on the origin chain yeah yeah we're calling head of storage uh install block error which is Let's uh I have to sign up separately uh which is yeah I can install the the block header on the uh On the Origin chain and then allow uh because it's in storage allow mechanisms like this uh header reporter to query it from uh uh storage and then relay it okay yeah I'll look look more more into Axiom but if if the block hash is enough because I I just looked at telepathy and they're just providing the state routes uh yeah um yeah yeah yeah cool okay thanks uh so are you guys just um thinking about this as a uh more like an infrastructure tool that you can just check the headers rather than like a messaging uh like relayer I I think we see this both and so it's it should be able to aggregate really anything that can be represented as a hash now if it kind of maps to this um it's essentially mapping of un256 to um 25632 then it should be able to kind of aggregate it uh we have uh built adapters for uh execution layer and head oracles uh execution layer like clients and uh and then also adapters for uh sending messages so we have or down here this uh Yahoo contract is our uh message dispatcher so this is the the endpoint they would use on the origin chain if you wanted to send kind of an arbitrary message across uh across chains and then on the other side uh the cro contract is our message executor that would be the thing that ultimately calls out to whatever your your system is or your contract is if you wanted to execute arbitrary calls and what chain is it deployed on right now uh it's not deployed in production anywhere it's it's very much still a moving Target very much still uh in development and so you guys are kind of getting your hands on it really early which is great hopefully uh folks here can help shape what it looks like cool I think uh if there's no more questions we can probably wrap it off here apparently we've had a pretty decent little Dive In yeah all right thanks everyone
Automatic transcript — names and jargon may be misspelled.