As having them all live in a single PropertyReader header / source
file was getting far too big. Additionally, sue some of our aliased
types to shorted lines (sVec, sList, uPtr etc)
Now things are working for the most part, move the readers into their
own internal namespace. Also start creating an actual separation of the
interface and the implementation with some Interface classes at the
non internal level.
Currently, it's more of a blob inspector than a full-blown
implementation, but this code does have the ability to understand a Corda
serialized blob and build a set of deserialisers to handle a blob. It
does this in the same way the native java implementation works by
interrogating the types (as per the definition in the envelope) and
building recursive type readers that are able to pull the relevant
information out of the byte stream.
Lots of future work to undertake, but as a starting point its a little
bit useful with the scope it could be made much more useful with some
work.
- Handle errors in Jackson and checkpoint deserialisation. A file
notifying the user that the checkpoint dump failed is created when
errors occur.
- Handle message deserialisation errors. A string placeholder is used
if an error occurs.
- Add more information about subflows (include their `FlowLogic`)
- Increase clarity in checkpoint output field names
* CORDA-3904 Add `flowCallStackSummary`
Add `flowCallStackSummary` to the output which contains the same content
as `flowCallStack` minus each subflow's `FlowLogic`. The `FlowLogic`
contains a ton of info which is normally repeated in each subflow.
Adding the summary gives an overview of the steps the flow executed
and which step it is currently on.
The `suspendedOn` field is put underneath the summary and the original
call stack is moved below the suspended info.
This puts the most useful information towards the top of the json file.
* CORDA-3139: Cater for port already bound scenario during port allocation
Also moved `SharedMemoryIncremental` into a separate file as it getting bigger
and improved readability of logic and added some logging.
* CORDA-3139: Fix the unit test
* CORDA-3139: Improve logging when failing
* CORDA-3139: Improve stability of the test
* CORDA-3018 Allow loading an untrusted contract jar if another attachment exists that was signed with the same keys and uploaded by a trusted uploader
`TransactionUtils.isAttachmentTrusted` requirements have been relaxed
to allow an untrusted attachment to be loaded as long as another
attachment exists that is signed by the same keys and was uploaded
by a trusted uploader.
The requirement of containing the same contract classes has been
removed. Therefore the contents of the existing trusted attachment
no longer matters.
* CORDA-3018 Allow a subset/intersection of signers in `isAttachmentTrusted`
Allow a subset/intersection of signers to satisfy the signer
requirements of `isAttachmentTrusted`. This allows an "untrusted"
attachment that is signed by one or more keys to be "trusted" as long
as another trusted attachment already exists that is signed by at least
one of the "untrusted" attachments signers.
A cache of trusted and untrusted public keys is now held (replacing the
previous cache of `List<PublicKey>`.
Tests have been added to `NodeAttachmentServiceTest` to confirm that
an attachment query using an `EQUAL` statement will actually return
attachments that are signed by any of the keys passed into the query.
Confirming this allowed an `EQUAL` query to satisfy the search that
had to be done as part of this change.
`MockAttachmentStorage`'s query criteria was updated to better match
the real `NodeAttachmentService` implementation.
* CORDA-3018 Update cache name and kdoc on `isAttachmentTrusted`
* CORDA-3018 Verify that chains of trust do not occur
* CORDA-3018 Switch keys around to improve chain of trust tests
* [ENT-3801] Store transactions in the database during transaction resolution (#2305)
* ENT-3801: Store downloaded txns as part of the backchain resolution into the db rather than the checkpoint
It's very inefficient to store the downloaded backchain in the checkpoint as more of it downloaded. Instead, if a threshold is reached (which currently defaults at 0) then the backchain is stored in the transactions table as unverified. A new is_verified column has been added to track this. Initially testing on the OS codebase has been very promising but unfortunately this current code is not quite ready. I had to quickly port it to ENT as this is meant to be an ENT-only optimisation.
To that effect, there is a TransactionResolver abstraction with two implementations: an in-memory one which has the old behaviour, and which will be the behaviour for OS, and a db one.
DBTransactionStorage hasn't been fully updated and I had to comment out the optimistic path for now.
Most of these changes will need to be ported to OS to keep the merge conflicts in check, but obviously not DbTransactionsResolver and the "is_verified" changes in DBTransactionStorage. DBTransactionStorage does have other refactoring which will make sense to port though.
* [ENT-3801] Start work on allowing modifications in AppendOnlyPersistentMap
* [ENT-3801] Add transaction resolver tests
* [ENT-3801] Adjust suspendable annotations
* [ENT-3801] Fix the ResolveTransactionFlow tests
* [ENT-3801] Update ResolveTransactionsFlow tests
* [ENT-3801] Add a liquibase migration script for isVerified
* [ENT-3801] Ensure the migration runs in the correct place
* [ENT-3801] Handle resolution of already present transactions
* [ENT-3801] Fix compile error in performance test app
* [ENT-3801] Logging and comment updates, plus a test case
* [ENT-3801] Add a notary change resolution test
* [ENT-3801] Add a contract upgrade transaction test
* [ENT-3801] Change new column to be a character based status
* [ENT-3801] Migration script type change
* [ENT-3801] Address first round of review comments
* [ENT-3801] Update variable names in AppendOnlyPersistentMap
* [ENT-3801] Another variable name clarification
* [ENT-3801] Fix missing name changes
* [ENT-3801] Make the signature list immutable when constructing cache value
* [ENT-3801] Add a locking strategy for unverified transactions
* [ENT-3801] Address tidying up review comments
* [ENT-3801] First attempt at ensuring locks are released after commit
* [ENT-3801] Remove references to old cache name
* [ENT-3801] Update locking logic
* [ENT-3801] Fix potential deadlock with read/write transaction locks
* [ENT-3801] Remove read locks, and ensure minimal extra suspends
* [ENT-3801] Fix build issues in tests
* [ENT-3801] Use the correct clock when calculating sleep durations
* [ENT-3801] Add a pessimism flag for writing verified transactions
* [ENT-3801] Change logging statement to debug
(cherry picked from commit 8ab6a55e17)
* [NOTICK] Fix up imports for some changed files
* [NOTICK] Fix transaction resolution tests
* [NOTICK] Reinstate the DBTransactionsResolver
* [NOTICK] Add the topological sort back to recordTransactions
* [NOTICK] Adjust test case to remove dependency on query ordering
* [NOTICK] Make test code match that in ENT
* CORDA-2617: Add failover listeners to terminate node process
This is a backport of changes done in Corda Enterprise.
It will be triggered in case of:
a) Loss of connectivity to in-built Artemis for Bridge Control;
b) Loss of connectivity to in-built Artemis for P2P connectivity.
Note on merge to CE: Disregard these changes and take whatever CE already has.
* CORDA-2617: Update documentation on stability of Corda Node
* CORDA-2617: Documentation update after discussion with @mnesbit
* parallelize download of nodeInfos
* actually call new list based addNodes method
* address review comments
fix NetworkMapUpdaterTest
* ensure threadpools are shutdown after network-map download is completed
* use NamedThreadFactory instead of re-implementing it.
* fix imports after rebase
* address review comments
* remove extra whitespace
* Add constants for the open source and samples repos branch names
Open source branch name - `openSourceBranchName`
Sample repos branch name - `openSourceSamplesBranchName`
* Add base path constants to the open source and samples repos
Fully replace base path to open source codebase - `openSourceBranch`
Fully replace base path to open source samples - `openSourceSamplesBranch`
These can be accessed in the docs using `os_branch` and `os_samples_branch`
Correct usages in the docs to use these constants.
* Correct links
* Initial commit based on experimental kryo hook agent.
* WIP
* Added documentation.
* Additional improvements and documentation following more testing.
* Added field level instrumentation + basic type handlers for String, byteArray, charArray, primitive types.
* Working version (without array type handling)
* Missing build.gradle file.
* Handle display of Arrays and String.
Pruning output to avoid repetition (by loop depth, object count).
* Added configurable StackDepth (for display purposes) and filter out ProgressTracker stacks.
* Further array handling (Object arrays, 2D, 3D), improved display and general code cleanup.
* Various fixes and improvements following demo to RP.
* Clean-up
* Further clean-up
* Set checkpoint id before deserialization.
* Update documentation
* Final clean-up.
* Minor documentation fixes.
* Updates following PR review feedback.
* Add changelog entry.
* CORDA-2216 Restrict extended key usage of certificate types
- Remove `anyExtendedKeyUsage` from all certificates
- Restrict to server and client auth for all certificates except
`ROOT_CA` which has had all extended key usages removed
* CORDA-2216 Update certificate types
- Remove server authentication from all certificates except for TLS
- Add client authentication to all certificates except for ROOT
Allow Hash Constraints to propagate to Signature Constraints. When
propagating, the new jar is added to the transaction instead of the
original contract attachment (jar).
The following requirements must be met to do so:
- System property "net.corda.node.disableHashConstraints" must be set
to `true`
- The min platform version must be 4 or greater
- There must be an input state with a hash constraint
- There must be no output states with a hash constraint
- The new jar must be signed
If these requirements are not met, the original Hash
Constraint will be kept and the contract attachment related to it is
also used.
This transition is done at the start of `handleContract` as it is not
the normal path a transition would follow. It is considered a backdoor
and should be treated separately from the rest of the attachment and
constraint logic. Furthermore, it will only work in private network
since all nodes must set the special `disableHashConstraints` flag.
* Fix test execution flakiness on fast hardware: set node info polling interval to 1 second in DriverDSL Node Startup (was only being set to 1 sec in Node Registration). Follow-up to https://github.com/corda/corda/pull/5240
* Diagnostics: add additional logging to NodeInfoFilersCopier.
* Diagnostics: add additional logging to NodeInfoWatcher
* Downgrade logging level severity to debug.
* Make atomic counter unique across instances.
Change to `SingleThreadedStateMachineManager`.
Instead of throwing an exception when a flow's fiber cannot be found,
just log the message at info level.
When set to true the RPC client will:
* automatically reconnect when the connection is broken
* simple RPC calls will block until connection is established
* Observables returned from RPC will automatically resubscribe on reconnect so the client continues to receive events. This doesn't guarantee that events will not be lost during the reconnect.