-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #491 from LF-Decentralized-Trust-labs/peers
Peer Management Enhancements (issue #488)
- Loading branch information
Showing
103 changed files
with
4,023 additions
and
2,972 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
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
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
6 changes: 3 additions & 3 deletions
6
core/go/db/migrations/postgres/000008_create_private_transaction_tables.down.sql
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
BEGIN; | ||
DROP TABLE dispatches; | ||
DROP TABLE state_distribution_acknowledgments; | ||
DROP TABLE state_distributions; | ||
DROP TABLE IF EXISTS dispatches; | ||
DROP TABLE IF EXISTS state_distribution_acknowledgments; | ||
DROP TABLE IF EXISTS state_distributions; | ||
COMMIT; | ||
|
8 changes: 4 additions & 4 deletions
8
core/go/db/migrations/postgres/000012_create_prepared_tx_tables.down.sql
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
BEGIN; | ||
DROP TABLE prepared_txn_states; | ||
DROP TABLE prepared_txn_distribution_acknowledgments; | ||
DROP TABLE prepared_txn_distributions; | ||
DROP TABLE prepared_txns; | ||
DROP TABLE IF EXISTS prepared_txn_states; | ||
DROP TABLE IF EXISTS prepared_txn_distribution_acknowledgments; | ||
DROP TABLE IF EXISTS prepared_txn_distributions; | ||
DROP TABLE IF EXISTS prepared_txns; | ||
COMMIT; |
5 changes: 5 additions & 0 deletions
5
core/go/db/migrations/postgres/000014_peer_queued_messages.down.sql
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,5 @@ | ||
BEGIN; | ||
DROP TABLE reliable_msg_acks; | ||
DROP TABLE reliable_msgs; | ||
COMMIT; | ||
|
30 changes: 30 additions & 0 deletions
30
core/go/db/migrations/postgres/000014_peer_queued_messages.up.sql
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,30 @@ | ||
BEGIN; | ||
|
||
-- These tables are replaced (data is not migrated from initial state distribution specific implementation) | ||
DROP TABLE state_distribution_acknowledgments; | ||
DROP TABLE state_distributions; | ||
DROP TABLE prepared_txn_distribution_acknowledgments; | ||
DROP TABLE prepared_txn_distributions; | ||
|
||
CREATE TABLE reliable_msgs ( | ||
"sequence" BIGINT GENERATED ALWAYS AS IDENTITY, | ||
"id" UUID NOT NULL, | ||
"created" BIGINT NOT NULL, | ||
"node" TEXT NOT NULL, | ||
"msg_type" TEXT NOT NULL, | ||
"metadata" TEXT | ||
); | ||
|
||
CREATE UNIQUE INDEX reliable_msgs_id ON reliable_msgs ("id"); | ||
CREATE INDEX reliable_msgs_node ON reliable_msgs ("node"); | ||
CREATE INDEX reliable_msgs_created ON reliable_msgs ("created"); | ||
|
||
CREATE TABLE reliable_msg_acks ( | ||
"id" UUID NOT NULL, | ||
"time" BIGINT NOT NULL, | ||
"error" TEXT, | ||
PRIMARY KEY ("id"), | ||
FOREIGN KEY ("id") REFERENCES reliable_msgs ("id") ON DELETE CASCADE | ||
); | ||
|
||
COMMIT; |
7 changes: 4 additions & 3 deletions
7
core/go/db/migrations/sqlite/000008_create_private_transaction_tables.down.sql
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DROP TABLE dispatches; | ||
DROP TABLE state_distribution_acknowledgments; | ||
DROP TABLE state_distributions; | ||
DROP TABLE IF EXISTS dispatches; | ||
DROP TABLE IF EXISTS state_distribution_acknowledgments; | ||
DROP TABLE IF EXISTS state_distributions; | ||
|
8 changes: 4 additions & 4 deletions
8
core/go/db/migrations/sqlite/000012_create_prepared_tx_tables.down.sql
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
DROP TABLE prepared_txn_states; | ||
DROP TABLE prepared_txn_distribution_acknowledgments; | ||
DROP TABLE prepared_txn_distributions; | ||
DROP TABLE prepared_txns; | ||
DROP TABLE IF EXISTS prepared_txn_states; | ||
DROP TABLE IF EXISTS prepared_txn_distribution_acknowledgments; | ||
DROP TABLE IF EXISTS prepared_txn_distributions; | ||
DROP TABLE IF EXISTS prepared_txns; |
3 changes: 3 additions & 0 deletions
3
core/go/db/migrations/sqlite/000014_peer_queued_messages.down.sql
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,3 @@ | ||
DROP TABLE reliable_msg_acks; | ||
DROP TABLE reliable_msgs; | ||
|
28 changes: 28 additions & 0 deletions
28
core/go/db/migrations/sqlite/000014_peer_queued_messages.up.sql
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,28 @@ | ||
-- These tables are replaced (data is not migrated from initial state distribution specific implementation) | ||
DROP TABLE state_distribution_acknowledgments; | ||
DROP TABLE state_distributions; | ||
DROP TABLE prepared_txn_distribution_acknowledgments; | ||
DROP TABLE prepared_txn_distributions; | ||
|
||
CREATE TABLE reliable_msgs ( | ||
"sequence" INTEGER PRIMARY KEY AUTOINCREMENT, | ||
"id" UUID NOT NULL, | ||
"created" BIGINT NOT NULL, | ||
"node" TEXT NOT NULL, | ||
"msg_type" TEXT NOT NULL, | ||
"metadata" TEXT | ||
); | ||
|
||
CREATE UNIQUE INDEX reliable_msgs_id ON reliable_msgs ("id"); | ||
CREATE INDEX reliable_msgs_node ON reliable_msgs ("node"); | ||
CREATE INDEX reliable_msgs_created ON reliable_msgs ("created"); | ||
|
||
CREATE TABLE reliable_msg_acks ( | ||
"id" UUID NOT NULL, | ||
"time" BIGINT NOT NULL, | ||
"error" TEXT, | ||
PRIMARY KEY ("id"), | ||
FOREIGN KEY ("id") REFERENCES reliable_msgs ("id") ON DELETE CASCADE | ||
); | ||
|
||
|
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
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.