Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.
Go to file
Joseph Zuniga-Daly c33720c73d
CORDA-3717: Apply custom serializers to checkpoints (#6392)
* CORDA-3717: Apply custom serializers to checkpoints

* Remove try/catch to fix TooGenericExceptionCaught detekt rule

* Rename exception

* Extract method

* Put calls to the userSerializer on their own lines to improve readability

* Remove unused constructors from exception

* Remove unused proxyType field

* Give field a descriptive name

* Explain why we are looking for two type parameters when we only use one

* Tidy up the fetching of types

* Use 0 seconds when forcing a flow checkpoint inside test

* Add test to check references are restored correctly

* Add CheckpointCustomSerializer interface

* Wire up the new CheckpointCustomSerializer interface

* Use kryo default for abstract classes

* Remove unused imports

* Remove need for external library in tests

* Make file match original to remove from diff

* Remove maySkipCheckpoint from calls to sleep

* Add newline to end of file

* Test custom serializers mapped to interfaces

* Test serializer configured with abstract class

* Move test into its own package

* Rename test

* Move flows and serializers into their own source file

* Move broken map into its own source file

* Delete comment now source file is simpler

* Rename class to have a shorter name

* Add tests that run the checkpoint serializer directly

* Check serialization of final classes

* Register as default unless the target class is final

* Test PublicKey serializer has not been overridden

* Add a broken serializer for EdDSAPublicKey to make test more robust

* Split serializer registration into default and non-default registrations. Run registrations at the right time to preserve Cordas own custom serializers.

* Check for duplicate custom checkpoint serializers

* Add doc comments

* Add doc comments to CustomSerializerCheckpointAdaptor

* Add test to check duplicate serializers are logged

* Do not log the duplicate serializer warning when the duplicate is the same class

* Update doc comment for CheckpointCustomSerializer

* Sort serializers by classname so we are not registering in an unknown or random order

* Add test to serialize a class that references itself

* Store custom serializer type in the Kryo stream so we can spot when a different serializer is being used to deserialize

* Testing has shown that registering custom serializers as default is more robust when adding new cordapps

* Remove new line character

* Remove unused imports

* Add interface net.corda.core.serialization.CheckpointCustomSerializer to api-current.txt

* Remove comment

* Update comment on exception

* Make CustomSerializerCheckpointAdaptor internal

* Revert "Add interface net.corda.core.serialization.CheckpointCustomSerializer to api-current.txt"

This reverts commit b835de79bd.

* Restore "Add interface net.corda.core.serialization.CheckpointCustomSerializer to api-current.txt""

This reverts commit 718873a4e9.

* Pass the class loader instead of the context

* Do less work in test setup

* Make the serialization context unique for CustomCheckpointSerializerTest so we get a new Kryo pool for the test

* Rebuild the Kryo pool for the given context when we change custom serializers

* Rebuild all Kryo pools on serializer change to keep serializer list consistent

* Move the custom serializer list into CheckpointSerializationContext to reduce scope from global to a serialization context

* Remove unused imports

* Make the new checkpointCustomSerializers property default to the empty list

* Delegate implementation using kotlin language feature
2020-07-22 17:31:59 +01:00
.ci CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
.github INFRA-456 Add codeowners (#6450) 2020-07-09 15:34:34 +01:00
.idea Merge remote-tracking branch 'origin/release/os/4.3' into my_merge_branch 2019-11-04 17:48:15 +00:00
client CORDA-3880: Streamline re-connection logic in RPCClientProxyHandler (#6426) 2020-07-03 09:29:43 +01:00
common Merge branch 'release/os/4.5' into dan/os-4.5-to-4.6-merge-2020-06-18 2020-06-18 15:50:46 +01:00
confidential-identities Merge branch 'release/os/4.4' into chrisr3-44-merge 2020-03-04 16:27:44 +00:00
config EG-71 - Changed the default file limit in the log4j2 configuration (#5996) 2020-03-02 09:26:46 +00:00
core CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
core-deterministic NOTICK: Avoid configuring more tasks in the deterministic modules. (#6452) 2020-07-13 10:33:23 +01:00
core-tests CORDA-3506 - Implement session close operations (#6357) 2020-07-21 13:26:11 +01:00
detekt-plugins NOTICK: Update Gradle files for DeteKt plugins. (#5970) 2020-02-16 08:21:05 +00:00
docker EG-2647: Add persistent Artemis volume (#6389) 2020-06-29 14:34:53 +01:00
docs INFRA-270 Publish archived API docs to Artifactory when tagged (#6309) 2020-07-16 10:46:42 +01:00
experimental NOTICK: Fix some Gradle technical debt. (#6430) 2020-07-07 09:08:58 +01:00
finance CORDA-3698: Require no classifier for Open Core and DJVM-related modules. (#6132) 2020-04-06 11:00:40 +01:00
gradle/wrapper CORDA-3892: Upgrade to Gradle 5.6.4 again, with build fixes. (#6448) 2020-07-08 11:34:25 +01:00
isolated CORDA-2893 Upgrade Corda to use Gradle 5.4.1 (Take 2) (#5137) 2019-05-20 14:26:42 +01:00
jdk8u-deterministic NOTICK: Avoid configuring more tasks in the deterministic modules. (#6452) 2020-07-13 10:33:23 +01:00
lib fix merge conflicts due to changes in Signed test cordapp creation 2019-11-05 17:42:38 +00:00
node CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
node-api CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
node-api-tests Merge branch 'release/os/4.6' into dan/4.6-into-checkpoint-feature-branch-2020-05-05 2020-05-05 17:05:23 +01:00
release-tools CORDA-3017 - Fix release tooling when product name != jira project (#5229) 2019-06-21 09:28:07 +01:00
samples CORDA-3201 - Enforce separate key for notary identity (#6308) 2020-07-20 10:59:08 +01:00
serialization CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
serialization-deterministic NOTICK: Avoid configuring more tasks in the deterministic modules. (#6452) 2020-07-13 10:33:23 +01:00
serialization-djvm NOTICK: Fix some Gradle technical debt. (#6430) 2020-07-07 09:08:58 +01:00
serialization-tests ENT-5043 separate out test utils (#5998) 2020-03-03 15:55:17 +00:00
testing CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
tools NOTICK: Fix some Gradle technical debt. (#6430) 2020-07-07 09:08:58 +01:00
.dockerignore WIP Kubenetes parallel build (#5396) 2019-09-03 15:40:08 +00:00
.gitignore ENT-4595 Add git based version (#5799) 2019-12-11 17:50:27 +00:00
build.gradle Merge remote-tracking branch 'origin/release/os/4.5' into vkolomeyko/os-4.5-os-4.6-merge 2020-07-20 15:16:33 +01:00
BUILD.md add a shared memory port allocator to allow multiple processes to sha… (#5223) 2019-07-02 18:38:33 +00:00
buildCacheSettings.gradle Explicitly disable remote gradle build cache when building locally. (#4095) 2018-10-19 16:40:06 +01:00
constants.properties CORDA-3506 - Implement session close operations (#6357) 2020-07-21 13:26:11 +01:00
CONTRIBUTING.md Combines all contributing info in one place. Clean-up. (#4266) 2018-11-20 18:17:11 +00:00
CONTRIBUTORS.md Contract tutorial update and Contributors list update (#5338) 2019-07-30 14:51:34 +01:00
detekt-baseline-config.yml TM-45 Make detektBaseline pass (#5561) 2019-10-15 15:49:31 +01:00
detekt-baseline.xml CORDA-3201 - Enforce separate key for notary identity (#6308) 2020-07-20 10:59:08 +01:00
detekt-config.yml [NOTICK] - Enable check in detekt for unused imports (#6106) 2020-03-26 15:46:33 +00:00
deterministic.gradle NOTICK: Avoid configuring more tasks in the deterministic modules. (#6452) 2020-07-13 10:33:23 +01:00
gradle.properties Revert "Merge pull request #5145 from corda/jdk11-migration-gradle5-upgrade" (#5146) 2019-05-20 16:16:49 +01:00
gradlew CORDA-3892: Upgrade Gradle 5.4.1 -> 5.6.4. (#6435) 2020-07-07 09:07:55 +01:00
gradlew.bat CORDA-3892: Upgrade Gradle 5.4.1 -> 5.6.4. (#6435) 2020-07-07 09:07:55 +01:00
java8.gradle NOTICK: Fix some Gradle technical debt. (#6430) 2020-07-07 09:08:58 +01:00
Jenkinsfile Empty JUnit results are not allowed 2020-07-21 15:55:56 +01:00
LICENSE Use full Apache 2.0 license so GitHub recognizes it 2019-08-23 12:24:37 +02:00
README.md Update README.md (#6144) 2020-04-09 15:31:19 +01:00
SECURITY.md CORDA-2958 Security policy for corda 2019-06-03 10:38:13 +02:00
settings.gradle Merge remote-tracking branch 'origin/release/os/4.5' into vkolomeyko/os-4.5-os-4.6-merge 2020-07-20 15:16:33 +01:00
sizing.sh add a shared memory port allocator to allow multiple processes to sha… (#5223) 2019-07-02 18:38:33 +00:00
TRADEMARK Updated URL link to R3 trademark policy 2017-07-13 11:43:41 +01:00

Corda

License

Corda

Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.

Features

  • Smart contracts that can be written in Java and other JVM languages
  • Flow framework to manage communication and negotiation between participants
  • Peer-to-peer network of nodes
  • "Notary" infrastructure to validate uniqueness and sequencing of transactions without global broadcast
  • Enables the development and deployment of distributed apps called CorDapps
  • Written in Kotlin, targeting the JVM

Getting started

  1. Read the Getting Started documentation
  2. Run the Example CorDapp
  3. Read about Corda's Key Concepts
  4. Follow the Hello, World! tutorial

Contributing

Corda is an open-source project and contributions are welcome!

To find out how to contribute, please see our contributing docs.

License

Apache 2.0

Acknowledgements

YourKit

YourKit supports open source projects with its full-featured Java Profiler.

YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.