Upgrading the notary to a new version of Corda Enterprise
Version 4.8
Version 4.7
No additional steps are needed to upgrade from version 4.6 to 4.7.
Version 4.6
No additional steps are needed to upgrade from version 4.5 to 4.6.
startNodesInProcess
driver properties (and not as a new process if the startNodesInProcess
is false
). This setting can be overridden. Please note that if the test interacts with the notary and expects the notary to run as a new process, you must set startInProcess
to false
.Version 4.5
We’ve introduced the notary_double_spends
table and added an index to the notary_request_log
table. The notary_double_spend
table contains information about attempted double-spend transactions.
Upgrade steps:
- Back up your DB cluster.
- Test to ensure that you can restore from backup.
- Add the new table and indexes to a database in your cluster. It will be replicated to all other databases in the cluster. If you experience problems when the notary worker is restarted, perform a rolling upgrade on the notary worker nodes as detailed in the node upgrade guide.
JPA notary using a CockroachDB database
To upgrade a CockroachDB database, run the following command:
create index on notary_request_log (consuming_transaction_id)
create table notary_double_spends (
state_ref varchar(73) not null,
request_timestamp timestamp not null,
consuming_transaction_id varchar(64) not null,
constraint id4 primary key (state_ref, consuming_transaction_id),
index (state_ref, request_timestamp, consuming_transaction_id)
);
JPA notary using an Oracle RAC database
To upgrade an Oracle RAC database, run the following commands:
Create the new notary table using the following command:
create table corda_adm.notary_double_spends ( state_ref varchar(73) not null, request_timestamp timestamp not null, consuming_transaction_id varchar(64) not null, constraint id4 primary key (state_ref) );
Once the table has been created, add indexes using the following commands:
create index tx_idx on corda_adm.notary_request_log(consuming_transaction_id) create index state_ts_tx_idx on corda_adm.notary_double_spends (state_ref,request_timestamp,consuming_transaction_id)
Lastly, grant access rights to the table:
GRANT SELECT, INSERT ON corda_adm.notary_double_spends TO corda_pdb_user;
Version 4.4
The notary_request_log
table was extended to include the X500 name of the worker node that processed the request.
Upgrade steps:
- Backup your DB Cluster.
- Test you can restore from backup.
- Log in to any database server of your cluster and add the new column to the
notary_request_log
table, see SQL statements below. It will be replicated to all other database servers. - In the unlikely event that the database gets corrupted, take all the notary worker nodes down and restore the database.
- Perform a rolling upgrade on the notary worker nodes. Follow the node upgrade guide for each node, and make sure the node is running and is no longer in flow draining mode before moving on to the next one.
JPA Notary
CockroachDB
ALTER TABLE notary_request_log ADD COLUMN worker_node_x500_name VARCHAR(255);
Oracle RAC
ALTER TABLE notary_request_log ADD worker_node_x500_name VARCHAR(255);
Percona XtraDB
ALTER TABLE notary_request_log ADD COLUMN worker_node_x500_name TEXT;
Version 4.2
Since Corda Enterprise Edition 4.2 the MySQL JDBC driver now needs to be installed manually for every worker node, otherwise nodes will fail to start. See notary installation page for more information.
Version 4.0
In Corda Enterprise Edition 4.0 an additional table notary_committed_transactions
is being used by the HA notary to support the new reference state functionality.
- Backup your Percona XtraDB Cluster.
- Test you can restore from backup.
- Log in to any Percona XtraDB Cluster database server and create the
notary_committed_transactions
table. It will be replicated to all other database servers.>
CREATE TABLE IF NOT EXISTS notary_committed_transactions (
transaction_id BINARY(32) NOT NULL,
CONSTRAINT tid PRIMARY KEY (transaction_id)
);
- In the unlikely event that the database gets corrupted, take all the notary worker nodes down and restore the database.
- Perform a rolling upgrade on the notary worker nodes. Follow the node upgrade guide for each node, and make sure the node is running and is no longer in flow draining mode before moving on to the next one.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.