Roman Khimov
d314f82db3
transaction: drop Network from Transaction
...
We only need it when signing/verifying.
2021-03-26 13:45:18 +03:00
Roman Khimov
b56e028733
*: add more package-specific documentation
...
For the most important packages at least.
2021-03-19 16:18:45 +03:00
Anna Shaleva
e5cdecfa9f
core: fix transaction hashes
2021-03-18 17:57:54 +03:00
Roman Khimov
4462a6a6b7
change block/tx/extensible signing process, fix #1741
...
Sign [magic, hash], see neo-project/neo#2314 .
2021-03-12 11:27:50 +03:00
Anna Shaleva
a6d4a266b9
core: check transaction's scripts length during decoding
2021-02-17 13:19:23 +03:00
Evgeniy Stratonikov
b0fbd897ad
Revert "rpc: marshal fees and GAS as Fixed8 decimal"
...
This reverts commit a79b12b4d4
.
2021-02-09 11:16:52 +03:00
Anna Shaleva
840104461b
config: update testnet netmode to preview5 magic
2021-02-05 18:57:54 +03:00
Roman Khimov
120ae4841f
transactions: fix JSON unmarshalling of fees
...
Fixed8 is already marshalled as a string and stripping quotes from it just
leads to interpreting it as a float with all regular float problems (like
test transaction failing with `txid doesn't match transaction hash`).
2021-01-22 18:22:09 +03:00
Anna Shaleva
e0d76d873e
core: add ProtocolNotSupported oracle response code
2020-12-18 13:01:45 +03:00
Evgenii Stratonikov
e4c3339c91
util: move Fixed8
to encoding/fixedn package
2020-12-09 11:18:18 +03:00
Evgenii Stratonikov
a79b12b4d4
rpc: marshal fees and GAS as Fixed8 decimal
2020-11-26 15:04:30 +03:00
Anna Shaleva
52cf328296
core: add NotaryAssisted transaction attribute
2020-11-25 18:37:29 +03:00
Anna Shaleva
31aa66a4a4
core: check the length of NotValidBefore attr while decoding
...
DecodeBinary throws panic otherwise.
2020-11-25 18:37:29 +03:00
Anna Shaleva
8548786444
core: do not rewrite binreader error for bad Conflicts attr
...
We should keep the original BinReader error untouched in case if
it is exists.
2020-11-25 18:37:24 +03:00
Evgenii Stratonikov
7d91a3a89e
pkg: move internal/ package to the root directory
...
This way we can use it in scripts and cli.
2020-11-24 16:39:56 +03:00
Roman Khimov
a1ce3d2db2
transaction: add new oracle response codes
...
Follow neo-project/neo#2037 .
2020-11-09 16:54:09 +03:00
Roman Khimov
b233158c9f
transaction: lower MaxValidUntilBlockIncrement
...
Follow neo-project/neo#2042 .
2020-11-06 13:41:46 +03:00
Roman Khimov
39a38dc5f5
transaction: raise max oracle response size
...
Follow neo-project/neo#1984 .
2020-11-06 13:41:46 +03:00
Anna Shaleva
ec63d5c456
core: add conflicts attribute
...
Close #1491
2020-10-29 10:57:31 +03:00
Anna Shaleva
f259a614de
core: add transaction.HasSigner method
2020-10-23 16:32:26 +03:00
Anna Shaleva
7947e99a1e
core: add transaction.GetAttributes
2020-10-23 11:05:03 +03:00
Anna Shaleva
a6579a05ac
core: refactor transaction.Attribute unmarshalling
2020-10-23 11:05:03 +03:00
Anna Shaleva
09b8b8de73
core: reserve attributes range for experimantal purposes
2020-10-23 11:04:59 +03:00
Anna Shaleva
368ff820b3
core: add NotValidBefore transaction attribute
...
Close #1490
2020-10-23 11:02:46 +03:00
Roman Khimov
705941a800
transaction: add script length limit
...
As it is implemented in C# code.
2020-10-07 18:23:10 +03:00
Roman Khimov
d029f5c0d8
transaction: fix witness script length limits
...
See neo-project/neo#1958 .
2020-10-07 18:05:23 +03:00
Evgenii Stratonikov
fa09b9af7b
transaction: rename FeeOnly to None
...
Follow missed change from neo-project/neo#1816 .
`None` may be used for any signer. Currently it is used
for sender to only pay fees, or to sign tx attributes.
2020-10-01 15:28:19 +03:00
Evgenii Stratonikov
1625689316
transaction: implement OracleResponse attribute
2020-09-16 14:50:31 +03:00
Evgenii Stratonikov
06b29e409c
transaction: remove Attribute.Data field
2020-09-16 13:39:53 +03:00
Roman Khimov
19c69618c5
transaction: cache tx size, don't serialize it over and over again
2020-09-11 18:55:19 +03:00
Roman Khimov
53c014a0bb
crypto/consensus: sign hashes and cache them for consensus payloads
...
Avoid serializing payload again and again for various purposes. To sign it, we
only need a hash.
Some 2.4% gain in TPS could be achieved with this.
2020-09-09 20:46:31 +03:00
Evgenii Stratonikov
7ee1ddff61
transaction: add tests for (*Transaction).isValid()
2020-08-23 09:39:46 +03:00
Evgenii Stratonikov
2661ebd295
transaction: add HighPriority attribute
...
HighPriority attributes specifies that transaction was
signed by a committee.
2020-08-23 09:39:46 +03:00
Evgenii Stratonikov
04bff62d65
transaction: update binary test data
2020-08-18 15:09:30 +03:00
Roman Khimov
ec2a2f3fb9
transaction: fix ineffassign GoReportCard issue
...
s is not used purposefuly.
2020-08-14 12:08:16 +03:00
Roman Khimov
acc2265169
transaction: attribute type is now type, not usage
2020-08-11 21:10:50 +03:00
Roman Khimov
fb70c82157
transaction: there are no valid attributes defined for preview3
2020-08-11 21:10:12 +03:00
Anna Shaleva
ba08a9b6ad
core: move all transaction.Decode checks to separate method
...
We should perform the same checks during UnmarshalJSON.
2020-08-04 17:34:06 +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
8697582b23
core: add FeeOnly witness scope
2020-08-04 15:08:59 +03:00
Anna Shaleva
75f1c2d6f2
core: add scopes check to cosigners in DecodeBinary
2020-08-04 15:08:59 +03:00
Roman Khimov
f46ed798f0
Merge pull request #1169 from nspcc-dev/neo3/rpc/fields_names_adjustment
...
rpc: adjust RPC calls JSON fields
2020-07-15 18:24:54 +03:00
Anna Shaleva
538616e9f8
rpc: adjust getrawtransaction
RPC-call JSON fields names
...
Part of #1130
2020-07-15 14:44:13 +03:00
Roman Khimov
fedcc6b6fc
transaction: drop old attributes
...
They're not supported in Neo 3. Also change data encoding to base64 following
Neo 3 changes.
2020-07-10 20:40:27 +03:00
Evgenii Stratonikov
5787d7775f
transaction: fail creating tx if there is additional data present
2020-07-03 18:03:57 +03:00
Evgenii Stratonikov
27b3054df4
transaction: set feePerByte on tx construction
2020-07-03 17:52:13 +03:00
Evgenii Stratonikov
3097dc60e5
transaction: cache feePerByte
2020-07-03 17:37:01 +03:00
Anna Shaleva
73b630db9b
*: switch from fixed8 to int64
...
Follow C# implementation, we have to marshall JSON Fixed8 fields without
taking into account decimals.
2020-06-29 21:39:27 +03:00
Roman Khimov
5251607fb7
transaction: s/txid/hash/ for JSON to match C# implementation
...
It uses `hash` for transactions now, but `txid` for application logs.
2020-06-24 10:43:58 +03:00
Roman Khimov
b483c38593
block/transaction: add network magic into the hash
...
We make it explicit in the appropriate Block/Transaction structures, not via a
singleton as C# node does. I think this approach has a bit more potential and
allows better packages reuse for different purposes.
2020-06-18 12:39:50 +03:00