Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 146 additions & 1 deletion relayer/contracts/gateway.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions relayer/relays/execution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (r *Relay) fetchUnprocessedParachainNonces(latest uint64) ([]uint64, error)
latestBucket := latest / 128

for b := uint64(0); b <= latestBucket; b++ {
encodedBucket, err := types.EncodeToBytes(types.NewU128(*big.NewInt(int64(b))))
encodedBucket, err := types.EncodeToBytes(types.NewU64(b))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to the subxt change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it's to coordinate with paritytech/polkadot-sdk#8240, which includes an optimized SparseBitmap.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you @yrong!

bucketKey, _ := types.CreateStorageKey(
r.paraconn.Metadata(),
"EthereumInboundQueueV2",
Expand Down Expand Up @@ -261,7 +261,7 @@ func (r *Relay) isParachainNonceSet(index uint64) (bool, error) {
bucket := index / 128
bitPosition := index % 128

encodedBucket, err := types.EncodeToBytes(types.NewU128(*big.NewInt(int64(bucket))))
encodedBucket, err := types.EncodeToBytes(types.NewU64(bucket))
bucketKey, err := types.CreateStorageKey(r.paraconn.Metadata(), "EthereumInboundQueueV2", "NonceBitmap", encodedBucket)
if err != nil {
return false, fmt.Errorf("create storage key for EthereumInboundQueueV2.NonceBitmap: %w", err)
Expand Down
Loading
Loading