Evgeniy Stratonikov
3a4e0caeb8
core/block: add Nonce
field to header
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-15 15:58:49 +03:00
Anna Shaleva
6d59689d9c
core: rename Neo.Crypto.CheckMultisig interop
2021-05-11 18:38:14 +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
9015e50847
core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1
...
Rename it to Neo.Crypto.CheckMultisig and remove `message` parameter.
2021-03-10 21:46:05 +03:00
Evgeniy Stratonikov
2f490a3403
block: remove ConsensusData
field
2021-03-10 13:38:44 +03:00
Roman Khimov
ad3547783d
native: drop Neo.Native.Deploy, move contract init to management contract
...
The contract is almost a stub at the moment, though it does deploy other
contracts.
2020-12-14 13:33:41 +03:00
Anna Shaleva
ead6bdb25e
core: remove unnecessary comment
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
5326fc587a
core: rename Neo.Crypto.CheckMultisig to Neo.Crypto.CheckMultisigWithECDsaSecp256r1
...
Part of #918
2020-07-14 16:19:12 +03:00
Roman Khimov
e5f05790d5
core: cache standby validators in the Blockchain
...
They never change, so it makes no sense parsing the keys over and over
again. It also simplifies the interface a little.
2020-06-24 10:22:17 +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
Roman Khimov
8fda6a3407
block: fix ConsensusData hashing
...
It's DoubleSha256 as with the rest of the structures.
2020-06-18 12:22:49 +03:00
Roman Khimov
26f11a52d9
config: move NetMode into its own micropackage
...
It's going to be used a bit more and pulling whole config just for one type is
a bit wrong.
2020-06-18 12:09:57 +03:00
Evgenii Stratonikov
7b4ca57e33
*: change address to the new format
...
NEO3 uses new prefix for address (53 = 0x35), thus string representations as
well as encrypted WIFs should be changed.
2020-06-17 15:58:21 +03:00
Roman Khimov
709146f295
transaction: drop Inputs and Outputs, forget UTXO
2020-06-05 19:20:16 +03:00
Roman Khimov
21efccd300
transaction: remove type field, set Version to 0
...
Two changes being done here, because they require a lot of updates to
tests. Now we're back into version 0 and we only have one type of
transaction.
It also removes GetType and GetScript interops, both are obsolete in Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
f63b286c35
core: update genesis block to store timestamp in ms
2020-06-05 19:20:16 +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
9f5fd21160
core: drop UXTO NEO and GAS transactions from the genesis block
...
They're no longer required. Adjust test chain for that, now it only has
invocations, transfers NEO/GAS and pays the fees with NEP5 GAS.
2020-06-05 19:20:16 +03:00
Roman Khimov
d9400800e3
transaction: drop Gas field from InvocationTX
...
It essentialy is the new SystemFee, so use that. Had to increase GAS transfer
in test chain to 1000 to pay for deployment.
2020-06-05 19:20:16 +03:00
Anna Shaleva
7acf5b2841
core: add SystemFee and NetworkFee to transaction
...
closes #831
2020-05-20 23:26:48 +03:00
Evgenii Stratonikov
f9f3192b48
vm: move RET and SYSCALL opcodes
2020-05-07 13:23:05 +03:00
Anna Shaleva
73167999cc
core: add cosigners field to transaction
...
closes #864
2020-05-04 11:53:31 +03:00
Anna Shaleva
29d321b5e1
*: drop miner transaction
...
1. Completely remove miner transaction
2. Change validation rule for block: block without transactions is
valid.
2020-04-27 17:57:37 +03:00
Anna Shaleva
55fd9f8d24
core: change block.ConsensusData to neo3 format
...
1. Dropped `Base.ConsensusData` block field
2. Added `Block.ConsensusData` field with `Nonce` and `PrimaryIndex`
3. Removed "Neo.Header.GetConsensusData" and
"AntShares.Header.GetConsensusData" interops
2020-04-27 17:57:37 +03:00
Anna Shaleva
aa554f0a9a
core: update block timestamp format
...
Changed block.Timestamp from uint32 to uint64
2020-04-27 17:56:44 +03:00
Anna Shaleva
869c7d6afa
core: init native interops in the genesis block
...
closes #836
2020-04-27 12:30:39 +03:00
Evgenii Stratonikov
008e6eb233
vm: implement new PUSH opcodes
2020-04-23 10:52:28 +03:00
Anna Shaleva
2b5c14160c
core: add sender field to transaction
...
closes #860
2020-04-20 17:21:28 +03:00
Evgenii Stratonikov
941410a840
core: change verification scripts to new format
...
Verification scripts now invoke Neo.Crypto.* interops instead of
CHECKSIG/VERIFY opcodes.
2020-04-20 11:55:24 +03:00
Anna Shaleva
5fa11987d2
core: add validUntilBlock field to transaction
...
1. closes #841
2. Commented out test cases where binary transaction are used.
These test cases marked with `TODO NEO3.0: Update binary` and need to be
updated.
3. Updated other tests.
4. Added cache to calculateValidUntilBlock() RPC-client method.
2020-04-15 13:46:43 +03:00
Anna Shaleva
65503aa9b4
core: add nonce field to transaction
...
1. Closes #840 : added Nonce field to transaction.Transaction and
removed Nonce field from transaction.MinerTx
2. Added following methods to different tx types:
- NewMinerTx()
- NewMinerTxWithNonce(...)
- NewEnrollmentTx(...)
- NewIssueTx()
- NewPublishTx(...)
- NewRegisterTx(...)
- NewStateTx(...)
in order to avoid code duplication when new transaction is created.
3. Commented out test cases where binary transaction/block are used.
These test cases marked with `TODO NEO3.0: Update binary` and need to be
updated.
4. Updated other tests
5. Added constant Nonce to GoveringTockenTx, UtilityTokenTx and genesis
block to avoid data variability. Also marked with TODO.
2020-04-14 16:19:41 +03:00
Anna Shaleva
5a984fdf88
config: move config.go out of config/
...
closes #423
2020-03-31 17:55:59 +03:00
Roman Khimov
e41d434a49
*: move all packages from CityOfZion to nspcc-dev
2020-03-03 17:21:42 +03:00
Evgenii Stratonikov
a3dacd3b74
tests: replace t.Fatal with require where possible
...
This makes tests less verbose and unifies the style
they are written in.
2020-03-02 17:22:27 +03:00
Roman Khimov
a4294f4b5f
core: export UtilityTokenID and GoverningTokenID
...
Both are very useful outside of the core, this change also makes respective
transactions initialize with the package as they don't depend on any kind of
input and it makes no sense recreating them again and again on every use.
2020-02-19 12:13:27 +03:00
Roman Khimov
b246653f62
address: rename functions as per #579 comments
...
Make them more clear to understand.
2019-12-25 17:34:18 +03:00
Roman Khimov
e685e9bf9a
address: move into its own package
...
Doesn't really belong to the crypto.
2019-12-25 15:22:02 +03:00
Evgenii Stratonikov
7179e4ba9f
util: add LE suffix to Uint256 methods
2019-12-06 12:16:55 +03:00
Roman Khimov
d5d570f793
uint256: add Reverse(), change String() to be BE
...
This one makes a little more obvious that we're operating with LE
representations mostly. Refs. #307 . See #314 also.
2019-08-26 13:32:19 +03:00
Anthony De Meulemeester
94672cb9cc
Persistance ( #53 )
...
* added publish TX for backwards compat.
* lowered the prototick for faster block syncing
* print useragent on startup
* added createMultiRedeemScript for genesis block generation.
* building genesis block from scratch.
* implemented merkle tree.
* starting blockhain with generated genesis hash
* Fixed bug in unspent coin state.
* fixed broken tests after genesis block.
* removed log line.
* bumped version -> 0.34.0
2018-03-25 12:45:54 +02:00