Skip to content

Commit

Permalink
updates for e2 release, currently using a temp fix for rest gateway i…
Browse files Browse the repository at this point in the history
…ssue
  • Loading branch information
kaiyzen committed Jul 30, 2019
1 parent 1889022 commit cdb4dbd
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OUT OF DATE, NEEDS UPDATING FOR DRAGON RELEASE
# OUT OF DATE, NEEDS UPDATING FOR ELEPHANT RELEASE

# Catapultサービスの起動

Expand Down
2 changes: 1 addition & 1 deletion cmds/docker/catapult-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
###### running services ###########

rest-gateway:
image: techbureau/catapult-rest-server:1.0.16
image: techbureau/catapult-rest-server:1.0.17-temp-fix
command: ash -c "/bin-mount/wait /state/configs-generated && npm start resources/rest.json /userconfig/rest.json"
stop_signal: SIGINT
ports:
Expand Down
2 changes: 1 addition & 1 deletion cmds/docker/docker-compose-setup-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
###### dynamic configuration ###########

generate-raw-addresses:
image: techbureau/catapult-tools:gcc-0.5.0.1
image: techbureau/catapult-tools:gcc-0.6.0.1
command: bash -c "/bin-mount/generate-raw-addresses-if-needed 50 /addresses/raw-addresses.txt /addresses/addresses.yaml"
volumes:
- ../../bin/bash:/bin-mount
Expand Down
4 changes: 2 additions & 2 deletions cmds/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
###### dynamic configuration ###########

generate-raw-addresses:
image: techbureau/catapult-tools:gcc-0.5.0.1
image: techbureau/catapult-tools:gcc-0.6.0.1
command: bash -c "/bin-mount/generate-raw-addresses-if-needed 50 /addresses/raw-addresses.txt /addresses/addresses.yaml"
volumes:
- ../../bin/bash:/bin-mount
Expand Down Expand Up @@ -65,7 +65,7 @@ services:
- db

rest-gateway:
image: techbureau/catapult-rest-server:1.0.16
image: techbureau/catapult-rest-server:1.0.17-temp-fix
command: ash -c "/bin-mount/wait /state/configs-generated && npm start resources/rest.json /userconfig/rest.json"
stop_signal: SIGINT
ports:
Expand Down
2 changes: 1 addition & 1 deletion cmds/docker/dockerfiles/catapult/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM techbureau/catapult-server:gcc-0.5.0.1
FROM techbureau/catapult-server:gcc-0.6.0.1
ADD ./userconfig /userconfig
2 changes: 1 addition & 1 deletion cmds/docker/dockerfiles/nemgen/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM techbureau/catapult-tools:gcc-0.5.0.1
FROM techbureau/catapult-tools:gcc-0.6.0.1
ADD ./userconfig /userconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ catapult.mongo.plugins.accountlink = true
catapult.mongo.plugins.aggregate = true
catapult.mongo.plugins.lockhash = true
catapult.mongo.plugins.locksecret = true
catapult.mongo.plugins.metadata = true
catapult.mongo.plugins.mosaic = true
catapult.mongo.plugins.multisig = true
catapult.mongo.plugins.namespace = true
catapult.mongo.plugins.restrictionaccount = true
catapult.mongo.plugins.restrictionmosaic = true
catapult.mongo.plugins.transfer = true
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ maxSecretLockDuration = 30d
minProofSize = 1
maxProofSize = 1000

[plugin:catapult.plugins.metadata]

maxValueSize = 1024

[plugin:catapult.plugins.mosaic]

maxMosaicsPerAccount = 10'000
Expand All @@ -77,22 +81,27 @@ maxCosignedAccountsPerAccount = 5
[plugin:catapult.plugins.namespace]

maxNameSize = 64
maxChildNamespaces = 500
maxNamespaceDepth = 3

# *approximate* days based on blockGenerationTargetTime
minNamespaceDuration = 1m
maxNamespaceDuration = 365d
namespaceGracePeriodDuration = 0d
namespaceGracePeriodDuration = 2m
reservedRootNamespaceNames = xem, nem, user, account, org, com, biz, net, edu, mil, gov, info

namespaceRentalFeeSinkPublicKey = {{namespace_rental_fee_sink_public_key}}
rootNamespaceRentalFeePerBlock = 1'000'000
childNamespaceRentalFee = 100'000'000

maxChildNamespaces = 500

[plugin:catapult.plugins.restrictionaccount]

maxAccountRestrictionValues = 512

[plugin:catapult.plugins.restrictionmosaic]

maxMosaicRestrictionValues = 20

[plugin:catapult.plugins.transfer]

maxMessageSize = 1024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ duration = 0
supply = 8'998'999'998'000'000
isTransferable = true
isSupplyMutable = false
isLevyMutable = false
isRestrictable = false

[distribution>cat:currency]
{{#cat_currency_distribution}}
Expand All @@ -49,7 +49,7 @@ duration = 0
supply = 15'000'000
isTransferable = true
isSupplyMutable = true
isLevyMutable = false
isRestrictable = false

[distribution>cat:harvest]
{{#cat_harvest_distribution}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ catapult.mongo.plugins.accountlink = true
catapult.mongo.plugins.aggregate = true
catapult.mongo.plugins.lockhash = true
catapult.mongo.plugins.locksecret = true
catapult.mongo.plugins.metadata = true
catapult.mongo.plugins.mosaic = true
catapult.mongo.plugins.multisig = true
catapult.mongo.plugins.namespace = true
catapult.mongo.plugins.restrictionaccount = true
catapult.mongo.plugins.restrictionmosaic = true
catapult.mongo.plugins.transfer = true
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ maxSecretLockDuration = 30d
minProofSize = 1
maxProofSize = 1000

[plugin:catapult.plugins.metadata]

maxValueSize = 1024

[plugin:catapult.plugins.mosaic]

maxMosaicsPerAccount = 10'000
Expand All @@ -77,22 +81,27 @@ maxCosignedAccountsPerAccount = 5
[plugin:catapult.plugins.namespace]

maxNameSize = 64
maxChildNamespaces = 500
maxNamespaceDepth = 3

# *approximate* days based on blockGenerationTargetTime
minNamespaceDuration = 1m
maxNamespaceDuration = 365d
namespaceGracePeriodDuration = 0d
namespaceGracePeriodDuration = 2m
reservedRootNamespaceNames = xem, nem, user, account, org, com, biz, net, edu, mil, gov, info

namespaceRentalFeeSinkPublicKey = {{namespace_rental_fee_sink_public_key}}
rootNamespaceRentalFeePerBlock = 1'000'000
childNamespaceRentalFee = 100'000'000

maxChildNamespaces = 500

[plugin:catapult.plugins.restrictionaccount]

maxAccountRestrictionValues = 512

[plugin:catapult.plugins.restrictionmosaic]

maxMosaicRestrictionValues = 20

[plugin:catapult.plugins.transfer]

Expand Down
2 changes: 1 addition & 1 deletion ruby/catapult-templates/rest_gateway/rest.json.mt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"port": 3000,
"crossDomainHttpMethods": ["GET", "POST", "PUT", "OPTIONS"],
"clientPrivateKey": "{{rest_gateway_private_key}}",
"extensions": ["accountLink", "accountProperties", "aggregate", "lock", "mosaic", "multisig", "namespace", "receipts", "transfer"],
"extensions": ["accountLink", "accountRestrictions", "aggregate", "lock", "mosaic", "multisig", "namespace", "receipts", "transfer"],
"db": {
"url": "mongodb://db:27017/",
"name": "catapult",
Expand Down
6 changes: 0 additions & 6 deletions static-config/mongo/mongoAccountPropertiesDbPrepare.js

This file was deleted.

17 changes: 16 additions & 1 deletion static-config/mongo/mongoDbPrepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
db.transactions.createIndex({ 'transaction.mosaicId': 1, 'transaction.type': 1 }, makeSparse('transaction.mosaicId'));
db.transactions.createIndex({ 'transaction.namespaceId': 1, 'transaction.type': 1 }, makeSparse('transaction.namespaceId'));

db.createCollection('transactionStatements');
db.transactionStatements.createIndex({ 'height': 1, 'source.primaryId': 1, 'source.secondaryId': 1 }, { unique: true });

db.createCollection('addressResolutionStatements');
db.addressResolutionStatements.createIndex({ 'height': 1, 'unresolved': 1 }, { unique: true });

db.createCollection('mosaicResolutionStatements');
db.mosaicResolutionStatements.createIndex({ 'height': 1, 'unresolved': 1 }, { unique: true });

db.createCollection('accounts');
db.accounts.createIndex({ 'account.publicKey': 1 }); // cannot be unique because zeroed public keys are stored
db.accounts.createIndex({ 'account.address': 1 }, { unique: true });
Expand All @@ -49,13 +58,19 @@

db.blocks.getIndexes();
db.transactions.getIndexes();
db.transactionStatements.getIndexes();
db.addressResolutionStatements.getIndexes();
db.mosaicResolutionStatements.getIndexes();
db.accounts.getIndexes();
db.unconfirmedTransactions.getIndexes();
db.partialTransactions.getIndexes();
db.transactionStatuses.getIndexes();
})();

load('mongoAccountPropertiesDbPrepare.js')
load('mongoLockInfoDbPrepare.js')
load('mongoMetadataDbPrepare.js')
load('mongoMosaicDbPrepare.js')
load('mongoMultisigDbPrepare.js')
load('mongoNamespaceDbPrepare.js')
load('mongoRestrictionAccountDbPrepare.js')
load('mongoRestrictionMosaicDbPrepare.js')
8 changes: 8 additions & 0 deletions static-config/mongo/mongoMetadataDbPrepare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(function prepareMetadataCollections() {
db.createCollection('metadata');
db.metadata.createIndex({ 'metadataEntry.compositeHash': 1 }, { unique: true });
db.metadata.createIndex({ 'metadataEntry.sourcePublicKey': 1, 'metadataEntry.metadataType': 1, 'metadataEntry.scopedMetadataKey': 1 });
db.metadata.createIndex({ 'metadataEntry.targetPublicKey': 1, 'metadataEntry.metadataType': 1, 'metadataEntry.scopedMetadataKey': 1 });

db.metadata.getIndexes();
})();
6 changes: 6 additions & 0 deletions static-config/mongo/mongoRestrictionAccountDbPrepare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(function prepareRestrictionAccountCollection() {
db.createCollection('accountRestrictions');
db.accountRestrictions.createIndex({ 'accountRestrictions.address': 1 }, { unique: true });

db.accountRestrictions.getIndexes();
})();
6 changes: 6 additions & 0 deletions static-config/mongo/mongoRestrictionMosaicDbPrepare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(function prepareRestrictionMosaicCollection() {
db.createCollection('mosaicRestrictions');
db.mosaicRestrictions.createIndex({ 'mosaicRestrictionEntry.compositeHash': 1 }, { unique: true });

db.mosaicRestrictions.getIndexes();
})();

0 comments on commit cdb4dbd

Please sign in to comment.