Conversation
* Initial InterFlux version * Refactor
* Modify DI sequence
* Initial InterFlux version * Update NBitcoin.csproj (stratisproject#391) * Pass along height information for OP_FEDERATION (stratisproject#379) * Pass along height information for OP_FEDERATION * Add defaults * Add defaults * Filter Transaction History by Transaction Id (stratisproject#393) * Update WalletService.cs * Add Filter * Fix Test * Perform check for cold staking txs * Refactor * Modify DI sequence * Add mainnet check points (stratisproject#400) * Add MainNet check points * Fix Tests * Change gas limit upper bound to 250,000 (stratisproject#399) * Add UInt256, serialization methods and CLR updates (stratisproject#365) * Add UInt256 serialization methods * Refactor * Use UInt256 in InternalExecutor * Undo unrelated change * Update TestMessage * Revert type updates to InternalExecutor * Update Serializer and PersistentState * Update package versions * Update SC packages to version 1.4.0-alpha * Add serializers and enums * Add primitive serializer * Update StandardToken.cs * Revert change * Update integration tests * Use switch/case in Serialize/Deserialize * Update package versions and remove workaround * Ensure the right Stratis.SmartContracts.Standards is used by contracts * Changes based on feedback * Fix primitive deserialize * Update standards dll name * Fix legacy standards dll path * Don't upgrade standards package of node * Don't upgrade StandardToken of node * Don't upgrade standards package of node * Add Standards forwards compatibility * Add test case for futuristic contracts * Fix Token_Standards_Test * Update RPC_GetReceipt_Returns_Value test * Cleanup non-required changes * Validate standards assembly * Disable automatic downloads * Add LegacyStandardsDLLs * Update test * Bump package versions for Core and Networks * Bump observer version * Update package versions * Refactor * Revert gitignore * Revert unnecessary changes * Revert unnecessary changes * Update Stratis.SmartContracts.xxx to 2.0.0.0 * Update package version for Stratis.SmartContracts.Tests.Common * Add TestNet checkpoints (stratisproject#402) * Update StraxTest.cs * Add testnet checkpoints * Fix Tests * Update Nuget Scripts and Collateral/FederatedPeg versions * Bump Version (stratisproject#403) * Update some test projects PackageIds and versions * Update PushNuget.ps1 * Update MaxStandardSigOpsCost and CCTS Max Partials Txs (stratisproject#404) * Update Stratis.SmartContracts.CLR.Validation's allowed primitive types (stratisproject#405) * Update validator's primitives * Bump package version * Bump Stratis.SmartContracts.Core and Stratis.SmartContracts.CLR versions (stratisproject#406) * Update validator's primitives * Bump package version * Bump Stratis.SmartContracts.Core and Stratis.SmartContracts.CLR versions * Bump Stratis.Bicoin.Features.SmartContracts as well * Bump Stratis.SmartContracts.Networks * Update PushSCNuget.ps1 * Fix Finality Bug (stratisproject#407) * Fix Finalized Bug * Fix Build * Trigger CI * Fix Tests * Comments * Console Cleanup (stratisproject#408) * Suppress bench logs * Done * Update NodeStats.cs * Fix Test * Bump version prior to fixing NuGet dependencies for Stratis.SmartContracts.Tests.Common (stratisproject#409) * Rocks DB (stratisproject#401) * WIP * Fix DB connections * Update CirrusD * Add RocksDbNative * Update Stratis.CirrusD.csproj * Add Snappy * Fix BlockStoreQueue * Add switch to program.cs * Fix Logger * Cleanup Console Logs * Add RocksDbChainStore * Update BlockPuller.cs * Implement RocksDb KeyValueStore * Add dbtype switch to StraxD * NodeStats changes * KeyValue fix * Fix Build * Voting / Wallet Log * Update ConnectionManager.cs * Hide bench stats * Update VersionProvider.cs * Self Review * Fix Test * Update ConnectionManager.cs * Fix Locks in StakeDB * Create RocksDbProvenBlockHeaderRepository * Update RocksDbProvenBlockHeaderRepository.cs * Add network type to console * Fix Test * Update NodeStats.cs * Add datafolder to nodestats * Fix Merge * Revert * Revert launchsettings * Add ColdStaking to PushNuGet script (stratisproject#410) * Add ColdStaking to PushNuGet script * Bump Stratis.Bitcoin.IntegrationTests.Common to 1.0.7 * Bump Stratis.Core.Tests.Common to 1.0.7 * Update NEthereum and Stratis.Patricia * SLN changes * Clean up commits * Remove launchSettings change Co-authored-by: Francois de la Rouviere <fassadlr@gmail.com> Co-authored-by: quantumagi <someguy.fromafrica@gmail.com>
* Initial InterFlux version * Update NBitcoin.csproj (stratisproject#391) * Pass along height information for OP_FEDERATION (stratisproject#379) * Pass along height information for OP_FEDERATION * Add defaults * Add defaults * Filter Transaction History by Transaction Id (stratisproject#393) * Update WalletService.cs * Add Filter * Fix Test * Perform check for cold staking txs * Refactor * Modify DI sequence * Add mainnet check points (stratisproject#400) * Add MainNet check points * Fix Tests * Change gas limit upper bound to 250,000 (stratisproject#399) * Add UInt256, serialization methods and CLR updates (stratisproject#365) * Add UInt256 serialization methods * Refactor * Use UInt256 in InternalExecutor * Undo unrelated change * Update TestMessage * Revert type updates to InternalExecutor * Update Serializer and PersistentState * Update package versions * Update SC packages to version 1.4.0-alpha * Add serializers and enums * Add primitive serializer * Update StandardToken.cs * Revert change * Update integration tests * Use switch/case in Serialize/Deserialize * Update package versions and remove workaround * Ensure the right Stratis.SmartContracts.Standards is used by contracts * Changes based on feedback * Fix primitive deserialize * Update standards dll name * Fix legacy standards dll path * Don't upgrade standards package of node * Don't upgrade StandardToken of node * Don't upgrade standards package of node * Add Standards forwards compatibility * Add test case for futuristic contracts * Fix Token_Standards_Test * Update RPC_GetReceipt_Returns_Value test * Cleanup non-required changes * Validate standards assembly * Disable automatic downloads * Add LegacyStandardsDLLs * Update test * Bump package versions for Core and Networks * Bump observer version * Update package versions * Refactor * Revert gitignore * Revert unnecessary changes * Revert unnecessary changes * Update Stratis.SmartContracts.xxx to 2.0.0.0 * Update package version for Stratis.SmartContracts.Tests.Common * Add TestNet checkpoints (stratisproject#402) * Update StraxTest.cs * Add testnet checkpoints * Fix Tests * Update Nuget Scripts and Collateral/FederatedPeg versions * Bump Version (stratisproject#403) * Update some test projects PackageIds and versions * Update PushNuget.ps1 * Update MaxStandardSigOpsCost and CCTS Max Partials Txs (stratisproject#404) * Update Stratis.SmartContracts.CLR.Validation's allowed primitive types (stratisproject#405) * Update validator's primitives * Bump package version * Bump Stratis.SmartContracts.Core and Stratis.SmartContracts.CLR versions (stratisproject#406) * Update validator's primitives * Bump package version * Bump Stratis.SmartContracts.Core and Stratis.SmartContracts.CLR versions * Bump Stratis.Bicoin.Features.SmartContracts as well * Bump Stratis.SmartContracts.Networks * Update PushSCNuget.ps1 * Fix Finality Bug (stratisproject#407) * Fix Finalized Bug * Fix Build * Trigger CI * Fix Tests * Comments * Console Cleanup (stratisproject#408) * Suppress bench logs * Done * Update NodeStats.cs * Fix Test * Bump version prior to fixing NuGet dependencies for Stratis.SmartContracts.Tests.Common (stratisproject#409) * Rocks DB (stratisproject#401) * WIP * Fix DB connections * Update CirrusD * Add RocksDbNative * Update Stratis.CirrusD.csproj * Add Snappy * Fix BlockStoreQueue * Add switch to program.cs * Fix Logger * Cleanup Console Logs * Add RocksDbChainStore * Update BlockPuller.cs * Implement RocksDb KeyValueStore * Add dbtype switch to StraxD * NodeStats changes * KeyValue fix * Fix Build * Voting / Wallet Log * Update ConnectionManager.cs * Hide bench stats * Update VersionProvider.cs * Self Review * Fix Test * Update ConnectionManager.cs * Fix Locks in StakeDB * Create RocksDbProvenBlockHeaderRepository * Update RocksDbProvenBlockHeaderRepository.cs * Add network type to console * Fix Test * Update NodeStats.cs * Add datafolder to nodestats * Fix Merge * Revert * Revert launchsettings * Add ColdStaking to PushNuGet script (stratisproject#410) * Add ColdStaking to PushNuGet script * Bump Stratis.Bitcoin.IntegrationTests.Common to 1.0.7 * Bump Stratis.Core.Tests.Common to 1.0.7 * Update NEthereum and Stratis.Patricia * SLN changes * Clean up commits * Remove launchSettings change * Add references Co-authored-by: Francois de la Rouviere <fassadlr@gmail.com> Co-authored-by: quantumagi <someguy.fromafrica@gmail.com>
* Update LaunchSidechainMasternode.ps1 * Update LaunchSidechainMasternode.ps1 * Update LaunchSidechainMasternode.ps1
* Update NBitcoin.csproj (stratisproject#391) * Pass along height information for OP_FEDERATION (stratisproject#379) * Pass along height information for OP_FEDERATION * Add defaults * Add defaults * Filter Transaction History by Transaction Id (stratisproject#393) * Update WalletService.cs * Add Filter * Fix Test * Perform check for cold staking txs * Add mainnet check points (stratisproject#400) * Add MainNet check points * Fix Tests * Change gas limit upper bound to 250,000 (stratisproject#399) * Add UInt256, serialization methods and CLR updates (stratisproject#365) * Add UInt256 serialization methods * Refactor * Use UInt256 in InternalExecutor * Undo unrelated change * Update TestMessage * Revert type updates to InternalExecutor * Update Serializer and PersistentState * Update package versions * Update SC packages to version 1.4.0-alpha * Add serializers and enums * Add primitive serializer * Update StandardToken.cs * Revert change * Update integration tests * Use switch/case in Serialize/Deserialize * Update package versions and remove workaround * Ensure the right Stratis.SmartContracts.Standards is used by contracts * Changes based on feedback * Fix primitive deserialize * Update standards dll name * Fix legacy standards dll path * Don't upgrade standards package of node * Don't upgrade StandardToken of node * Don't upgrade standards package of node * Add Standards forwards compatibility * Add test case for futuristic contracts * Fix Token_Standards_Test * Update RPC_GetReceipt_Returns_Value test * Cleanup non-required changes * Validate standards assembly * Disable automatic downloads * Add LegacyStandardsDLLs * Update test * Bump package versions for Core and Networks * Bump observer version * Update package versions * Refactor * Revert gitignore * Revert unnecessary changes * Revert unnecessary changes * Update Stratis.SmartContracts.xxx to 2.0.0.0 * Update package version for Stratis.SmartContracts.Tests.Common * Add TestNet checkpoints (stratisproject#402) * Update StraxTest.cs * Add testnet checkpoints * Fix Tests * Update Nuget Scripts and Collateral/FederatedPeg versions * Bump Version (stratisproject#403) * Update some test projects PackageIds and versions * Update PushNuget.ps1 * Update MaxStandardSigOpsCost and CCTS Max Partials Txs (stratisproject#404) * Update Stratis.SmartContracts.CLR.Validation's allowed primitive types (stratisproject#405) * Update validator's primitives * Bump package version * Bump Stratis.SmartContracts.Core and Stratis.SmartContracts.CLR versions (stratisproject#406) * Update validator's primitives * Bump package version * Bump Stratis.SmartContracts.Core and Stratis.SmartContracts.CLR versions * Bump Stratis.Bicoin.Features.SmartContracts as well * Bump Stratis.SmartContracts.Networks * Update PushSCNuget.ps1 * Fix Finality Bug (stratisproject#407) * Fix Finalized Bug * Fix Build * Trigger CI * Fix Tests * Comments * Console Cleanup (stratisproject#408) * Suppress bench logs * Done * Update NodeStats.cs * Fix Test * Bump version prior to fixing NuGet dependencies for Stratis.SmartContracts.Tests.Common (stratisproject#409) * Rocks DB (stratisproject#401) * WIP * Fix DB connections * Update CirrusD * Add RocksDbNative * Update Stratis.CirrusD.csproj * Add Snappy * Fix BlockStoreQueue * Add switch to program.cs * Fix Logger * Cleanup Console Logs * Add RocksDbChainStore * Update BlockPuller.cs * Implement RocksDb KeyValueStore * Add dbtype switch to StraxD * NodeStats changes * KeyValue fix * Fix Build * Voting / Wallet Log * Update ConnectionManager.cs * Hide bench stats * Update VersionProvider.cs * Self Review * Fix Test * Update ConnectionManager.cs * Fix Locks in StakeDB * Create RocksDbProvenBlockHeaderRepository * Update RocksDbProvenBlockHeaderRepository.cs * Add network type to console * Fix Test * Update NodeStats.cs * Add datafolder to nodestats * Fix Merge * Revert * Revert launchsettings * Add ColdStaking to PushNuGet script (stratisproject#410) * Add ColdStaking to PushNuGet script * Bump Stratis.Bitcoin.IntegrationTests.Common to 1.0.7 * Bump Stratis.Core.Tests.Common to 1.0.7 * Update to Stratis.RocksDb (stratisproject#415) * Prevent changing published packages w/o bumping local version (stratisproject#411) * Prevent changing package code of published version - must bump version * Update comments * Small refactor * Ensure Release folder exists * Check version changes related to project references * Bump versions * Refactor * Refactor * Fix wallet feature vesion * Update RocksDb dylibs (stratisproject#417) * Update to Stratis.RocksDb * Update to version 0.0.9.1 * Update RocksDb Nugets * Update Rocksdb (stratisproject#418) * Revert "Dont fetch/process deposits until the CCTS has cleared its suspended transfers (stratisproject#367)" This reverts commit 334b4f0. * Update Nuget * Update CirrusMain.cs (stratisproject#422) * Consolidate outstanding console changes for the MS/Miner (stratisproject#423) * update RocksDb Nuget (stratisproject#424) * Update Stratis.Bitcoin Assembly info to version 1.0.7.2 * Fix Seeder (stratisproject#425) * Fix AddressIndexer Console (stratisproject#426) * Update ConnectionManager.cs (stratisproject#427) * Fix merge conflicts Co-authored-by: Francois de la Rouviere <fassadlr@gmail.com> Co-authored-by: quantumagi <someguy.fromafrica@gmail.com>
src/Stratis.Bitcoin.Features.Interop/EthereumClient/ContractSource/MultisigWallet.sol
Show resolved
Hide resolved
| this.filterId = this.transferEventHandler.CreateFilterAsync(this.filterAllTransferEventsForContract).GetAwaiter().GetResult(); | ||
| } | ||
|
|
||
| public List<EventLog<TransferEventDTO>> GetTransferEventsForWrappedStrax() |
There was a problem hiding this comment.
this method and the one that calls it can be made async to avoid doing .GetAwaiter().GetResult(); in the code
There was a problem hiding this comment.
@noescape00 I suspect this is because of NEthereum's interface contract not being async or not returning Task? @zeptin can you confirm?
|
|
||
| namespace Stratis.Bitcoin.Features.Interop.EthereumClient | ||
| { | ||
| public class EthereumClientBase : IEthereumClientBase |
There was a problem hiding this comment.
Please add xmldoc for methods in the class (and also for other methods in this PR that are not documented)
| return result; | ||
| } | ||
|
|
||
| public Dictionary<string, string> InvokeContract(InteropRequest request) |
There was a problem hiding this comment.
some of the methods in this class are not used, some return empty values. Those probably should be implemented or removed
|
|
||
| public class MultisigWalletDeployment : ContractDeploymentMessage | ||
| { | ||
| public static string BYTECODE = |
There was a problem hiding this comment.
maybe use resources instead of hardcoding it here
|
|
||
| namespace Stratis.Bitcoin.Features.Interop | ||
| { | ||
| public interface IInteropTransactionManager |
There was a problem hiding this comment.
please add xml doc here and everywhere where it's absent
| .FeatureServices(services => services | ||
| .AddSingleton<InteropSettings>() | ||
| .AddSingleton<IEthereumClientBase, EthereumClientBase>() | ||
| //.AddSingleton<IInteropRequestRepository, InteropRequestRepository>() |
| private const string LastScannedHeightKey = "InteropLastScannedHeight"; | ||
| private const int InteropBatchSize = 100; | ||
|
|
||
| private const string ContractAddressKeyPrefix = "CN"; |
There was a problem hiding this comment.
those constants are not used
|
|
||
| namespace Stratis.Bitcoin.Features.Interop | ||
| { | ||
| public class InteropPoller : IDisposable |
There was a problem hiding this comment.
it's an important class, please add documentation
src/Stratis.Bitcoin.Features.Interop/Stratis.Bitcoin.Features.Interop.csproj
Outdated
Show resolved
Hide resolved
src/Stratis.Bitcoin.Features.MemoryPool/Rules/CheckSigOpsMempoolRule.cs
Outdated
Show resolved
Hide resolved
| Processed | ||
| } | ||
|
|
||
| public class ConversionRequest : IBitcoinSerializable |
There was a problem hiding this comment.
It would be good to at least add a high level summary on what these new classes do and/or are used for?
|
|
||
| try | ||
| { | ||
| this.CheckEthereumNode(); |
There was a problem hiding this comment.
probably better to do it once on initialization
src/Stratis.Bitcoin.Features.Interop/EthereumClient/MultisigWallet.cs
Outdated
Show resolved
Hide resolved
src/Stratis.Bitcoin.Features.Interop/EthereumClient/IEthereumClientBase.cs
Show resolved
Hide resolved
| Guard.NotNull(interopTransactionManager, nameof(interopTransactionManager)); | ||
| Guard.NotNull(ethereumClientBase, nameof(ethereumClientBase)); | ||
|
|
||
| this.logger = loggerFactory.CreateLogger(this.GetType().FullName); |
There was a problem hiding this comment.
It might be cool if we can implement new code with NLog's LogManager.GetCurrentClassLogger(). Not essential here, perhaps in another PR.
|
|
||
| namespace Stratis.Bitcoin.Features.FederatedPeg | ||
| { | ||
| public interface IConversionRequestRepository |
There was a problem hiding this comment.
Perhaps comment these methods?
| this.logger = Substitute.For<ILogger>(); | ||
| this.loggerFactory.CreateLogger(null).ReturnsForAnyArgs(this.logger); | ||
| this.httpClientFactory = new HttpClientFactory(); | ||
| this.httpClientFactory = new Bitcoin.Controllers.HttpClientFactory(); |
There was a problem hiding this comment.
Hmmm why this namespace add?
|
|
||
| namespace Stratis.Bitcoin.Features.Interop.Models | ||
| { | ||
| public class EthereumRequestModel |
There was a problem hiding this comment.
Not sure if JsonProperty attributes should be added here?
| } | ||
| } | ||
|
|
||
| public void RemoveTransaction(string requestId) |
There was a problem hiding this comment.
How does transaction's get removed?
|
|
||
| public override Task InitializeAsync() | ||
| { | ||
| this.interopPoller?.Initialize(); |
There was a problem hiding this comment.
How do we guarantee that this is called after the federation feature has initialized? As we rely on things like "IsFederationMember" etc.
There was a problem hiding this comment.
Hmm, the interoperability feature should initialize well after the federation manager, is it necessary to explicitly check that it has completed before using IsFederationMember?
There was a problem hiding this comment.
I think it's ok. We just need to ensure that initialization sequence is correct
| } | ||
| catch (Exception e) | ||
| { | ||
| this.logger.LogWarning("Exception raised when checking interop requests. {0}", 0); |
| return requests; | ||
| } | ||
|
|
||
| private void ProcessEthereumRequests() |
There was a problem hiding this comment.
a lot of unused code above and blow this point
noescape00
left a comment
There was a problem hiding this comment.
also please implement TODOs
| this.ethereumClientBase = ethereumClientBase; | ||
| } | ||
|
|
||
| [NoTrace] |
There was a problem hiding this comment.
fody was removed from codebase according to @fassadlr , so this tag is not needed
|
|
||
| return; | ||
| } | ||
| else |
There was a problem hiding this comment.
else and {} are not needed
| { | ||
| public enum InteropRequestType | ||
| { | ||
| // Stratis (Cirrus) network invoking Ethereum contract. |
| /// <summary> | ||
| /// For either type of invocation, this is the name of the method that is to be invoked. | ||
| /// </summary> | ||
| public string MethodName { get { return this.methodName; } set { this.methodName = value; } } |
There was a problem hiding this comment.
this is not used anywhere
|
|
||
| public bool Enabled { get; set; } | ||
|
|
||
| public string InteropContractCirrusAddress { get; set; } |
There was a problem hiding this comment.
please comment all properties
|
Updated version is here: #481 |
No description provided.