Skip to content

ServiceProviderRegistry: align on canonical decoding address from bytes #758

@wjmelements

Description

@wjmelements

We already align on encoding (always use 20 bytes).

Decoding address is simple when the length is 20 bytes but we have different behavior in different places when the length is different.

Curio currently uses the bottom 20 bytes and might fail when the address is shorter than that. I think our canonical decoding behavior should match the behavior of address(uint160(BigEndian.decode(values[i]))) in Solidity.
Can reuse these synapse test cases from packages/synapse-core/src/test/capabilities.test.ts.

These fields are fairly unimportant so far so this is not urgent.

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomersteam/fs-wgItems being worked on or tracked by the "FS Working Group". See FilOzone/github-mgmt #10

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions