Skip to content

Commit 9fd5aec

Browse files
authored
Proofs (#129)
* Added SealCommitPhase1 Fixed some clang-tidy errors Signed-off-by: artyom-yurin <[email protected]> * Added SealCommitPhase2 Signed-off-by: artyom-yurin <[email protected]> * Added verifyPost Signed-off-by: artyom-yurin <[email protected]> * Added unseal and unsealRange functions Signed-off-by: artyom-yurin <[email protected]> * Removed bls-signatures submodule Signed-off-by: artyom-yurin <[email protected]> * Removed ParamProvider Signed-off-by: artyom-yurin <[email protected]> * Simplified structure PrivateSectorInfo Signed-off-by: artyom-yurin <[email protected]> * Rewrited verifySeal Signed-off-by: artyom-yurin <[email protected]> * Update filecoin-ffi Rewrite VerifyPoSt Signed-off-by: artyom-yurin <[email protected]> * Added docs Added finalizeTicket function Signed-off-by: artyom-yurin <[email protected]> * Added some util functions Signed-off-by: artyom-yurin <[email protected]> * Disabled proof test Signed-off-by: artyom-yurin <[email protected]>
1 parent 34dbd8b commit 9fd5aec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+913
-958
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "deps/bls-signatures"]
2-
path = deps/bls-signatures
3-
url = https://github.com/filecoin-project/bls-signatures.git
41
[submodule "deps/tinycbor"]
52
path = deps/tinycbor
63
url = https://github.com/intel/tinycbor.git

cmake/dependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ find_package(GTest CONFIG REQUIRED)
77
find_package(GMock CONFIG REQUIRED)
88

99
# https://docs.hunter.sh/en/latest/packages/pkg/Boost.html
10-
hunter_add_package(Boost COMPONENTS date_time filesystem random system)
11-
find_package(Boost CONFIG REQUIRED date_time filesystem random system)
10+
hunter_add_package(Boost COMPONENTS date_time filesystem random)
11+
find_package(Boost CONFIG REQUIRED date_time filesystem random)
1212

1313
# https://docs.hunter.sh/en/latest/packages/pkg/Microsoft.GSL.html
1414
hunter_add_package(Microsoft.GSL)

core/crypto/bls/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ add_library(bls_provider
88
)
99

1010
target_link_libraries(bls_provider
11-
bls_signatures_ffi
11+
bls_types
1212
outcome
1313
)
14+
15+
add_library(bls_types INTERFACE)
16+
17+
target_link_libraries(bls_types INTERFACE
18+
filecoin_ffi
19+
)

core/crypto/bls/bls_types.hpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@
66
#ifndef CRYPTO_BLS_PROVIDER_TYPES_HPP
77
#define CRYPTO_BLS_PROVIDER_TYPES_HPP
88

9+
#include <filecoin-ffi/filecoin.h>
910
#include <array>
1011

11-
extern "C" {
12-
#include "crypto/bls/libbls_signatures.h"
13-
}
14-
1512
#include "common/outcome.hpp"
1613

1714
namespace fc::crypto::bls {
@@ -22,20 +19,20 @@ namespace fc::crypto::bls {
2219
using Digest = std::array<uint8_t, DIGEST_BYTES>;
2320

2421
struct KeyPair {
25-
PrivateKey private_key;
26-
PublicKey public_key;
22+
PrivateKey private_key;
23+
PublicKey public_key;
2724
};
2825

2926
enum class Errors {
30-
InternalError = 1,
31-
KeyPairGenerationFailed,
32-
SignatureGenerationFailed,
33-
SignatureVerificationFailed,
34-
InvalidPrivateKey,
35-
InvalidPublicKey,
36-
AggregateError
27+
InternalError = 1,
28+
KeyPairGenerationFailed,
29+
SignatureGenerationFailed,
30+
SignatureVerificationFailed,
31+
InvalidPrivateKey,
32+
InvalidPublicKey,
33+
AggregateError,
3734
};
38-
};
35+
}; // namespace fc::crypto::bls
3936

4037
OUTCOME_HPP_DECLARE_ERROR(fc::crypto::bls, Errors);
4138

core/crypto/bls/libbls_signatures.h

Lines changed: 0 additions & 126 deletions
This file was deleted.

core/crypto/randomness/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ add_library(chain_randomness_provider
1515
impl/chain_randomness_provider_impl.cpp
1616
)
1717
target_link_libraries(chain_randomness_provider
18+
tickets
1819
Boost::boost
1920
blob
2021
buffer

core/crypto/signature/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ add_library(signature
77
signature.cpp
88
)
99
target_link_libraries(signature
10+
bls_types
1011
outcome
1112
)

core/crypto/vrf/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_library(vrf_provider
77
vrf_types.cpp
88
)
99
target_link_libraries(vrf_provider
10+
bls_types
1011
address
1112
blob
1213
buffer

core/primitives/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ add_subdirectory(chain_epoch)
1010
add_subdirectory(cid)
1111
add_subdirectory(piece)
1212
add_subdirectory(rle_bitset)
13+
add_subdirectory(sector)
1314
add_subdirectory(ticket)
1415
add_subdirectory(tipset)

core/primitives/address/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
add_library(address
55
address.cpp
66
address_codec.cpp
7-
../piece/piece.hpp ../piece/piece.hpp)
7+
)
88
target_link_libraries(address
9+
bls_types
910
Boost::boost
1011
blake2
1112
blob

0 commit comments

Comments
 (0)