Hecate2
Hecate2
```csharp using Neo.SmartContract.Framework; using Neo.SmartContract.Framework.Attributes; using Neo.SmartContract.Framework.Services; using System.ComponentModel; namespace ContractTemplate { [DisplayName(nameof(TestContract))] [ContractPermission("*", "*")] public class TestContract : SmartContract { public static void Main() { Runtime.BurnGas(1000); for (int i...
And neo-go does pick a single byte https://github.com/nspcc-dev/neo-go/blob/3628b824e122b349a7411c657bb5ecda14340a48/pkg/vm/vm.go#L1255-L1264
> a solution to solve your problem: use `public static byte[] Reverse(this Array source);` > > see https://github.com/neo-project/neo-devpack-dotnet/blob/a77456b47636acfebe1fc78cad57f6ebfdc60109/src/Neo.SmartContract.Framework/Helper.cs#L209-L215 Many thanks! The following contract works: ```csharp public static ByteString abiencode(ByteString data,...
And, also because of BigInteger adding an additional byte 0x00, `(ByteString)BigInteger.Parse("63076024560530113402979550242307453568063438748328787417531900361828837441551")` exceeds the 32-byte limit, if written in contracts. The purpose is to inject a constant hash 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f
Zero integers are not related to the problem. The additional zeroes come from bytes of large values (probably those larger than 0x80?). If those large bytes are encoded with only...
> We better just do #3517 solving this and many other potential problems. I agree. Yet we can still do more to avoid GC. I have changed my strategy in...
In Neo.VM.Benchmark my time cost for NeoIssue2528 was reduced from 3.81s to 0.146s. The cause of https://github.com/neo-project/neo/issues/2528 is bullying `CheckZeroReferred` in GC. We can simply avoid GC with `
And here's another script that bullies the GC even with the fix in this PR. `VwEAwkpKAfoHdwARwG8AnXcAbwAl9////xHAzwJwlAAAdwDBwG8AnXcAbwAl9////0U=` PACK and UNPACK changes stack reference dramatically, but CheckZeroReferred is needed to determine whether...
> This require a hardfork I think it does not require a hardfork. It's just trying to skip Tarjan to save time.
> `VwEAwkpKAfoHdwARwG8AnXcAbwAl9////xHAzwJwlAAAdwDBwG8AnXcAbwAl9////0U=` By the way, replacing UNPACK PACK with NEWARRAY0 DROP does not make a DoS, because the new empty array is not added to tracked_item successfully in `AddStackReference`.