 			into: SQLTable(name: SQLMetadata.grantsTableName),
 			columns: ["user", "kind", "table"].map { SQLColumn(name: $0) },
 			values: [
-				[.literalBlob(identity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.create.rawValue), .null],
-				[.literalBlob(identity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.drop.rawValue), .null],
-				[.literalBlob(identity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.insert.rawValue), .literalString(SQLMetadata.grantsTableName)],
-				[.literalBlob(identity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.delete.rawValue), .literalString(SQLMetadata.grantsTableName)]
+				[.literalBlob(rootIdentity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.create.rawValue), .null],
+				[.literalBlob(rootIdentity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.drop.rawValue), .null],
+				[.literalBlob(rootIdentity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.insert.rawValue), .literalString(SQLMetadata.grantsTableName)],
+				[.literalBlob(rootIdentity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.delete.rawValue), .literalString(SQLMetadata.grantsTableName)]
 			]
 		))
-		let grantTransaction = try SQLTransaction(statement: grant, invoker: identity.publicKey, counter: rootCounter)
+		let grantTransaction = try SQLTransaction(statement: grant, invoker: rootIdentity.publicKey, counter: rootCounter)
 		rootCounter += 1
 
-		try node.receive(transaction: try createTransaction.sign(with: identity.privateKey), from: nil)
-		try node.receive(transaction: try grantTransaction.sign(with: identity.privateKey), from: nil)
+		try node.receive(transaction: try createTransaction.sign(with: rootIdentity.privateKey), from: nil)
+		try node.receive(transaction: try grantTransaction.sign(with: rootIdentity.privateKey), from: nil)
 	}
 
 	// Start submitting test blocks if that's what the user requested


	// Initialize database if we have to
	var rootCounter = 0
	if initializeOption.value {
		// Generate root keypair
		let identity = try Identity()
		Log.info("Root private key: \(identity.privateKey.stringValue)")
		Log.info("Root public key: \(identity.publicKey.stringValue)")
		Swift.print("\r\nPGPASSWORD=\(identity.privateKey.stringValue) psql -h localhost -p \(netPort+1) -U \(identity.publicKey.stringValue)\r\n")

		// Create grants table, etc.
		let create = SQLStatement.create(table: SQLTable(name: SQLMetadata.grantsTableName), schema: SQLGrants.schema)
		let createTransaction = try SQLTransaction(statement: create, invoker: identity.publicKey, counter: rootCounter)
		rootCounter += 1

		let grant = SQLStatement.insert(SQLInsert(


		node.start(blocking: false)
		let q = try SQLStatement("CREATE TABLE test (origin TEXT, x TEXT);");
		try node.receive(transaction: try SQLTransaction(statement: q, invoker: rootIdentity.publicKey, counter: rootCounter).sign(with: rootIdentity.privateKey), from: nil)
		rootCounter += 1

		// Grant to user
		let grant = SQLStatement.insert(SQLInsert(
			orReplace: false,
			into: SQLTable(name: SQLMetadata.grantsTableName),
			columns: ["user", "kind", "table"].map { SQLColumn(name: $0) },
			values: [
				[.literalBlob(identity.publicKey.data.sha256), .literalString(SQLPrivilege.Kind.insert.rawValue), .literalString("test")]
			]
		))
		try node.receive(transaction: try SQLTransaction(statement: grant, invoker: rootIdentity.publicKey, counter: rootCounter).sign(with: rootIdentity.privateKey), from: nil)
		rootCounter += 1

		sleep(10)

		Log.info("Start submitting demo blocks")
		var testCounter = 0
		do {
			var i = 0
			while true {
				i += 1
				let q = try SQLStatement("INSERT INTO test (origin,x) VALUES ('\(node.uuid.uuidString)',\(i));")
				let tr = try SQLTransaction(statement: q, invoker: identity.publicKey, counter: testCounter).sign(with: identity.privateKey)
				Log.info("[Test] submit \(tr)")
				try node.receive(transaction: tr, from: nil)
				testCounter += 1
				sleep(10)
			}
		}
