Conversation
* Change view reason * Move order for compatibility * Moved to other file * Change order * Change agreement
| } | ||
|
|
||
| public int Size => InvocationScript.GetVarSize() + VerificationScript.GetVarSize(); | ||
| public bool HasScopedHash => Scope == WitnessScope.CustomScriptHash || Scope == WitnessScope.ExecutingGroupPubKey; |
There was a problem hiding this comment.
This is very well done Shargon, congratulations. We just need to filter this pubkey here, as it has another size other than Hash160.... I'm not against groupHash concept Hash160(pubkey) or Hash160(21+pubkey+ac concept...), and group becomes a witness 😂 or just keep pubkey, and count bytes correctly ;)
| { | ||
| if (CommitPayloads[i]?.ConsensusMessage.ViewNumber != ViewNumber) continue; | ||
| sc.AddSignature(contract, Validators[i], CommitPayloads[i].GetDeserializedMessage<Commit>().Signature); | ||
| sc.AddSignature(contract, Validators[i], CommitPayloads[i].GetDeserializedMessage<Commit>().Signature, WitnessScope.Global, UInt160.Zero); |
There was a problem hiding this comment.
Should we keep Global as default param? Same for filter zero?
| ((IVerifiable)this).DeserializeUnsigned(reader); | ||
| if (reader.ReadByte() != 1) throw new FormatException(); | ||
| Witness = reader.ReadSerializable<Witness>(); | ||
| if (Witness.Scope != WitnessScope.Global) throw new FormatException(); |
There was a problem hiding this comment.
Very good move. Blocks/Consensus require global witness.
| /// <summary> | ||
| /// EntryScriptHash - no params (root-only witnesses) - can be default safe choice for native NEO/GAS (neo2 attach mode) | ||
| /// </summary> | ||
| InitScriptHash = 0x01, |
There was a problem hiding this comment.
This should ensure that EntryScriptHash == CallingScriptHash, during CheckWitness verification.
igormcoelho
left a comment
There was a problem hiding this comment.
In a very good direction, congratulation Shargon!
* Remove minner tx hole * Fix equals
This reverts commit 5b321fb.
* Seconds to milliseconds * Sending unsaved files * fixing formula of consensus bonification * Refactoring milliseconds * Refactoring milliseconds from capeslock * Refactoring milliseconds from capeslock II * Adjusting UT * Adjusting UT II * Super fast protocol to 2s * Fixing timestamps to long and tests * Minor adjusts * Change view deserialization fix * Timestamp to ulong * Update neo/Helper.cs Co-Authored-By: Shargon <shargon@gmail.com> * Update JNumber.cs * Optimize and remove TODO * Update ApplicationEngine.cs * Fixing ExtendTimerByFactor This was already from milliseconds, thus, just removing the multiplier
* allow CheckWitness to work when using invokescript * Fix * Update RpcServer.cs * Allow more than one signature * Reorder properties
Making memory pool capacity configurable
) * testDemo * add dll lib * add dbsnapshot dispose * test get blocks in levelDBStore * add levelDBStore test funcs * fix levelDBStore funcs * add DbCache addInternal * differ db path * space * fix delete internal test * add test getInternal tryGetInternal move libleveldb.dll * add dbCache method test * add store test * add cache unit tests * add cache unit tests * up readonly max_capacity * fix leveldbexception * fix comment on UT_Cache * format * fix multithread test problem * up cache * update travis config * update travis.yml * test DbMetaDataCache * fix db directory * format and update travis for maxos * fix mac env travis * 2019/7/12 10:34 * 2019/7/12 11:01 * remove commented line * test BigDecimal * fix format and csproj * rm coverage.opencover.xml * update method name * add UT_P_Helper * modify UT_P_Helper * modify UT_P_helper * Clean ut * test Base58 & BloomFilter * Update UT_Cache.cs * Correct Typo * test JsonArray * update namespace * update namespace * update format * update format * organise folder structure * add UT_JString * test JBoolean JNumber & JObject * 2019/7/16 10:30 add some test case for UInt32Wrapper and SerializableWrapper * fix timestamp * test ECDsa and Crypto * test OrderedDictionary & complete IO.Json tests * 2019/7/16 17:33 add some test case of SQLiteWallet * test FIFOSet * add CloneCache and DataCache unit tests * fix namespace * add UT_Cryptography_Helper * format UT_CloneCache and UT_DataCache * add UT_DataCache.GetAndChange unit test * update namespace * remove comment code * delete Persistence part * 2019/7/19 11:07 add some test case for Helper in VM * Fix Base58 Test * 2019/7/19 11:33 change some format * update IOHelper exception assert * 2019/7/19 14:22 change format * format IOHelper * review IO.Wrapper * review Wallets.SQLite UT * Test ECFieldElement ECPoint * refactor package * format ECDsa * update namespace * Code fix * review cache * modify UT_JString * fomat * using Actin replace with try-catch * add UT_CloneMetaCache and UT_MetaDataCache * update namespace * format UT_DataCache.cs * Code Fix * format * update csproj * Code fix for UT_ECFieldElement and UT_ECPoint * Code fix * format * update travis * delete deleteFiles * fix path and comment * update travis * delete test ToTimeStamp * format UT_*Cache * update format * fomat * use hex extensions in Cryptography_Helper * remove reflection * optimization of UT_DataCache * update namespace * modify TestSha256
* Script header * Script header draft * Clean files * Typo * Rename class and magic header * Clean hash * UT * Erik's suggestions * Change name * Typo * Check magic * 64 to 32 * Nef file only for neo-cli * Real Checksum * Clean * Clean again * Remove code * Update neo/SmartContract/NefFile.cs Co-Authored-By: Igor Machado Coelho <igor.machado@gmail.com> * Enum to const * Remove unnecessary change * Apply Erik's suggestions
* testDemo * add dll lib * add dbsnapshot dispose * test get blocks in levelDBStore * add levelDBStore test funcs * fix levelDBStore funcs * add DbCache addInternal * differ db path * space * fix delete internal test * add test getInternal tryGetInternal move libleveldb.dll * add dbCache method test * add store test * add cache unit tests * add cache unit tests * up readonly max_capacity * fix leveldbexception * fix comment on UT_Cache * format * fix multithread test problem * up cache * update travis config * update travis.yml * test DbMetaDataCache * fix db directory * format and update travis for maxos * fix mac env travis * 2019/7/12 10:34 * 2019/7/12 11:01 * remove commented line * test BigDecimal * fix format and csproj * rm coverage.opencover.xml * update method name * add UT_P_Helper * modify UT_P_Helper * modify UT_P_helper * Clean ut * test Base58 & BloomFilter * Update UT_Cache.cs * Correct Typo * test JsonArray * update namespace * update namespace * update format * update format * organise folder structure * add UT_JString * test JBoolean JNumber & JObject * 2019/7/16 10:30 add some test case for UInt32Wrapper and SerializableWrapper * fix timestamp * test ECDsa and Crypto * test OrderedDictionary & complete IO.Json tests * 2019/7/16 17:33 add some test case of SQLiteWallet * test FIFOSet * add CloneCache and DataCache unit tests * fix namespace * add UT_Cryptography_Helper * format UT_CloneCache and UT_DataCache * add UT_DataCache.GetAndChange unit test * update namespace * remove comment code * delete Persistence part * 2019/7/19 11:07 add some test case for Helper in VM * Fix Base58 Test * 2019/7/19 11:33 change some format * update IOHelper exception assert * 2019/7/19 14:22 change format * format IOHelper * review IO.Wrapper * review Wallets.SQLite UT * Test ECFieldElement ECPoint * refactor package * format ECDsa * update namespace * Code fix * review cache * modify UT_JString * fomat * using Actin replace with try-catch * add UT_CloneMetaCache and UT_MetaDataCache * update namespace * format UT_DataCache.cs * Code Fix * format * update csproj * Code fix for UT_ECFieldElement and UT_ECPoint * Code fix * format * update travis * delete deleteFiles * fix path and comment * update travis * delete test ToTimeStamp * format UT_*Cache * update format * fomat * use hex extensions in Cryptography_Helper * remove reflection * optimization of UT_DataCache * update namespace * modify TestSha256 * update UT in crypto module * Rename UT_Scrypt.cs to UT_SCrypt.cs * format * update UT_Murmur3
|
@shargon I may need to change quite a few things here, is that ok? |
* Add NEO SDK based on RPC client * add rpc interface methods for neo3 * update unit test * add unit test * Update TransactionHelper.cs Changed for neo 3.0, not final yet. * implement sdk rpc client methods * backup files * change class name * remove uncompleted modules for pull request * change json deserialize method with Neo JObject * modified JSON implementation, added FromJson() * more RPC change * PR correction * RPC module fix, remove newton.json * fix * fix getblock issue * PR correction * PR Correction * PR Correction: rename RPC models * PR Correction * resolve conflicts * Clean code * Clean code * Clean code * Clean code * Update RpcValidateAddressResult.cs * Clean code * PR correction * Move test file to the right place
|
Maybe it is better to open a new one I think, Igor. |
|
@igormcoelho feel free to modify, i think that is better to improve this one, for finish it quicker |
|
I will close it, and create a new one cleaner |
|
Shargon, I'll try to start another one in a very different direction... this way we increase the odds of finishing this quickly. |
|
Is duplicate work |
Why? Don't you think we should try a different approach? As long as problem is solved, I don't see a problem with it. In fact, it could be a solution... |
|
@shargon I opened another PR, but please cleanup and re-open yours. This way, we can have complementary views that may solve the problem. Or if you prefer, re-open yours and take parts of mine that help solving the issue (if any). It's time to have this solved, a very critical feature. |
Close #544
I have a problem with makeTransaction, because i need the witness ...