Skip to content

Commit

Permalink
Resolved builder errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLord017 committed Nov 4, 2024
1 parent 1e08ad5 commit 1b6d9eb
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 99 deletions.
42 changes: 18 additions & 24 deletions consensus/consensus_core/consensus_core.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
package consensus_core

import (
"bytes"

"github.com/ugorji/go/codec"
)

type Transaction = [1073741824]byte
type Bytes32 [32]byte
type BLSPubKey [48]byte
type Address [20]byte
type LogsBloom [256]byte
type SignatureBytes [96]byte
type Transaction = [1073741824]byte //1073741824

type BeaconBlock struct {
Slot uint64 `json:"slot"`
Expand Down Expand Up @@ -112,23 +106,23 @@ type Withdrawal struct {
}

type ExecutionPayload struct {
ParentHash Bytes32
FeeRecipient Address
StateRoot Bytes32
ReceiptsRoot Bytes32
LogsBloom LogsBloom
PrevRandao Bytes32
BlockNumber uint64
GasLimit uint64
GasUsed uint64
Timestamp uint64
ExtraData [32]byte
BaseFeePerGas uint64
BlockHash Bytes32
Transactions []Transaction `ssz-max:"1048576"`
Withdrawals []Withdrawal `ssz-max:"16"`
BlobGasUsed *uint64 // Deneb-specific field, use pointer for optionality
ExcessBlobGas *uint64 // Deneb-specific field, use pointer for optionality
ParentHash Bytes32 `json:"parent_hash"`
FeeRecipient Address `json:"fee_recipient"`
StateRoot Bytes32 `json:"state_root"`
ReceiptsRoot Bytes32 `json:"receipts_root"`
LogsBloom LogsBloom `json:"logs_bloom"`
PrevRandao Bytes32 `json:"prev_randao"`
BlockNumber uint64 `json:"block_number"`
GasLimit uint64 `json:"gas_limit"`
GasUsed uint64 `json:"gas_used"`
Timestamp uint64 `json:"timestamp"`
ExtraData []byte `json:"extra_data"`
BaseFeePerGas uint64 `json:"base_fee_per_gas"`
BlockHash Bytes32 `json:"block_hash"`
Transactions []Transaction `json:"transactions"`
Withdrawals *[]Withdrawal `json:"withdrawals"` //Only capella and deneb
BlobGasUsed *uint64 `json:"blob_gas_used"` // Only deneb
ExcessBlobGas *uint64 `json:"excess_blob_gas"` // Only deneb
}

type SignedBlsToExecutionChange struct {
Expand Down
2 changes: 1 addition & 1 deletion consensus/rpc/consensus_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package rpc

import (
"github.com/BlocSoc-iitr/selene/consensus/consensus_core"
"github.com/BlocSoc-iitr/selene/utils"

)

// return types not mention and oarameters as well
Expand Down
10 changes: 0 additions & 10 deletions consensus/rpc/mock_rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ import (
"testing"
)

<<<<<<< HEAD
=======
func TestNewMockRpc(t *testing.T) {
path := "/tmp/testdata"
mockRpc := NewMockRpc(path)
if mockRpc.testdata != path {
t.Errorf("Expected testdata path to be %s, got %s", path, mockRpc.testdata)
}
}
>>>>>>> 8c9adab233a285540ae026d334a2740131590c79
func TestGetBootstrap(t *testing.T) {
tempDir, err := os.MkdirTemp("", "mock_rpc_test")
if err != nil {
Expand Down
28 changes: 15 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,52 @@ module github.com/BlocSoc-iitr/selene
go 1.22.3

require (
github.com/avast/retry-go v3.0.0+incompatible
github.com/consensys/gnark-crypto v0.12.1
github.com/ethereum/go-ethereum v1.14.11
github.com/holiman/uint256 v1.3.1
github.com/kilic/bls12-381 v0.1.0
github.com/pkg/errors v0.9.1
github.com/protolambda/bls12-381-util v0.1.0
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/ugorji/go/codec v1.2.12
github.com/wealdtech/go-merkletree v1.0.0
golang.org/x/crypto v0.22.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v1.1.1 // indirect
github.com/cockroachdb/pebble v1.1.2 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/kilic/bls12-381 v0.1.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
Expand All @@ -58,7 +66,6 @@ require (
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/protolambda/bls12-381-util v0.1.0 // indirect
github.com/protolambda/zrnt v0.32.2 // indirect
github.com/protolambda/ztyp v0.2.2 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand All @@ -71,24 +78,19 @@ require (
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/supranational/blst v0.3.13 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/wealdtech/go-merkletree v1.0.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading

0 comments on commit 1b6d9eb

Please sign in to comment.