2024-02-13 07:04:56 +00:00
|
|
|
package crypto
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto"
|
|
|
|
|
|
|
|
"source.quilibrium.com/quilibrium/monorepo/node/protobufs"
|
|
|
|
"source.quilibrium.com/quilibrium/monorepo/node/tries"
|
|
|
|
)
|
|
|
|
|
|
|
|
type FrameProver interface {
|
|
|
|
ProveMasterClockFrame(
|
|
|
|
previousFrame *protobufs.ClockFrame,
|
|
|
|
timestamp int64,
|
|
|
|
difficulty uint32,
|
|
|
|
) (*protobufs.ClockFrame, error)
|
|
|
|
ProveDataClockFrame(
|
|
|
|
previousFrame *protobufs.ClockFrame,
|
|
|
|
commitments [][]byte,
|
|
|
|
aggregateProofs []*protobufs.InclusionAggregateProof,
|
|
|
|
provingKey crypto.Signer,
|
|
|
|
timestamp int64,
|
|
|
|
difficulty uint32,
|
|
|
|
) (*protobufs.ClockFrame, error)
|
|
|
|
CreateMasterGenesisFrame(
|
|
|
|
filter []byte,
|
|
|
|
seed []byte,
|
|
|
|
difficulty uint32,
|
|
|
|
) (*protobufs.ClockFrame, error)
|
|
|
|
CreateDataGenesisFrame(
|
|
|
|
filter []byte,
|
|
|
|
origin []byte,
|
|
|
|
difficulty uint32,
|
|
|
|
inclusionProof *InclusionAggregateProof,
|
|
|
|
proverKeys [][]byte,
|
|
|
|
preDusk bool,
|
|
|
|
) (*protobufs.ClockFrame, *tries.RollingFrecencyCritbitTrie, error)
|
|
|
|
VerifyMasterClockFrame(
|
|
|
|
frame *protobufs.ClockFrame,
|
|
|
|
) error
|
|
|
|
VerifyDataClockFrame(
|
|
|
|
frame *protobufs.ClockFrame,
|
|
|
|
) error
|
2024-03-27 08:50:52 +00:00
|
|
|
GenerateWeakRecursiveProofIndex(
|
|
|
|
frame *protobufs.ClockFrame,
|
|
|
|
) (uint64, error)
|
|
|
|
FetchRecursiveProof(
|
|
|
|
frame *protobufs.ClockFrame,
|
|
|
|
) []byte
|
|
|
|
VerifyWeakRecursiveProof(
|
|
|
|
frame *protobufs.ClockFrame,
|
|
|
|
proof []byte,
|
|
|
|
deepVerifier *protobufs.ClockFrame,
|
|
|
|
) bool
|
2024-05-25 05:22:50 +00:00
|
|
|
CalculateChallengeProof(
|
|
|
|
challenge []byte,
|
v1.4.18-patch-2 (#230)
* feat: IPC for wesolowski
* update self peer info
* remove digests and signatures
* add new binaries and digests
* Signatory #13 added
* Signatory #4 added (#231)
* added sig.6 files (#232)
* Signatory #9 added (#233)
* Added signatories #1, #2, #3, #5, #8, #12, #14, #15, #16, #17
* remove binaries, release ready
---------
Co-authored-by: 0xOzgur <29779769+0xOzgur@users.noreply.github.com>
Co-authored-by: Demipoet <161999657+demipoet@users.noreply.github.com>
Co-authored-by: Freekers <1370857+Freekers@users.noreply.github.com>
2024-05-29 17:51:47 +00:00
|
|
|
core uint32,
|
2024-06-08 11:32:45 +00:00
|
|
|
increment uint32,
|
|
|
|
) ([]byte, error)
|
2024-05-25 05:22:50 +00:00
|
|
|
VerifyChallengeProof(
|
|
|
|
challenge []byte,
|
2024-06-08 11:32:45 +00:00
|
|
|
increment uint32,
|
|
|
|
core uint32,
|
|
|
|
proof []byte,
|
2024-05-25 05:22:50 +00:00
|
|
|
) bool
|
2024-02-13 07:04:56 +00:00
|
|
|
}
|