Skip to content

Develop #1331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 171 commits into
base: master
Choose a base branch
from
Open

Develop #1331

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
1c38063
Delta height peer query (#1019)
nshCore Nov 16, 2019
717aa0a
Update nuget-pre-release-azure-pipelines.yml for Azure Pipelines
nshCore Nov 16, 2019
9e5ed59
Update pr-test-suite-azure-pipelines.yml for Azure Pipelines (#1100)
nshCore Nov 16, 2019
4d80e48
Delta index query and p2p protocols refactor
nshCore Nov 17, 2019
4183375
Add attribute to daobase to map to documentdb id (#1099)
Nov 17, 2019
5436b61
Update error codes and descriptions. (#1105)
franssl Nov 19, 2019
d51848c
Merge contract entries into public entries (#1106)
Nov 21, 2019
d9b16e4
754 unit test config value parser (#1109)
franssl Nov 21, 2019
ac0add5
Remove repository wrapper (#1108)
Nov 22, 2019
310c0e8
consensus and crypto perf optimizations (#1111)
Scooletz Nov 28, 2019
01723eb
docs: add Scooletz as a contributor (#1112)
allcontributors[bot] Nov 28, 2019
4013bd6
Better substitutes for spanified interfaces (#1118)
Scooletz Dec 2, 2019
3bbd3b5
Use PublicEntry as mempool item instead of TransactionBroadcast (#1110)
Dec 2, 2019
b37f614
merge-master
nshCore Dec 2, 2019
b5e9b67
update protocol
nshCore Dec 2, 2019
084bade
Fix consensus poa test (#1122)
Dec 4, 2019
9afab8f
Rename public key entries in public transactions to address (#1127)
Dec 6, 2019
a59e9c0
Send exists response to client if transaction exists in mempool (#1126)
Dec 6, 2019
7306031
Fix codacy warnings (#1128)
Dec 6, 2019
f972482
Add unit tests for json converters and turn CidHelper into Dfs Extens…
Dec 6, 2019
37cc76b
rebased on top of develop and squashed
Scooletz Dec 10, 2019
d05d702
Leading space in licenses
Scooletz Dec 10, 2019
9e63da8
Substitute registered in PoaTestNode
Scooletz Dec 10, 2019
0a8fea5
Derep peers that vote out of delta producers (#1132)
Dec 11, 2019
c8c385e
StateRoot added to DeltaProto; DeltaExecutor properly configured
Scooletz Dec 11, 2019
56e9d62
LedgerModule no longer registerd EF repository explicitly, leaving th…
Scooletz Dec 12, 2019
2fc3083
StateRootResolver removed as Delta has the root now; all web3Api is d…
Scooletz Dec 12, 2019
9cf48ca
Initial getStorageAt
Scooletz Dec 12, 2019
4e18646
getTransactionCount
Scooletz Dec 12, 2019
25234f4
Cleaning
Scooletz Dec 12, 2019
005ff2c
Receipts
Scooletz Dec 16, 2019
517384d
Minor tests related
Scooletz Dec 16, 2019
644df46
Ledger delta executions
Scooletz Dec 16, 2019
4983cde
Fixing crypto issues with test data generator
Scooletz Dec 16, 2019
bf6e0a7
initial transactions
Scooletz Dec 17, 2019
2e48c79
Delta executor used
Scooletz Dec 19, 2019
e60cd4d
Web3 API module now is registered with a container reuse, enabling sh…
Scooletz Dec 19, 2019
98b3c36
Module work
Scooletz Jan 3, 2020
d200b68
Components made independent from registration and KeyFilter, WithExec…
Scooletz Jan 4, 2020
43c9e3a
Missing registration in KVM added
Scooletz Jan 7, 2020
681fc41
JSON Rpc amended to handle ids properly
Scooletz Jan 7, 2020
f3fa3f0
returning to ArrayPool moved to finally
Scooletz Jan 7, 2020
0fc5a27
DocumentId in receipt calculated in Ledger
Scooletz Jan 7, 2020
e8423b9
TruffleTest added
Scooletz Jan 7, 2020
faa9e0d
builds from Truffle no longer tracked
Scooletz Jan 7, 2020
2caa17f
PublicEntries build from transaction call WIP
Scooletz Jan 7, 2020
45f38b6
DeltaWithCid added to ease resolutions of delta with cids with extrac…
Scooletz Jan 7, 2020
baffde9
Remove redundant repository classes (#1136)
Jan 7, 2020
107a2b2
SendTransaction amended
Scooletz Jan 8, 2020
844c79a
moving forward with Web3
Scooletz Jan 8, 2020
dd4fb41
eth_getTransactionCount now returns 0 for nonexistent accounts
Scooletz Jan 9, 2020
af71354
Converters added for RPCs
Scooletz Jan 9, 2020
b6a8889
Genesis delta block augmented to include some value for a specific ac…
Scooletz Jan 9, 2020
0f7ec3a
KeccakConverter registered; GetStorageHandler now handles nonexistent…
Scooletz Jan 9, 2020
41016d3
Hacks to make it work
Scooletz Jan 9, 2020
189bbc6
TimeStamp type is mapped automatically
Scooletz Jan 13, 2020
c3fdbfc
DeltaHashProvider disinguishes different cases for deltas not being u…
Scooletz Jan 13, 2020
e0a1d4c
DeltaHashProvider logs enhanced + Ledger applies deltas
Scooletz Jan 13, 2020
e1efc29
local changes for debugging
Scooletz Jan 13, 2020
b6ee781
WIP more handlers
Scooletz Jan 14, 2020
cbbc286
WIP handlers separated
Scooletz Jan 14, 2020
8dc02d9
TransactionsReceipts now can be found from the delta itself
Scooletz Jan 14, 2020
f5ad1d0
Delta has its number embedded, Cids used for RPC, a few more calls im…
Scooletz Jan 14, 2020
486fd00
getTransactionByHash
Scooletz Jan 14, 2020
fc6a7cf
CidJsonConvert introduced to map Rpc models with requirements of eth …
Scooletz Jan 15, 2020
f70b524
Hashing PublicEntry changed to explicitly opt-in needed properties
Scooletz Jan 16, 2020
364d13c
TransactionFees removed from PublicEntry
Scooletz Jan 16, 2020
08d5c17
local changes for debugging
Scooletz Jan 13, 2020
bcf620d
Program amended with consts
Scooletz Jan 14, 2020
1880cbd
Merge branch 'poa-with-local-changes' of https://github.com/catalyst-…
tkstanczak Jan 17, 2020
6ac4f1a
scripts for testing cat vs neth
tkstanczak Jan 17, 2020
a2210b5
scripts for testing cat vs neth
tkstanczak Jan 17, 2020
e934a2f
local changes for debugging
Scooletz Jan 13, 2020
e940cc8
Program amended with consts
Scooletz Jan 14, 2020
5ec123e
empty to address is properly handled now
Scooletz Jan 17, 2020
5556800
Merge branch 'poa-with-local-changes' of https://github.com/catalyst-…
tkstanczak Jan 17, 2020
41e4b7d
sample of truffle and nethermind conversation for the EIP20 deployment
tkstanczak Jan 17, 2020
669bb2b
Merge branch 'poatruffleson' into poa-with-local-changes
tkstanczak Jan 18, 2020
f8ac482
some fixes
tkstanczak Jan 18, 2020
76dabdd
fixed things around receipts and get code
tkstanczak Jan 18, 2020
02337c9
debug messages
tkstanczak Jan 18, 2020
fcbaa26
keep searching
tkstanczak Jan 18, 2020
03f6ac6
Added logging filters and removed some diag logging
tkstanczak Jan 19, 2020
541bfa5
state root to keccak, some web3 by hash fixes
tkstanczak Jan 19, 2020
2ad6c81
working deployment
tkstanczak Jan 20, 2020
904ce0c
Refactor and fix build warnings (#1137)
Jan 27, 2020
56dbeaa
Update instructions and links in README (#1158)
franssl Jan 30, 2020
3733060
Create delta index service (#1160)
Feb 6, 2020
94a307d
Update ApiModule to prevent blocking sigint (#1163)
Feb 7, 2020
592926f
Implement delta height request observer (#1162)
Feb 7, 2020
83f1e5d
Implement delta history request observer (#1161)
Feb 7, 2020
73c2894
Catalyst DFS (#1138)
Feb 7, 2020
e8c06ff
protocol buffers pointing at latest develop
tkstanczak Feb 10, 2020
e374e72
Merge branch 'develop' into poa-with-local-changes
tkstanczak Feb 10, 2020
cacd8ef
fix some namespaces after merge? guessing
tkstanczak Feb 10, 2020
8e9710e
trying to make it build with chnges in delta hash
tkstanczak Feb 10, 2020
162449d
some random changes in hope for a build
tkstanczak Feb 10, 2020
d692a0a
clean BlockForRpc
tkstanczak Feb 10, 2020
fbc172c
moved class to a separate file
tkstanczak Feb 10, 2020
072b08c
line length split
tkstanczak Feb 10, 2020
955add6
removed unused class
tkstanczak Feb 10, 2020
dd4a470
comment out hrdcoded password
tkstanczak Feb 10, 2020
f617ff0
removing some compiler warnings
tkstanczak Feb 10, 2020
43742f0
some test fixe
tkstanczak Feb 11, 2020
2f6666b
removed various warnings
tkstanczak Feb 11, 2020
1d2a04f
ordering fix
tkstanczak Feb 11, 2020
6e631d0
fixed ledger tests
tkstanczak Feb 11, 2020
32e752c
test fix
tkstanczak Feb 11, 2020
71f7ef4
ledget tests / state root
tkstanczak Feb 11, 2020
653ac10
all tests passing
tkstanczak Feb 11, 2020
d1985b4
readding shared container
tkstanczak Feb 11, 2020
07164eb
deserialization fix
tkstanczak Feb 11, 2020
d05421b
comversion / block params / addresses
tkstanczak Feb 11, 2020
7da6c13
Add web3 truffle support (#1167)
tkstanczak Feb 18, 2020
474c376
old style with ECDSA
tkstanczak Feb 22, 2020
24528ce
additional account
tkstanczak Feb 22, 2020
75ff2c7
catalyst provider package
tkstanczak Feb 22, 2020
059263f
sig validation working fine
tkstanczak Feb 22, 2020
e27477a
batch requests handler
tkstanczak Feb 22, 2020
cd6e541
Merge branch 'develop' into add-catalyst-provider-support
tkstanczak Feb 22, 2020
88d2e72
test fix
tkstanczak Feb 22, 2020
2591df0
adds sig verifier and hashing precompiles to KVM
tkstanczak Feb 22, 2020
db23cff
build fix
tkstanczak Feb 22, 2020
4b1c59d
this deserves some tests
tkstanczak Mar 9, 2020
200c200
Merge remote-tracking branch 'origin/add-catalyst-provider-support' i…
Mar 12, 2020
f5d133d
fixed error results for Ed25519 and returned value is bool now (#1173)
tkstanczak Mar 12, 2020
a33076c
Test change to PR test trigger (#1194)
franssl Mar 23, 2020
ec72724
Batch verification (#1186)
franssl Mar 25, 2020
c143855
Fix pr test triggers (#1198)
franssl Mar 26, 2020
7027eca
Update native library to remove warning message when node starts (#1202)
franssl Mar 27, 2020
92bde85
Sync, + Eth Json RPC and other changes for TestNet (#1179)
Mar 31, 2020
2983a18
Document update (#1207)
kearneyjj1 Apr 6, 2020
bc35b5a
Check if delta/candidate/fav came from POA node in more places. (#1213)
Apr 14, 2020
6fcc76d
Update nethermind upstream unit tests (#1211)
Apr 14, 2020
1145ac7
Substitute peer repo for CandidateDeltaObserver and FavouriteDeltaObs…
Apr 16, 2020
36f16df
Update file system api tests to use nunit setup instead of constructo…
Apr 17, 2020
6af496c
Fix sync issue with DeltaHashProvider (#1221)
Apr 17, 2020
066c660
Fix mempool items not removed incorrect hash, remove timestamp from t…
Apr 17, 2020
8839d7d
Fix get balance bug on reset (#1224)
Apr 21, 2020
41b419d
Bump PeterO.Cbor from 3.1.0 to 4.0.0 in /src/Catalyst.Core.Modules.Df…
dependabot[bot] Apr 21, 2020
6f59283
updating neth reference (#1228)
tkstanczak Apr 30, 2020
b32d8d6
Fixed disposal of containers creating rocksdb (#1233)
tkstanczak Apr 30, 2020
ac94c7f
Fix test suite (#1231)
franssl May 1, 2020
8cc0c54
Fix test filtering (#1235)
franssl May 1, 2020
1102c4a
Use Dfs Keystore instead of Catalyst Keystore (#1229)
May 5, 2020
50cb466
Skip tests which fail intermittently (#1243)
franssl May 12, 2020
a704c13
Revert to previous rustup toolchain (#1255)
franssl May 20, 2020
2bcd9a1
1205 port forwarding (#1246)
franssl May 20, 2020
db61ef2
Remove rust cryptography submodule (#1275)
franssl Jun 8, 2020
fe7bfdd
Use libp2p in catalyst (#1245)
Jun 16, 2020
b328fb1
Add ssl cert to web3 module (#1283)
Jun 17, 2020
e3cf70d
Fix consensus cycle time + cycle sync (#1290)
Jul 3, 2020
a291a51
Integrate benchmarking repository into Catalyst (#1294)
jakubbober Jul 16, 2020
3349837
Create CatalystTestPlan.md (#1300)
Jul 17, 2020
7b02960
Cycle event provider unit tests (#1298)
Jul 17, 2020
ef1956d
Add password repeater functionality (#1302)
Jul 21, 2020
290a2ae
Modularization of network layer (#1297)
Jul 22, 2020
fe11e66
Fix refs in dotnetty proj (#1305)
Jul 22, 2020
8a70c4a
RPC call returns tx objects/hashes in block (#1303)
franssl Jul 22, 2020
c47d2a4
Only rpc calls broadcast on transaction received event (#1308)
Aug 3, 2020
5d9a97d
Remove transactions with less then minimum gas from mempool (#1309)
Aug 3, 2020
884f3c3
Deserialisation can handle bool in format true/false in addition to 0…
franssl Aug 4, 2020
70c996d
Networktype set via commandline (#1310)
franssl Aug 7, 2020
923d739
Use kvm address in producer selection (#1314)
Aug 13, 2020
9bfe6a1
Use multi validator set (#1319)
Sep 1, 2020
b5f9083
Add validator set smart contract, contract abi proxy classes and fix …
Sep 1, 2020
358d760
Update package.json to point at updated dependency (#1323)
Sep 9, 2020
db5b25d
Add --uninstall option when running a Node (#1324)
jakubbober Sep 15, 2020
93ad286
Updated to .NET 6 and C# 10, applied some C# improvements (#1326)
TheNewAutonomy Jan 18, 2022
172269b
Corrected AutoFac and components still using .NET Core 3.1
TheNewAutonomy Jan 22, 2022
d5c9d2d
Updated Copyright notices (#1332)
TheNewAutonomy Jan 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
old style with ECDSA
  • Loading branch information
tkstanczak committed Feb 22, 2020
commit 474c376e3880a54ecacde709d4fc3a89edbf5db6
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*
*/

// const {HDWalletProvider} = require("@catalyst-net-js/truffle-provider");
const HDWalletProvider = require('truffle-hdwallet-provider');
// const infuraKey = "fj4jll3k.....";
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@
#endregion

using System;
using System.IO;
using Catalyst.Abstractions.Ledger;
using Catalyst.Core.Lib.Extensions;
using Catalyst.Protocol.Cryptography;
using Catalyst.Protocol.Transaction;
using Catalyst.Protocol.Wire;
using Google.Protobuf;
using Google.Protobuf.WellKnownTypes;
using Nethermind.Core;
using Nethermind.Core.Crypto;
using Nethermind.Core.Encoding;
using Nethermind.Core.Extensions;
using Nethermind.Core.Specs;
using Nethermind.Dirichlet.Numerics;
using Nethermind.Logging;

namespace Catalyst.Core.Modules.Web3.Controllers.Handlers
{
Expand All @@ -40,25 +44,54 @@ public class EthSendRawTransactionHandler : EthWeb3RequestHandler<byte[], Keccak
{
protected override Keccak Handle(byte[] transaction, IWeb3EthApi api)
{
Transaction tx = Rlp.Decode<Transaction>(transaction);
PublicEntry publicEntry;
try
{
Transaction tx = Rlp.Decode<Transaction>(transaction);
EthereumEcdsa ecdsa = new EthereumEcdsa(MainNetSpecProvider.Instance, LimboLogs.Instance);
tx.SenderAddress = ecdsa.RecoverAddress(tx, MainNetSpecProvider.IstanbulBlockNumber);
tx.Timestamp = (UInt256) DateTimeOffset.UtcNow.ToUnixTimeSeconds();
publicEntry = new PublicEntry
{
Data = (tx.Data ?? tx.Init).ToByteString(),
GasLimit = (ulong) tx.GasLimit,
GasPrice = tx.GasPrice.ToUint256ByteString(),
Nonce = (ulong) tx.Nonce,
SenderAddress = tx.SenderAddress.Bytes.ToByteString(),
ReceiverAddress = tx.To?.Bytes.ToByteString() ?? ByteString.Empty,
Amount = tx.Value.ToUint256ByteString(),
Timestamp = new Timestamp {Seconds = (long) tx.Timestamp},
Signature = new Protocol.Cryptography.Signature
{
RawBytes = ByteString.CopyFrom((byte) 1)
}
};
}
catch
{
try
{
TransactionBroadcast transactionBroadcast = TransactionBroadcast.Parser.ParseFrom(transaction);
publicEntry = transactionBroadcast.PublicEntry;
if (publicEntry.ReceiverAddress.Length == 1)
{
publicEntry.ReceiverAddress = ByteString.Empty;
}

tx.Timestamp = (UInt256) DateTimeOffset.UtcNow.ToUnixTimeSeconds();
if (publicEntry.SenderAddress.Length == 32)
{
byte[] kvmAddressBytes = Keccak.Compute(publicEntry.SenderAddress.ToByteArray()).Bytes.AsSpan(12).ToArray();
string hex = kvmAddressBytes.ToHexString() ?? throw new ArgumentNullException("kvmAddressBytes.ToHexString()");
publicEntry.SenderAddress = kvmAddressBytes.ToByteString();
}

PublicEntry publicEntry = new PublicEntry
{
Data = (tx.Data ?? tx.Init).ToByteString(),
GasLimit = (ulong) tx.GasLimit,
GasPrice = tx.GasPrice.ToUint256ByteString(),
Nonce = (ulong) tx.Nonce,
SenderAddress = new Address("0xb77aec9f59f9d6f39793289a09aea871932619ed").Bytes.ToByteString(),
ReceiverAddress = tx.To?.Bytes.ToByteString() ?? ByteString.Empty,
Amount = tx.Value.ToUint256ByteString(),
Timestamp = new Timestamp {Seconds = (long) tx.Timestamp},
Signature = new Protocol.Cryptography.Signature
publicEntry.Timestamp = Timestamp.FromDateTime(DateTime.UtcNow);
}
catch (Exception)
{
RawBytes = ByteString.CopyFrom((byte) 1)
throw new InvalidDataException($"Transaction data could not be deserialized into a {nameof(PublicEntry)}");
}
};
}

return api.SendTransaction(publicEntry);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Catalyst.Node.POA.CE/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ public static async Task<int> Main(string[] args)
private static async Task<int> RunAsync(Options options)
{
// uncomment to speed up node launching
// options.IpfsPassword = options.IpfsPassword ?? "ipfs";
// options.NodePassword = options.NodePassword ?? "node";
// options.SslCertPassword = options.SslCertPassword ?? "cert";
options.IpfsPassword ??= "ipfs";
options.NodePassword ??= "node";
options.SslCertPassword ??= "cert";

Kernel.Logger.Information("Catalyst.Node started with process id {0}",
Process.GetCurrentProcess().Id.ToString());
Expand Down
1 change: 1 addition & 0 deletions src/Catalyst.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Guard.Argument($EXPR$, $NAME$).NotNull()</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Crockford/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Datagram/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=deserialised/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ecdsa/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=EIPS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ethereum/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=EXTCODECOPY/@EntryIndexedValue">True</s:Boolean>
Expand Down