MCPcopy Index your code
hub / github.com/curio-research/keystone

github.com/curio-research/keystone @v0.1.14

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.14 ↗ · + Follow
770 symbols 1,898 edges 70 files 235 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Keystone

Keystone Cover

Keystone is a rollup SDK for building onchain games hyper focused on performance and composability above all.

We believe that in order for onchain games as a whole to meaningfully expand, we must first and foremost deliver unparalleled experience that the average player is familiar with.

TODO: insert header image

Current features

  • High frequency tick based game logic
  • State sync with support for emitting events and errors
  • Atomic transactions within game logic systems

Coming Soon

  • EVM layer that composes on top of the tick-based state machine
  • Better code-gen support across platforms (Unity, Typescript, etc)
  • UI state explorers, simulation tools
  • Parallel execution ???

Back story

After building and launching onchain games ourselves, we realized the following problems:

  • Slow performance: Games built using smart contract languages are slow by nature, as blockchain state machines aren’t specialized for games. We cannot build ambitious games with even hundreds of concurrent users.
  • Missing critical game features: Since blockchains are async and transparent by nature, missing games like game tick and private information block meaningful games from thriving.
  • Isolated developer toolchains: Smart contract languages are unable to leverage existing mature toolchains and ecosystems for games.

Keystone represents a step-function improvement in how onchain games are built. We designed keystone from grounds up to create a high-performance, data oriented game server with the composability of EVM smart contracts (coming soon).

Extension points exported contracts — how you extend this code

ISystemErrorHandler (Interface)
error handling interface [3 implementers]
server/gameTick.go
IWorld (Interface)
The World Interface Implemented by base world state and buffer world to enable atomic transactions [2 implementers]
state/gameWorld.go
IVerifyIdentity (Interface)
we assume that all incoming requests have an identity payload [2 implementers]
test/testutils/identity.go
ITable (Interface)
Table interface [1 implementers]
state/core.go
ISaveState (Interface)
general interface to implement [1 implementers]
server/saveState.go
Pather (Interface)
astar is an A* pathfinding implementation. Pather is an interface which allows A* searching on arbitrary objects which c [1 …
pathfinder/astar.go
ISocketRequestRouter (FuncType)
(no doc)
server/streamServer.go
IMiddleware (FuncType)
(no doc)
server/middleware.go

Core symbols most depended-on inside this repo

Get
called by 84
state/gameWorld.go
AddSpecific
called by 45
state/gameWorld.go
Add
called by 37
state/gameWorld.go
Len
called by 34
pathfinder/priority_queue.go
Contains
called by 28
state/sparseSet.go
Filter
called by 26
state/gameWorld.go
Name
called by 23
state/core.go
TickWorldForward
called by 22
server/tick.go

Shape

Method 413
Function 221
Struct 101
TypeAlias 23
Interface 8
FuncType 4

Languages

Go100%
TypeScript1%

Modules by API surface

test/proto/pb.base/base.pb.go230 symbols
test/proto/pb.test/test.pb.go57 symbols
state/core.go35 symbols
pathfinder/astar.go31 symbols
server/gameTick.go29 symbols
state/gameWorld.go26 symbols
server/gameContext.go26 symbols
test/testHelpers.go21 symbols
server/streamServer.go21 symbols
server/serverpb/output/server.pb.go18 symbols
test/table_test.go16 symbols
server/socketNetworkMessage.go14 symbols

For agents

$ claude mcp add keystone \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact