Skip to content
This repository was archived by the owner on Dec 4, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
14bf0b0
Clear PR
nedobylskiy Nov 28, 2019
719c3ff
Clear PR
nedobylskiy Nov 28, 2019
9cef9bc
Merge pull request #67 from Izzzio/Command-Line
nedobylskiy Nov 28, 2019
80821a8
Merge branches 'Terminal-for-RPC' and 'master' of https://github.com/…
nedobylskiy Nov 28, 2019
310d0b2
Package edit
nedobylskiy Nov 28, 2019
0617a3c
Merge pull request #74 from Izzzio/Terminal-for-RPC-merge
nedobylskiy Nov 28, 2019
c4de0f8
Merge pull request #72 from Izzzio/de-sync
nedobylskiy Nov 28, 2019
77d13b2
RPC fixes
nedobylskiy Nov 28, 2019
f046186
Merge pull request #75 from Izzzio/terminal-update
nedobylskiy Nov 28, 2019
28c6289
Create main.yml
nedobylskiy Nov 28, 2019
fa78f26
Merge pull request #76 from Izzzio/actions-text
nedobylskiy Nov 28, 2019
11be638
Create main2.yml
nedobylskiy Nov 28, 2019
3091f26
tests for linux
nedobylskiy Nov 28, 2019
869e6c8
Merge remote-tracking branch 'origin/master'
nedobylskiy Nov 28, 2019
b6ab6c8
Merge branches 'actions-test-2' and 'master' of https://github.com/Iz…
nedobylskiy Nov 28, 2019
506a864
tests for linux
nedobylskiy Nov 28, 2019
c3db996
Update access
nedobylskiy Nov 28, 2019
85eb94a
Bad test test
nedobylskiy Nov 28, 2019
8f1ce28
Bad test test
nedobylskiy Nov 28, 2019
9d8687c
Ok test test
nedobylskiy Nov 28, 2019
0543cf9
Finalize
nedobylskiy Nov 28, 2019
5ec2bb4
Merge pull request #77 from Izzzio/actions-test-2
nedobylskiy Nov 28, 2019
c180430
Create npmpublish.yml
nedobylskiy Nov 28, 2019
e9676cc
Merge pull request #78 from Izzzio/action-packaging
nedobylskiy Nov 28, 2019
dd0c380
Packaging fix
nedobylskiy Nov 28, 2019
338b7ac
Publish fix
nedobylskiy Nov 28, 2019
538b3ea
Refactor
nedobylskiy Nov 29, 2019
56d9963
Update readme
nedobylskiy Nov 29, 2019
c17a33a
Update readme
nedobylskiy Nov 29, 2019
fad5283
Code Style fix
nedobylskiy Nov 29, 2019
061da79
Test fix
nedobylskiy Nov 29, 2019
018920e
Test fix
nedobylskiy Nov 29, 2019
cb526ea
Test fix
nedobylskiy Nov 29, 2019
a0d172e
Test fix
nedobylskiy Nov 29, 2019
eb67c6e
Test subsystem
nedobylskiy Nov 29, 2019
e3a2d28
change permissions
nedobylskiy Nov 29, 2019
08b4a14
Dumb files
nedobylskiy Nov 29, 2019
8250984
disable network test
nedobylskiy Nov 29, 2019
60e75f3
Merge pull request #79 from Izzzio/refactor-fixes
nedobylskiy Nov 29, 2019
be9cb2c
Merge branches 'check-block-availability' and 'master' of https://git…
nedobylskiy Nov 29, 2019
d1dc8ad
Fix
nedobylskiy Nov 29, 2019
47740a5
Merge pull request #43 from Izzzio/check-block-availability
nedobylskiy Nov 29, 2019
02f5190
Merge branches 'check-length-smartcontract' and 'master' of https://g…
nedobylskiy Nov 29, 2019
f5144f3
Fix
nedobylskiy Nov 29, 2019
b096eb4
Merge pull request #49 from Izzzio/check-length-smartcontract
nedobylskiy Nov 29, 2019
998cd78
Terminal package update
nedobylskiy Nov 29, 2019
90d57c3
Terminal package update
nedobylskiy Nov 29, 2019
f661580
multi os terminal start
nedobylskiy Nov 29, 2019
6ffcb12
multi os terminal start
nedobylskiy Nov 29, 2019
39f1266
update package.json
nedobylskiy Nov 29, 2019
4e7c5dc
update package.json
nedobylskiy Nov 29, 2019
070e836
update package.json
nedobylskiy Nov 29, 2019
98bbb28
update package.json
nedobylskiy Nov 29, 2019
d7b9f43
update package.json
nedobylskiy Nov 29, 2019
ce3ba6b
update package.json
nedobylskiy Nov 29, 2019
924ad73
npm publish action update
nedobylskiy Nov 29, 2019
663eec8
npm publish action update
nedobylskiy Nov 29, 2019
b86a6fd
Merge pull request #80 from Izzzio/terminal-api-update
nedobylskiy Nov 29, 2019
ffc9f04
Update benchmark support
nedobylskiy Dec 3, 2019
4b59dd5
Merge pull request #81 from Izzzio/banchmark
nedobylskiy Dec 3, 2019
27da871
FIX!
nedobylskiy Dec 3, 2019
18ed902
Merge pull request #82 from Izzzio/network-fix
nedobylskiy Dec 3, 2019
96a4182
+ genesis hash checking
Arucard89 Dec 5, 2019
6d93d44
+ hash validation for genesis
Arucard89 Dec 5, 2019
2bc3d07
fix logs and exit code
Arucard89 Dec 6, 2019
2f418ff
+ fatal
Arucard89 Dec 6, 2019
9d2991d
- info message
Arucard89 Dec 6, 2019
0f81404
Merge pull request #83 from Izzzio/Check-Genesis
nedobylskiy Dec 6, 2019
11bbac5
Network test
nedobylskiy Dec 9, 2019
6e34a05
Network test
nedobylskiy Dec 9, 2019
501cf93
Network test
nedobylskiy Dec 9, 2019
b01b9e1
Update permissions
nedobylskiy Dec 9, 2019
aa6ff62
Network test
nedobylskiy Dec 10, 2019
81b3c19
Network test
nedobylskiy Dec 10, 2019
24551ec
Network test
nedobylskiy Dec 10, 2019
1af7811
Merge pull request #84 from Izzzio/networking-test
nedobylskiy Dec 10, 2019
5b32af2
Network test
nedobylskiy Dec 10, 2019
0c6586d
Update test sh
nedobylskiy Dec 10, 2019
df894e7
Merge pull request #85 from Izzzio/speed-refactor
nedobylskiy Dec 10, 2019
f92f54b
Network test
nedobylskiy Dec 10, 2019
8706325
Merge pull request #86 from Izzzio/speed-refactor
nedobylskiy Dec 10, 2019
e5fb96f
Fixes
nedobylskiy Dec 10, 2019
38fc59b
as
nedobylskiy Dec 10, 2019
67f4856
Merge pull request #87 from Izzzio/sync-test
nedobylskiy Dec 11, 2019
1c0e9e5
Remove binaries
nedobylskiy Dec 11, 2019
2e52475
+voting for changing price + checking new parameters of length
Arucard89 Jan 29, 2020
cc63680
+fix bug of getting info
Arucard89 Jan 29, 2020
30e78ab
fix type error
Arucard89 Jan 29, 2020
d3acab4
+ tests
Arucard89 Jan 29, 2020
905682c
+update all mastercontracts
Arucard89 Jan 29, 2020
f685bc1
+ callContractMethodRollbackPromise
Arucard89 Jan 31, 2020
d9618c4
add plugin search path
nedobylskiy Feb 3, 2020
fec02dc
Merge pull request #91 from Izzzio/pluginpathControl
nedobylskiy Feb 3, 2020
64703cd
Clean
nedobylskiy Feb 3, 2020
dcbd922
Merge pull request #92 from Izzzio/pluginpathControl
nedobylskiy Feb 3, 2020
a7dcd27
fix type coercion
Arucard89 Feb 3, 2020
80465d0
Improve plugin loading
nedobylskiy Feb 4, 2020
83e5165
move contractLengthCheck feom deploy contract to generateBlock
Arucard89 Feb 5, 2020
72f3b6b
Merge pull request #93 from Izzzio/pluginpathControl
nedobylskiy Feb 5, 2020
7d95ff0
Merge pull request #88 from Izzzio/remove-binaries
nedobylskiy Feb 5, 2020
36e1a42
Improves
nedobylskiy Feb 5, 2020
08facbd
Validator plugins loading improve
nedobylskiy Feb 5, 2020
cd9e67e
Merge pull request #94 from Izzzio/pluginpathControl
nedobylskiy Feb 5, 2020
5595690
Merge pull request #90 from Izzzio/contract-size-limits
nedobylskiy Feb 5, 2020
e30b8a6
Update package version
nedobylskiy Feb 5, 2020
b2bbedc
Contract exists method
nedobylskiy Feb 7, 2020
689cc01
Contract exists method
nedobylskiy Feb 7, 2020
92b33b9
Format unify
nedobylskiy Feb 7, 2020
529607d
Merge pull request #95 from Izzzio/isContractExists
nedobylskiy Feb 7, 2020
46cebed
Deploy owner
nedobylskiy Feb 10, 2020
8b1f710
Deploy owner
nedobylskiy Feb 10, 2020
d911e34
Merge branch 'newIsolatedVM' of https://github.com/Izzzio/izzzio into…
nedobylskiy Feb 10, 2020
858b5a9
Async property fix
nedobylskiy Feb 10, 2020
b89f098
Clear
nedobylskiy Feb 10, 2020
dc8a353
runContextMethodAsyncPromise fix
nedobylskiy Feb 10, 2020
6c200e5
Clean up
nedobylskiy Feb 10, 2020
045c689
Clean up
nedobylskiy Feb 10, 2020
303c7d6
Fixed stucking in runMethodAsync exception case
nedobylskiy Feb 10, 2020
7fdbf8f
Merge pull request #97 from Izzzio/contractMethodExceptionFix
nedobylskiy Feb 10, 2020
799e1d1
Merge branches 'contractMethodExceptionFix' and 'deployOwner' of http…
nedobylskiy Feb 10, 2020
2be5d96
Merge pull request #96 from Izzzio/deployOwner
nedobylskiy Feb 10, 2020
e294631
Clean up
nedobylskiy Feb 13, 2020
774c351
Merge pull request #99 from Izzzio/peer-exchange-improve
nedobylskiy Feb 13, 2020
714e781
NodeMetaInfo fixed
nedobylskiy Feb 14, 2020
73a0a0b
Fatal fall module
nedobylskiy Feb 14, 2020
84025c0
Merge pull request #100 from Izzzio/peer-exchange-improve
nedobylskiy Feb 14, 2020
e330bd9
Merge pull request #101 from Izzzio/fatal-unexpected-behaviour
nedobylskiy Feb 14, 2020
51d6d39
DApp class refactor
nedobylskiy Feb 14, 2020
94e99c3
Merge pull request #102 from Izzzio/refactoring
nedobylskiy Feb 14, 2020
eb124a3
Key generator fix
nedobylskiy Feb 17, 2020
866a8f2
Merge pull request #103 from Izzzio/refactoring
nedobylskiy Feb 17, 2020
07add2a
DApp config support
nedobylskiy Feb 17, 2020
f58f619
Merge pull request #104 from Izzzio/appConfig
nedobylskiy Feb 17, 2020
d3e6681
New release numeration
nedobylskiy Feb 18, 2020
bda4e0f
Api version sync with node
nedobylskiy Feb 18, 2020
fb3933d
Merge pull request #105 from Izzzio/api-ver-sync
nedobylskiy Feb 18, 2020
c51c892
Default consensus DLCPoA
nedobylskiy Feb 19, 2020
5a270e6
Clean up
nedobylskiy Feb 19, 2020
5796798
Clean up
nedobylskiy Feb 19, 2020
b05a301
remove deprecated wallet balance message
nedobylskiy Feb 19, 2020
4b5490e
Change sign function
nedobylskiy Feb 19, 2020
ca91e89
Config write func
nedobylskiy Feb 19, 2020
3268129
Change tests validators
nedobylskiy Feb 19, 2020
6f7314d
Merge pull request #106 from Izzzio/change-default
nedobylskiy Feb 19, 2020
f37a228
fsbPoA
Arucard89 Feb 25, 2020
871afef
+handling keys
Arucard89 Feb 26, 2020
5040d81
Determenistic JSON.stringify
nedobylskiy Feb 27, 2020
c7ad8eb
Clean up
nedobylskiy Feb 27, 2020
210723f
Add DApp get block ang getBlockAsync
nedobylskiy Feb 27, 2020
e15ee7f
+ handling key operations
Arucard89 Feb 27, 2020
3d8239d
- unneccessary lines
Arucard89 Feb 27, 2020
c679dc9
added keys functions
Arucard89 Mar 1, 2020
60c448a
+ work on tests
Arucard89 Mar 1, 2020
ae0afac
fix dublicate adding
Arucard89 Mar 2, 2020
0e63ceb
-comment
Arucard89 Mar 3, 2020
79da2d9
delete unneccessary files
Arucard89 Mar 4, 2020
dfe5727
+ blockhandler
Arucard89 Mar 4, 2020
6f0ce17
start testing + fixes
Arucard89 Mar 4, 2020
8de7a5c
added tests
Arucard89 Mar 4, 2020
d304455
fix and refactor
Arucard89 Mar 4, 2020
3190923
Merge pull request #109 from Izzzio/determenistic-json-stringify
nedobylskiy Mar 5, 2020
79324c4
Change package version
nedobylskiy Mar 5, 2020
65f073b
bug fix
Arucard89 Mar 5, 2020
5532068
fix exception with wrong key
Arucard89 Mar 5, 2020
81a6a3e
make faster checking if key is admin. finished tests
Arucard89 Mar 5, 2020
44b8895
translation
Arucard89 Mar 5, 2020
b3edd05
fix linux version of tests
Arucard89 Mar 5, 2020
f2a0364
fix rights issue, - unneccessary files
Arucard89 Mar 6, 2020
3d1e7a4
move all fsbpoa functions from blockhandler to fsboa
Arucard89 Mar 8, 2020
182bb76
Merge branch 'Proof-of-Authority' of https://github.com/Izzzio/izzzio…
Arucard89 Mar 8, 2020
9062f34
fix loading problem
Arucard89 Mar 8, 2020
0106562
fix issue with reading file
Arucard89 Mar 8, 2020
dcade76
remove unneccessary files
Arucard89 Mar 8, 2020
eed1086
Add lodash, change config
lotuspkt Mar 8, 2020
8c94cff
lodash defaultsDeep to assign default config instead for..in
akimra Mar 10, 2020
c695ae5
configuration file load method changed to lodash
Pafaul Mar 10, 2020
e97387b
config loadash
Pafaul Mar 10, 2020
475bb0e
fix
Pafaul Mar 10, 2020
7076a36
fix
Pafaul Mar 10, 2020
016c60b
fix
Pafaul Mar 10, 2020
81547b0
-unneccessary files
Arucard89 Mar 10, 2020
927e85a
added node module for comparison versions
demndik Mar 10, 2020
75c832c
fixed checking of contract address
akimra Mar 12, 2020
2f007f1
????
Pafaul Mar 12, 2020
6b68347
Merge pull request #114 from Izzzio/config-lodash
nedobylskiy Mar 12, 2020
5547a9f
Merge branch 'master' into testwork
nedobylskiy Mar 12, 2020
353f6fc
Merge pull request #113 from akimra/testwork
nedobylskiy Mar 12, 2020
3ce90c3
Merge branch 'master' into master
nedobylskiy Mar 12, 2020
6eb94ab
Merge pull request #111 from lotuspkt/master
nedobylskiy Mar 12, 2020
5101c64
Clean up
nedobylskiy Mar 12, 2020
db82627
changed check to % operator
akimra Mar 12, 2020
7b455af
Merge pull request #115 from akimra/check-contract-fix
nedobylskiy Mar 12, 2020
5679367
Cache added for Blockchain.asyncGet()
Pafaul Mar 12, 2020
c147c74
Change consensus name
nedobylskiy Mar 12, 2020
8286026
Clean up
nedobylskiy Mar 12, 2020
71726d3
Merge branches 'Proof-of-Authority' and 'master' of https://github.co…
nedobylskiy Mar 12, 2020
35f5a85
Clean up
nedobylskiy Mar 12, 2020
e39e5e2
Change permission
nedobylskiy Mar 12, 2020
88abea5
Cache added
Pafaul Mar 12, 2020
9c79664
fixes
Pafaul Mar 12, 2020
fb71e4f
typo fix
Pafaul Mar 12, 2020
ec22167
created module compareVersions
demndik Mar 12, 2020
a974a0b
rework
Pafaul Mar 13, 2020
290146d
added docs
Pafaul Mar 13, 2020
d669f0e
Merge pull request #116 from Izzzio/addcache
nedobylskiy Mar 13, 2020
357a305
refactored all functions exclude hash function
akimra Mar 13, 2020
9126880
refactored all functions of cryptography.js
akimra Mar 13, 2020
4ea9e3f
version verification code developed (basic version)
demndik Mar 14, 2020
3dcc8bb
compleated. Testing
demndik Mar 14, 2020
8de11c8
rename module file name
demndik Mar 14, 2020
69b1c6a
Merge pull request #117 from akimra/refactor-cryptography
akimra Mar 16, 2020
fd7fea1
Added GitHub Actions release action for Windows and Linux distros build
Pafaul Mar 16, 2020
6d1ab50
Update buildRelease.yml
Pafaul Mar 16, 2020
4c35a6c
Merge pull request #122 from Izzzio/release-action
nedobylskiy Mar 17, 2020
869e60b
Merge pull request #120 from Izzzio/refactor-cryptography
nedobylskiy Mar 17, 2020
e9c1c5f
updates
demndik Mar 17, 2020
96ea485
Merge pull request #118 from Izzzio/version-comparison
nedobylskiy Mar 18, 2020
72ade2e
defaultLimit added in config
lotuspkt Mar 20, 2020
a11464f
Merge pull request #123 from Izzzio/task_158
nedobylskiy Mar 20, 2020
4782761
added broadcastId
lotuspkt Mar 24, 2020
36a56ed
Merge pull request #124 from Izzzio/task_154
nedobylskiy Mar 25, 2020
f2e5357
Added subscription for new blocks
Pafaul Apr 7, 2020
19eafa2
fix
Pafaul Apr 8, 2020
63aadc8
fix for subscribers
Pafaul Apr 8, 2020
033cbca
Update
nedobylskiy Apr 11, 2020
6c2b2f8
Merge branches 'Proof-of-Authority' and 'master' of https://github.co…
nedobylskiy Apr 11, 2020
6068517
Added plugins functional:
Pafaul Apr 11, 2020
fcd973c
Key POA
nedobylskiy Apr 13, 2020
5d472ef
Finalize tests
nedobylskiy Apr 13, 2020
d1e29ac
Initial keys support
nedobylskiy Apr 13, 2020
689193d
Clean up
nedobylskiy Apr 13, 2020
ab22f62
Merge pull request #110 from Izzzio/Proof-of-Authority
nedobylskiy Apr 13, 2020
6150e8c
fix subscribers call
Pafaul Apr 14, 2020
415e6a8
Forgot to put }
Pafaul Apr 14, 2020
fb9c663
Update README.MD
nedobylskiy Apr 14, 2020
a53b5ee
Update keyring.js
nedobylskiy Apr 16, 2020
e006e6c
Sync fixes
nedobylskiy Apr 16, 2020
05ac70e
More sync fix
nedobylskiy Apr 16, 2020
5b44f17
Merge pull request #137 from Izzzio/SyncFix
nedobylskiy Apr 16, 2020
5a7e3a7
addBlockChainIndex moved to _addBlockChainIndex
Pafaul Apr 22, 2020
0d680c5
forEach -> for (...of...)
Pafaul Apr 22, 2020
e6c82ce
Changes:
Pafaul Apr 23, 2020
80b028d
plugins.js
Pafaul Apr 24, 2020
d3535a5
Merge pull request #134 from Izzzio/net_plugins
nedobylskiy Apr 27, 2020
bbec26a
Update package.json
nedobylskiy Apr 27, 2020
32350bc
Update package.json
nedobylskiy Apr 27, 2020
0f873a2
Updated benchmark
Aug 4, 2020
ace3549
Merge pull request #141 from lailune/hotfix
sitnin Aug 4, 2020
d64ff05
Update LICENSE
AngelikaSheshunova Feb 17, 2022
ab5e764
Update LICENSE
AngelikaSheshunova Jul 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tests

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Run npm install
run: npm install
- name: Run Test
run: npm run test
118 changes: 118 additions & 0 deletions .github/workflows/buildRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Create Distro

on:
release:
types: [created]

jobs:
Linux-Distro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: NPM install
shell: bash
run: |
cd /home/runner/work/izzzio/izzzio
npm install

- name: Create ZIP distro for Linux
shell: bash
run: |
cp $(which node) /home/runner/work/izzzio/izzzio/.
cd /home/runner/work/izzzio/
zip -r iz3node-linux-x64.zip izzzio/*

- name: Upload Linux distro
uses: actions/upload-artifact@v1
with:
name: iz3node-linux-x64.zip
path: /home/runner/work/izzzio/iz3node-linux-x64.zip

Get-Windows-Node-Files:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: NPM install
shell: cmd
run: npm install "d:\a\izzzio\izzzio"

- name: Upload Windows Node exe
uses: actions/upload-artifact@v1
with:
name: win-node-exe
path: "c:\\Program Files\\nodejs\\node.exe"

- name: Upload Node Modules for Windows
uses: actions/upload-artifact@v1
with:
name: win-node-modules
path: node_modules

Build-Windows-Distro:
needs: Get-Windows-Node-Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Get Windows Node exe
uses: actions/download-artifact@v1
with:
name: win-node-exe

- name: Get Windows Node modules
uses: actions/download-artifact@v1
with:
name: win-node-modules

- name: Extract files
shell: bash
run: |
WORK_DIR=/home/runner/work/izzzio/izzzio
mkdir $WORK_DIR/node_modules
mv $WORK_DIR/win-node-modules/* $WORK_DIR/node_modules/
mv $WORK_DIR/win-node-exe/* $WORK_DIR/.
[ -d $WORK_DIR/win-node-exe ] && rm -r $WORK_DIR/win-node-exe
[ -d $WORK_DIR/win-node-modules ] && rm -r $WORK_DIR/win-node-modules

- name: Create ZIP distro for Windows
shell: bash
run: |
cd /home/runner/work/izzzio/
zip -r iz3node-windows-x64.zip izzzio/*

- name: Upload Windows distro
uses: actions/upload-artifact@v1
with:
name: iz3node-windows-x64.zip
path: /home/runner/work/izzzio/iz3node-windows-x64.zip

Publish-Binaries:
needs: [Build-Windows-Distro, Linux-Distro]
runs-on: ubuntu-latest
steps:
- name: Download Windows distro
uses: actions/download-artifact@v1
with:
name: iz3node-windows-x64.zip

- name: Download Linux distro
uses: actions/download-artifact@v1
with:
name: iz3node-linux-x64.zip

- name: Publish binaries
uses: Roang-zero1/github-upload-release-artifacts-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'iz3node-windows-x64.zip iz3node-linux-x64.zip'
32 changes: 32 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Node.js Packaging

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: cd api/node && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ typings/
# dotenv environment variables file
.env

package-lock.json

Будет удалено .gitignore
Будет удалено .idea/
Expand Down
6 changes: 6 additions & 0 deletions .tabnineignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
runtime
blocks
EcmaContracts
contractsRuntime
BigNet/test
Tests/*
83 changes: 73 additions & 10 deletions BigNet/mainContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ const C2C_FEE = 0.001;
*/
const FEE_ADDRESS = CONTRACT_OWNER;

/**
* Max size of adding contract
* @type {number}
*/
const MAX_CONTRACT_LENGTH = 10 * 1024 * 1024;

/**
* Main IZZZIO token contract
*/
Expand Down Expand Up @@ -113,11 +119,18 @@ class mainToken extends TokenContract {
this._c2cOrders = new BlockchainMap('c2cOrders');
this._resourcePrice = new BlockchainMap('resourcePrice');
this._ResourcesCostChange = new Event('ResourcesCostChange', 'string', 'string');

this._maxContractLength = new KeyValue('maxContractLength');
this._MaxContractLengthChange = new Event('MaxContractLengthChange', 'string', 'number');

if (contracts.isDeploy()) {
this._resourcePrice['ram'] = RESOURCES_PRICE.ram;
this._resourcePrice['callLimit'] = RESOURCES_PRICE.callLimit;
this._resourcePrice['timeLimit'] = RESOURCES_PRICE.timeLimit;
this._ResourcesCostChange.emit('initial',this.getCurrentResources());

this._maxContractLength.put('maxContractLength', MAX_CONTRACT_LENGTH);
this._MaxContractLengthChange.emit('initial', this.getCurrentMaxContractLength());
}
}

Expand Down Expand Up @@ -165,7 +178,8 @@ class mainToken extends TokenContract {
* @param {string} address contract address
*/
checkContractAddress(address) {
return !isNaN(parseFloat(address)) && isFinite(address);
let addr = parseFloat(address);
return !isNaN(addr) && isFinite(address) && addr % 1 === 0;
}

/**
Expand Down Expand Up @@ -319,6 +333,15 @@ class mainToken extends TokenContract {
return {ram: Math.round(ram), timeLimit: Math.round(timeLimit), callLimit: Math.round(callLimit)};
}

/**
* Returns calculated resources as JSON
* @param {string} amount
* @return JSON {{callLimit: number, timeLimit: number, ram: number}}
*/
getCalculatedResources(amount) {
return JSON.stringify(this.calculateResources(amount));
}

/**
* Returns calculated contracts limits
* @param address
Expand All @@ -341,6 +364,14 @@ class mainToken extends TokenContract {
this._resourcePrice['callLimit'] = newCost.callLimit;
}

/**
* accepting new contract size after voting
* @param newValue
*/
_acceptNewMaxContractLength(newValue) {
this._maxContractLength.put('maxContractLength', +newValue);
}

/**
* get results og voting contract by its address
* @param voteContractAddress
Expand All @@ -354,7 +385,7 @@ class mainToken extends TokenContract {
/**
* Process results of change contract cost voting
* @param voteContractAddress
* @returns {number} result of processing: 0 - voting isn't started, 1 - coting hasn't been ended yet, 2 - old variant wins, 4 - new variant wins and accepted
* @returns {number} result of processing: 0 - voting isn't started, 1 - voting hasn't been ended yet, 2 - old variant of cost wins, 3 - new variant of cost wins and accepted, 4 - old var of max contract size wins, 5 new var of max contract size wins and accepted
*/
processResults(voteContractAddress) {
const voteResults = this._getResultsOfVoting(voteContractAddress);
Expand All @@ -367,14 +398,27 @@ class mainToken extends TokenContract {
break;
case 'ended':
let winner = this._findMaxVariantIndex(voteResults.results);
// if wins the same variant as we have now then do nothing
if (winner.index === this.getCurrentResources()) {
this._ResourcesCostChange.emit('not change by voting',this.getCurrentResources());
return 2;
if (typeof JSON.parse(winner.index) === 'object'){
// if wins the same variant as we have now then do nothing
const curResourses = this.getCurrentResources();
if (winner.index === curResourses) {
this._ResourcesCostChange.emit('not change by voting',curResourses);
return 2;
} else {
this._acceptNewResources(JSON.parse(winner.index));
this._ResourcesCostChange.emit('change by voting', curResourses);
return 3;
}
} else {
this._acceptNewResources(JSON.parse(winner.index));
this._ResourcesCostChange.emit('change by voting',this.getCurrentResources());
return 3;
const curMaxLen = this.getCurrentMaxContractLength();
if ( +winner.index === curMaxLen) {
this._MaxContractLengthChange.emit('not change by voting', curMaxLen);
return 4;
} else {
this._acceptNewMaxContractLength(JSON.parse(winner.index));
this._MaxContractLengthChange.emit('change by voting', curMaxLen);
return 5;
}
}
}
}
Expand Down Expand Up @@ -413,6 +457,13 @@ class mainToken extends TokenContract {
});
}

/**
* get current max contract size
*/
getCurrentMaxContractLength() {
return Number(this._maxContractLength.get('maxContractLength'));
}

/**
* returns resources as string
* @param obj
Expand All @@ -423,7 +474,7 @@ class mainToken extends TokenContract {
}

/**
* starts voting contract by addres to decide if we need new resouces price or not
* starts voting contract by address to decide if we need new resouces price or not
* @param voteContractAddress address of voting contract
* @param newVariant multiplier for new resources cost (new = old * multiplier)
*/
Expand All @@ -434,6 +485,18 @@ class mainToken extends TokenContract {
return JSON.stringify([newCost, oldCost]);
}

/**
* starts voting contract by address to decide if we need newMaxContractLength or not
* @param voteContractAddress address of voting contract
* @param newVariant multiplier for new resources cost (new = old * multiplier)
*/
startVotingForChangeMaxContractLength(voteContractAddress, newVariant) {
let newVal = newVariant;
let oldVal = this.getCurrentMaxContractLength();
contracts.callMethodDeploy(voteContractAddress, 'startVoting',[newVal, oldVal]);
return JSON.stringify([newVal, oldVal]);
}


/**
* TODO: Remove in release
Expand Down
4 changes: 2 additions & 2 deletions BigNet/startNetwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class App extends DApp {
});

process.on('unhandledRejection', error => {
logger.fatal(error);
process.exit();
logger.fatalFall(error);
});

//Preparing environment
logger.info('Deploying contract...');
that.contracts.ecmaContract.deployContract(masterContract, 0, async function (deployedContract) {
assert.assert(deployedContract !== null && Object.keys(deployedContract).length !== 0, "Invalid deployed contract");
assert.true(deployedContract.address === that.getMasterContractAddress(), 'Invalid master contract address ' + that.getMasterContractAddress());
logger.info("Master contract deployed");
});
Expand Down
8 changes: 7 additions & 1 deletion BigNet/test/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"initialPeers": [
],
"recieverAddress": "nodeOne",
"validators": [
"lcpoa",
"thrusted"
],
"blockHashFilter": {
"blockEndls": [
"f3c3",
Expand Down Expand Up @@ -32,5 +36,7 @@
"masterContract": 5
},
"signFunction": "NEWRSA",
"plugins": [ "iz3-basic-crypto" ]
"plugins": [
"iz3-basic-crypto"
]
}
Loading