-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(odap-plugin): odap crash recovery first implementation
* Addition of retries when making requests * Addition of timeouts when making requests * Addition of endpoints for recovery procedure * Tests with crashes in the first phase of the protocol * Addition of logging in local SQLite database * IPFS is now only to store hashes and signatures of the logs and proofs/claims * Migrate odap-api-call-with-ledger-connector.test from tape to jest * Addition of rollbacks when counter party gateway is and is not crashed * Update README.md with a new protocol image and the description of each test file Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt>
- Loading branch information
1 parent
48c5345
commit 2e94ef8
Showing
82 changed files
with
12,947 additions
and
2,483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,7 @@ | |
"protoc", | ||
"protos", | ||
"qscc", | ||
"recoverupdateackmessage", | ||
"RUSTC", | ||
"Rwset", | ||
"sbjpubkey", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const environment = process.env.ENVIRONMENT || "development"; | ||
const config = require("../knexfile.js")[environment]; | ||
module.exports = require("knex")(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import path from "path"; | ||
|
||
// default configuration for knex | ||
module.exports = { | ||
development: { | ||
client: "sqlite3", | ||
connection: { | ||
filename: path.resolve(__dirname, ".dev.sqlite3"), | ||
}, | ||
migrations: { | ||
directory: path.resolve(__dirname, "migrations"), | ||
}, | ||
useNullAsDefault: true, | ||
}, | ||
}; |
15 changes: 15 additions & 0 deletions
15
packages/cactus-plugin-odap-hermes/knex/migrations/20220331132128_create_logs_table.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
exports.up = async (knex) => { | ||
return await knex.schema.createTable("logs", function (table) { | ||
table.string("sessionID").notNullable(); | ||
table.string("type").notNullable(); | ||
table.string("key").notNullable(); | ||
table.string("operation").notNullable(); | ||
table.string("timestamp").notNullable(); | ||
table.string("data").notNullable(); | ||
table.primary("key"); | ||
}); | ||
}; | ||
|
||
exports.down = async (knex) => { | ||
return await knex.schema.dropTable("logs"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.