Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vovapolu evm #7

Merged
merged 239 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
dbdf060
Add first iteration of yaml diff #273
vovapolu Oct 19, 2018
b6db666
Update test to keep colours in the output #273
vovapolu Oct 19, 2018
84d1ef8
Add basic diff tests #273
vovapolu Oct 22, 2018
449ddc7
Add yaml diff to plaintest #273
vovapolu Oct 22, 2018
8f11fc6
Re-deploy Pravda on test-net after release resolves #290
Chicker Oct 23, 2018
b7b641b
Format sources #273
vovapolu Oct 23, 2018
094c8f0
Add tests #245
nevgeny Oct 9, 2018
57cc547
Fix tests. Refactor sources #245
nevgeny Oct 23, 2018
f4686b7
Add tests #245
nevgeny Oct 24, 2018
c5c1a48
Merge pull request #291 from expload/issue-290
fomkin Oct 24, 2018
ea85aa3
Add complex event test, remove boopickle and bson transcoding from no…
vovapolu Oct 24, 2018
3a786b1
Fix tests #294
vovapolu Oct 24, 2018
c549fc8
Format sources and add headers #294
vovapolu Oct 24, 2018
73adef3
Clean up debug output #294
vovapolu Oct 24, 2018
e3c440c
Clean up more debug things #294
vovapolu Oct 24, 2018
f9d0b32
Use non-pretty printer for bjson #294
vovapolu Oct 24, 2018
2a4febd
Return Pravda's version when the "/version" endpoint was requested #296
Chicker Oct 25, 2018
be81894
Copy .git folder to docker build for correct work of sbt-git plugin r…
Chicker Oct 25, 2018
dd6230b
Merge pull request #295 from expload/i294-bson-serialization-bug
fomkin Oct 25, 2018
795c8d7
Merge pull request #285 from expload/i273-yaml-diff
fomkin Oct 25, 2018
637517d
Give to PRAVDA_COIN_HOLDER_2 a big number of XCoins while initial coi…
Chicker Oct 24, 2018
a65b7c0
Fix tethys implicits for node #294
vovapolu Oct 25, 2018
0f37958
Merge pull request #298 from expload/i294-bson-serialization-bug
fomkin Oct 25, 2018
e58ca52
Merge pull request #297 from expload/issue-292
fomkin Oct 25, 2018
3e83a89
Merge pull request #299 from expload/issue-296
fomkin Oct 25, 2018
68cb719
[WIP] Add basic dotnet compilation scheme #247
vovapolu Oct 23, 2018
b58d8ce
[WIP] Add dotnet compilation scheme + update tests #247
vovapolu Oct 25, 2018
73150b5
Update translation tests #247
vovapolu Oct 25, 2018
675ee4b
Update parser and translation tests #247
vovapolu Oct 25, 2018
4165832
Update all dotnet tests #247
vovapolu Oct 25, 2018
3b813a6
Update testkit tests #247
vovapolu Oct 26, 2018
74cc47d
Format sources #247
vovapolu Oct 26, 2018
037a993
Clean up after rebase #247
vovapolu Oct 26, 2018
46dabe0
Merge pull request #302 from expload/i247-dotnet-compilation
fomkin Oct 29, 2018
5f1b158
Add abci server logging #306
vovapolu Oct 29, 2018
92093cc
Rename docker image name to pravda-cli #308
Chicker Oct 29, 2018
da57ade
Remove unnecessary stages from .drone.yml
Chicker Oct 29, 2018
445412c
Remove the using of native-packager's docker plugin #308
Chicker Oct 29, 2018
860f88f
Merge pull request #309 from expload/issue-308
Chicker Oct 29, 2018
320fb28
Bump abci server version #306
vovapolu Oct 29, 2018
d2a11f6
Merge pull request #307 from expload/i306-abci-server-logging
vovapolu Oct 29, 2018
0880618
[WIP] Update Unity codegen #311
vovapolu Oct 30, 2018
eb9ca27
Update codegen, add ExploadUnitCodegen.cs, make codegen compatible wi…
vovapolu Oct 31, 2018
df8bd43
Update tests for new Emit method in SmartProgram #311
vovapolu Oct 31, 2018
7995970
Remove dir parameter from gen unity, update codegen doc #311
vovapolu Oct 31, 2018
2c269d6
Update codegen docs #311
vovapolu Oct 31, 2018
501f433
Add reference Expload.Unity.Codegen to codegen docs #311
vovapolu Oct 31, 2018
6bd8b3c
Fix it codegen tests #311
vovapolu Oct 31, 2018
c6d59ef
Add program name to dotnet translation #311
vovapolu Oct 31, 2018
d90ffe0
Merge pull request #238 from dedok1997/feature/evm-translator
vovapolu Nov 1, 2018
6cd3dfb
Format sources #311
vovapolu Nov 1, 2018
b02897b
Add project pravda-wallet with api for broadcast program #310
nmdaniil Nov 1, 2018
49db133
Fix type of ParseUInt16 for codegen #311
vovapolu Nov 1, 2018
a425251
Fix dotnet sandbox test after changes in translation #311
vovapolu Nov 1, 2018
f805f7a
Update docs #311
vovapolu Nov 1, 2018
8f12178
Add docker plugin for pravda-wallet #310
nmdaniil Nov 1, 2018
94ab7f2
Scalafmt #310
nmdaniil Nov 1, 2018
4928c46
Merge pull request #312 from expload/i311-update-unity-codegen
fomkin Nov 1, 2018
abc606a
Change PR: add module node-client, rename wallet to node-client-api, …
nmdaniil Nov 2, 2018
65c3dfe
Refresh various docs #315
vovapolu Nov 2, 2018
6d038d6
Add docker publish #310
nmdaniil Nov 2, 2018
1071b2e
Merge branch 'master' into issue-310
nmdaniil Nov 6, 2018
340b210
Merge pull request #313 from expload/issue-310
fomkin Nov 6, 2018
e19ca13
Update translation example document #319
invisible-defects Nov 2, 2018
7e1df07
Merge pull request #317 from expload/PDB-Argument
invisible-defects Nov 6, 2018
b5f62e0
Add initial files, create a new module #214
vovapolu Sep 12, 2018
d0efdb1
Add coins receiving gui route, http server, config #214
vovapolu Nov 2, 2018
f169f05
Change cli dependency to node-client, add config, fix html #214
vovapolu Nov 6, 2018
e5dee9e
Add docker image and its publishing in .drone.yml #214
vovapolu Nov 6, 2018
cabbaf2
Add healthz endpoint, change http port #214
vovapolu Nov 6, 2018
52c3716
Format sources and add headers #214
vovapolu Nov 6, 2018
c01bc19
Change default http port #214
vovapolu Nov 7, 2018
334f58d
Add abi parser. Add function recognizer #245
nevgeny Nov 7, 2018
c74c51c
Merge pull request #320 from expload/i214-coins-receiving
vovapolu Nov 7, 2018
51c8b34
Revert http port #214
vovapolu Nov 7, 2018
8669341
Merge pull request #321 from expload/i214-coins-receiving
vovapolu Nov 7, 2018
d0a9f72
Add launching of xcoins-receiving staging to CI #214
vovapolu Nov 7, 2018
dcc137e
Merge pull request #316 from expload/i315-refresh-docs
vovapolu Nov 7, 2018
8e27004
Rename xcoins-receiving to faucet #214
vovapolu Nov 7, 2018
04daa65
Update docker image and .sbt config for faucet #214
vovapolu Nov 7, 2018
129d850
Update .drone.yaml for faucet #214
vovapolu Nov 7, 2018
24bb005
Change publish config for pravda-faucet #214
vovapolu Nov 7, 2018
ab7eff4
rename node-client-api to broadcaster #322
Nov 8, 2018
51b7b68
improve documentation #322
Nov 8, 2018
875298e
Merge pull request #326 from expload/issue-322
fomkin Nov 8, 2018
f82b477
Merge branch 'master' into i214-coins-receiving
vovapolu Nov 8, 2018
a9f4f9b
Cleaning up after merge #214
vovapolu Nov 8, 2018
8e53f63
Merge pull request #323 from expload/i214-coins-receiving
vovapolu Nov 8, 2018
c5026f3
Add interfaces tests #327
vovapolu Nov 8, 2018
d5b3ebf
Fix Pcall test in testkit #327
vovapolu Nov 8, 2018
b05241a
Merge pull request #328 from expload/i327-interfaces-tests
vovapolu Nov 8, 2018
b792a06
Add tests #329
nevgeny Nov 9, 2018
f805434
Fix bug in watt payer signature process #314
vovapolu Nov 9, 2018
be1c41f
Format sources #314
vovapolu Nov 9, 2018
7a1a414
Merge pull request #335 from expload/i314-watt-payer-bug
vovapolu Nov 9, 2018
65af170
update opcodes documentation #193
Nov 11, 2018
1dc0e9c
allow to save flat object and primitive arrays to storage #193
invisible-defects Nov 8, 2018
83f2a1d
add non-primitive storage tests #193
Nov 11, 2018
5f5e1aa
Merge pull request #336 from expload/non-primitive-data-storage
fomkin Nov 12, 2018
ef3e770
Add transaction id to response, update tests #318
vovapolu Nov 12, 2018
7cc578e
Format sources #318
vovapolu Nov 12, 2018
4924c6f
Merge pull request #337 from expload/i318-transaction-id
vovapolu Nov 12, 2018
6e05634
Allow to get callers stack from program #324
invisible-defects Nov 12, 2018
36888a2
Merge pull request #338 from expload/get-callers-stack
fomkin Nov 13, 2018
dede9bb
add transactionId to events endpoint #339
Nov 14, 2018
880b4a6
update documentation and reformat code #339
Nov 14, 2018
dcf29ab
Merge pull request #340 from expload/issue-339
fomkin Nov 14, 2018
f56535f
Add transactionId handling to unity codegen, update DApp API docs #341
vovapolu Nov 14, 2018
65ce35f
add MSI signing step to .drone.ci #343
Nov 15, 2018
e43595d
Merge pull request #342 from expload/i341-transaction-id
fomkin Nov 15, 2018
ccc7bad
Merge pull request #344 from expload/issue-343
vovapolu Nov 15, 2018
ec61c6f
Update data.md
trikota Nov 15, 2018
7913061
Update DApp API docs
vovapolu Nov 15, 2018
3bad6a4
Update "Getting Started" based on PravdaProgramTemplate #345
invisible-defects Nov 15, 2018
6fc4f6b
Merge pull request #346 from expload/update-getting-started
fomkin Nov 15, 2018
4efc951
Merge pull request #347 from trikota/patch-1
fomkin Nov 16, 2018
8f3c864
update documentation layout #349
Nov 16, 2018
ec4799e
Merge pull request #350 from expload/issue-349
fomkin Nov 16, 2018
8cbe139
remove command-line interface doc folder
Nov 16, 2018
1ec3883
update link to pravda documentation
Nov 16, 2018
5c60041
add method-test specification #351
Nov 16, 2018
c6e9632
use new method-test dapp api in unity3d codegen #351
Nov 16, 2018
e46ad63
Merge pull request #353 from expload/issue-351
fomkin Nov 16, 2018
f0c1c57
Add hash and height opcodes implementation #357
Chicker Nov 17, 2018
1baf3e8
Fix test #357
Chicker Nov 17, 2018
b1445eb
Add dotnet translation and tests #357
Chicker Nov 17, 2018
83bc9f5
Fix Callers tests #357
Chicker Nov 17, 2018
1a13d4a
Add testkit tests #357
Chicker Nov 17, 2018
1dadb6c
Add documentation about adding new functionality to the .NET parser #357
Chicker Nov 17, 2018
9c51258
Add right string concatenation, logic operations, fields reading/writ…
vovapolu Nov 17, 2018
2194345
Format sources #354 #355 #356
vovapolu Nov 17, 2018
1aaa853
Fix default hash for AppStateInfo
Chicker Nov 17, 2018
18ce6e5
Merge pull request #359 from expload/issue-357
vovapolu Nov 17, 2018
aa78c8c
Add transfer and ptransfer to C# #361
vovapolu Nov 17, 2018
2781d1d
Merge pull request #362 from expload/translator-mega-patch
vovapolu Nov 17, 2018
35d865f
add pravda program template #360
Nov 17, 2018
c4aa917
Add method that executes transaction without applying side-effects an…
Chicker Nov 17, 2018
2717012
Merge pull request #365 from expload/issue-363
Chicker Nov 18, 2018
a7e25ac
move endpoint address to variable #360
Nov 18, 2018
c316666
Merge pull request #364 from expload/issue-360
fomkin Nov 18, 2018
753781c
move dotnet steps to bottom
Nov 18, 2018
137ae7b
Add disasm #369
nevgeny Nov 21, 2018
1d66f28
Getting events by transactionId returns empty array #373
Chicker Nov 22, 2018
4eb0d08
Merge pull request #374 from expload/issue-373
Chicker Nov 22, 2018
593fcf7
Add :latest tag for broadcaster docker image #372
Chicker Nov 22, 2018
d7aa3c0
Merge pull request #376 from expload/issue-372
Chicker Nov 22, 2018
ce3424d
Replace Java 7 copy method to method from Apache Commons #375
Chicker Nov 22, 2018
de9da28
Fix array out of bounds behaviour, add tests #368
vovapolu Nov 22, 2018
a8c8090
Merge pull request #379 from expload/issue-375
Chicker Nov 23, 2018
92d4e36
Forbid private Mappings, add ctor initialization, fix dotnet tests #3…
vovapolu Nov 26, 2018
74f4766
Fix testkit tests #358 #367
vovapolu Nov 26, 2018
8f33b47
Add ObjectInit test #367
vovapolu Nov 26, 2018
9376d63
rename Mapping methods #234
Sep 24, 2018
195661c
Rebase on master, fix usages of Mapping's methods, fix tests #234
vovapolu Nov 26, 2018
d8b1dda
Merge pull request #378 from expload/i368-array-out-of-bounds
vovapolu Nov 27, 2018
8cdc289
Merge pull request #382 from expload/i358-i367-private-mappings-and-c…
vovapolu Nov 27, 2018
58db480
Fix parser tests #234
vovapolu Nov 27, 2018
6b55555
Merge pull request #383 from expload/issue-234
vovapolu Nov 27, 2018
2d5b533
Replace actual tmp dir in tests, change it to #384
vovapolu Nov 27, 2018
063e20a
Merge pull request #385 from expload/i384-pravda-tmp-dir
vovapolu Nov 27, 2018
869ec90
[WIP] Test for static methods in other programs #366
vovapolu Nov 18, 2018
a63c79e
Add global index of methods from all files, add support for calling m…
vovapolu Nov 27, 2018
aa96a15
[WIP] Add global index for method parents #366
vovapolu Nov 27, 2018
1154758
[WIP] Refactor global indexes of methods #366
vovapolu Nov 28, 2018
9a58fc7
Fix sources. Refactore code #369
nevgeny Nov 29, 2018
a84215f
Move `BytesToHex` to pravda STL #390
invisible-defects Nov 29, 2018
b0d1f1a
[WIP] Add method and field inverted index #366
vovapolu Nov 29, 2018
ff4870f
[WIP] Add docs for inverted indexes classes #366
vovapolu Nov 29, 2018
9a4cf3c
Merge pull request #391 from expload/bytes-to-hex
vovapolu Nov 30, 2018
7c062e4
Add support for external methods, add tests #366
vovapolu Nov 30, 2018
449a8a4
Format sources and add headers #366
vovapolu Nov 30, 2018
93f025c
Fix tests, add StaticClass runtime test #366
vovapolu Nov 30, 2018
15b7ac0
Add stack size predictor #387
nevgeny Dec 3, 2018
72f62fa
Upgrade tendermint 0.16.0 -> 0.26.0 #381
nmdaniil Dec 3, 2018
66bd6ad
Merge pull request #392 from expload/i366-run-methods
vovapolu Dec 3, 2018
86f8a50
Turn on optimization for dotnet-compilation in all tests, fix tests #223
vovapolu Dec 3, 2018
395dbc8
Turn on optimization in DotnetCompilation dsl, fix tests #223
vovapolu Dec 3, 2018
0f49f6e
Merge pull request #394 from expload/issue-381
fomkin Dec 4, 2018
dba6594
Update Compare test #223
vovapolu Dec 5, 2018
95e6513
Merge pull request #395 from expload/i223-c#-optimize-tests
vovapolu Dec 5, 2018
247e0e4
Remove unsigned primitives, fix tests, change byte to sbyte in Pravda…
vovapolu Dec 4, 2018
6a11e07
Format sources #393
vovapolu Dec 4, 2018
161fb7f
Update docs #393
vovapolu Dec 5, 2018
9503a2d
Format sources #393
vovapolu Dec 5, 2018
9a12a60
Yet another fix resolves #375
Chicker Dec 5, 2018
e3b0ce1
Change balance type to int64 in VM #393
vovapolu Dec 5, 2018
741054a
Merge pull request #396 from expload/i393-remove-unsigned
vovapolu Dec 5, 2018
37eb79d
Allow to return and accept arbitrary types in public methods, allow t…
vovapolu Dec 5, 2018
46b7766
Add initialization of program fields to default values to ctor #399
vovapolu Dec 5, 2018
80d0d9f
Forbid all non-private fields in programs #399
vovapolu Dec 5, 2018
cddf715
Merge pull request #397 from expload/issue-375
Chicker Dec 6, 2018
f366f07
Format sources #399
vovapolu Dec 6, 2018
de7cd34
Merge pull request #402 from expload/i399-program-default-fields
vovapolu Dec 6, 2018
ed461f8
Merge pull request #401 from expload/i398-public-method-types
vovapolu Dec 6, 2018
1342536
After the first successful broadcast, the furthers broadcast calls th…
Chicker Dec 6, 2018
1578d4f
Merge pull request #404 from expload/issue-403
vovapolu Dec 6, 2018
7c3f7d7
Merge pull request #370 from dedok1997/feature/evm-translator
vovapolu Dec 6, 2018
d405c92
Fix style, rename things #245
vovapolu Dec 6, 2018
f4dddbf
Merge branch 'master' into i245-evm-translator
vovapolu Dec 6, 2018
efe6a85
Add read/write in memory operations #387
nevgeny Dec 6, 2018
9fbe51c
Add expand array function #387
nevgeny Dec 7, 2018
4f4f812
Rewrite tests, refactor evm.run to EvmSandbox, unify sandboxes for vm…
vovapolu Dec 7, 2018
b72bcea
Merge remote-tracking branch 'dedok_fork/feature/evm-translator' into…
vovapolu Dec 7, 2018
f19d09e
Format sources #245
vovapolu Dec 7, 2018
bfe5c71
Fix tests #387
nevgeny Dec 11, 2018
0c25cfa
Fix tests №387
nevgeny Dec 11, 2018
bd8a9e2
Add test #387
nevgeny Dec 12, 2018
50a511c
Bump dotnet version and publish symbols #410
vovapolu Dec 10, 2018
d189efc
Include Pravda.pdb to nuget package #410
vovapolu Dec 10, 2018
ba31acb
Fix dotnet translator, analyse typedefs in each file separately #409
vovapolu Dec 10, 2018
c904358
[WIP] Add translation test, convert everything to bytes in simple ope…
vovapolu Dec 11, 2018
76db327
[WIP] Make opcodes to handle only Bytes
vovapolu Dec 12, 2018
89cbbee
Add memory emulation. Fix tests. Format sources #387
nevgeny Dec 13, 2018
dbc538e
[WIP] Continue to translate SimpleStorage
vovapolu Dec 13, 2018
fde9062
[WIP] Playing with calldata
vovapolu Dec 13, 2018
953cfc1
Remove unused imports #387
nevgeny Dec 14, 2018
f7f3ab6
[WIP] Working prototype, tests don't work
vovapolu Dec 14, 2018
4bdc66f
Fix tests
vovapolu Dec 17, 2018
a6f97b4
Fix all evm tests
vovapolu Dec 17, 2018
0fb8697
Fix all tests
vovapolu Dec 17, 2018
2e853e2
Merge remote-tracking branch 'origin/i245-evm-translator' into vovapo…
vovapolu Dec 17, 2018
faabeb1
Add new type in abi parser. Add Sha3 translation #417
nevgeny Dec 18, 2018
f96639f
Add SimpleToken.sl
vovapolu Dec 18, 2018
0d883ed
Add evm parser and abi parser tests, add sha3 stdlib func
vovapolu Dec 18, 2018
1d3d01e
[WIP] Add SimpleToken test
vovapolu Dec 18, 2018
5c48939
[WIP] Add evm cli command #418
nevgeny Dec 20, 2018
79cad98
Add tests for balanceOf, transfer in SimpleToken
vovapolu Dec 20, 2018
3acb30c
Convert result bytes to appropriate Pravda VM type, fix tests
vovapolu Dec 20, 2018
fc64733
Fix evm cli command #418
nevgeny Dec 20, 2018
447dd9e
Merge remote-tracking branch 'origin/i418-cli-evm' into vovapolu-evm
vovapolu Dec 20, 2018
3f18b2a
Refactor tests, move source files, recompile SimpleStorage
vovapolu Dec 24, 2018
2249da6
Add documentation #418
nevgeny Dec 24, 2018
95cca81
Remove unneccesary stdlib func, rename stdlib funcs, fix evm tests
vovapolu Dec 24, 2018
cbdc78f
Add file name checks #418
nevgeny Dec 27, 2018
13a66f2
Merge branch 'vovapolu-evm' into i418-cli-evm
nevgeny Dec 27, 2018
ecd4160
Format sources. Fix documentation #418
nevgeny Dec 27, 2018
676d08f
Add headers #418
nevgeny Jan 9, 2019
21002b4
Format sources #418
nevgeny Jan 9, 2019
b7f6e42
Merge pull request #428 from expload/i418-cli-evm
vovapolu Jan 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.idea/
codegen/target/
common/target/
dotnet/target/
node/target/
node-db/target/
plaintest/target/
testkit/target/
vm/target/
vm-api/target/
vm-asm/target/
yaml4s/target/
yopt/target/
92 changes: 64 additions & 28 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ workspace:
base: /workdir
path: code
pipeline:
tag-the-image:
image: alpine/git:1.0.4
pull: false
commands:
- echo -n `git describe --tags | sed -e "s/^v//"`",latest" > .tags
tests:
image: gcr.io/time-coin/sbt:latest
pull: true
Expand All @@ -16,16 +21,15 @@ pipeline:
- export COURSIER_CACHE='/workdir/coursier/'
- export SBT_OPTS='-Dsbt.global.base=/workdir/sbt/ -Dsbt.ivy.home=/workdir/ivy/ -Divy.home=/workdir/ivy/'
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 headerCheck scalafmtCheck test:scalafmtCheck test "gen-doc/run --check"
package-zip-and-publish-to-bintray:
package-zip:
image: gcr.io/time-coin/sbt:latest
volumes:
- /var/lib/sbt-cache:/workdir/sbt
- /var/lib/coursier-cache:/workdir/coursier
commands:
- export COURSIER_CACHE='/workdir/coursier/'
- export SBT_OPTS='-Dsbt.global.base=/workdir/sbt/ -Dsbt.ivy.home=/workdir/ivy/ -Divy.home=/workdir/ivy/'
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 cli/universal:packageZipTarball cli/universal:stage node/docker:stage publish
secrets: [ bintray_user, bintray_pass ]
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 cli/universal:packageZipTarball cli/universal:stage broadcaster/universal:stage faucet/universal:stage
when:
event: tag
package-msi:
Expand All @@ -38,18 +42,27 @@ pipeline:
- mv /workdir/code/cli/target/universal/*.tgz /workdir/code/cli/target/universal/PravdaSDK-$$PRAVDA_VERSION.tgz
when:
event: tag
package-publish-nuget:
image: microsoft/dotnet:2.1-sdk
environment:
- PRAVDA_VERSION=${DRONE_TAG##v}
sign-msi:
image: byrnedo/alpine-curl
commands:
- cd /workdir/code/PravdaDotNet
- dotnet pack -c Release
- dotnet nuget push bin/Release/Expload.Pravda.$PRAVDA_VERSION.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json
secrets: [ nuget_key ]
- find . -name *.msi -exec curl -F msi=@{} http://35.246.239.138:8080/sign-msi -o {} \;
when:
event: tag
publish-to-bintray:
group: publish
image: gcr.io/time-coin/sbt:latest
volumes:
- /var/lib/sbt-cache:/workdir/sbt
- /var/lib/coursier-cache:/workdir/coursier
commands:
- export COURSIER_CACHE='/workdir/coursier/'
- export SBT_OPTS='-Dsbt.global.base=/workdir/sbt/ -Dsbt.ivy.home=/workdir/ivy/ -Divy.home=/workdir/ivy/'
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 publish
secrets: [ bintray_user, bintray_pass ]
when:
event: tag
publish-github-releases:
group: publish
image: plugins/github-release
files:
- /workdir/code/win-installer/*.msi
Expand All @@ -58,30 +71,53 @@ pipeline:
when:
event: tag
publish-docker-hub:
group: publish
image: plugins/docker
repo: expload/pravda
context: /workdir/code/node/target/docker/stage/
dockerfile: /workdir/code/node/target/docker/stage/Dockerfile
context: .
dockerfile: docker/images/pravda-cli/Dockerfile
secrets: [ docker_username, docker_password ]
auto_tag: true
when:
event: tag
publish-docker-image-private:
image: plugins/gcr
registry: gcr.io/time-coin
repo: gcr.io/time-coin/expload-pravda-node
publish-pravda-faucet:
group: publish
image: plugins/docker
repo: expload/pravda-faucet
context: .
dockerfile: ./docker/images/expload-pravda-node/Dockerfile
secrets: [ gcr_json_key ]
dockerfile: docker/images/pravda-faucet/Dockerfile
secrets: [ docker_username, docker_password ]
when:
event: push
branch: master
publish-docker-image-private-tagged:
image: plugins/gcr
registry: gcr.io/time-coin
repo: gcr.io/time-coin/expload-pravda-node
event: tag
publish-broadcaster-to-docker:
group: publish
image: plugins/docker
repo: expload/pravda-broadcaster
context: .
dockerfile: ./docker/images/expload-pravda-node/Dockerfile
secrets: [ gcr_json_key ]
dockerfile: docker/images/broadcaster/Dockerfile
secrets: [ docker_username, docker_password ]
when:
event: tag
publish-pravda-dll-nuget:
group: dotnet
image: microsoft/dotnet:2.2-sdk
environment:
- PRAVDA_VERSION=${DRONE_TAG##v}
commands:
- cd /workdir/code/PravdaDotNet
- dotnet pack -c Release
- dotnet nuget push bin/Release/Expload.Pravda.$PRAVDA_VERSION.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json
secrets: [ nuget_key ]
when:
event: tag
publish-pravda-program-template-nuget:
group: dotnet
image: chicker/nuget:0.8
environment:
- PRAVDA_VERSION=${DRONE_TAG##v}
commands:
- cd /workdir/code/PravdaProgramTemplate
- nuget pack -Version $PRAVDA_VERSION Expload.PravdaProgramTemplate.nuspec
- dotnet nuget push Expload.PravdaProgramTemplate.$PRAVDA_VERSION.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json
secrets: [ nuget_key ]
when:
event: tag
43 changes: 37 additions & 6 deletions PravdaDotNet/Pravda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,26 @@ public class Program : Attribute {}

// Access to the storage
public class Mapping<K, V> {
public V get(K key) { return default(V); }
public bool exists(K key) { return false; }
public void put(K key, V value) { return; }
public V getDefault(K key, V def) { return default(V); }

public V this[K k] {
get {
return default(V);
}
set {
return;
}
}

// Checks the specified key is present in the mapping.
public bool ContainsKey(K key) {
return false;
}

// Gets the value associated with the specified key.
// If key is not fount returns defaultValue.
public V GetOrDefault(K key, V defaultValue) {
return default(V);
}
}

public class Info {
Expand All @@ -25,6 +41,20 @@ public class Info {

// Get program address
public static Bytes ProgramAddress() { return null; }

// Get list of contract's callers' addresses
public static Bytes[] Callers() { return null; }

public static long Height() { return 0L; }
public static Bytes LastBlockHash() { return null; }
}

public class Actions {
// Transfer native coins from executor account
public static void Transfer(Bytes to, long amount) { return; }

// Transfer native coins from program account
public static void TransferFromProgram(Bytes to, long amount) { return; }
}

public class Log {
Expand All @@ -42,11 +72,11 @@ public class Bytes {
// Get the void address (32 zero bytes)
public static Bytes VOID_ADDRESS = null;

public Bytes(params byte[] bytes) {}
public Bytes(params sbyte[] bytes) {}
public Bytes(String hex) {}

// Get the i-th byte
public byte this[int i] { get { return 0; } set { return; } }
public sbyte this[int i] { get { return 0; } }
// Get the sub-array
public Bytes Slice(int start, int length) { return null; }
// Concatenate two Bytes
Expand All @@ -60,6 +90,7 @@ public class StdLib {
public static Bytes Ripemd160(String str) { return null; }

public static Bytes HexToBytes(String hex) { return null; }
public static String BytesToHex(Bytes bytes) { return null; }

public static bool ValidateEd25519Signature(Bytes pubKey, Bytes message, Bytes signature) { return false; }
public static bool ValidateEd25519Signature(Bytes pubKey, String message, Bytes signature) { return false; }
Expand Down
1 change: 1 addition & 0 deletions PravdaDotNet/Pravda.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<PackageId>Expload.Pravda</PackageId>
<PackageVersion>$(PRAVDA_VERSION)</PackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
</Project>
Binary file modified PravdaDotNet/Pravda.dll
Binary file not shown.
25 changes: 25 additions & 0 deletions PravdaProgramTemplate/Content/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Alexander Voronkov",
"classifications": [ "Common", "Console" ],
"identity": "Expload.PravdaProgramTemplate",
"name": "Pravda Program Template",
"shortName": "pravdaprogram",
"sourceName": "MyProgram",
"symbols": {
"namespace": {
"type": "parameter",
"datatype": "string",
"defaultValue": "MyCompany",
"replaces": "NAMESPACE",
"description": "Program namespace"
},
"version": {
"type": "parameter",
"datatype": "string",
"defaultValue": "1.0.0",
"replaces": "VERSION",
"description": "Program version"
}
}
}
13 changes: 13 additions & 0 deletions PravdaProgramTemplate/Content/MyProgram.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace NAMESPACE {

using Expload.Pravda;
using System;

[Program]
public class MyProgram {

public string HelloWorld() {
return "Hello, world!";
}
}
}
26 changes: 26 additions & 0 deletions PravdaProgramTemplate/Content/MyProgram.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageName>MyProgram</PackageName>
<PackageId>NAMESPACE.$(PackageName)</PackageId>
<PackageVersion>VERSION</PackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>$(PackageId)</AssemblyName>
<WattsLimit>500000</WattsLimit>
<PravdaApi>http://publicnode.expload.com/api/public</PravdaApi>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Expload.Pravda" Version="0.*" />
</ItemGroup>
<Target Name="BuildPravdaAfterPublish" AfterTargets="Publish" Condition="'$(Configuration)' == 'Debug'">
<Exec Command="pravda compile dotnet -i &quot;bin/Debug/netstandard2.0/publish&quot; -o bin/$(PackageName).pravda --main-class $(PackageId)" />
</Target>
<Target Name="DeployPravdaAfterPublish" AfterTargets="Publish" Condition="'$(Configuration)' == 'Deploy'">
<Exec Command="pravda compile dotnet -i &quot;bin/Deploy/netstandard2.0/publish&quot; -o bin/$(PackageName).pravda --main-class $(PackageId)" />
<Exec Command="pravda gen address -o program-wallet.json" />
<Exec Command="pravda broadcast deploy -i bin/$(PackageName).pravda -w wallet.json -p program-wallet.json -l $(WattsLimit) -e $(PravdaApi)" />
</Target>
<Target Name="UpdatePravdaAfterPublish" AfterTargets="Publish" Condition="'$(Configuration)' == 'Update'">
<Exec Command="pravda compile dotnet -i &quot;bin/Update/netstandard2.0/publish&quot; -o bin/$(PackageName).pravda --main-class $(PackageId)" />
<Exec Command="pravda broadcast update -i bin/$(PackageName).pravda -w wallet.json -p program-wallet.json -l $(WattsLimit) -e $(PravdaApi)" />
</Target>
</Project>
39 changes: 39 additions & 0 deletions PravdaProgramTemplate/Content/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Pravda Program Template

## Installing the template

```bash
dotnet new -i Expload.PravdaProgramTemplate
dotnet new pravdaprogram
```

## Building and running

First, you have to generate a wallet and put it into wallet.json (or move it to the folder if you have one).

```bash
pravda gen address -o wallet.json
```

Then use [Faucet](http://faucet.dev.expload.com/ui) to get some XCoin. After you have funds on your wallet, deploy the program.

```bash
dotnet publish -c Deploy
```

To update program run

```bash
dotnet publish -c Update
```

## FAQ

> I get `NotEnoughMoney` exception. What do I do?

Make sure you've used faucet to get XCoin for account in `wallet.json`.

> What do I do next?

Now you can edit the program in *.cs and deploy scripts
in .csproj to suit your needs. Make sure to check out [Pravda docs](https://expload.com/developers/documentation/pravda/)!
12 changes: 12 additions & 0 deletions PravdaProgramTemplate/Expload.PravdaProgramTemplate.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Expload.PravdaProgramTemplate</id>
<version>1.0.0</version>
<description>A template for Pravda Program</description>
<authors>Alexander Voronkov</authors>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,4 @@ Pravda is a general purpose blockchain with PoA consensus (PoW in future). It's

Network node is build on top of [Tendermint](http://tendermint.com/), is written in Scala and runs on JVM. We have our own virtual machine for "smart contracts" (not exactly) and translators from [.NET](https://en.wikipedia.org/wiki/Common_Intermediate_Language) (and [EVM](https://ethereum.github.io/yellowpaper/paper.pdf) in future) bytecode.

## Documentation

* [Getting Started](doc/getting-started.md)
* [Command line interface](doc/ref/cli/main.md)
* [Pravda Virtual Machine](doc/ref/vm)
* [Using assembler](doc/ref/vm/asm.md)
* [Internal data format](doc/ref/vm/data.md)
* [Opcodes](doc/ref/vm/opcodes.md)
* [Standard Library](doc/ref/vm/stdlib.md)
* [Meta information](doc/ref/vm/meta.md)
* [DApp API specification](doc/dapp-api.md)
* [Node API specification](doc/node-api.md)
* [Dotnet](doc/ref/dotnet)
* [Dotnet translation](doc/ref/dotnet/translation.md)
* [Dotnet classes translation](doc/ref/dotnet/classes-translation.md)
* [Code generation](doc/codegen.md)
* [Glossary](doc/glossary.md)
* [FAQ](doc/faq.md)

## Development

* [Participation](doc/dev/participation.md)
* [Building from sources](doc/dev/building-from-sources.md)
* [How to generate documentation](doc/dev/gen-doc.md)
* [How to add new functionality to VM](doc/dev/add-new-functionality.md)
[Documentation](https://expload.com/developers/documentation/pravda/)
Loading