Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update to match new specifications from dlc-specs PR 163 #187

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

maxpolizzo
Copy link
Collaborator

@maxpolizzo maxpolizzo commented May 10, 2023

To do:

  • Rename all classes and interfaces under pre163 and pre167 folders with Pre163 or Pre167 suffix (7aa86d7c3d2ba68a8d86d8ec69498707dd8bb676)
  • Make sure type is returned by pre163 classes toJSON function and make sure it is not in other classes. Classes where returned type has been removed from toJSON function must have a pre163 version for backwards compatibility. (6916ce7b2c031af238a7a46197a59a3574b0ea3d)
  • Fix DlcMessage.ts to handle BigSize type deserialisation (bffd2c3be4d6e788a3e9741cbcf14f4869700f01)
  • DlcOffer, DlcAccept, and DlcSign, DlcCancel, DlcClose, DlcIds, DlcInfo, DlcTransactions, NodeAnnouncementMessage, 
OrderAccept, OrderIrcInfo, OrderMetadata, OrderOffer messages should use Uint16 to deserialize type, and all sub-messages should use BigSize if type is used for deserialisation (post163, type is only used for deserialisation when there are several possible sub-types for a message class)
  • When the class has no sub-class, type should be inferred from the class itself (i.e. the class does not carry type), otherwise type should be added to the class
  • Remove serialization of length in OracleIdentifier.ts, OrderIrcInfo.ts and OrderMetadata.ts (20c4bcab5787b2d7947fd9c7d0cc63f088f1c8b2)
  • Make sure all typescript interface names do start with "I" (ca939d55a1c1da8f5fd320d8fd523bc8c78d24b4)
  • Keep old reader instantiation in pre163, use new instantiation elsewhere (a7cca04b2b6dc49a59683fa41b75ce2513be145f)
  • DlcOffer, DlcAccept and DlcSign and OrderOffer already have TLV streams enabled. Add TLV streams to DlcClose, OrderAccept, NodeAnnnouncementMessage , OracleAttestationV0Pre167 and OracleAnnouncementV0Pre167 (a142ab5fe728d1faac6ef76e260004f0611929b7)
  • Add protocolVersion to OrderAccept (458ea8390ce9c6f809d2a72592908743b340d676)
  • In messages/ContractInfo.ts, re-implement DisjointContractInfo.validate (335895bc1e7d8b53ced2e90e7c24822e13ab123a)
  • In ContractDescriptor.ts an assert clause was added to the deserialize function to check that the deserialised type is as expected: generalise this everywhere (34290675df4e81c685e5686c4dce68cf5e72a86b)
  • Fix imports in rocksdb package (59f4fcb762c50d6eaadeef2efbb47094be71cefe)
  • Fix imports, logic and tests in core package (e63be5d80dd77098f3b98167827ba3ff96fe9517)
  • Fix conflicts between packages dependencies bignumber.js and @node-dlc/bitcoin and remove unnecessary type conversions that had been used to circumvent the issue (1fbe6796cae9dd7f76503f116c6fc4c89d3ae1e1)
  • Add pre-163 tests to messaging package (7cb1b78584f1ea15c37b049804b893ed5d87eb7c)
  • Fix post-163 tests in messaging package (2edfc54de3d548b15d4de188aa973b93dcce86b2)
  • Fix NodeAnnouncementMessage.spec.ts test (4d32771fa631e2bcb9ff42b56a4268115eca7608)
  • Fix tests inrocksdb packages and generalise using offerCollateral, acceptCollateral and temporaryConntractId orders keys everywhere (19f48306a1df3dfbd4382172b685494d8ce9249a)
  • Fix tests in transport package (86c783e52285282b6a31b9c0b0be44201ca52364)
  • Add a toPre163 function to post-163 classes in messaging package and add corresponding tests (0fb761fd8a7b0d41f9c80183659c402e95cdbee4)
  • Fix discrepancy between pre-163 test vectors and post-163 test vectors related to ScriptWitness serialisation (fd856e6196b9dc36c7e7f832e1da49e45f08de53)
  • Lint messaging package (677d168ecd013c952a8a40f5e7267e79343d100e)
  • Fix payout functions builders and cross-packages dependencies (3b88c99c6e6f4832fa58fa7f5df496f162f7879c)
  • Rebase vs master branch
  • Bump packages version numbers to 0.21.5 (55e78311d2a71e9da8651f098743adb0dad88a91)
  • Rebase vs master branch again after new commit to master branch
  • Fix OracleAttestationV0Pre167 calculation of deserializedBytes during deserialization (567d0e0e65bc859f9e8cd41d88184ad3ac7bc7cd)
  • Check compatibility with rust-dlc

@maxpolizzo maxpolizzo requested a review from matthewjablack May 10, 2023 18:17
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch 6 times, most recently from d9a0bf2 to 4b7cb03 Compare May 17, 2023 22:41
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch 7 times, most recently from ea7aa80 to 2ef6aaf Compare May 25, 2023 21:02
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch 7 times, most recently from f7e383d to 114a178 Compare June 1, 2023 17:57
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch 3 times, most recently from 970db55 to 993da33 Compare June 8, 2023 17:52
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch from eb9fb65 to 30d1d54 Compare August 4, 2023 22:30
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch from 30d1d54 to 7f3a5b9 Compare August 11, 2023 22:48
@maxpolizzo maxpolizzo changed the base branch from wip-dlc-specs-163 to master August 11, 2023 22:50
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch from 2d4cbe6 to 3c29f36 Compare August 22, 2023 22:15
matthewjablack and others added 27 commits August 22, 2023 16:23
…ckages/messaging/lib/messages/pre-167 --wip-- [skip ci]
…AttestationV0Pre167, DlcClose, DlcTransactions, OracleIdentifierV0, OrderAccept, OrderIrcInfo, OrderMetadata. Added OracleAttestationV0Pre163 and OracleIdentifierV0Pre163 classes with returned type in toJSON function. Renamed OracleIdentifierV0.ts to OracleIdentifier.ts. --wip-- [skip ci]
…erIrcInfo.ts and OrderMetadata.ts --wip-- [skip ci]
…cClose, OrderAccept, NodeAnnnouncementMessage, OracleAttestationV0Pre167 and OracleAnnouncementV0Pre167 --wip-- [skip ci]
…ry type conversions that had been used to circuvent the issue --wip-- [skip ci]
…aging/__tests__/messages/pre-163 --wip-- [skip ci]
…and temporaryConntractId keys everywhere --wip-- [skip ci]
…Pre163 and toPre163 functions --wip-- [skip ci]
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch from 3c29f36 to 55e7831 Compare August 22, 2023 22:39
@maxpolizzo maxpolizzo force-pushed the maxpolizzo/dlc-specs-163 branch from de85a2a to 567d0e0 Compare August 25, 2023 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants