-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adjust calculation of gas outputs for FIP-0009 (#356)
* fix: adjust calculation of gas outputs for FIP-0009 * remove dev lines from go.mod * Use exported ShouldBurn method from lotus vm * Use exported ShouldBurn method from lotus vm * Upgrade carbs version
- Loading branch information
Showing
10 changed files
with
282 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module github.com/filecoin-project/sentinel-visor/extern/filecoin-ffi-stub | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4 | ||
github.com/filecoin-project/specs-actors v0.9.4 | ||
github.com/ipfs/go-cid v0.0.7 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package ffi | ||
|
||
import ( | ||
"io" | ||
"os" | ||
|
||
abi "github.com/filecoin-project/go-state-types/abi" | ||
"github.com/filecoin-project/specs-actors/actors/runtime/proof" | ||
"github.com/ipfs/go-cid" | ||
) | ||
|
||
func GetGPUDevices() ([]string, error) { | ||
return nil, nil | ||
} | ||
|
||
func GenerateUnsealedCID(_ abi.RegisteredSealProof, _ []abi.PieceInfo) (cid.Cid, error) { | ||
return cid.Undef, nil | ||
} | ||
|
||
func GeneratePieceCIDFromFile(_ abi.RegisteredSealProof, _ io.Reader, _ abi.UnpaddedPieceSize) (cid.Cid, error) { | ||
return cid.Undef, nil | ||
} | ||
|
||
func UnsealRange(_ abi.RegisteredSealProof, _ string, _, _ *os.File, _ abi.SectorNumber, _ abi.ActorID, _ abi.SealRandomness, _ cid.Cid, _, _ uint64) error { | ||
return nil | ||
} | ||
|
||
func SealPreCommitPhase1(_ abi.RegisteredSealProof, _, _, _ string, _ abi.SectorNumber, _ abi.ActorID, _ abi.SealRandomness, _ []abi.PieceInfo) ([]byte, error) { | ||
return nil, nil | ||
} | ||
|
||
func SealPreCommitPhase2(_ []byte, _, _ string) (cid.Cid, cid.Cid, error) { | ||
return cid.Undef, cid.Undef, nil | ||
} | ||
|
||
func SealCommitPhase1(abi.RegisteredSealProof, cid.Cid, cid.Cid, string, string, abi.SectorNumber, abi.ActorID, abi.SealRandomness, abi.InteractiveSealRandomness, []abi.PieceInfo) ([]byte, error) { | ||
return nil, nil | ||
} | ||
|
||
func SealCommitPhase2([]byte, abi.SectorNumber, abi.ActorID) ([]byte, error) { | ||
return nil, nil | ||
} | ||
|
||
func ClearCache(uint64, string) error { | ||
return nil | ||
} | ||
|
||
func GenerateWinningPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof.PoStProof, error) { | ||
return nil, nil | ||
} | ||
|
||
func GenerateWindowPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof.PoStProof, []abi.SectorNumber, error) { | ||
return nil, nil, nil | ||
} | ||
|
||
type ( | ||
SortedPrivateSectorInfo struct{ abi.SectorNumber } | ||
PrivateSectorInfo struct { | ||
abi.SectorNumber | ||
CacheDirPath string | ||
PoStProofType abi.RegisteredPoStProof | ||
SealedSectorPath string | ||
SectorInfo proof.SectorInfo | ||
} | ||
) | ||
|
||
func NewSortedPrivateSectorInfo(...PrivateSectorInfo) SortedPrivateSectorInfo { | ||
return SortedPrivateSectorInfo{} | ||
} | ||
|
||
func VerifySeal(proof.SealVerifyInfo) (bool, error) { | ||
return true, nil | ||
} | ||
|
||
func VerifyWinningPoSt(proof.WinningPoStVerifyInfo) (bool, error) { | ||
return true, nil | ||
} | ||
|
||
func VerifyWindowPoSt(proof.WindowPoStVerifyInfo) (bool, error) { | ||
return true, nil | ||
} | ||
|
||
func GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error) { | ||
return nil, nil | ||
} | ||
|
||
func FauxRep(abi.RegisteredSealProof, string, string) (cid.Cid, error) { | ||
return cid.Undef, nil | ||
} | ||
|
||
type FallbackChallenges struct { | ||
Sectors []abi.SectorNumber | ||
Challenges map[abi.SectorNumber][]uint64 | ||
} | ||
|
||
func GeneratePoStFallbackSectorChallenges(proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, sectorIds []abi.SectorNumber) (*FallbackChallenges, error) { | ||
return nil, nil | ||
} | ||
|
||
func GenerateSingleVanillaProof(replica PrivateSectorInfo, challange []uint64) ([]byte, error) { | ||
return nil, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.