Skip to content

Commit

Permalink
Update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dastanbeksamatov committed Jun 8, 2021
1 parent ed571d7 commit 0aad62c
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/get-latest-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ curl --location --request POST 'localhost:9933' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "chain_getHeader",
"method": "chain_getFinalizedHead",
"params": [],
"id": 1
}'
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif
run-node:
ifdef help
@docker run -it limechain/as-substrate:node-v1 --help
else detached
else ifeq ($(detached), 1)
@docker run -p ${RPC-PORT}:${RPC-PORT} -p ${WS-PORT}:${WS-PORT} -p ${PORT}:${PORT} -v "$(CURDIR)/${spec}":/raw-chain-spec.json -v /tmp:/tmp --name ${NAME} -d limechain/as-substrate:grandpa --base-path /tmp/${NAME} --port ${PORT} --ws-port ${WS-PORT} --rpc-port ${RPC-PORT} --execution Wasm --offchain-worker Never --validator --name=${NAME} ${OTHER}
else
@docker run -p ${RPC-PORT}:${RPC-PORT} -p ${WS-PORT}:${WS-PORT} -p ${PORT}:${PORT} -v "$(CURDIR)/${spec}":/raw-chain-spec.json -v /tmp:/tmp limechain/as-substrate:grandpa --base-path /tmp/${NAME} --port ${PORT} --ws-port ${WS-PORT} --rpc-port ${RPC-PORT} --execution Wasm --offchain-worker Never --validator --name=${NAME} ${OTHER}
Expand Down
2 changes: 2 additions & 0 deletions assembly/frame/executive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ export namespace Executive {
const transactionVersion = RuntimeConfig.runtimeVersion().transactionVersion;
const payload = utx.createPayload(blockHash, genesisHash, specVersion, transactionVersion);

Log.info("payload: " + Utils.toHexString(payload));

if (!Crypto.verifySignature(<SignatureType>extSignature.signature, payload, from, SignatureTypes.sr25519)) {
Log.error("Validation error: Invalid signature");
return ResponseCodes.INVALID_SIGNATURE;
Expand Down
3 changes: 2 additions & 1 deletion assembly/runtime/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export type Multiplier = UInt64;
export type Weight = UInt64;
export type UncheckedExtrinsic = GenericExtrinsic<AccountIdType, Balance, NonceType, SignatureType>;
export type AccountDataType = AccountData<Balance>;
export type AccountInfoType = AccountInfo<NonceType, AccountDataType>;
export type RefCount = UInt32;
export type AccountInfoType = AccountInfo<NonceType, RefCount, AccountDataType>;
/**
* Note: Originally Events are stored as a vector of RawEvents,
* since we don't have support for vector of Codec types (i.e Codec[]),
Expand Down
2 changes: 1 addition & 1 deletion cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "subsembly",
"version": "1.0.6",
"version": "1.0.7",
"description": "CLI tool for Subsembly",
"main": "dist/src/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/compile/metadata/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"AccountData": "AccountData",
"BlockNumber": "Compact<u64>",
"ExtrinsicData": "Bytes",
"AccountInfo": "AccountInfo",
"Signature": "Hash512",
"AccountInfo": "AccountInfoWithRefCount",
"Signature": "H512",
"Hash": "Hash",
"Phase": "Phase",
"Moment": "Moment",
Expand Down
3 changes: 1 addition & 2 deletions cli/src/commands/spec/builder/assembly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import { BytesReader, CompactInt, UInt128, UInt64 } from 'as-scale-codec';
import { AccountData, AccountId, Utils } from 'subsembly-core';

export type Balance = UInt128;
export type Weight = UInt64;

/**
* @description Gets the AccountData converted to the bytes
* @param freeBalance free balance for the AccountData
*/
export function getAccountDataBytes(freeBalance: Uint8Array): u8[] {
const balance = BytesReader.decodeInto<Balance>(Utils.toU8Array(freeBalance));
const accData = new AccountData<Balance>(balance, instantiate<Balance>(u128.Zero));
const accData = new AccountData<Balance>(balance, instantiate<Balance>(u128.Zero), instantiate<Balance>(u128.Zero), instantiate<Balance>(u128.Zero));
return accData.toU8a();
}

Expand Down
6 changes: 3 additions & 3 deletions cli/src/commands/spec/builder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/src/commands/spec/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@assemblyscript/loader": "^0.17.9",
"as-scale-codec": "0.2.3",
"subsembly-core": "1.0.7"
"subsembly-core": "1.1.0"
},
"devDependencies": {
"assemblyscript": "^0.17.9",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/spec/builder/src/modules/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class System {
static getAccountInfo(hexAccountData) {
// nonce and refCount are 0 for all accounts in genesis
const nonce = "0x00000000";
const refCount = "0x00";
const refCount = "0x00000000";
return nonce.concat(hexStripPrefix(refCount)).concat(hexStripPrefix(hexAccountData));
}
}
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"as-bignum": "^0.2.6",
"as-scale-codec": "0.2.3",
"subsembly-core": "^1.0.8"
"subsembly-core": "^1.1.0"
},
"devDependencies": {
"assemblyscript": "^0.17.1"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ ret@~0.1.10:
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==

subsembly-core@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/subsembly-core/-/subsembly-core-1.0.8.tgz#76a620c02f972299fbd11c6aa0463a712b2798e9"
integrity sha512-SGsZqYS/T/Krl//TxFc/TkZfE2p81eR0Qimu5fp68X8VUX5i2aePNWGWZQ4TqUvhSYo88fbBwbhPfCpMteLV9g==
subsembly-core@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/subsembly-core/-/subsembly-core-1.1.0.tgz#f4eb11726d8bd5189318c35c5fd56e3aec885de0"
integrity sha512-Rhd2bjabH1eYTdmAhc6EEN5iwMkQrnONKiSKOIaWgETMiFhd8HnGJXKz3vzLez5228tPh0Vau8J7z/cmDmA3oQ==
dependencies:
"@assemblyscript/loader" "^0.17.9"
as-scale-codec "^0.2.3"
Expand Down

0 comments on commit 0aad62c

Please sign in to comment.