Skip to content

Commit

Permalink
Merge branch 'master' into network-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
virajbhartiya authored Dec 10, 2024
2 parents 3080368 + 8b3de48 commit 78e0bf5
Show file tree
Hide file tree
Showing 193 changed files with 8,917 additions and 8,449 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/create-release-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Create Release Issue

on:
workflow_dispatch:
inputs:
type:
description: "What's the type of the release?"
required: true
type: choice
options:
- node
- miner
- both
tag:
description: "What's the tag of the release? (e.g., 1.30.1)"
required: true
level:
description: "What's the level of the release?"
required: true
default: 'warning'
type: choice
options:
- major
- minor
- patch
network-upgrade:
description: "What's the version of the network upgrade this release is related to? (e.g. 25)"
required: false
discussion-link:
description: "What's a link to the GitHub Discussions topic for the network upgrade?"
required: false
changelog-link:
description: "What's a link to the Lotus CHANGELOG entry for the network upgrade?"
required: false
rc1-date:
description: "What's the expected shipping date for RC1?"
required: false
stable-date:
description: "What's the expected shipping date for the stable release?"
required: false

defaults:
run:
shell: bash

permissions:
contents: read
issues: write

jobs:
create-issue:
name: Create Release Issue
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-go
- env:
GITHUB_TOKEN: ${{ github.token }}
run: |
go run cmd/release/main.go create-issue \
--create-on-github true \
--type "${{ github.event.inputs.type }}" \
--tag "${{ github.event.inputs.tag }}" \
--level "${{ github.event.inputs.level }}" \
--network-upgrade "${{ github.event.inputs.network-upgrade }}" \
--discussion-link "${{ github.event.inputs.discussion-link }}" \
--changelog-link "${{ github.event.inputs.changelog-link }}" \
--rc1-date "${{ github.event.inputs.rc1-date }}" \
--stable-date "${{ github.event.inputs.stable-date }}" \
--repo "filecoin-project/lotus"
6,693 changes: 52 additions & 6,641 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ type FullNode interface {
StateMarketDeals(context.Context, types.TipSetKey) (map[string]*MarketDeal, error) //perm:read
// StateMarketStorageDeal returns information about the indicated deal
StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*MarketDeal, error) //perm:read
// StateMarketProposalPending returns whether a given proposal CID is marked as pending in the market actor
StateMarketProposalPending(ctx context.Context, proposalCid cid.Cid, tsk types.TipSetKey) (bool, error) //perm:read
// StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal. Returns nil if
// pending allocation is not found.
StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifreg.Allocation, error) //perm:read
Expand Down Expand Up @@ -618,7 +620,7 @@ type FullNode interface {
// StateGetRandomnessFromBeacon is used to sample the beacon for randomness.
StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read

// StateGetRandomnessDigestFromTickets. is used to sample the chain for randomness.
// StateGetRandomnessDigestFromTickets is used to sample the chain for randomness.
StateGetRandomnessDigestFromTickets(ctx context.Context, randEpoch abi.ChainEpoch, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
// StateGetRandomnessDigestFromBeacon is used to sample the beacon for randomness.
StateGetRandomnessDigestFromBeacon(ctx context.Context, randEpoch abi.ChainEpoch, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
Expand Down
2 changes: 1 addition & 1 deletion api/api_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type StorageMiner interface {
ActorSectorSize(context.Context, address.Address) (abi.SectorSize, error) //perm:read
ActorAddressConfig(ctx context.Context) (AddressConfig, error) //perm:read

// WithdrawBalance allows to withdraw balance from miner actor to owner address
// ActorWithdrawBalance allows to withdraw balance from miner actor to owner address
// Specify amount as "0" to withdraw full balance. This method returns a message CID
// and does not wait for message execution
ActorWithdrawBalance(ctx context.Context, amount abi.TokenAmount) (cid.Cid, error) //perm:admin
Expand Down
5 changes: 0 additions & 5 deletions api/api_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// stm: #unit
package api

import (
Expand Down Expand Up @@ -30,7 +29,6 @@ func goCmd() string {
}

func TestDoesntDependOnFFI(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_FFI_DEPENDENCE_001
deps, err := exec.Command(goCmd(), "list", "-deps", "github.com/filecoin-project/lotus/api").Output()
if err != nil {
t.Fatal(err)
Expand All @@ -43,7 +41,6 @@ func TestDoesntDependOnFFI(t *testing.T) {
}

func TestDoesntDependOnBuild(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_FFI_DEPENDENCE_002
deps, err := exec.Command(goCmd(), "list", "-deps", "github.com/filecoin-project/lotus/api").Output()
if err != nil {
t.Fatal(err)
Expand All @@ -56,7 +53,6 @@ func TestDoesntDependOnBuild(t *testing.T) {
}

func TestReturnTypes(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_001
errType := reflect.TypeOf(new(error)).Elem()
bareIface := reflect.TypeOf(new(interface{})).Elem()
jmarsh := reflect.TypeOf(new(json.Marshaler)).Elem()
Expand Down Expand Up @@ -122,7 +118,6 @@ func TestReturnTypes(t *testing.T) {
}

func TestPermTags(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_PERM_TAGS_001
_ = PermissionedFullAPI(&FullNodeStruct{})
_ = PermissionedStorMinerAPI(&StorageMinerStruct{})
_ = PermissionedWorkerAPI(&WorkerStruct{})
Expand Down
26 changes: 25 additions & 1 deletion api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,31 @@ func init() {
addExample(f3Lease)
addExample(&f3Lease)

f3Cert := certs.FinalityCertificate{
GPBFTInstance: 0,
ECChain: []gpbft.TipSet{
{
Epoch: 0,
Key: tsk.Bytes(),
PowerTable: c,
},
},
SupplementalData: gpbft.SupplementalData{
PowerTable: c,
},
Signers: bitfield.NewFromSet([]uint64{2, 3, 5, 7}),
Signature: []byte("UnDadaSeA"),
PowerTableDelta: []certs.PowerTableDelta{
{
ParticipantID: 0,
PowerDelta: gpbft.StoragePower{},
SigningKey: []byte("BaRrelEYe"),
},
},
}
addExample(f3Cert)
addExample(&f3Cert)

block := blocks.Block(&blocks.BasicBlock{})
ExampleValues[reflect.TypeOf(&block).Elem()] = block

Expand Down Expand Up @@ -429,7 +454,6 @@ func init() {
FromHeight: epochPtr(1010),
ToHeight: epochPtr(1020),
})
addExample(&certs.FinalityCertificate{})
addExample(&manifest.Manifest{})
addExample(gpbft.NetworkName("filecoin"))
addExample(gpbft.ActorID(1000))
Expand Down
15 changes: 15 additions & 0 deletions api/mocks/mock_full.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions api/proxy_util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// stm: #unit
package api

import (
Expand Down Expand Up @@ -30,7 +29,6 @@ type StrC struct {
}

func TestGetInternalStructs(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_API_STRUCTS_001
var proxy StrA

sts := GetInternalStructs(&proxy)
Expand All @@ -46,7 +44,6 @@ func TestGetInternalStructs(t *testing.T) {
}

func TestNestedInternalStructs(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_API_STRUCTS_001
var proxy StrC

// check that only the top-level internal struct gets picked up
Expand Down
2 changes: 1 addition & 1 deletion api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ type ForkUpgradeParams struct {
UpgradePhoenixHeight abi.ChainEpoch
UpgradeWaffleHeight abi.ChainEpoch
UpgradeTuktukHeight abi.ChainEpoch
UpgradeXxHeight abi.ChainEpoch
UpgradeTeepHeight abi.ChainEpoch
}

// ChainExportConfig holds configuration for chain ranged exports.
Expand Down
11 changes: 0 additions & 11 deletions blockstore/badger/blockstore_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// stm: #unit
package badgerbs

import (
Expand All @@ -19,8 +18,6 @@ import (
)

func TestBadgerBlockstore(t *testing.T) {
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
(&Suite{
NewBlockstore: newBlockstore(DefaultOptions),
OpenBlockstore: openBlockstore(DefaultOptions),
Expand All @@ -39,8 +36,6 @@ func TestBadgerBlockstore(t *testing.T) {
}

func TestStorageKey(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_STORAGE_KEY_001
bs, _ := newBlockstore(DefaultOptions)(t)
bbs := bs.(*Blockstore)
defer bbs.Close() //nolint:errcheck
Expand Down Expand Up @@ -254,16 +249,10 @@ func testMove(t *testing.T, optsF func(string) Options) {
}

func TestMoveNoPrefix(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_DELETE_001, @SPLITSTORE_BADGER_COLLECT_GARBAGE_001
testMove(t, DefaultOptions)
}

func TestMoveWithPrefix(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_DELETE_001, @SPLITSTORE_BADGER_COLLECT_GARBAGE_001
testMove(t, func(path string) Options {
opts := DefaultOptions(path)
opts.Prefix = "/prefixed/"
Expand Down
Loading

0 comments on commit 78e0bf5

Please sign in to comment.