-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1 Architecture #1
Comments
Hey, good write up. A few questions: |
Some background: The smart contracts are ENS resolvers. Their role is to map an ens record to a After pitching this to john in person and seeing your questions I'm realizing that I'm telling the story wrong, so I'm going to rewrite the OP. BUT:
Interacting with the ENS resolver/smart contract. Not sure what the ABI is, but it will probably be something like
The CLI is an interface for this. So what I imagine the CLI doing is something like: $ hyperlane publish ./build/out This will publish the
Any change to the static content
It's how ENS works. Every "domain" is a smart contract that either resolves to a value and can nest (every level of the domain path is a new smart contract) to another smart contract to handle the lower path. Check the ENS introduction
Also just how ENS works. Now, why am I using ENS? It's the evolving standard for how this is going to work. Sense writing originally, I've discovered https://eth.show which is, if not exactly, the gateway I described above. @humbitious didn't like the idea of "needing to hit mainnet for every request" but you can do a few things to limit the load like cache results (with a ttl like normal dns) or, all of these functions to resolve are
Let me try to answer this with an example. Let me know if this isn't clear still. Let's assume we have a website, named Here's a mapping of possible ways to get to your website:
Another thing we can do is map
Yes, the smart contract(s) will contain a bunch of mappings actually that, through ENS, instructs the gateway which files to serve. |
Do any of the other alternatives use mainnet smart contracts to handle the conditionals like, if parameter x then give back IPFS hash y, else z? "Smart contracts are programmable! See where this is going?" |
I haven't been able to find anyone attempting to write ENS resolvers with this complex of logic. The reference contract that people use is just a key-value mapping. The ENS spec also doesn't include parameters to be passed down. This current architecture and existing gateways don't support that, but I have thought it could be nea, powerful, and also backwards compatible. |
Overview
Hyperlane's goal is to allow for user friendly static-hosted websites to be served via a distributed storage provider (IPFS initially). While providing friendly domain names for users, it also gives developers flexibility to perform expected DevOps dances like blue/green deploys, dark launches, timed releases, split testing, and slow rollouts to name a few.
Hyperlane:
How it works
ENS Resolvers
All of the "magic" happens in these bespoke resolvers. ENS is similar to DNS in that you have nested domains
*.*.eth
where every nested level is it's own smart contract. Smart contracts are programmable! See where this is going?The hyperlane ens resolvers allows developers to choose which revision of their site is sent to users with smart contracts. For the most part, these resolvers will be standardized and provided by hyperlane, but community developers with the right motivation could create their own or contribute back new features. In fact, this allows more complex features to be added to the platform progressively as all you need to do is upgrade existing resolvers.
The default resolver will perform the following:
<rev_number>.*.hyperlane.eth
<rev_number>.*.hyperlane.io
0
will, by default, point to an "instruction/it works" page with getting started for quick onboarding.*.hyperlane.eth
will be the "public" version that will default to latest revisionCLI
A CLI (likely installed as a global npm dependency) will be provided to act as an abstraction away from the smart contract setup and implementation. Assuming a robust and feature rich set of default smart contracts, your average user will only need to register a subdomain of
hyperlane.eth
by deploying a set of contracts that they will own, and then interacting with them.The CLI will provide that interface while allowing advanced usages of forking and overwriting default contract behavior.
Upgradability and migrations across cli/smart contract versions will be important to take into consideration.
Possible Examples:
Deploy a new version of your website from your build directory
Change which alias gets default traffic
Perform a blue green deploy, with a contract set to use the alias
green
instead oflatest
The Gateway
Edit: Still under investigation if needed,
eth.show
and.luxe
domains might be able to solve this natively.The gateway's goal is to fill a hole in the existing ecosystem. Natively, browsers don't know how to handle
When a user visits a hyperlane website the gateway will:
host
to a ENS record._dnslink
DNS text entry for custom domains_dnslink
inspiration/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco
.For immutable content types (js, css, images) a file with a format like
bundle.<contentHash>.js
or with a querybundle.js?hash=<contentHash>
will be short circuited to the IPFS gateway.The text was updated successfully, but these errors were encountered: