Skip to content

Commit da26f22

Browse files
fboucquezrg911segfaultxaviboldchainsdependabot[bot]
authored
Dev -> Main (#697)
* Updated Travis. Using travis function submodule * Fixed e2e script * Currency and CurrencyService (#695) * Network Currency and Service * Code improvements * Renamed NetworkCurrency with Currency Docs fixes * Removed cache from service. The repository factory caches them * Fixed lazy loading cache * Improved e2e for travis cron Mosaic id is prefered when loading from rest. Removed hardcoded mosaic id from public * Fixed lint error * Fixed build * Updated bootstrap * create-index-files npm command (#701) Generates the index.ts automatically * Revisit how npm package is created (#702) * Updated open api to latest alpha (Requires New Rest) (#698) * Fixed #672 - Added finalization http * Security alert fix * Updated libs * Updated open api to latest alpha Added secret filter in secret lock search Updated transaction search * Improved e2e tests * Increased timeout * Fixed build error Co-authored-by: Steven Liu <[email protected]> * Typo in docs of PublicAccount.ts (#703) * UnlockedAccount endpoint and latest openAPI changes (#706) * Fixed #705 - Added unlocked account endpoint - Applied latest changes from openAPI * Updated open api to latest alpha (Requires New Rest) (#698) * Fixed #672 - Added finalization http * Security alert fix * Updated libs * Updated open api to latest alpha Added secret filter in secret lock search Updated transaction search * Improved e2e tests * Increased timeout * Fixed build error Co-authored-by: Steven Liu <[email protected]> * Fixed #705 - Added unlocked account endpoint - Applied latest changes from openAPI * Updated change log Co-authored-by: fboucquez <[email protected]> * Added prettier-plugin-organize-imports to prettier. (#708) * Added prettier-plugin-organize-imports to prettier. It fixes all the unsued imports warnings and order conflicts. It's integrated with npm run style:fox * Updated openAPI spec for unlockedAccount (#710) * Updated openAPI spec for unlockedAccount * Added Peer param in unlocked account * Updated travis (#711) * PersistentDelegationRequestTransaction message bug fix (#709) * Fixed message parsing from dto and buffer * State serialization and Mako Catbuffer (#707) * message marker harvesting (#714) * Fixed persistentHarvesting message marker issue. * Working on persistent delegate harvest * Improved doc and unit tests Co-authored-by: fernando <[email protected]> * - Added nodePublicKey in NodeInfo (#719) - Cache nodePublicKey in RepoFactory * /Merkle endpoints (#717) * Added /merkle endpoints * Added new block type (#724) * Added new block type * PR feedbacks * Server 10.0.0.4 upgrade (#725) * V1 Transactions * Added voting key v1 and v2 * fixed lint * Fixed DTO mapping and improved unit test. * Fixed repository merkle name Fixed search criteria * Server duration parser and test refactor (#729) * - Fixed #728 - server duration parser and test refactor * Added more check in duration parser * All transaction related notification should take an unresolved address (#731) * issue-#664: change filter Address to be unresolved Address * [issue-664]: resolve transaction notification with unresolved address * [issue-664]: fix invalid address name in docs * [issue-664]: add some test case for unresolved address * Merkle proof + finalization proof + block type fixes (#727) Improved creation of streamers Finality proof fix Make nemesis/importance block optional Co-authored-by: fernando <[email protected]> * Fixed deadline is sometimes 1 sec different * instead of minus milsecs, minus secs, sinc server epochAdjustment is using secs * New Role types (#733) * Bump highlight.js from 10.1.2 to 10.4.1 (#735) Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.1.2 to 10.4.1. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md) - [Commits](highlightjs/highlight.js@10.1.2...10.4.1) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 0.22.0 changelog (#732) * Updated version to 0.22.0 Updated changelog * Feedback changes * State proof fixes (#736) * Added version 1 fallback * removed log * Addes sort_key:keys (#737) * Updated change log (#738) * Version upgrades (#739) * Version upgrades * updated open api version Co-authored-by: Steven Liu <[email protected]> Co-authored-by: Xavi Artigas <[email protected]> Co-authored-by: James Lin <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent b1a555a commit da26f22

File tree

342 files changed

+9310
-4478
lines changed

Some content is hidden

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

342 files changed

+9310
-4478
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "travis"]
2+
path = travis
3+
url = https://github.com/nemgrouplimited/travis-functions.git

.npmignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
src/
21
test/
32
node_modules/
43
e2e/
54
docs/
65
coverage/
76
.nyc_output/
7+
.github/
88
.idea/
99
dist/test
1010
dist/e2e
1111
licenses/
12+
travis/
13+
target/
14+
ts-docs/
15+
.travis
16+
*.iml
17+
*.log

.travis.yml

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,54 @@
1+
dist: bionic
12
language: node_js
23
node_js:
3-
- "10"
4-
- "12"
4+
- 10
5+
- 12
6+
services:
7+
- docker
8+
env:
9+
global:
10+
- DEV_BRANCH=dev
11+
- RELEASE_BRANCH=main
12+
- POST_RELEASE_BRANCH=main
13+
- RELEASE_MESSAGE=release
514
cache:
615
directories:
716
- "node_modules"
817
- .eslintcache
9-
jobs:
10-
include:
11-
- stage: e2e
12-
script: npm run test:e2e
13-
if: branch = e2e
1418
before_script:
15-
- npm run build
16-
- if [ "$TRAVIS_NODE_VERSION" = "10" ] || [ "$TRAVIS_NODE_VERSION" = "12" ]; then npm run lint; fi
19+
- . ./travis/node-functions.sh
20+
- VERSION="$(node_load_version)"
21+
- log_env_variables
1722
script:
1823
- npm run test:cov
19-
- npm run doc
20-
- touch ./ts-docs/.nojekyll
2124
- if [ "$TRAVIS_NODE_VERSION" = "10" ]; then npm run coveralls-report; fi
22-
deploy:
23-
- provider: script
24-
skip_cleanup: true
25-
script: /bin/sh travis/github-pages.sh
26-
on:
27-
branch: main
28-
node_js: "12"
29-
- provider: script
30-
skip_cleanup: true
31-
script: /bin/sh travis/uploadArchives.sh
32-
on:
33-
branch: main
34-
node_js: "10"
35-
- provider: script
36-
skip_cleanup: true
37-
script: /bin/sh travis/release.sh
38-
on:
39-
branch: $RELEASE_BRANCH
40-
node_js: "10"
25+
jobs:
26+
include:
27+
- stage: test
28+
name: docs
29+
script: npm run doc
30+
- stage: test
31+
name: lint
32+
script: npm run lint
33+
- name: e2e
34+
script: npm run e2e
35+
if: (branch = env(DEV_BRANCH) AND type = cron) OR (commit_message = e2e)
36+
- stage: publish
37+
name: github alpha pages
38+
script: node_push_github_pages
39+
if: branch = env(DEV_BRANCH) AND type = push
40+
- name: alpha npm
41+
script: npm run build && node_publish_alpha
42+
if: branch = env(DEV_BRANCH) AND type = push
43+
- stage: release
44+
name: release npm
45+
script: npm run build && node_publish_release
46+
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
47+
- stage: release
48+
name: github release pages
49+
script: node_push_github_pages
50+
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
51+
- stage: post release
52+
name: tag and version upgrade
53+
script: node_post_release
54+
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ 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.22.0] - 8-Dec-2020
8+
9+
**Milestone**: Catapult-server finality(0.10.0.4)
10+
Package | Version | Link
11+
---|---|---
12+
SDK Core| v0.22.0 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)
13+
Catbuffer | v0.0.24 | [catbuffer-typescript](https://www.npmjs.com/package/catbuffer-typescript)
14+
Client Library | v0.10.4 | [symbol-openapi-typescript-fetch-client](https://www.npmjs.com/package/symbol-openapi-typescript-fetch-client)
15+
16+
- **[BREAKING CHANGE]** `Deadline.create` requires the configurable `epochAdjustment` from the network properties. The value can be retrieved using ``RepositoryFactory.getEpochAdjustment()`` or calling catapult-rest's `network/properties` endpoint.
17+
- **[BREAKING CHANGE]** `NetworkCurrency` subclasses replaced with `Currency` objects. You can retrieve the network currencies with ``RepositoryFactory.getCurrencies()``.
18+
- **[BREAKING CHANGE]** `SecretLockRepository.getSecretLock` has been updated. It now takes the composite hash as parameter.
19+
- **[BREAKING CHANGE]** Replaced ``BlockInfo`` with the new block types: ``NormalBlockInfo`` and ``NemesisImportanceBlockInfo``.
20+
- Added `FinalizationRepository`.
21+
- Added `transferMosaicId`, `fromTransferAmount`, `toTransferAmount` to transaction searches.
22+
- Added `CurrencyService` to allow loading Network and custom `Currency` objects from the rest API.
23+
- Added `UnlockedAccount` endpoint in `NodeRepository` to check harvester's unlocking status on the selected node.
24+
- Added `StateProofService` to verify the different states.
25+
- Added `serialize()` to state objects `AccountInfo`, `MosaicInfo`, `NamespaceInfo`, `MultisigAccountInfo`, `AccountRestrictions`, `MosaicGlobalRestriction`, `MosaicAddressRestriction`, `MetadataEntry`, `SecretLockInfo`, `HashLockInfo` to generate the state proof hashes.
26+
- Added `version` field to state objects.
27+
- Added `/merkle` endpoints to the repositories of the different states which returns the state Merkle-Patricia tree.
28+
- Added `stremer()` to repositories to simplify `PaginationStreamer` objects creation.
29+
- Improved `search` endpoints allowing "empty" criteria in order to paginate over all the objects.
30+
- `Listener` now accepts address aliases as `UnresolvedAddress` objects.
31+
- Added V1 and V2 Voting Key transaction support.
32+
- Updated `FinalizationProof` object with the new ``SignatureSchema`` for catapult-server tree testnet/v3.
33+
734
## [0.21.0] - 25-Sep-2020
835

936
**Milestone**: Catapult-server finality(0.10.0.3)

e2e/conf/network.conf

Lines changed: 0 additions & 53 deletions
This file was deleted.

e2e/e2e-preset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
nemesis:
22
mosaics:
33
- accounts: 10
4+
symbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha-202011061935

e2e/infrastructure/AccountHttp.spec.ts

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,26 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { deepEqual } from 'assert';
1718
import { expect } from 'chai';
18-
import { AccountRepository } from '../../src/infrastructure/AccountRepository';
19-
import { MultisigRepository } from '../../src/infrastructure/MultisigRepository';
20-
import { NamespaceRepository } from '../../src/infrastructure/NamespaceRepository';
21-
import { RepositoryCallError } from '../../src/infrastructure/RepositoryCallError';
22-
import { Account } from '../../src/model/account/Account';
23-
import { Address } from '../../src/model/account/Address';
24-
import { PlainMessage } from '../../src/model/message/PlainMessage';
25-
import { AliasAction } from '../../src/model/namespace/AliasAction';
26-
import { NamespaceId } from '../../src/model/namespace/NamespaceId';
27-
import { NetworkType } from '../../src/model/network/NetworkType';
28-
import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction';
29-
import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction';
30-
import { Deadline } from '../../src/model/transaction/Deadline';
31-
import { MultisigAccountModificationTransaction } from '../../src/model/transaction/MultisigAccountModificationTransaction';
32-
import { NamespaceRegistrationTransaction } from '../../src/model/transaction/NamespaceRegistrationTransaction';
33-
import { TransferTransaction } from '../../src/model/transaction/TransferTransaction';
34-
import { UInt64 } from '../../src/model/UInt64';
19+
import { take, toArray } from 'rxjs/operators';
20+
import { AccountRepository, MultisigRepository, NamespaceRepository, Order, RepositoryCallError } from '../../src/infrastructure';
21+
import { AccountPaginationStreamer } from '../../src/infrastructure/paginationStreamer';
22+
import { AccountOrderBy } from '../../src/infrastructure/searchCriteria';
23+
import { UInt64 } from '../../src/model';
24+
import { Account, Address } from '../../src/model/account';
25+
import { PlainMessage } from '../../src/model/message';
26+
import { AliasAction, NamespaceId } from '../../src/model/namespace';
27+
import { NetworkType } from '../../src/model/network';
28+
import {
29+
AddressAliasTransaction,
30+
AggregateTransaction,
31+
Deadline,
32+
MultisigAccountModificationTransaction,
33+
NamespaceRegistrationTransaction,
34+
TransferTransaction,
35+
} from '../../src/model/transaction';
3536
import { IntegrationTestHelper } from './IntegrationTestHelper';
36-
import { AccountPaginationStreamer } from '../../src/infrastructure/paginationStreamer/AccountPaginationStreamer';
37-
import { toArray, take } from 'rxjs/operators';
38-
import { deepEqual } from 'assert';
39-
import { Order } from '../../src/infrastructure/infrastructure';
40-
import { AccountOrderBy } from '../../src/infrastructure/searchCriteria/AccountOrderBy';
4137

4238
describe('AccountHttp', () => {
4339
const helper = new IntegrationTestHelper();
@@ -56,8 +52,6 @@ describe('AccountHttp', () => {
5652
let generationHash: string;
5753
let networkType: NetworkType;
5854

59-
const epochAdjustment = 1573430400;
60-
6155
before(() => {
6256
return helper.start({ openListener: true }).then(() => {
6357
account = helper.account;
@@ -89,9 +83,9 @@ describe('AccountHttp', () => {
8983
describe('Make sure test account is not virgin', () => {
9084
it('Announce TransferTransaction', () => {
9185
const transferTransaction = TransferTransaction.create(
92-
Deadline.create(epochAdjustment),
86+
Deadline.create(helper.epochAdjustment),
9387
account2.address,
94-
[helper.createNetworkCurrency(1, false)],
88+
[helper.createCurrency(1, false)],
9589
PlainMessage.create('test-message'),
9690
networkType,
9791
helper.maxFee,
@@ -106,7 +100,7 @@ describe('AccountHttp', () => {
106100
it('Announce NamespaceRegistrationTransaction', () => {
107101
const namespaceName = 'root-test-namespace-' + Math.floor(Math.random() * 10000);
108102
const registerNamespaceTransaction = NamespaceRegistrationTransaction.createRootNamespace(
109-
Deadline.create(epochAdjustment),
103+
Deadline.create(helper.epochAdjustment),
110104
namespaceName,
111105
UInt64.fromUint(9),
112106
networkType,
@@ -121,7 +115,7 @@ describe('AccountHttp', () => {
121115
describe('Setup test AddressAlias', () => {
122116
it('Announce addressAliasTransaction', () => {
123117
const addressAliasTransaction = AddressAliasTransaction.create(
124-
Deadline.create(epochAdjustment),
118+
Deadline.create(helper.epochAdjustment),
125119
AliasAction.Link,
126120
namespaceId,
127121
account.address,
@@ -136,7 +130,7 @@ describe('AccountHttp', () => {
136130
describe('Setup test multisig account', () => {
137131
it('Announce MultisigAccountModificationTransaction', () => {
138132
const modifyMultisigAccountTransaction = MultisigAccountModificationTransaction.create(
139-
Deadline.create(epochAdjustment),
133+
Deadline.create(helper.epochAdjustment),
140134
2,
141135
1,
142136
[cosignAccount1.address, cosignAccount2.address, cosignAccount3.address],
@@ -146,7 +140,7 @@ describe('AccountHttp', () => {
146140
);
147141

148142
const aggregateTransaction = AggregateTransaction.createComplete(
149-
Deadline.create(epochAdjustment),
143+
Deadline.create(helper.epochAdjustment),
150144
[modifyMultisigAccountTransaction.toAggregate(multisigAccount.publicAccount)],
151145
networkType,
152146
[],
@@ -172,6 +166,9 @@ describe('AccountHttp', () => {
172166
it('should return account data given a NEM Address', async () => {
173167
const accountInfo = await accountRepository.getAccountInfo(accountAddress).toPromise();
174168
expect(accountInfo.publicKey).to.be.equal(accountPublicKey);
169+
170+
const merkleInfo = await accountRepository.getAccountInfoMerkle(accountInfo.address).toPromise();
171+
expect(merkleInfo.raw).to.not.be.undefined;
175172
});
176173
});
177174

@@ -251,7 +248,7 @@ describe('AccountHttp', () => {
251248
describe('Remove test AddressAlias', () => {
252249
it('Announce addressAliasTransaction', () => {
253250
const addressAliasTransaction = AddressAliasTransaction.create(
254-
Deadline.create(epochAdjustment),
251+
Deadline.create(helper.epochAdjustment),
255252
AliasAction.Unlink,
256253
namespaceId,
257254
account.address,
@@ -266,7 +263,7 @@ describe('AccountHttp', () => {
266263
describe('Restore test multisig Accounts', () => {
267264
it('Announce MultisigAccountModificationTransaction', () => {
268265
const removeCosigner1 = MultisigAccountModificationTransaction.create(
269-
Deadline.create(epochAdjustment),
266+
Deadline.create(helper.epochAdjustment),
270267
-1,
271268
0,
272269
[],
@@ -275,7 +272,7 @@ describe('AccountHttp', () => {
275272
helper.maxFee,
276273
);
277274
const removeCosigner2 = MultisigAccountModificationTransaction.create(
278-
Deadline.create(epochAdjustment),
275+
Deadline.create(helper.epochAdjustment),
279276
0,
280277
0,
281278
[],
@@ -285,7 +282,7 @@ describe('AccountHttp', () => {
285282
);
286283

287284
const removeCosigner3 = MultisigAccountModificationTransaction.create(
288-
Deadline.create(epochAdjustment),
285+
Deadline.create(helper.epochAdjustment),
289286
-1,
290287
-1,
291288
[],
@@ -295,7 +292,7 @@ describe('AccountHttp', () => {
295292
);
296293

297294
const aggregateTransaction = AggregateTransaction.createComplete(
298-
Deadline.create(epochAdjustment),
295+
Deadline.create(helper.epochAdjustment),
299296
[
300297
removeCosigner1.toAggregate(multisigAccount.publicAccount),
301298
removeCosigner2.toAggregate(multisigAccount.publicAccount),

0 commit comments

Comments
 (0)