diff --git a/Makefile b/Makefile index 2463f61ba0..1bddce65e9 100644 --- a/Makefile +++ b/Makefile @@ -118,8 +118,6 @@ feedernode: juno-cached --metrics-port=9090 node1: juno-cached -# todo remove rm before merge - rm -rf ./p2p-dbs/node1/ && \ ./build/juno \ --network=sepolia \ --log-level=debug \ diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index 3495df361d..fa3c5b446d 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -45,16 +45,15 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, NLeaves: header.EventCount, Root: AdaptHash(commitments.EventCommitment), }, - // todo fill receipts with receipt commitment - Receipts: AdaptHash(&felt.Zero), + Receipts: AdaptHash(commitments.ReceiptCommitment), ProtocolVersion: header.ProtocolVersion, - GasPriceFri: AdaptUint128(header.GasPrice), + GasPriceFri: AdaptUint128(header.GasPriceSTRK), Signatures: utils.Map(header.Signatures, AdaptSignature), StateDiffCommitment: &spec.StateDiffCommitment{ StateDiffLength: stateDiffLength, Root: AdaptHash(stateDiffCommitment), }, - GasPriceWei: AdaptUint128(header.GasPriceSTRK), + GasPriceWei: AdaptUint128(header.GasPrice), DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), L1DataAvailabilityMode: adaptL1DA(header.L1DAMode), diff --git a/adapters/p2p2core/block.go b/adapters/p2p2core/block.go index 4b54d12f9a..e593a3d6c8 100644 --- a/adapters/p2p2core/block.go +++ b/adapters/p2p2core/block.go @@ -40,7 +40,6 @@ func AdaptBlockHeader(h *spec.SignedBlockHeader, eventsBloom *bloom.BloomFilter) PriceInWei: AdaptUint128(h.DataGasPriceWei), PriceInFri: AdaptUint128(h.DataGasPriceFri), }, - // todo(kirill) check prices GasPrice: AdaptUint128(h.GasPriceWei), GasPriceSTRK: AdaptUint128(h.GasPriceFri), } diff --git a/p2p/starknet/handlers.go b/p2p/starknet/handlers.go index 5b8b1ba5f8..bbddda3076 100644 --- a/p2p/starknet/handlers.go +++ b/p2p/starknet/handlers.go @@ -150,7 +150,7 @@ func (h *Handler) onHeadersRequest(req *spec.BlockHeadersRequest) (iter.Seq[prot return &spec.BlockHeadersResponse{ HeaderMessage: &spec.BlockHeadersResponse_Header{ - Header: core2p2p.AdaptHeader(header, commitments, stateUpdate.StateDiff.Commitment(), + Header: core2p2p.AdaptHeader(header, commitments, stateUpdate.StateDiff.Hash(), stateUpdate.StateDiff.Length()), }, }, nil