Commit graph

189 commits

Author SHA1 Message Date
Roman Khimov
5196558056 cli/wallet: allow to read wallet from stdin where it's possible
Unfortunately, testing this code is not possible without an additional wrapper
in `input`, but adding it just to test this seems to be too excessive. Fixes
2021-12-08 10:36:17 +03:00
Roman Khimov
3dbc9bb5dc docs: add a note on defer limitations 2021-12-03 11:36:37 +03:00
Roman Khimov
ce9d0b22cf *: use NEP-XX naming consistently in docs/comments
Standards are NEP-11 and NEP-17, not NEP11, not NEP17, not anything
else. Variable/function names of course can use whatever fits, but documents
and comments should be consistent wrt this.
2021-11-19 12:58:46 +03:00
Roman Khimov
7f48653e66 rpc: add server-side NEP-11 tracking API 2021-11-19 12:58:46 +03:00
Roman Khimov
6b8e615094
Merge pull request #2234 from nspcc-dev/rpc/params-parsing
rpc: method-specific parameters parsing optimisation
2021-11-10 20:45:44 +03:00
Anna Shaleva
4072c2fa90 rpc: handlers parameters audit
Make them compatible with C#.
2021-11-10 14:54:09 +03:00
Evgeniy Stratonikov
7758378d28 compiler: allow to overload methods in manifest
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-10-29 20:15:21 +03:00
Roman Khimov
1144a03486 storage: drop RedisDB, close #2130 2021-10-27 17:32:25 +03:00
Roman Khimov
fb4b87bb96 storage: drop BadgerDB support, close #2130 2021-10-27 17:31:55 +03:00
Anna Shaleva
807fa4a720 services: allow non-empty inv scripts for contract-based notary witness 2021-10-25 17:23:29 +03:00
Anna Shaleva
75d7891ca1 services: add ability to combine notary signers
Notes for witnesses:
* [N sig + M multisig + K contract] combination is possible where N, M, K >=0.
* Each verification script should be properly filled in.
* Each invocation script should either be empty or contain exactly one
signature.
2021-10-25 12:22:13 +03:00
Roman Khimov
9e7b334953 docs: add a note for wallet conversion 2021-10-13 15:58:41 +03:00
Roman Khimov
2bec43511d
Merge pull request #2207 from nspcc-dev/rpc/gethistoricalstate
rpc: implement `getstate` and `findstates` RPC methods
2021-10-13 15:27:51 +03:00
Anna Shaleva
43ac4e1517 rpc: implement findstates RPC handler 2021-10-13 11:41:05 +03:00
Anna Shaleva
6eb3cad6d5 rpc: use uint64 for timestamp boundaries in GetNEP17Transfers
Block's timestamp is in milliseconds, so it overflows uint32.
2021-10-11 17:34:05 +03:00
Anna Shaleva
01143da621 rpc: add getstate RPC handler 2021-10-11 16:43:44 +03:00
Anna Shaleva
b3ea7504cb subscriptions: add container hash to notification event
External users make use of it. Close #2190.
2021-09-24 17:42:02 +03:00
Roman Khimov
c4637514d4
Merge pull request #2165 from nspcc-dev/rpc/audit
rpc: request handlers audit
2021-09-10 13:16:40 +03:00
Anna Shaleva
cba259dc47 docs: add implementation notice about getrawtransaction response 2021-09-10 11:38:59 +03:00
Anna Shaleva
6da458365d vm CLI: allow to dump slots 2021-09-09 13:45:10 +03:00
Roman Khimov
b502c5f148
Merge pull request #2162 from nspcc-dev/docs/update
docs: minor documentation updates and adjustments
2021-09-09 12:38:20 +03:00
Anna Shaleva
cbc75afd4d docs: refactor documentation
CLI:
* Typos are fixed
* Documentation on NEP-11 tokens is added
* NeoGo node configuration is moved to a separate file

Compiler:
* Typos and indentations are fixed
* Ops dump example is updated

Consensus:
* Typos are fixed
* Links are fixed

Notifications:
* Minor adjustments

RPC:
* `getversion` response is updated
* `getunclamedgas` comment is removed (not valid since
https://github.com/neo-project/neo-modules/pull/243)

VM:
* Update help message
* `load*` command adjustments
* `astack` command removal
2021-09-08 17:52:46 +03:00
Anna Shaleva
74f1848d19 core: adjust LastUpdatedBlock calculation for NEP17 balances
...wrt P2PStateExchange setting.
2021-09-07 19:43:27 +03:00
Roman Khimov
b84cd1f3d8
Merge pull request #2139 from nspcc-dev/docs/notary
docs: add Notary subsystem documentation
2021-09-02 13:10:43 +03:00
Anna Shaleva
e6d63eb1de docs: add Notary subsystem documentation 2021-09-01 16:53:48 +03:00
Roman Khimov
ad5acf4873 *: drop Go 1.14 2021-08-25 14:59:00 +03:00
Evgeniy Stratonikov
e2910a7cb4 vm/cli: add public key -> address conversion, fix #2121
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-13 10:43:49 +03:00
Anna Shaleva
76c687aaa1 config: add P2PStateExchangeExtensions and StateSyncInterval settings 2021-08-10 11:00:32 +03:00
Evgeniy Stratonikov
653ecbe50e docs/compiler.md: document manifest groups
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-06 12:05:36 +03:00
Roman Khimov
06c3dda5d1
Merge pull request #2093 from nspcc-dev/states-exchange/drop-nep17-balance-state
core: implement dynamic NEP17 balances tracking
2021-07-29 19:08:42 +03:00
Evgeniy Stratonikov
619bbb40c4 docs/compiler.md: document contract configuration
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-29 16:12:31 +03:00
Anna Shaleva
e8bed184d5 core: implement dynamic NEP17 balances tracking
Request NEP17 balances from a set of NEP17 contracts instead of getting
them from storage. LastUpdatedBlock tracking remains untouched, because
there's no way to retrieve it dynamically.
2021-07-29 10:23:01 +03:00
Roman Khimov
8b0dfe135f cli/query: add height command 2021-07-23 10:22:58 +03:00
Roman Khimov
24ee8fab5c cli: move wallet candidate getstate into query voter
This command has nothing to do with wallets.
2021-07-22 21:13:44 +03:00
Roman Khimov
753e61bcff cli/query: add 'candidates' and 'committee', fix #2067 2021-07-22 21:13:44 +03:00
Evgeniy Stratonikov
4861569ab6 docs: add query tx info
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-20 18:03:51 +03:00
Roman Khimov
51a975fc25 docs: add more info about running a CN node on public networks
Fix #2065.
2021-07-15 12:21:07 +03:00
Evgeniy Stratonikov
9b89e3f632 docs,config: add Oracle.AllowedContentTypes option
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-13 11:11:37 +03:00
Anna Shaleva
f98d4e8eed docs: add node configuration docs. 2021-05-17 21:55:47 +03:00
Evgeniy Stratonikov
ea49c6b637 wallet: rename isdefault to isDefault
Follow neo-project/neo#2451 .
2021-05-14 10:31:31 +03:00
Roman Khimov
50cb0450f2 circleci/workflows: drop vet run
golangci-lint already includes govet, so having it in a separate task doesn't
add any value (only increases CI running time).
2021-05-13 00:08:42 +03:00
Anna Shaleva
b5dc598af7 docs: add docs on services restart 2021-05-05 10:57:31 +03:00
Roman Khimov
b9fe5d8dae docs: mention calculatenetworkfee RPC call 2021-04-08 15:17:15 +03:00
Roman Khimov
9948003aef docs: specify timeout units in example 2021-04-08 15:17:15 +03:00
Roman Khimov
4997849470 docs: add a note on state validation, fix #1847 2021-04-07 21:42:26 +03:00
Roman Khimov
b2ecb10868 docs: add some oracle service doc, fix #1846 2021-04-07 21:27:42 +03:00
Roman Khimov
5898013699 docs: fix consensus UnlockWallet documentation 2021-04-07 18:31:37 +03:00
Roman Khimov
ebf4062c85 docs: update RPC server document 2021-03-19 16:18:45 +03:00
Roman Khimov
8db7700fe7 docs: rework CLI document
Bring it up to date, make it more useful.
2021-03-19 16:18:45 +03:00
Roman Khimov
e7c4264124 docs: update consensus.md
Remove outdated things, make it more useful.
2021-03-19 16:18:45 +03:00
Roman Khimov
e0c7a3b77c rpc: add getblockheadercount call
See neo-project/neo-modules#504.
2021-02-07 23:18:09 +03:00
Roman Khimov
edcee68f91 docs: add a note about getstorage
Initially I wanted to emulate it, but probably there is no much gain in doing
so. It can be done if need be.
2021-02-04 13:12:11 +03:00
Roman Khimov
f2b12756ee docs: use contract instead of mycontract throughout the compiler doc 2021-01-28 12:16:18 +03:00
Roman Khimov
a217d62f8a docs: make compiler documentation more up to date
Add some notes on GOROOT setup and output files, properly describe
YAML/manifest interactions and remove severely outdated examples (we have
better ones in `examples` anyway).
2021-01-28 12:16:18 +03:00
fabwa
32e86785fa
Update notifications.md 2021-01-24 16:50:02 +01:00
Evgenii Stratonikov
31eca342eb *: replace all NEP5 occurences to NEP17 2020-11-24 13:08:24 +03:00
Roman Khimov
10945a989d docs: update project config example to smth more up to date 2020-11-13 21:52:42 +03:00
Roman Khimov
286d9185f4 smartcontract: remove contract features
We're featureless now, all contracts have access to storage and payable status
is to be determined via new NEP. Follow neo-project/neo#2060.
2020-11-13 21:26:23 +03:00
Anna Shaleva
d6992cb5c4 core: marshal block hash for AppExecResult [NotificationsSubsystem] 2020-11-12 17:43:20 +03:00
Anna Shaleva
fc018afb95 docs: adjust invokefunction documentation 2020-11-05 10:37:06 +03:00
Anna Shaleva
d3daaafbe4 rpc: allow to get contract scripthash from address, id or name [Server]
... for `invokefunction` RPC method.
2020-11-03 17:25:46 +03:00
Anna Shaleva
15a939b1da rpc: allow to getcontractstate by address, id or name
close #1423
2020-11-03 17:23:49 +03:00
Evgenii Stratonikov
c4a8770215 compiler: support _deploy method 2020-10-06 19:12:35 +03:00
Anna Shaleva
543fd58e93 vm: restrict map key size 2020-09-29 18:46:15 +03:00
Roman Khimov
a53bc6b13e docs: update RPC documentation with getnep5transfers changes 2020-09-22 16:55:20 +03:00
Evgenii Stratonikov
5ba22a02f4 docs: mention util and convert packages in compiler 2020-09-15 16:34:00 +03:00
Evgenii Stratonikov
f2d49cd1d6 docs: update compiler.md 2020-08-27 10:28:50 +03:00
Evgenii Stratonikov
69989e1227 compiler: support copy() 2020-08-25 08:53:29 +03:00
Evgenii Stratonikov
0f11116040 compiler: support make() 2020-08-25 08:53:28 +03:00
Evgenii Stratonikov
6d169a356e docs: update compiler.md
Make a note about compiling directories.
2020-08-11 11:21:32 +03:00
Evgenii Stratonikov
f2cb1d5f02 compiler: use constants in interops
We now support using exported constants, so there is no
need in declaring functions. All functions from `interop/`
are not to be compiled.

Fix #1298.
2020-08-10 17:52:31 +03:00
Roman Khimov
0e2784cd2c always wrap errors when creating new ones with fmt.Errorf()
It doesn't really change anything in most of the cases, but it's a useful
habit anyway.

Fix #350.
2020-08-07 12:21:52 +03:00
Roman Khimov
e1d3223505
Merge pull request #1247 from nspcc-dev/feature/pointers
Support pointers in compiler
2020-08-06 13:53:08 +03:00
Evgenii Stratonikov
5b78bb2e55 docs: describe pointer support in compiler.md 2020-08-06 13:43:40 +03:00
Roman Khimov
4bbe863904
Merge pull request #1266 from nspcc-dev/notifications/filter_by_name
rpc: filter subscriptions' notifications by name
2020-08-05 10:00:15 +03:00
Anna Shaleva
90825efa16 core: move transaction's sender to cosigners
Closes #1184

Ported changes from https://github.com/neo-project/neo/pull/1752
2020-08-04 17:33:50 +03:00
Anna Shaleva
4ff3a9e9a7 rpc: filter subscriptions' notifications by name
Closes #1263
2020-08-04 16:29:13 +03:00
Evgenii Stratonikov
b53f0257f5 stackitem: change ByteArray type to ByteString
Adjust only string representation.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-31 16:07:16 +03:00
Anna Shaleva
538616e9f8 rpc: adjust getrawtransaction RPC-call JSON fields names
Part of #1130
2020-07-15 14:44:13 +03:00
Anna Shaleva
e81ccb7deb rpc: adjust getblock RPC-call JSON fields names
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
51576f236d rpc: adjust getapplicationlog RPC-call JSON fields names
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
b387deaa05 vm: switch from .avm to .nef 2020-06-29 09:15:29 +03:00
Anna Shaleva
c7746da023 cli, compiler: switch from .avm to .nef
We don't generate clear .avm instructions anymore. Instead, use .nef
files with additional metadata.
2020-06-29 09:15:29 +03:00
Evgenii Stratonikov
65cb6dd0ad cli: change name for wallet path flag
`-p` is used for `--privnet`, `-w` is for wallet.
Fix CLI error:
balance flag redefined: p
panic: balance flag redefined: p
2020-06-25 17:21:18 +03:00
Roman Khimov
d81d826bfc core: fix Storage.Get to return Null when there is no value
Match C# implementation and fix state inconsistency at block 249920 of
preview2 testnet. Make our Go Storage.Get return nil and adapt
examples/tests.
2020-06-24 10:43:58 +03:00
Roman Khimov
16ce63e653 cli: unify RPC endpoint flags under options package
This makes rpc flags consistent across all commands, previously some commands
used 'endpoint, e' and some 'rpc, r', some had ability to change timeout and
some hadn't. Now 'rpc-endpoint, r' is used everywhere along with 'timeout, t'.
2020-06-18 12:10:59 +03:00
Evgenii Stratonikov
651976b2ca config: remove AddressVersion from the configuration
It is never used and is the same constant for both mainnet, testnet and
privnet.
2020-06-17 15:55:22 +03:00
Roman Khimov
0a09a20900 transaction: drop Register transaction type
And everything associated like SystemFee configuration.
2020-06-05 19:20:16 +03:00
Roman Khimov
169c5ae775 transaction: drop Issue TX support 2020-06-05 19:20:16 +03:00
Roman Khimov
c6ae954e4e rpc: drop getaccountstate method
It's not relevant for Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
657bb7575e rpc: change getunclaimed to getunclaimedgas
getunclaimed doesn't exist on Neo 3 and getunclaimedgas works for NEP5 GAS.
2020-06-05 19:20:16 +03:00
Roman Khimov
d856df36a7 rpc: drop support for gettxout method
Neo 3 doesn't need it.
2020-06-05 19:20:16 +03:00
Roman Khimov
232e1a2598 rpc: drop support for getassetstate
It's for UTXO assets and it's absent in Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
63eb6069b2 rpc: drop support for getunspents method
Irrelevant for Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
670396b908 rpc: drop getclaimable RPC call support
It's not present in NEO 3 and it's not needed there.
2020-06-05 19:20:16 +03:00
Roman Khimov
f8093e415e docs: update compiler.md, bring it up to date
And add one more reference to it into the main README.
2020-05-27 12:01:50 +03:00
Roman Khimov
ab264deffe docs: drop runtime.md
We have now way better godoc for interop functions, so this document makes
little sense and it's not referenced anywhere, so it's safe to drop it.
2020-05-27 12:01:50 +03:00
Roman Khimov
e32d0e01af compiler|transaction: remove transaction.GetUnspentCoins support
It's useless. Even though there is Neo.Transaction.GetUnspentCoins syscall
that can be used, its return type is an interop structure that's not accepted
by any other syscall, so you can't really do anything with it. And there is no
such interface for the .net Framework.
2020-05-27 12:01:50 +03:00
Roman Khimov
b29db96cdb docs: update RPC document, add notifications spec 2020-05-26 11:36:47 +03:00
Roman Khimov
4912e4f425 *: drop Publish transaction type
It shouldn't be used even in NEO 2 as it was substituted by contract
deployment interop functions.
2020-04-16 14:40:20 +03:00