Skip to content

rergegrerg - #1

Open
Ahmedramadan28 wants to merge 5946 commits into
Ahmedramadan28:mainfrom
unionlabs:main
Open

rergegrerg#1
Ahmedramadan28 wants to merge 5946 commits into
Ahmedramadan28:mainfrom
unionlabs:main

Conversation

@Ahmedramadan28

Copy link
Copy Markdown
Owner

rer

benluelo and others added 30 commits January 6, 2026 12:56
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
also more lenient packet hash parsing in app urls
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
benluelo and others added 30 commits June 1, 2026 21:35
gno related changes:
- add lc (`gno-verifier`, `gno-light-client`, `gno-light-client-types`)
- add to `protos`
- add types (`gno-types`) and jsonrpc client (`gno-rpc`)
- add client (`gno-client`, similar to `cosmos-client`)
- add all required gno voyager modules and plugins
- add v3 to `state-lens/ics23/ics23` client spec, both evm and cosmwasm
(may be removed in the future, see
onbloc/gno-ibc#39)
- add various gno utilities to `u`

non gno related changes:
- add `AbciQueryResponse::decode_merkle_proof` to deduplicate some code
throughout various abci-compatible voyager modules/plugins
- add some more test cases to `ibc-union-spec`
- fix `ucs03-zkgm-packet` `TokenOrderV2Metadata` metadata serde
- fix `ethereum-light-client-types` `LightClientUpdate` serde
- fix some voyager error messages
- remove extraneous `ChainIdParseError` through voyager plugins/modules
- add some more config checks throughout voyager plugins/modules
_timeoutCall was passing call.contractAddress instead of call.sender to
encodeCallCalldata. Both _executeCall and _acknowledgeCall use
call.sender correctly only the timeout path had the wrong argument.

This causes the inner IBC module to receive a packet with an incorrect
sender field on timeout, which can result in a wrong refund address or a
stuck packet.
Reverts changes from 5b49e95 that
removed the auth types fee collector module account.
…ng/gno#5716 (#5474)

## Summary
Fixes the amino encoding of `CanonicalPartSetHeader` to match the field
order and types defined in
[gnolang/gno#5716](gnolang/gno#5716).

Previously, `total` was encoded as `sint32` at field tag 2 and `hash` at
tag 1, diverging from the upstream gno spec and causing signature
verification failures against current gno testnet blocks.

## Changes

- **`lib/gno-types/src/part_set_header.rs`** — reorder fields in
`CanonicalPartSetHeader`: `total` moved to tag 1 (`uint32`), `hash` to
tag 2; update `canonicalize_part_set_header` accordingly
- **`lib/gno-types/src/vote.rs`** — update expected amino-encoded bytes
in unit test to reflect corrected field ordering
- **`lib/gno-verifier/src/verify.rs`** — update testdata file references
- **`lib/gno-verifier/testdata`** — replace stale mainnet testdata with
current test-13 block data (height 381822–381823)

## Test

Existing `verify_works` test in `lib/gno-verifier/src/verify.rs` runs
against the new testnet13 testdata and passes with the corrected
encoding.
…_by_hash

The second PacketSend filter in query_packet_by_hash hardcoded the realm
"gno.land/r/core/ibc/v1/core", while the sibling filter is templated from
ibc_core_realm. For any deployment whose IBC core realm differs from that
default (e.g. gno.land/r/onbloc/ibc/union/core), the _and over the two filters
matches zero events, so packet-by-hash lookups return nothing. Template both
pkg_path filters from ibc_core_realm.

Assisted-By: Claude (AI agent)
…_by_hash (#5476)

## Problem

`query_packet_by_hash` in the gno **state** module `_and`s two
`PacketSend` event filters (one matched by `source_channel_id`, one by
`packet_hash`). The first filter's `pkg_path` is templated from
`ibc_core_realm`, but the second hardcodes
`gno.land/r/core/ibc/v1/core`.

For any gno deployment whose IBC core realm differs from that default —
e.g. the onbloc port at `gno.land/r/onbloc/ibc/union/core` — the second
filter matches zero events, the `_and` yields nothing, and
`query_packet_by_hash` returns no transaction.

## Fix

Template **both** `pkg_path` filters from `ibc_core_realm` (bind it once
as a `format!` captured identifier, like `channel_id`/`packet_hash`
already are, and drop the now-unused positional arg). Behavioral change
is one filter; diff is +4/-4.

## Notes

- Found while wiring Voyager's gno modules against the onbloc
`gno.land/r/onbloc/ibc/union/core` deployment; with `ibc_core_realm` set
to that realm, packet-by-hash lookups resolve correctly after this
change.
- I did not build voyager locally for this change — relying on CI; it's
a focused string-template fix with no logic change.

---
🤖 Disclosure: this PR was prepared by **Claude (an AI agent)** on behalf
of @tbruyelle.
fixes #5428

## Summary

both `Poll` implementations had two input-validation guards comparing
each commit's `Signatures` slice length against itself, so the condition
was always false and the "More signatures than validators" error never
fired.
a malformed request with more signatures than validators would skip the
check entirely and reach the prover. this fixes both comparisons to use
`Validators` on the right-hand side. the same copy paste bug was in both
server files; both are patched in this commit

## Changes

- `galoisd/grpc/server.go`: compare `Signatures` against `Validators`
for both the trusted and untrusted commits
- `galoisd/grpc/bls12381_server.go`: same fix (the guard was copy pasted
from `server.go` with the same typo)
- `galoisd/grpc/server_test.go`: regression test that `Poll` rejects a
commit with more signatures than validators, covering both server types
and both commit fields (4 sub-cases total)

## Testing

`go test ./grpc/...` in `galoisd\`. the new test fails before the fix
(the dead guard is skipped so a zero-value server hits the job-slot
check and returns `busy_building`), and passes after. also ran `go build
./grpc/...` and `go vet ./grpc/...`
#5475)

Closes #3417.

## What this does

Adds a `u slot` subcommand (alias `u s`) to the `u` CLI. Given a
Solidity storage layout type and an ordered list of keys, it prints the
storage slot as a `0x`-prefixed 32-byte hex value to stdout.

```
u slot "mapping(uint256 => mapping(uint256 => uint256)[])" 100 1 123
# 0x00a9b48fe93e5d10ebc2d9021d1477088c6292bf047876944343f57fdf3f0467
```

Keys go outermost to innermost. The output is bare (no label), so it
pipes into other tools without any stripping.

## Implementation

- New module `tools/u/src/slot.rs` with three private functions:
`parse_layout` (wraps the bare type in a dummy state variable so
`syn-solidity` can parse it), `parse_mapping_key` (maps a Solidity key
type and string value to `MappingKey`), and `build_slot` (walks the type
tree consuming keys front-to-back, allocating each `Slot` node in a
`typed_arena::Arena` to satisfy the borrow-based lifetime constraints).
- Reuses the existing `solidity-slot` library unchanged.
- Wired into `main.rs` as `Cmd::Slot` with visible alias `s`.
- Added `syn-solidity` and `typed-arena` to workspace dependencies.

## Test coverage

14 unit tests covering: nested mapping + array layout parsing, all
supported key types (`uint256`, `uint64`, `bytes32`, `string`),
rejection of unsupported types and malformed inputs, the known-answer
vector from the issue, too-few and too-many keys, a single mapping, a
single dynamic array, and a `bytes32` key.

## Checklist

- [x] `cargo clippy -p u --all-targets` passes
- [x] `cargo fmt -p u` produces no diff
- [x] `cargo test -p u` passes (14/14)
- [x] Known-answer vector confirmed end-to-end via CLI
- [x] Positional args (not flags), per maintainer feedback
- [x] Lives in existing `tools/u` crate, no new crate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.