Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

senders and receivers are empty in the response of dense_pull_ledger_diff #979

Closed
Dengjianping opened this issue Jan 10, 2023 · 0 comments · Fixed by #982
Closed

senders and receivers are empty in the response of dense_pull_ledger_diff #979

Dengjianping opened this issue Jan 10, 2023 · 0 comments · Fixed by #982
Assignees
Labels
A-calamari Area: Issues and PRs related to the Calamari Runtime A-client Client - i.e. not upgradeable with the runtime - changes A-manta-pay Area: Issues and PRs related to the MantaPay Pallet A-runtime Area: Issues and PRs related to Runtimes A-serialization Area: Issues and PRs related to Serialization C-bug Category: Issues documenting a bug L-fixed Log: Issues and PRs related to bug fixes P-high Priority: High T-runtime Team: Relevant for the Runtime Team
Milestone

Comments

@Dengjianping
Copy link
Contributor

Dengjianping commented Jan 10, 2023

When runtime(wasm) gets the data from related storages, then pass it to client(host, jsonrpsee), codec(skip) will skip to encode both two fields.
The response like

{
  should_continue: false,
  receivers: '',
  senders: '',
  senders_receivers_total: '0x02000000000000000000000000000000',
  next_checkpoint: null
}

This is caused by the macro codec(skip)

ub struct DensePullResponse {
    ...
    #[codec(skip)]
    pub receivers: String,

    #[codec(skip)]
    pub senders: String,
    ...
}

But runtime(codec) doesn't allow to use String, removing #[codec(skip)] will report compilation error.

#[derive(Clone, Debug, Encode, Default, Eq, Hash, Decode, PartialEq, TypeInfo)]
      |                        ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `String`
@Dengjianping Dengjianping self-assigned this Jan 10, 2023
@Dengjianping Dengjianping added C-bug Category: Issues documenting a bug A-calamari Area: Issues and PRs related to the Calamari Runtime A-runtime Area: Issues and PRs related to Runtimes P-high Priority: High T-runtime Team: Relevant for the Runtime Team A-serialization Area: Issues and PRs related to Serialization A-manta-pay Area: Issues and PRs related to the MantaPay Pallet L-fixed Log: Issues and PRs related to bug fixes A-client Client - i.e. not upgradeable with the runtime - changes labels Jan 10, 2023
@Dengjianping Dengjianping added this to the v4.0.1 milestone Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-calamari Area: Issues and PRs related to the Calamari Runtime A-client Client - i.e. not upgradeable with the runtime - changes A-manta-pay Area: Issues and PRs related to the MantaPay Pallet A-runtime Area: Issues and PRs related to Runtimes A-serialization Area: Issues and PRs related to Serialization C-bug Category: Issues documenting a bug L-fixed Log: Issues and PRs related to bug fixes P-high Priority: High T-runtime Team: Relevant for the Runtime Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant