Skip to content

Commit

Permalink
Dev -> Main (#697)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
5 people authored Dec 8, 2020
1 parent b1a555a commit da26f22
Show file tree
Hide file tree
Showing 342 changed files with 9,310 additions and 4,478 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "travis"]
path = travis
url = https://github.com/nemgrouplimited/travis-functions.git
8 changes: 7 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
src/
test/
node_modules/
e2e/
docs/
coverage/
.nyc_output/
.github/
.idea/
dist/test
dist/e2e
licenses/
travis/
target/
ts-docs/
.travis
*.iml
*.log
74 changes: 44 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
dist: bionic
language: node_js
node_js:
- "10"
- "12"
- 10
- 12
services:
- docker
env:
global:
- DEV_BRANCH=dev
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
cache:
directories:
- "node_modules"
- .eslintcache
jobs:
include:
- stage: e2e
script: npm run test:e2e
if: branch = e2e
before_script:
- npm run build
- if [ "$TRAVIS_NODE_VERSION" = "10" ] || [ "$TRAVIS_NODE_VERSION" = "12" ]; then npm run lint; fi
- . ./travis/node-functions.sh
- VERSION="$(node_load_version)"
- log_env_variables
script:
- npm run test:cov
- npm run doc
- touch ./ts-docs/.nojekyll
- if [ "$TRAVIS_NODE_VERSION" = "10" ]; then npm run coveralls-report; fi
deploy:
- provider: script
skip_cleanup: true
script: /bin/sh travis/github-pages.sh
on:
branch: main
node_js: "12"
- provider: script
skip_cleanup: true
script: /bin/sh travis/uploadArchives.sh
on:
branch: main
node_js: "10"
- provider: script
skip_cleanup: true
script: /bin/sh travis/release.sh
on:
branch: $RELEASE_BRANCH
node_js: "10"
jobs:
include:
- stage: test
name: docs
script: npm run doc
- stage: test
name: lint
script: npm run lint
- name: e2e
script: npm run e2e
if: (branch = env(DEV_BRANCH) AND type = cron) OR (commit_message = e2e)
- stage: publish
name: github alpha pages
script: node_push_github_pages
if: branch = env(DEV_BRANCH) AND type = push
- name: alpha npm
script: npm run build && node_publish_alpha
if: branch = env(DEV_BRANCH) AND type = push
- stage: release
name: release npm
script: npm run build && node_publish_release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: release
name: github release pages
script: node_push_github_pages
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: post release
name: tag and version upgrade
script: node_post_release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.

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

## [0.22.0] - 8-Dec-2020

**Milestone**: Catapult-server finality(0.10.0.4)
Package | Version | Link
---|---|---
SDK Core| v0.22.0 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)
Catbuffer | v0.0.24 | [catbuffer-typescript](https://www.npmjs.com/package/catbuffer-typescript)
Client Library | v0.10.4 | [symbol-openapi-typescript-fetch-client](https://www.npmjs.com/package/symbol-openapi-typescript-fetch-client)

- **[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.
- **[BREAKING CHANGE]** `NetworkCurrency` subclasses replaced with `Currency` objects. You can retrieve the network currencies with ``RepositoryFactory.getCurrencies()``.
- **[BREAKING CHANGE]** `SecretLockRepository.getSecretLock` has been updated. It now takes the composite hash as parameter.
- **[BREAKING CHANGE]** Replaced ``BlockInfo`` with the new block types: ``NormalBlockInfo`` and ``NemesisImportanceBlockInfo``.
- Added `FinalizationRepository`.
- Added `transferMosaicId`, `fromTransferAmount`, `toTransferAmount` to transaction searches.
- Added `CurrencyService` to allow loading Network and custom `Currency` objects from the rest API.
- Added `UnlockedAccount` endpoint in `NodeRepository` to check harvester's unlocking status on the selected node.
- Added `StateProofService` to verify the different states.
- Added `serialize()` to state objects `AccountInfo`, `MosaicInfo`, `NamespaceInfo`, `MultisigAccountInfo`, `AccountRestrictions`, `MosaicGlobalRestriction`, `MosaicAddressRestriction`, `MetadataEntry`, `SecretLockInfo`, `HashLockInfo` to generate the state proof hashes.
- Added `version` field to state objects.
- Added `/merkle` endpoints to the repositories of the different states which returns the state Merkle-Patricia tree.
- Added `stremer()` to repositories to simplify `PaginationStreamer` objects creation.
- Improved `search` endpoints allowing "empty" criteria in order to paginate over all the objects.
- `Listener` now accepts address aliases as `UnresolvedAddress` objects.
- Added V1 and V2 Voting Key transaction support.
- Updated `FinalizationProof` object with the new ``SignatureSchema`` for catapult-server tree testnet/v3.

## [0.21.0] - 25-Sep-2020

**Milestone**: Catapult-server finality(0.10.0.3)
Expand Down
53 changes: 0 additions & 53 deletions e2e/conf/network.conf

This file was deleted.

1 change: 1 addition & 0 deletions e2e/e2e-preset.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nemesis:
mosaics:
- accounts: 10
symbolRestImage: symbolplatform/symbol-rest:2.1.1-alpha-202011061935
67 changes: 32 additions & 35 deletions e2e/infrastructure/AccountHttp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,26 @@
* limitations under the License.
*/

import { deepEqual } from 'assert';
import { expect } from 'chai';
import { AccountRepository } from '../../src/infrastructure/AccountRepository';
import { MultisigRepository } from '../../src/infrastructure/MultisigRepository';
import { NamespaceRepository } from '../../src/infrastructure/NamespaceRepository';
import { RepositoryCallError } from '../../src/infrastructure/RepositoryCallError';
import { Account } from '../../src/model/account/Account';
import { Address } from '../../src/model/account/Address';
import { PlainMessage } from '../../src/model/message/PlainMessage';
import { AliasAction } from '../../src/model/namespace/AliasAction';
import { NamespaceId } from '../../src/model/namespace/NamespaceId';
import { NetworkType } from '../../src/model/network/NetworkType';
import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction';
import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction';
import { Deadline } from '../../src/model/transaction/Deadline';
import { MultisigAccountModificationTransaction } from '../../src/model/transaction/MultisigAccountModificationTransaction';
import { NamespaceRegistrationTransaction } from '../../src/model/transaction/NamespaceRegistrationTransaction';
import { TransferTransaction } from '../../src/model/transaction/TransferTransaction';
import { UInt64 } from '../../src/model/UInt64';
import { take, toArray } from 'rxjs/operators';
import { AccountRepository, MultisigRepository, NamespaceRepository, Order, RepositoryCallError } from '../../src/infrastructure';
import { AccountPaginationStreamer } from '../../src/infrastructure/paginationStreamer';
import { AccountOrderBy } from '../../src/infrastructure/searchCriteria';
import { UInt64 } from '../../src/model';
import { Account, Address } from '../../src/model/account';
import { PlainMessage } from '../../src/model/message';
import { AliasAction, NamespaceId } from '../../src/model/namespace';
import { NetworkType } from '../../src/model/network';
import {
AddressAliasTransaction,
AggregateTransaction,
Deadline,
MultisigAccountModificationTransaction,
NamespaceRegistrationTransaction,
TransferTransaction,
} from '../../src/model/transaction';
import { IntegrationTestHelper } from './IntegrationTestHelper';
import { AccountPaginationStreamer } from '../../src/infrastructure/paginationStreamer/AccountPaginationStreamer';
import { toArray, take } from 'rxjs/operators';
import { deepEqual } from 'assert';
import { Order } from '../../src/infrastructure/infrastructure';
import { AccountOrderBy } from '../../src/infrastructure/searchCriteria/AccountOrderBy';

describe('AccountHttp', () => {
const helper = new IntegrationTestHelper();
Expand All @@ -56,8 +52,6 @@ describe('AccountHttp', () => {
let generationHash: string;
let networkType: NetworkType;

const epochAdjustment = 1573430400;

before(() => {
return helper.start({ openListener: true }).then(() => {
account = helper.account;
Expand Down Expand Up @@ -89,9 +83,9 @@ describe('AccountHttp', () => {
describe('Make sure test account is not virgin', () => {
it('Announce TransferTransaction', () => {
const transferTransaction = TransferTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
account2.address,
[helper.createNetworkCurrency(1, false)],
[helper.createCurrency(1, false)],
PlainMessage.create('test-message'),
networkType,
helper.maxFee,
Expand All @@ -106,7 +100,7 @@ describe('AccountHttp', () => {
it('Announce NamespaceRegistrationTransaction', () => {
const namespaceName = 'root-test-namespace-' + Math.floor(Math.random() * 10000);
const registerNamespaceTransaction = NamespaceRegistrationTransaction.createRootNamespace(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
namespaceName,
UInt64.fromUint(9),
networkType,
Expand All @@ -121,7 +115,7 @@ describe('AccountHttp', () => {
describe('Setup test AddressAlias', () => {
it('Announce addressAliasTransaction', () => {
const addressAliasTransaction = AddressAliasTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
AliasAction.Link,
namespaceId,
account.address,
Expand All @@ -136,7 +130,7 @@ describe('AccountHttp', () => {
describe('Setup test multisig account', () => {
it('Announce MultisigAccountModificationTransaction', () => {
const modifyMultisigAccountTransaction = MultisigAccountModificationTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
2,
1,
[cosignAccount1.address, cosignAccount2.address, cosignAccount3.address],
Expand All @@ -146,7 +140,7 @@ describe('AccountHttp', () => {
);

const aggregateTransaction = AggregateTransaction.createComplete(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
[modifyMultisigAccountTransaction.toAggregate(multisigAccount.publicAccount)],
networkType,
[],
Expand All @@ -172,6 +166,9 @@ describe('AccountHttp', () => {
it('should return account data given a NEM Address', async () => {
const accountInfo = await accountRepository.getAccountInfo(accountAddress).toPromise();
expect(accountInfo.publicKey).to.be.equal(accountPublicKey);

const merkleInfo = await accountRepository.getAccountInfoMerkle(accountInfo.address).toPromise();
expect(merkleInfo.raw).to.not.be.undefined;
});
});

Expand Down Expand Up @@ -251,7 +248,7 @@ describe('AccountHttp', () => {
describe('Remove test AddressAlias', () => {
it('Announce addressAliasTransaction', () => {
const addressAliasTransaction = AddressAliasTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
AliasAction.Unlink,
namespaceId,
account.address,
Expand All @@ -266,7 +263,7 @@ describe('AccountHttp', () => {
describe('Restore test multisig Accounts', () => {
it('Announce MultisigAccountModificationTransaction', () => {
const removeCosigner1 = MultisigAccountModificationTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
-1,
0,
[],
Expand All @@ -275,7 +272,7 @@ describe('AccountHttp', () => {
helper.maxFee,
);
const removeCosigner2 = MultisigAccountModificationTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
0,
0,
[],
Expand All @@ -285,7 +282,7 @@ describe('AccountHttp', () => {
);

const removeCosigner3 = MultisigAccountModificationTransaction.create(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
-1,
-1,
[],
Expand All @@ -295,7 +292,7 @@ describe('AccountHttp', () => {
);

const aggregateTransaction = AggregateTransaction.createComplete(
Deadline.create(epochAdjustment),
Deadline.create(helper.epochAdjustment),
[
removeCosigner1.toAggregate(multisigAccount.publicAccount),
removeCosigner2.toAggregate(multisigAccount.publicAccount),
Expand Down
Loading

0 comments on commit da26f22

Please sign in to comment.