Skip to content

Commit 3bfe78b

Browse files
authored
Merge pull request #492 from dashpay/develop
Develop
2 parents 080be30 + 2a3fa9e commit 3bfe78b

26 files changed

+151
-84
lines changed

DashSync.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
3434
s.ios.framework = 'UIKit'
3535
s.macos.framework = 'Cocoa'
3636
s.compiler_flags = '-Wno-comma'
37-
s.dependency 'DashSharedCore', '0.4.0'
37+
s.dependency 'DashSharedCore', '0.4.5'
3838
s.dependency 'CocoaLumberjack', '3.7.2'
3939
s.ios.dependency 'DWAlertController', '0.2.1'
4040
s.dependency 'DSDynamicOptions', '0.1.2'
File renamed without changes.
File renamed without changes.
-80.9 KB
Binary file not shown.
81.8 KB
Binary file not shown.

DashSync/shared/Models/Chain/DSChain.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ typedef NS_ENUM(uint16_t, DSChainSyncPhase)
479479
- (BOOL)isDevnetAny;
480480
- (BOOL)isEvolutionEnabled;
481481
- (BOOL)isDevnetWithGenesisHash:(UInt256)genesisHash;
482+
- (BOOL)isCore19Active;
483+
- (KeyKind)getActiveBLSType;
484+
482485
@end
483486

484487
@protocol DSChainTransactionsDelegate

DashSync/shared/Models/Chain/DSChain.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,14 @@ - (void)setUp {
405405

406406
// MARK: - Helpers
407407

408+
- (BOOL)isCore19Active {
409+
return self.lastTerminalBlockHeight >= chain_core19_activation_height(self.chainType);
410+
}
411+
412+
- (KeyKind)getActiveBLSType {
413+
return [self isCore19Active] ? KeyKind_BLSBasic : KeyKind_BLS;
414+
}
415+
408416
- (NSDictionary<NSValue *, DSBlock *> *)syncBlocks {
409417
return [self.mSyncBlocks copy];
410418
}

DashSync/shared/Models/Chain/DSChainCheckpoints.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ static checkpoint testnet_checkpoint_array[] = {
4343
{370368, "000001702422af778c9d1e16a891f58fbaabb6ff82dea8fc1910ab80552bdf9c", 1598642620, 0x1e02336eu, "", "717beedaa6da0d5c1124b9d0788d040ca18eb1fe6ed49c126ea9a2d30d11921c", "00000000000000000000000000000000000000000000000002239b4ac0e84dc4"}, //for tests
4444
{414106, "00000674c5269b59d6d3bb6bb08b58add4b3e0eab11136be47bb8e0d4ec86e69", 1609043444, 0x1e0dd96eu, "", "e8c45fabdb650ac2c42105083cb63998142e18be89b61bd034b3714498e6622f", "000000000000000000000000000000000000000000000000022f14058d3b2efc"}, //fork height
4545
{480000, "000001210c081f763d18db332b38ec1ac14fac62170a0d1a2028cabe8cecc799", 1618235036, 0x1e01eec7u, "", "d9fae96cce9bf0edcf9ece1b7894e0356165c0a5dcdc6f2e0784461c4168cbec", "000000000000000000000000000000000000000000000000022f14bf215f8016"},
46-
// {530000, "0000060db4b6bdb17f0617d15637bdf0f18ad738ccb438ee2cd000fef11c7130", 1625277934, 0x1e0fffffu, "MNT530000", "7a6a78a22df2d9dc8c44afd48dfe4a60f75428f5e6004cf4cdf82e4f81a0a68b", "000000000000000000000000000000000000000000000000022f1524ad0dacd3"},
47-
// {760000, "000000b80d3010bb62b309aec9a7dd748777cc5e2640a26b1981cb3c61c66211", 1657592023, 0x1e01f865u, "", "8302c05bdca60e7dfcac26cebea8d797bda1b87111cf3a3dc33050c43f2abfbe", "000000000000000000000000000000000000000000000000027baba1fe003e84"},
46+
{530000, "0000060db4b6bdb17f0617d15637bdf0f18ad738ccb438ee2cd000fef11c7130", 1625277934, 0x1e0fffffu, "MNT530000__70228", "7a6a78a22df2d9dc8c44afd48dfe4a60f75428f5e6004cf4cdf82e4f81a0a68b", "000000000000000000000000000000000000000000000000022f1524ad0dacd3"},
47+
{760000, "000000b80d3010bb62b309aec9a7dd748777cc5e2640a26b1981cb3c61c66211", 1657592023, 0x1e01f865u, "", "8302c05bdca60e7dfcac26cebea8d797bda1b87111cf3a3dc33050c43f2abfbe", "000000000000000000000000000000000000000000000000027baba1fe003e84"},
4848
};
4949

5050
// blockchain checkpoints - these are also used as starting points for partial chain downloads, so they need to be at
@@ -83,7 +83,7 @@ static checkpoint mainnet_checkpoint_array[] = {
8383
{1060000, "00000000000000132447e6bac9fe0d7d756851450eab29358787dc05d809bf07", 1556260812, 0x191f6aceu, "", "", "000000000000000000000000000000000000000000001392c164c11ca344daec"},
8484
{1080000, "00000000000000099c5cc38bac7878f771408537e520a1ef9e31b5c1040d2d2a", 1559412342, 0x192a9588u, "", "", "0000000000000000000000000000000000000000000015a7e09c202c817e33d8"},
8585
{1088640, "00000000000000112e41e4b3afda8b233b8cc07c532d2eac5de097b68358c43e", 1560773201, 0x1922ae0bu, "", "379fd491044a273372a8e901866fbe6ed9bab7ce2de0968a71d38de5d5eac340", "0000000000000000000000000000000000000000000016a12b2d3216341ba998"},
86-
// {1088640, "00000000000000112e41e4b3afda8b233b8cc07c532d2eac5de097b68358c43e", 1560773201, 0x1922ae0bu, "ML1088640", "379fd491044a273372a8e901866fbe6ed9bab7ce2de0968a71d38de5d5eac340", "0000000000000000000000000000000000000000000016a12b2d3216341ba998"},
86+
{1088640, "00000000000000112e41e4b3afda8b233b8cc07c532d2eac5de097b68358c43e", 1560773201, 0x1922ae0bu, "ML1088640__70218", "379fd491044a273372a8e901866fbe6ed9bab7ce2de0968a71d38de5d5eac340", "0000000000000000000000000000000000000000000016a12b2d3216341ba998"},
8787
{1100000, "00000000000000190560ed4b128c156e489fdbe0814bf62c8ab53ab3259d7908", 1562561033, 0x191a9f05u, "", "", "0000000000000000000000000000000000000000000017ffbd499dd0911202a4"},
8888
{1120000, "0000000000000011103eae768e6a322b991c5c20569d95930b87e1305fa19c75", 1565712301, 0x19200768u, "", "", "000000000000000000000000000000000000000000001a7cca810db5e54e95ca"},
8989
{1140000, "00000000000000083ac0e592e180487cb237f659a305d2be19e883ed564fe20f", 1568864488, 0x1923198bu, "", "", "000000000000000000000000000000000000000000001ccf1b2b6718aad9bb8d"},
@@ -115,5 +115,5 @@ static checkpoint mainnet_checkpoint_array[] = {
115115
{1680000, "000000000000001d4107019248ea733abc4fd02b31db202f6bfd38f8848c7100", 1653989911, 0x192af7edu, "", "dd516ade3a5b599a6989a36e137be9e14f0fd77dad036c6c0748bfbbd73d9805", "0000000000000000000000000000000000000000000073575a368d41c4d9641c"},
116116
{1700000, "000000000000001d7579a371e782fd9c4480f626a62b916fa4eb97e16a49043a", 1657142113, 0x1927e30eu, "", "dafe57cefc3bc265dfe8416e2f2e3a22af268fd587a48f36affd404bec738305", "000000000000000000000000000000000000000000007562df93a26b81386288"},
117117
{1720000, "000000000000001ef1f8a3d33bbe304c1d12f59f2c8aa989099dc215fd10903e", 1660295895, 0x19362176u, "", "67c6348c35bc42aa4cabd25e29560f5d22c6a9fba274bf0c52fe73021d0e8d5e", "000000000000000000000000000000000000000000007715a9ae4dd7ff1d3902"},
118-
// {1720000, "000000000000001ef1f8a3d33bbe304c1d12f59f2c8aa989099dc215fd10903e", 1660295895, 0x19362176u, "ML1720000", "67c6348c35bc42aa4cabd25e29560f5d22c6a9fba274bf0c52fe73021d0e8d5e", "000000000000000000000000000000000000000000007715a9ae4dd7ff1d3902"},
118+
{1720000, "000000000000001ef1f8a3d33bbe304c1d12f59f2c8aa989099dc215fd10903e", 1660295895, 0x19362176u, "ML1720000__70218", "67c6348c35bc42aa4cabd25e29560f5d22c6a9fba274bf0c52fe73021d0e8d5e", "000000000000000000000000000000000000000000007715a9ae4dd7ff1d3902"},
119119
};

DashSync/shared/Models/Chain/DSChainConstants.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
#define TESTNET_DAPI_GRPC_STANDARD_PORT 3010
3232
#define DEVNET_DAPI_GRPC_STANDARD_PORT 3010
3333

34-
#define PROTOCOL_VERSION_MAINNET 70227
35-
#define DEFAULT_MIN_PROTOCOL_VERSION_MAINNET 70224
34+
#define PROTOCOL_VERSION_MAINNET 70228
35+
#define DEFAULT_MIN_PROTOCOL_VERSION_MAINNET 70228
3636

37-
#define PROTOCOL_VERSION_TESTNET 70227
38-
#define DEFAULT_MIN_PROTOCOL_VERSION_TESTNET 70224
37+
#define PROTOCOL_VERSION_TESTNET 70228
38+
#define DEFAULT_MIN_PROTOCOL_VERSION_TESTNET 70228
3939

40-
#define PROTOCOL_VERSION_DEVNET 70227
41-
#define DEFAULT_MIN_PROTOCOL_VERSION_DEVNET 70224
40+
#define PROTOCOL_VERSION_DEVNET 70228
41+
#define DEFAULT_MIN_PROTOCOL_VERSION_DEVNET 70228
4242

4343
#define PLATFORM_PROTOCOL_VERSION_MAINNET 1
4444
#define DEFAULT_MIN_PLATFORM_PROTOCOL_VERSION_MAINNET 1
@@ -49,8 +49,10 @@
4949
#define PLATFORM_PROTOCOL_VERSION_DEVNET 1
5050
#define DEFAULT_MIN_PLATFORM_PROTOCOL_VERSION_DEVNET 1
5151

52-
#define MAX_VALID_MIN_PROTOCOL_VERSION 70227
53-
#define MIN_VALID_MIN_PROTOCOL_VERSION 70224
52+
#define DEFAULT_CHECKPOINT_PROTOCOL_VERSION 70218
53+
54+
#define MAX_VALID_MIN_PROTOCOL_VERSION 70228
55+
#define MIN_VALID_MIN_PROTOCOL_VERSION 70228
5456

5557
#define MAX_TARGET_PROOF_OF_WORK_MAINNET 0x1e0fffffu // highest value for difficulty target (higher values are less difficult)
5658
#define MAX_TARGET_PROOF_OF_WORK_TESTNET 0x1e0fffffu

DashSync/shared/Models/Chain/DSCheckpoint.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ typedef NS_ENUM(uint8_t, DSCheckpointOptions)
4444
@property (nonatomic, readonly) uint32_t timestamp;
4545
@property (nonatomic, readonly) uint32_t target;
4646
@property (nonatomic, readonly) NSString *masternodeListName;
47+
@property (nonatomic, readonly) uint32_t protocolVersion;
4748
@property (nonatomic, readonly) UInt256 merkleRoot;
4849
@property (nonatomic, readonly) UInt256 chainWork;
4950

0 commit comments

Comments
 (0)