Skip to content

Commit c1464c0

Browse files
authored
Re track catapult-server main (#745)
* Re track catapult-server main * - Added minFeeMultipler - Updated version - Updated change log * privatetest network update
1 parent 1693f2e commit c1464c0

File tree

72 files changed

+360
-922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+360
-922
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
44

55
The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [0.23.0] - 14-Jan-2021
8+
9+
**Milestone**: Catapult-server main(0.10.0.5)
10+
Package | Version | Link
11+
---|---|---
12+
SDK Core| v0.23.0 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)
13+
Catbuffer | v0.1.1 | [catbuffer-typescript](https://www.npmjs.com/package/catbuffer-typescript)
14+
Client Library | v0.11.1 | [symbol-openapi-typescript-fetch-client](https://www.npmjs.com/package/symbol-openapi-typescript-fetch-client)
15+
16+
- **Re track to catapult-server main branch**
17+
- **All entity versions reset to v1 for Symbol mainnet release**
18+
- **[BREAKING CHANGE]** Finalization proof modle removed `messageGroup.schemaVersion` and `BMTreeSignaure.top`
19+
- **[BREAKING CHANGE]** Removed `VotingKeyLinkV1Transaction`.
20+
- **[BREAKING CHANGE]** `PrivateTest` network type changed from `0x80` to `0xA8`.
21+
- Added **Node** specific property: `minFeeMultipler` in transactionFees.
22+
- Removed padding buffer in account state serialization.
23+
- Voting key length set to 32 bytes.
24+
725
## [0.22.2] - 12-Dec-2020
826

927
**Milestone**: Catapult-server finality(0.10.0.4)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The Symbol SDK for TypeScript / JavaScript allows you to develop web, mobile, an
99

1010
## Important Notes
1111

12-
### _Catapult-Server_ Network Compatibility ([email protected].1)
12+
### _Catapult-Server_ Network Compatibility ([email protected].4)
1313

14-
Due to a network upgrade with [catapult-server](https://github.com/nemtech/catapult-server/releases/tag/v0.10.0.1) version, **it is recommended to use this package's 0.21.0 version and upwards to use this package with Fushicho versioned networks**.
14+
Due to a network upgrade with [catapult-server](https://github.com/nemtech/catapult-server/releases/tag/v0.10.0.4) version, **it is recommended to use this package's 0.23.0 version and upwards to use this package with Fushicho versioned networks**.
1515

16-
The upgrade to this package's [version v0.21.0](https://github.com/nemtech/symbol-sdk-typescript-javascript/releases/tag/v0.21.0) is mandatory for the latest **_Catapult-Server_ compatibility**.
16+
The upgrade to this package's [version v0.23.0](https://github.com/nemtech/symbol-sdk-typescript-javascript/releases/tag/v0.23.0) is mandatory for the latest **_Catapult-Server_ compatibility**.
1717

1818
Find the complete release notes [here](CHANGELOG.md).
1919

e2e/infrastructure/TransactionHttp.spec.ts

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
TransactionStatusRepository,
3434
} from '../../src/infrastructure';
3535
import { TransactionPaginationStreamer } from '../../src/infrastructure/paginationStreamer';
36-
import { TransactionVersion, UInt64, VotingKeyLinkV1Transaction } from '../../src/model';
36+
import { TransactionVersion, UInt64 } from '../../src/model';
3737
import { Account } from '../../src/model/account';
3838
import { LockHashAlgorithm } from '../../src/model/lock';
3939
import { PlainMessage } from '../../src/model/message';
@@ -737,7 +737,7 @@ describe('TransactionHttp', () => {
737737
300,
738738
LinkAction.Link,
739739
networkType,
740-
TransactionVersion.VOTING_KEY_LINK_V2,
740+
TransactionVersion.VOTING_KEY_LINK,
741741
helper.maxFee,
742742
);
743743
const signedTransaction = votingLinkTransaction.signWith(account, generationHash);
@@ -753,30 +753,6 @@ describe('TransactionHttp', () => {
753753
});
754754
});
755755

756-
describe('VotingKeyLinkV1Transaction', () => {
757-
it('standalone', () => {
758-
const votingLinkTransaction = VotingKeyLinkV1Transaction.create(
759-
Deadline.create(helper.epochAdjustment),
760-
votingKeyV1,
761-
100,
762-
300,
763-
LinkAction.Link,
764-
networkType,
765-
helper.maxFee,
766-
);
767-
const signedTransaction = votingLinkTransaction.signWith(account, generationHash);
768-
769-
console.log(signedTransaction.payload);
770-
771-
return helper.announce(signedTransaction).then((transaction: VotingKeyLinkV1Transaction) => {
772-
expect(transaction.linkedPublicKey, 'LinkedPublicKey').not.to.be.undefined;
773-
expect(transaction.startEpoch, 'startEpoch').not.to.be.undefined;
774-
expect(transaction.endEpoch, 'endEpoch').not.to.be.undefined;
775-
expect(transaction.linkAction, 'LinkAction').not.to.be.undefined;
776-
return signedTransaction;
777-
});
778-
});
779-
});
780756
describe('VotingKeyLinkTransaction', () => {
781757
it('aggregate', () => {
782758
const votingLinkTransaction = VotingKeyLinkTransaction.create(
@@ -786,7 +762,7 @@ describe('TransactionHttp', () => {
786762
300,
787763
LinkAction.Unlink,
788764
networkType,
789-
TransactionVersion.VOTING_KEY_LINK_V2,
765+
TransactionVersion.VOTING_KEY_LINK,
790766
helper.maxFee,
791767
);
792768
const aggregateTransaction = AggregateTransaction.createComplete(

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "symbol-sdk",
3-
"version": "0.22.3",
3+
"version": "0.23.0",
44
"description": "Reactive symbol sdk for typescript and javascript",
55
"scripts": {
66
"pretest": "npm run build",
@@ -99,7 +99,7 @@
9999
"dependencies": {
100100
"@js-joda/core": "^3.2.0",
101101
"bluebird": "^3.7.2",
102-
"catbuffer-typescript": "0.0.25",
102+
"catbuffer-typescript": "0.1.1",
103103
"crypto-js": "^4.0.0",
104104
"diff": "^4.0.2",
105105
"futoin-hkdf": "^1.3.2",
@@ -113,7 +113,7 @@
113113
"ripemd160": "^2.0.2",
114114
"rxjs": "^6.6.3",
115115
"rxjs-compat": "^6.6.3",
116-
"symbol-openapi-typescript-fetch-client": "0.10.5-1",
116+
"symbol-openapi-typescript-fetch-client": "0.11.1",
117117
"tweetnacl": "^1.0.3",
118118
"ws": "^7.3.1"
119119
},

src/infrastructure/FinalizationHttp.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ export class FinalizationHttp extends Http implements FinalizationRepository {
9191
new BmTreeSignature(
9292
new ParentPublicKeySignaturePair(s.root.parentPublicKey, s.root.signature),
9393
new ParentPublicKeySignaturePair(s.bottom.parentPublicKey, s.bottom.signature),
94-
s.top ? new ParentPublicKeySignaturePair(s.top.parentPublicKey, s.top.signature) : undefined,
9594
),
9695
),
97-
mg.signatureSchema,
9896
),
9997
),
10098
);

src/infrastructure/NetworkHttp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export class NetworkHttp extends Http implements NetworkRepository {
127127
body.medianFeeMultiplier,
128128
body.highestFeeMultiplier,
129129
body.lowestFeeMultiplier,
130+
body.minFeeMultiplier,
130131
),
131132
);
132133
}

src/infrastructure/transaction/CreateTransactionFromDTO.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
import { Convert as convert } from '../../core/format';
1717
import { UnresolvedMapping } from '../../core/utils';
18-
import { MessageFactory, TransactionVersion, UInt64, VotingKeyLinkV1Transaction } from '../../model';
18+
import { MessageFactory, TransactionVersion, UInt64 } from '../../model';
1919
import { Address, PublicAccount } from '../../model/account';
2020
import { Mosaic, MosaicFlags, MosaicId, MosaicNonce } from '../../model/mosaic';
2121
import { NamespaceId } from '../../model/namespace';
@@ -473,7 +473,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo, isE
473473
: undefined,
474474
transactionInfo,
475475
).setPayloadSize(transactionDTO.size);
476-
} else if (type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK_V2) {
476+
} else if (type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK) {
477477
return new VotingKeyLinkTransaction(
478478
transactionDTO.network,
479479
version,
@@ -489,22 +489,6 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo, isE
489489
: undefined,
490490
transactionInfo,
491491
).setPayloadSize(transactionDTO.size);
492-
} else if (type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK_V1) {
493-
return new VotingKeyLinkV1Transaction(
494-
transactionDTO.network,
495-
version,
496-
deadline,
497-
maxFee,
498-
transactionDTO.linkedPublicKey,
499-
transactionDTO.startEpoch,
500-
transactionDTO.endEpoch,
501-
transactionDTO.linkAction,
502-
signature,
503-
transactionDTO.signerPublicKey
504-
? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, transactionDTO.network)
505-
: undefined,
506-
transactionInfo,
507-
).setPayloadSize(transactionDTO.size);
508492
}
509493
throw new Error(`Unimplemented transaction with type ${type} for version ${version}`);
510494
};

src/infrastructure/transaction/CreateTransactionFromPayload.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import {
4343
TransactionVersion,
4444
TransferTransaction,
4545
VotingKeyLinkTransaction,
46-
VotingKeyLinkV1Transaction,
4746
VrfKeyLinkTransaction,
4847
} from '../../model/transaction';
4948

@@ -102,9 +101,7 @@ export const CreateTransactionFromPayload = (payload: string, isEmbedded = false
102101
return VrfKeyLinkTransaction.createFromPayload(payload, isEmbedded);
103102
} else if (type === TransactionType.NODE_KEY_LINK) {
104103
return NodeKeyLinkTransaction.createFromPayload(payload, isEmbedded);
105-
} else if (type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK_V1) {
106-
return VotingKeyLinkV1Transaction.createFromPayload(payload, isEmbedded);
107-
} else if (type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK_V2) {
104+
} else if (type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK) {
108105
return VotingKeyLinkTransaction.createFromPayload(payload, isEmbedded);
109106
} else if (type === TransactionType.AGGREGATE_COMPLETE || type === TransactionType.AGGREGATE_BONDED) {
110107
return AggregateTransaction.createFromPayload(payload);

src/infrastructure/transaction/SerializeTransactionToJSON.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import {
4141
TransactionVersion,
4242
TransferTransaction,
4343
VotingKeyLinkTransaction,
44-
VotingKeyLinkV1Transaction,
4544
VrfKeyLinkTransaction,
4645
} from '../../model/transaction';
4746

@@ -273,22 +272,14 @@ export const SerializeTransactionToJSON = (transaction: Transaction): any => {
273272
linkedPublicKey: nodeKeyLinkTx.linkedPublicKey,
274273
linkAction: nodeKeyLinkTx.linkAction,
275274
};
276-
} else if (transaction.type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK_V2) {
275+
} else if (transaction.type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK) {
277276
const votingKeyLinkTx = transaction as VotingKeyLinkTransaction;
278277
return {
279278
linkedPublicKey: votingKeyLinkTx.linkedPublicKey,
280279
startEpoch: votingKeyLinkTx.startEpoch,
281280
endEpoch: votingKeyLinkTx.endEpoch,
282281
linkAction: votingKeyLinkTx.linkAction,
283282
};
284-
} else if (transaction.type === TransactionType.VOTING_KEY_LINK && version == TransactionVersion.VOTING_KEY_LINK_V1) {
285-
const votingKeyLinkTx = transaction as VotingKeyLinkV1Transaction;
286-
return {
287-
linkedPublicKey: votingKeyLinkTx.linkedPublicKey,
288-
startEpoch: votingKeyLinkTx.startEpoch,
289-
endEpoch: votingKeyLinkTx.endEpoch,
290-
linkAction: votingKeyLinkTx.linkAction,
291-
};
292283
} else {
293284
throw new Error(`Transaction type ${transaction.type} not implemented yet for version ${version}.`);
294285
}

0 commit comments

Comments
 (0)