Corda Community Edition 4.11
Corda Enterprise Edition 4.11 ã«ã¯ãããã€ãã®æ°æ©èœãæ¹åç¹ãããã³ä¿®æ£ãå«ãŸããŠããŸãã
ãã©ãããã©ãŒã ããŒãžã§ã³å€æŽ
Corda 4.11 ã¯ãã©ãããã©ãŒã ããŒãžã§ã³13ã䜿çšããŠããŸãã
ãã©ãããã©ãŒã ããŒãžã§ã³ã«é¢ãã詳现ã¯ãVersioningãåç §ããŠãã ããã
æ°æ©èœãšæ¹åç¹
JDK Azul ããã³ Oracle JDK ã¢ããã°ã¬ãŒã
Corda ã¯çŸåšãJDK Azul 8u382 ããã³ Oracle JDK 8u381 ããµããŒãããŠããŸãã
Ledger Recovery
Corda 4.11 ãªãªãŒã¹ã®äžç°ãšããŠãLedger Recoveryãå°å ¥ãããŸãããããã¯ãæšæºåããã Corda ãããã¯ãŒã¯ã®éçšããã¯ã¢ããããã³ãªã«ããªããã»ã¹ãè£å®ããŸãã
詳现ã«ã€ããŠã¯ãLedger Recovery ãåç §ããŠãã ããã
Two Phase Finality
Two Phase Finality ãããã³ã«ïŒFinalityFlow
ããã³ ReceiveFinalityFlow
ãµããããŒïŒãè¿œå ãããFinality ã䜿çšãã CorDapps ã®èé害æ§ãšå埩æ§ãåäžãããŸãããæ¢åã® CorDapps ã§ã¯ããã®æ°ããæ¹è¯ããããããã³ã«ãå©çšããããã®å€æŽã¯å¿
èŠãããŸããã
詳现ã«ã€ããŠã¯ãTwo Phase Finalityãåç §ããŠãã ããã
äŸåé¢ä¿ã®ã¢ããã°ã¬ãŒã
以äžã®äŸåé¢ä¿ãã¢ããã°ã¬ãŒããããé倧ãªã»ãã¥ãªãã£ã®è匱æ§ã«å¯ŸåŠããŠããŸãã
Hibernateã5.4.32.Finalãã5.6.14.Finalã«ã¢ããã°ã¬ãŒããããŸããã
H2ã1.4.197ãã2.2.214ã«ã¢ããã°ã¬ãŒããããŸããã
H2ããŒã¿ããŒã¹ã¯ãæ¢ç¥ã®è匱æ§ã«å¯ŸåŠããããã«ãããŒãžã§ã³2.2.224ã«ã¢ããã°ã¬ãŒããããŸãããH2ã¯ãµããŒããããŠããªãæ¬çªããŒã¿ããŒã¹ã§ãããéçºããã³ãã¹ãç®çã§ã®ã¿äœ¿çšããå¿ èŠããããŸããH2ããŒãžã§ã³1.4.197ïŒCordaã®ä»¥åã®ããŒãžã§ã³ã§äœ¿çšãããŠããããŒãžã§ã³ïŒãšã4.11ã§å®è£ ãããæ°ããH2ããŒãžã§ã³2.2.224ã®éãã«é¢ãã詳现ã¯ãH2ããã¥ã¡ã³ããåç §ããŠãã ãããæãéèŠãªéãã¯æ¬¡ã®ãšããã§ãã
- ãšã³ãã£ãã£ã®åœå H2ããŒãžã§ã³2.2.224ã¯ãããŒã¿ããŒã¹å ã®ããŒãã«ãšåã®åœåã«é¢ããå³æ Œãªã«ãŒã«ãå®è£ ããŠããŸããSQLã®ããŒã¯ãŒãã®äœ¿çšã¯ãã¯ãèš±å¯ãããŠããŸãããCorDappã¹ããŒããããŒãã«ãŸãã¯åã«äºçŽãããååã䜿çšããŠããå ŽåãCorDappã®ãããŒã¯ããŒãã«ãšå¯Ÿè©±ããããšãããšãã«å€±æããé¢é£ããSQLäŸå€ãçºçããŸãã
- åŸæ¹äºææ§
ãã®åé¡ã®è§£æ±ºçã¯ãåé¡ã®ããããŒãã«ãŸãã¯åã®ååãäºçŽãããŠããªãååã«å€æŽããããšã§ãããã®ååå€æŽããã»ã¹ã¯ãCorDappã®ç§»è¡ã¹ã¯ãªãããšCorDappã³ãŒãå ã®JPAãšã³ãã£ãã£å®çŸ©ã§å®è£ ããå¿ èŠããããŸãã
H2ããŒãžã§ã³2.xã¯ãå€ãããŒãžã§ã³ãšåŸæ¹äºææ§ããããŸãããH2ããŒã¿ããŒã¹URLã«MODE=LEGACY
ãè¿œå ããããšã§ãéãããåŸæ¹äºææ§ãå®çŸã§ããŸãã詳现ã«ã€ããŠã¯ãH2 FeaturesããŒãžã®LEGACY Compatibility Modeã»ã¯ã·ã§ã³ãåç
§ããŠãã ããã
H2 2.xã¯ãå€ãH2ããŒãžã§ã³ã§äœæãããããŒã¿ããŒã¹ãã¡ã€ã«ãèªã¿åãããšãã§ããŸãããå€ãããŒã¿ããŒã¹ãã¢ããã°ã¬ãŒãããããã®æšå¥šãããã¢ãããŒãã¯ãããŒã¿ããšã¯ã¹ããŒãããŠãããæ°ããããŒãžã§ã³2.xããŒã¿ããŒã¹ã«åã€ã³ããŒãããããšã§ãããã®ããã»ã¹ã®è©³çŽ°ã«ã€ããŠã¯ãH2 Migration to 2.0ããŒãžã«èšèŒãããŠããŸãã
Liquibaseã3.6.3ãã4.20.0ã«ã¢ããã°ã¬ãŒããããŸããã
- API
- ãã° ãã®Liquibaseã®ããŒãžã§ã³ã§ã¯ããã¹ãŠã®INFOã¬ãã«ã®ãã°ãSTDERRã«åããããSTDOUTã¯SQLã¯ãšãªã®ãã°ã«äœ¿çšãããŸããLiquibaseã䜿çšããç¬èªã®ããŒã¿ããŒã¹ãã€ã°ã¬ãŒã·ã§ã³ã³ãŒããå®è£ ããŠãããŠãŒãã£ãªãã£ã¯ãã«ã¹ã¿ã ãã¬ãŒã確ç«ããŠLiquibaseã®æ å ±ãã°ããã£ããã£ã§ããŸããLiquibase APIã¯ãã«ã¹ã¿ã ãã¬ãŒãçµ±åããããã«äœ¿çšã§ããã¯ã©ã¹ãæäŸããŠããŸãã
ãã®Liquibaseã®ããŒãžã§ã³ã«ã¯ãåã®ããŒãžã§ã³ãšã¯ãããã«ç°ãªãAPIããããŸããLiquibaseã䜿çšããç¬èªã®ããŒã¿ããŒã¹ãã€ã°ã¬ãŒã·ã§ã³ã³ãŒããå®è£ ããŠããCorDappsã¯ãæ°ããAPIã«åãããŠæŽæ°ããå¿ èŠããããŸãã
vault_stateããŒãã«ã«è¿œå ãããæ¶è²»ãã©ã³ã¶ã¯ã·ã§ã³ID
Stateããã©ã³ã¶ã¯ã·ã§ã³ã«ãã£ãŠæ¶è²»ããããšãCordaã¯vault_state
ããŒãã«ã®consuming_tx_id
åã«æ¶è²»ãã©ã³ã¶ã¯ã·ã§ã³ã®IDãè¿œå ããŸããCordaã¯æ°ãããã©ã³ã¶ã¯ã·ã§ã³ã®ããã«ã®ã¿ãã®ããŒã¿ããŒã¹åãæŽæ°ããŸãããã§ã«å°åž³ã«ååšããæ¶è²»ãããStateã«å¯ŸããŠã¯ãconsuming_tx_id
ã®å€ã¯nullã§ãã
AMQPããŒã¿ã®ãã·ãªã¢ã©ã€ãºæ§èœåäž
ãã®ãªãªãŒã¹ã§ã¯ãAMQPããŒã¿ã®ãã·ãªã¢ã©ã€ãºã®ããã©ãŒãã³ã¹ãåäžããŠãããããã«ããLedgerGraphãArchivingãããã³ä»ã®CorDappsã®ããã©ãŒãã³ã¹åäžãæåŸ ãããŸãã
æ¡åŒµãããSendTransactionFlow
SendTransactionFlowã¯ãè€æ°ã®ã»ãã·ã§ã³ã«éä¿¡ã§ããããã«æ¡åŒµãããŸãããSendTransactionFlowã®åŒã³åºãå ã¯ãæ°ããã³ã³ã¹ãã©ã¯ã¿åŒæ°ã䜿çšããŠãéä¿¡å ã®ã»ãã·ã§ã³ã®çš®é¡ã瀺ãããšãã§ããŸããæ°ããã³ã³ã¹ãã©ã¯ã¿åŒæ°ã¯ä»¥äžã®éãã§ã:
participantSessions: Set<FlowSessions>
observerSessions: Set<FlowSession>
ãããã®ãã©ã¡ãŒã¿ã¯ãéä¿¡è åŽã«æ ŒçŽããå埩ã¡ã¿ããŒã¿ã®çš®é¡ãæšè«ããã³æ§ç¯ããããã«ã䜿çšãããŸãã
åå è
ã»ãã·ã§ã³ã¯ãStatesToRecord
ã®å€ãONLY_RELEVANTã«ããã©ã«ãã§èšå®ãããŸãã
åå è
ã»ãã·ã§ã³ã¯ãStatesToRecord
ã®å€ãALL_VISIBLEã«ããã©ã«ãã§èšå®ãããŸãã
æ°ããæå·åãµãŒãã¹
AESããŒã®å®è£ ã䜿çšããããã¢éã§ã®å ±æããã³æ°žç¶æ§ã®ããã«é åžã¬ã³ãŒãå埩ã¡ã¿ããŒã¿ãæå·åããã³åŸ©å·åããããã«äœ¿çšãããŸãã
DJVMã®åé€
DJVMã®ããŒã¿æ©èœãåé€ãããŸãããDJVMã®åé€ã®çµæãDriverParameters
ã¯ã©ã¹ããdjvmBootstrapSource
ããã³djvmCordaSource
ã®2ã€ã®ã³ã³ã¹ãã©ã¯ã¿ãã©ã¡ãŒã¿ãåé€ãããŸãããDriverParameters
ã䜿çšããã¯ã©ã€ã¢ã³ãã³ãŒãã¯ãåã³ã³ãã€ã«ãå¿
èŠã§ãã
解æ¶ãããåé¡
ãã®ãªãªãŒã¹ã«ã¯ã4.10.3以éã®æ¬¡ã®ä¿®æ£ãå«ãŸããŠããŸãã
- PostgreSQL 9.6ããã³10.10ã¯ãPostgreSQLèªäœã«ãã£ãŠãµããŒããããªããªã£ãããããµããŒããããªãã¯ã¹ããåé€ãããŸããã
- log4j2.xmlã¯ãããŒã«ãªãŒããŒæŠç¥ã®æ§æã§èšºæããã³ãã§ãã¯ãã€ã³ããã°çšã®æ£ãããã¡ã€ã«ãåé€ããŸãã
- åã®ããããªãªãŒã¹ã§ã¯ãSSL蚌ææžã®åŠçã匷åããäžç°ãšããŠã倱æããSSLãã³ãã·ã§ã€ã¯ã«é¢é£ããç¹å®ã®ãã°ã¡ãã»ãŒãžãæå³ããè¿œå ãããŸããããããã®ã¡ãã»ãŒãžã¯ããã©ãã£ãã¯ããŒããã©ã³ãµãŒãã·ã¹ãã ã¢ãã¿ãªã³ã°ã®æ¥ç¶æ§ãã¹ãäžã«ãã°ã«é »ç¹ã«è¡šç€ºãããŸããããã°ã®ãã€ãºãæžå°ãããããã«ããããã®ç¹å®ã®ãã°ã¡ãã»ãŒãžãç¡å¹ã«ããŸããã
ããŒã¿ããŒã¹ã¹ããŒãã®å€æŽ
ãã¹ãŠã®ããŒã¿ããŒã¹ããŒãã«ã®è©³çŽ°ãªèª¬æã«ã€ããŠã¯ãããŒã¿ããŒã¹ããŒãã«ãåç §ããŠãã ããã
以äžã®ããŒã¿ããŒã¹å€æŽãé©çšãããŸããïŒ
vault_state
ããŒãã«ã«ã¯ãæ°ããconsuming_tx_id
åãè¿œå ãããŸããããã®æ°ããåã¯ã次ã®ãã€ã°ã¬ãŒã·ã§ã³ã¹ã¯ãªããã§è¿œå ãããŸããïŒvault-schema.changelog-v14.xml
ã- Two Phase Finalityã¯ãã¡ã€ã³ã®DbTransactionããŒãã«å ã«è¿œå ã®ããŒã¿ãã£ãŒã«ããå°å ¥ããŸããã
@Column(name = "signatures")
val signatures: ByteArray?
Two Phase Finality ã¯ãå埩ã¡ã¿ããŒã¿ã®é åžã¬ã³ãŒããæ ŒçŽããããã®æ°ããããŒã¿ããŒã¹ããŒãã«ã2ã€å°å ¥ããŸã:
@Entity
@Table(name = "${NODE_DATABASE_PREFIX}sender_distr_recs")
data class DBSenderDistributionRecord(
@EmbeddedId
var compositeKey: PersistentKey,
/** states to record: NONE, ALL_VISIBLE, ONLY_RELEVANT */
@Column(name = "sender_states_to_record", nullable = false)
var senderStatesToRecord: StatesToRecord,
/** states to record: NONE, ALL_VISIBLE, ONLY_RELEVANT */
@Column(name = "receiver_states_to_record", nullable = false)
var receiverStatesToRecord: StatesToRecord
)
@Entity
@Table(name = "${NODE_DATABASE_PREFIX}receiver_distr_recs")
data class DBReceiverDistributionRecord(
@EmbeddedId
var compositeKey: PersistentKey,
/** Encrypted recovery information for sole use by Sender **/
@Lob
@Column(name = "distribution_list", nullable = false)
val distributionList: ByteArray,
/** states to record: NONE, ALL_VISIBLE, ONLY_RELEVANT */
@Column(name = "receiver_states_to_record", nullable = false)
val receiverStatesToRecord: StatesToRecord
)
äžèšã®ããŒãã«ã¯åãæ°žç¶çãªè€åããŒã¿ã€ãã䜿çšããŸã:
@Embeddable
@Immutable
data class PersistentKey(
@Column(name = "transaction_id", length = 144, nullable = false)
var txId: String,
@Column(name = "peer_party_id", nullable = false)
var peerPartyId: Long,
@Column(name = "timestamp", nullable = false)
var timestamp: Instant,
@Column(name = "timestamp_discriminator", nullable = false)
var timestampDiscriminator: Int
)
é åžãªã¹ãã®ãã©ã€ãã·ãŒæ å ±ïŒæå·ããŒãå«ãïŒãä¿æããããã®2ã€ã®è¿œå ã®ããŒãã«ããããŸã:
@Entity
@Table(name = "${NODE_DATABASE_PREFIX}recovery_party_info")
data class DBRecoveryPartyInfo(
@Id
/** CordaX500Name hashCode() **/
@Column(name = "party_id", nullable = false)
var partyId: Long,
/** CordaX500Name of party **/
@Column(name = "party_name", nullable = false)
val partyName: String
)
@Entity
@Table(name = "${NODE_DATABASE_PREFIX}aes_encryption_keys")
class EncryptionKeyRecord(
@Id
@Type(type = "uuid-char")
@Column(name = "key_id", nullable = false)
val keyId: UUID,
@Column(name = "key_material", nullable = false)
val keyMaterial: ByteArray
)
ãµãŒãããŒãã£ã³ã³ããŒãã³ãã®ã¢ããã°ã¬ãŒã
以äžã®è¡šã¯ã4.10.3ãš4.11 Enterprise Editionsã®éã§ã®äŸåé¢ä¿ã®ããŒãžã§ã³å€æŽããªã¹ãã¢ããããŠããŸã:
äŸåé¢ä¿ | åå | ããŒãžã§ã³ 4.1.2 Enterprise | ããŒãžã§ã³ 4.11 Enterprise |
org.bouncycastle | Bouncy Castle | 1.70 | 1.75 |
co.paralleluniverse:quasar-core | Quasar | 0.7.15_r3 | 0.7.16_r3 |
org.hibernate | Hibernate | 5.4.32.Final | 5.6.14.Final |
com.h2database | H2 | 1.4.197 | 2.2.2241 |
org.liquibase | Liquibase | 3.6.3 | 4.20.0 |
Log4jããã
2021幎12æã®Log4jã®è匱æ§ã«å¯ŸåŠãããã¹ãŠã®ãããã¯ãã¡ããã¯ãªãã¯ããŠãã ããã