Decentralized Database on Universal Chain
The project is a decentralized network of SQL nodes (airports) managed via Ethereum smart contracts. SQL nodes are dynamically selected as the origin of the route, receive SQL queries (flight plans), execute them on the SQLite database (destination), and return hash results.
The Ethereum smart contract that handles:
- Airport/Node Management: Register (
constructAirport), open (openAirport), temporarily close (closeAirport), or remove (destroyAirport) an airport/node. - Route/Database Management: Launch (
launchNewRoute), modify (changePermission), terminate (terminateRoute), or reroute (reroute) routes to destination/database registration. - Query/FlightPlan Submit: Submit SQL queries/flightplan (
submitFlightPlan) to be executed by nodes, databases on the route.
The Go-based node implementation that:
- Registers itself as an airport on Ethereum.
- Listens for
NewRouteLaunchedandRouteTerminatedto manage databases. - Listens for
FlightPlanSubmittedevents. - Parses and executes SQL queries.
- Calculates hash of results for data changes.
- Hardhat
- Go 1.24.4+
- Dependencies:
go get github.com/google/uuid go get github.com/ethereum/go-ethereum go get github.com/mattn/go-sqlite3 go get github.com/rqlite/sql