Skip to content

Commit

Permalink
chore: undo debug/temp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Dec 18, 2024
1 parent 1519679 commit 69560ba
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 53 deletions.
4 changes: 0 additions & 4 deletions api/clients/v2/disperser_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ func (c *disperserClient) DisperseBlob(
return nil, [32]byte{}, api.NewErrorInternal("uninitialized signer for authenticated dispersal")
}

// if c.accountant == nil {
// return nil, [32]byte{}, api.NewErrorInternal("uninitialized accountant for paid dispersal; make sure to call PopulateAccountant after creating the client")
// }

symbolLength := encoding.GetBlobLengthPowerOf2(uint(len(data)))
payment, err := c.accountant.AccountBlob(ctx, uint64(symbolLength), quorums, salt)
if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions common/aws/dynamodb/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,9 @@ func (c *client) TableExists(ctx context.Context, name string) error {
if name == "" {
return errors.New("table name is empty")
}
describe, err := c.dynamoClient.DescribeTable(ctx, &dynamodb.DescribeTableInput{
_, err := c.dynamoClient.DescribeTable(ctx, &dynamodb.DescribeTableInput{
TableName: aws.String(name),
})
fmt.Println("desribe table check exists", describe)
fmt.Printf("desribe table check exists: %s\n", *describe.Table.TableName)
if err != nil {
return err
}
Expand Down
16 changes: 0 additions & 16 deletions core/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,27 +619,11 @@ type ReservedPayment struct {
QuorumSplits []byte
}

func DummyReservedPayment() *ReservedPayment {
return &ReservedPayment{
SymbolsPerSecond: 0,
StartTimestamp: 0,
EndTimestamp: 0,
QuorumNumbers: []uint8{},
QuorumSplits: []byte{},
}
}

type OnDemandPayment struct {
// Total amount deposited by the user
CumulativePayment *big.Int
}

func DummyOnDemandPayment() *OnDemandPayment {
return &OnDemandPayment{
CumulativePayment: big.NewInt(0),
}
}

type BlobVersionParameters struct {
CodingRate uint32
MaxNumOperators uint32
Expand Down
2 changes: 0 additions & 2 deletions core/eth/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ func (t *Reader) updateContractBindings(blsOperatorStateRetrieverAddr, eigenDASe
}
}

t.logger.Debug("Make payment vault binding")

var contractPaymentVault *paymentvault.ContractPaymentVault
paymentVaultAddr, err := contractEigenDAServiceManager.PaymentVault(&bind.CallOpts{})
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion core/meterer/offchain_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func NewOffchainStore(
return OffchainStore{}, err
}

fmt.Println("check if payment tables exist", reservationTableName)
err = dynamoClient.TableExists(context.Background(), reservationTableName)
if err != nil {
return OffchainStore{}, err
Expand Down
1 change: 0 additions & 1 deletion disperser/apiserver/server_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,5 @@ func (s *DispersalServerV2) GetPaymentState(ctx context.Context, req *pb.GetPaym
CumulativePayment: largestCumulativePaymentBytes,
OnchainCumulativePayment: onchainCumulativePaymentBytes,
}

return reply, nil
}
2 changes: 1 addition & 1 deletion inabox/deploy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ func (env *Config) GenerateAllVariables() {
name := fmt.Sprintf("staker%v", i)
key, address := env.getKey(name)

// Create client paritipants
// Create staker paritipants
participant := Staker{
Address: address,
PrivateKey: key[2:],
Expand Down
2 changes: 0 additions & 2 deletions inabox/deploy/config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ type EigenDADeployConfig struct {
ConfirmerPrivateKey string `json:"confirmerPrivateKey"`
StakerTokenAmounts [][]string `json:"-"`
OperatorPrivateKeys []string `json:"-"`
// ClientPrivateKeys []string `json:"clientPrivateKeys"`
}

func (cfg *EigenDADeployConfig) MarshalJSON() ([]byte, error) {
Expand Down Expand Up @@ -86,7 +85,6 @@ func (cfg *EigenDADeployConfig) MarshalJSON() ([]byte, error) {
"maxOperatorCount": cfg.MaxOperatorCount,
"stakerPrivateKeys": cfg.StakerPrivateKeys,
"confirmerPrivateKey": cfg.ConfirmerPrivateKey,
// "clientPrivateKeys": cfg.ClientPrivateKeys,
}

remainingJSON, err := json.Marshal(remainingFields)
Expand Down
9 changes: 0 additions & 9 deletions inabox/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (env *Config) generateEigenDADeployConfig() EigenDADeployConfig {

operators := make([]string, 0)
stakers := make([]string, 0)
// clients := make([]string, 0)
maxOperatorCount := env.Services.Counts.NumMaxOperatorCount

numStrategies := len(env.Services.Stakes)
Expand Down Expand Up @@ -72,21 +71,13 @@ func (env *Config) generateEigenDADeployConfig() EigenDADeployConfig {
operators = append(operators, env.getKeyString(operatorName))
}

// // 4 clients: with both, with reservations, with on-demand payments, without payments
// for i := 0; i < 4; i++ {
// clientName := fmt.Sprintf("client%d", i)
// clients = append(clients, env.getKeyString(clientName))
// }
// fmt.Println("------- clients -------", clients)

config := EigenDADeployConfig{
UseDefaults: true,
NumStrategies: numStrategies,
MaxOperatorCount: maxOperatorCount,
StakerPrivateKeys: stakers,
StakerTokenAmounts: stakes,
OperatorPrivateKeys: operators,
// ClientPrivateKeys: clients,
ConfirmerPrivateKey: env.getKeyString("batcher0"),
}

Expand Down
112 changes: 101 additions & 11 deletions inabox/geth/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,126 @@
},
"difficulty": "1",
"gasLimit": "3000000000000",
"extradata": "0x0000000000000000000000000000000000000000000000000000000000000000d5a0359da7b310917d7760385516b2426e86ab7f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"extradata": "0x00000000000000000000000000000000000000000000000000000000000000003aa273f6c6df3a8498ebdcdd241a2575e08cde640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"alloc": {
"d5a0359da7b310917d7760385516b2426e86ab7f": {
"3aa273f6c6df3a8498ebdcdd241a2575e08cde64": {
"balance": "10000000000000000000000"
},
"9441540e8183d416f2dc1901ab2034600f17b65a": {
"9b3c9d02803fc33e6741a13f12da3a1d6c4713c0": {
"balance": "10000000000000000000000"
},
"f270e0dd5a1cc34cda8fb991307604097e622002": {
"3e3dc19803b5bb0b9defc6150624d3c6a43e17b8": {
"balance": "10000000000000000000000"
},
"cab1b44dd1f1c265405878ac1179cd94d0dba634": {
"41c8e41184f75d9fedf066a18bf3b1ee0f2b52cd": {
"balance": "10000000000000000000000"
},
"cebe05cd708f000177b12e8270dfc310d834f4cb": {
"339bd9107d62664f14622af9e9babd96c43601af": {
"balance": "10000000000000000000000"
},
"ad5824ed245e92ec3ec65ffd828f5de74529fba8": {
"d4f4f56f2316730d32caf7236f3f8238c0209392": {
"balance": "10000000000000000000000"
},
"8ac5c23217164edcbb4ffc54a784961b7349d8db": {
"e17bad29284b9a8e7b49439b3904819814f67944": {
"balance": "10000000000000000000000"
},
"b298731f7a058aa7f27edd28d5085f8096016077": {
"e1d0d0adf2e30710ec9c009130a399031e76653d": {
"balance": "10000000000000000000000"
},
"1ed94239dd059dbe628743dd541686095c37e7d4": {
"4f492dae6157e0d2cbd9c93499e38964089dc811": {
"balance": "10000000000000000000000"
},
"0b3cf18fa9043390da5c47cf814e0d7cfc468587": {
"6627b6917fe0b16be1199a921485c332df163847": {
"balance": "10000000000000000000000"
},
"21b3c67f628308f9cb91ed5a1e1fa3af3d62bd66": {
"balance": "10000000000000000000000"
},
"9f7ba464e1f93922cd7815340e4e2dc9ea9246cb": {
"balance": "10000000000000000000000"
},
"7f260f2c3e51db9050165c301e810544781353d9": {
"balance": "10000000000000000000000"
},
"cc168bcf4ca5ffa966cef9a1d82096caba134f60": {
"balance": "10000000000000000000000"
},
"2958cf3b40801f94ecaf639f11a1abae22b3bbce": {
"balance": "10000000000000000000000"
},
"dd85f291e1d64aff4cf6158a429996beb9e83c80": {
"balance": "10000000000000000000000"
},
"2406e62561d4e2cd5d31cc1210f3411dddd52aca": {
"balance": "10000000000000000000000"
},
"785314a573f5718d173d495b6e6e71ea1536fd61": {
"balance": "10000000000000000000000"
},
"9f2b611c3fbbb75ce3b4de684e61f1afa985432e": {
"balance": "10000000000000000000000"
},
"989b3ca3ee9e35bad4264a52ce74a2d3a40448c5": {
"balance": "10000000000000000000000"
},
"77bd0b1fc456b5ae69212c27ed3460a139e96088": {
"balance": "10000000000000000000000"
},
"411dc05f378f71f548466ac7b712402ffc8fb890": {
"balance": "10000000000000000000000"
},
"db87fd9b6d6030f8803dd897332897066a62b1b0": {
"balance": "10000000000000000000000"
},
"277c4527bcbee90a522484ff1b3bf2f00bc47db5": {
"balance": "10000000000000000000000"
},
"1c8db22179eef3df5be9c7b5105ada4c8e215c00": {
"balance": "10000000000000000000000"
},
"ae6828606c276102bb235bfd3367028594dd6f57": {
"balance": "10000000000000000000000"
},
"bede9cef202313b3a4fb3cf78229c693fc0cc7a2": {
"balance": "10000000000000000000000"
},
"9f9cf64a74234fc25f7fe76d9d26fa3d1c62bd54": {
"balance": "10000000000000000000000"
},
"575bc3d8a6a6ece357ab7cad27f04d3162d6d3e3": {
"balance": "10000000000000000000000"
},
"c780fed36eb9de80aaf4854d4635a98fd41f574f": {
"balance": "10000000000000000000000"
},
"1d123cfc4692760e0fcf35ae38a07cf63f9c45c4": {
"balance": "10000000000000000000000"
},
"72101d732055d7eea6d1ac1d6bd59351e3049367": {
"balance": "10000000000000000000000"
},
"2d6a5ef88d73410a4d78fb3de8cc5c6a84cddf89": {
"balance": "10000000000000000000000"
},
"22718436a53d0fb585a5ae52fcdd0bc03416b0ff": {
"balance": "10000000000000000000000"
},
"34566e074bf559d824e9c47353336e7880981689": {
"balance": "10000000000000000000000"
},
"68ae7598ff568ff74a3c513f16d03475a1f0bde3": {
"balance": "10000000000000000000000"
},
"ccf713bf2c8937aafa29f40058a04acfad1ae769": {
"balance": "10000000000000000000000"
},
"bba7581cca70e96c98041e8d3b9b3e8299468e44": {
"balance": "10000000000000000000000"
},
"5c5ed4f0523a349e6c7f14184daa992aa1d766a0": {
"balance": "10000000000000000000000"
},
"9cf5643b98ccc3a574eb4c51d591140d18390bf5": {
"balance": "10000000000000000000000"
}
}
Expand Down
4 changes: 1 addition & 3 deletions inabox/tests/integration_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

var _ = Describe("Inabox v2 Integration", func() {
It("test end to end scenario", func() {
ctx, cancel := context.WithTimeout(context.Background(), 180*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()

privateKeyHex := "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcded"
Expand All @@ -34,8 +34,6 @@ var _ = Describe("Inabox v2 Integration", func() {
}, signer, nil, nil)
Expect(err).To(BeNil())
Expect(disp).To(Not(BeNil()))
err = disp.PopulateAccountant(ctx)
Expect(err).To(BeNil())

data1 := make([]byte, 992)
_, err = rand.Read(data1)
Expand Down

0 comments on commit 69560ba

Please sign in to comment.