-
@ arkinox
2023-12-19 16:34:01Key insights have been developed during the first 90 days as well as lots of new code.
Cyberspace Meta-Protocol
- I revised the protocol to be much simpler and better optimized for typical nostr usage.
- I merged many different event kinds into a single event kind -- the action event -- and made better usage of tags to differentiate the different kinds of actions.
- formalized the data that must be included in an action event, including the velocity, quaternion, action type, cyberspace coordinate, and references to the genesis action.
- I formalized the coordinate system -- until this point there were a couple different ideas of how to structure it.
- I formalized how an action chain is constructed and verified.
- I updated the cyberspace meta-protocol Github with these changes.
Key Protocol Insights Discovered
- After formalizing the coordinate system, I discovered that there was a great use for the final unused bit in a cyberspace coordinate: to distinguish what plane the coordinate belongs to. I had previously wondered about the relationship between cyberspace and reality. I've worked a lot in the augmented reality industry and felt as though cyberspace shouldn't be entirely virtual but have some connection to reality. Using the last bit in a cyberspace coordinate, we can define 2 planes for cyberspace: a coordinate system for reality, and a coordinate system for virtual reality. Thus, the concepts of Dataspace and Ideaspace, respectively, were born. The last bit indicates the coordinate belongs to Dataspace when 0 and Ideaspace when 1.
- Dataspace allows cyberspace objects to exist in the real world. Each point in Dataspace represents a point in real physical space, whereas zero points in Ideaspace relate to a point in reality.
- After considering many options for where Dataspace should be physically located, I settled on positioning Dataspace relative to Earth's center. Dataspace is a cubic area surrounding the Earth where each side is tangential to geosynchronous orbit. This is the maximum useful coordinate space for humans on earth. Anything bigger would involve relative positions of celestial bodies, which is outside of the scope and needs of humanity currently and would add too much extra complexity.
- Dataspace and Ideaspace work the same way, so space may be trustlessly claimed via proof-of-work and virtual interactive objects may be published in those spaces. This enables augmented-reality experiences to exist in the real world in real places that anyone can access with their nostr identity and smartphone.
- Besides claimed spaces (constructs), I created a new type of virtual structure that is not confined to a space so that globally available objects may be utilized in cyberspace. This would be useful for bringing data into cyberspace that isn't tied to a fixed location. This structure doesn't yet have a name.
- Using Dataspace, AI agents can be physically constrained to a location on Earth.
- Dataspace enables an easy solution to the proof-of-location problem which has not been solved without "blockchains" or specialized hardware. However, this solution has caveats, but also brings with it interesting use cases. One example would be providing access to a localized AI based on the verification of your own location in Dataspace.
- DVMs can be used to verify your location. This could be tied to rewards or attendance for events.
ONOSENDAI Code
I began a refactor of ONOSENDAI's codebase. The original codebase was a proof-of-concept that one could represent a 3D world using nostr. It was not structured to support the thermodynamic cyberspace protocol, and it was not using TypeScript nor a frontend framework, so I began a total rewrite using Vite/ReactJS/TypeScript.
One of the key components to the new ONOSENDAI is retrieving and validating cyberspace events published via nostr. I built series of TypeScript libraries that comprise what I call the "cyberspace state reconciler" that enables a JavaScript application to subscribe to, validate, and supply the validated state of a given user's cyberspace presence. This logic will be critical to any cyberspace application so I am designing it with other developers in mind.
Likewise I completed the work on the mining engine for https://construct.onosendai.tech, the in-browser mining software that one can use to trustlessly claim space in cyberspace via SHA256 mining. This same engine is providing the basis for the engine ONOSENDAI will use to power all cyberspace actions. (Like all of my projects, the construct miner is open source on GitHub: https://github.com/arkin0x/construct-miner)
Key Code Insights Discovered
I solved a particularly tricky problem that I have not seen anyone else solve. There are a few other nostr-based programs that perform proof of work, but they are not optimized. They work in the following way:
- create a nostr event
- serialize it
- convert to binary
- hash
- update nostr event nonce
- serialize it
- convert to binary
- hash
- etc etc etc
My mining algorithm works like this:
- create a nostr event
- serialize it
- convert to binary
- determine the nonce location in binary
- hash
- update nonce in binary
- hash
- update nonce in binary
- hash
- etc etc etc
As you can see, my mining algorithm skips a lot of overhead with object creation and string serialization. I did this partially out of necessity. For some reason, when mining via web worker, the TextEncoder object produced a memory leak that crashed the worker. Using this method is not only more efficient, but it avoids using the TextEncoder for every hash; in fact, it only uses the TextEncoder once.
To accomplish this, the nonce is structured in a different way than normally prescribed by NIP-13. I use a fixed-length nonce of 16 characters and each character can be one of 16 adjacent ASCII symbols. Incrementing this in binary is very easy; it would be problematic if the string length of the nonce ever changed, so I avoided that completely. The nonce's entropy in this format is just as sufficient as putting an incremented number into the nonce, especially with an updating created_at.
This mining system is as efficient as I can imagine it to be for web-based web worker mining. With this system, I can spawn 10 web workers and have them mine in parallel, which is what the ONOSENDAI Construct Miner does.
I am currently in progress of implementing this mining system within ONOSENDAI to enable the most efficient usage of system resources to mine cyberspace actions. As the protocol dictates, every action must include proof of work, and the proof of work scales the action. Thus, the more efficiently you can mine on your hardware, the more efficiently you can act in cyberspace.
Utilizing Dataspace: Yondar
Yondar an augmented reality project of mine that I have been working on for a while, but with the invention of Dataspace, it completely changes how I think about it. Where ONOSENDAI is meant to be an Ideaspace client, Yondar is a Dataspace companion that can be your window into the 3D augmented reality world of cyberspace in your travels across reality.
I've recently open sourced Yondar and relinquished ownership of the project to make it a fully open source endeavor. I've also begun plans to tailor it toward cyberspace implementation. Excitement about Yondar in the nostr community has been palpable because it brings a fresh new mapping and geospatial features to the protocol. However, the upcoming cyberspace features are even more exciting in my opinion, and I have been greatly encouraged by the code contributions made by the Yondar community! It's really a beautiful thing to see.
Community
The ONOSENDAI Telegram group is currently close to 100 members. It's exciting to see how many people are interested in building a true metaverse. I'm hoping that our community continues to spread the word about cyberspace and contribute to the code. Open source is our superpower!
Likewise, the Yondar Telegram group exploded from 0 to almost 50 members in a handful of weeks.
Both of these communities have different interests but are connected by the same thread: the open source metaverse protocol of cyberspace.
Nostrocket
Yondar is the first big https://nostrocket.org project. There has been immense synergy between Yondar's utilization of the nostrocket protocol and G's work on improving nostrocket. Having an ambitious and active project like Yondar helps to push nostrocket forward. G and I have worked together and there is no doubt that this synergy has propelled our projects forward. Some would perhaps liken this to, say... a rocket? Working as designed!
Summary
With a increasingly solidified protocol specification, improving tools, and growing open source communities surrounding Yondar and ONOSENDAI, I am extremely optimistic about the velocity of my work on bringing cyberspace into reality. I think that this metaverse, unlike any others, will open up possibilities that only a permissionless protocol could enable. Integration with augmented reality, DVMs, AI, and real locations can make cyberspace a useful and practical medium that touches our everyday lives.
Resources
ONOSENDAI Telegram Group: https://t.me/ONOSENDAITECH Yondar Telegram Group: https://t.me/yondarme Cyberspace Meta-Protocol specification: https://github.com/arkin0x/cyberspace ONOSENDAI repo - refactor branch: https://github.com/arkin0x/ONOSENDAI/tree/vite-reactjs-refactor ONOSENDAI Construct Miner repo: https://github.com/arkin0x/construct-miner Yondar repo: https://github.com/innovatario/yondar-mono ONOSENDAI: https://onosendai.tech Yondar: https://go.yondar.me Me: https://njump.me/npub1arkn0xxxll4llgy9qxkrncn3vc4l69s0dz8ef3zadykcwe7ax3dqrrh43w