onflow / onflow/flow

GRPC::ResourceExhausted: 8:Received message larger than max (4399180 vs. 4194304).

Open
#751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feedback
Dominant language
Go
Stars
361
Forks
159
PR merge metrics
No merged PRs in 30d

Description

Hi guys,
I'm using your protobuf source files, but I have a problem with received message when I'm trying to get transaction result.

Steps to Reproduce

Backtrace of error.

Caused by:
GRPC::ResourceExhausted: 8:Received message larger than max (9259070 vs. 4194304). debug_error_string:{"created":"@1641864948.226107284","description":"Received message larger than max (9259070 vs. 4194304)","file":"src/core/ext/filters/message_size/message_size_filter.cc","file_line":205,"grpc_status":8}
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:29:in `check_status'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:180:in `attach_status_results_and_complete_call'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:376:in `request_response'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:180:in `block in request_response'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/interceptors.rb:170:in `intercept!'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:179:in `request_response'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/service.rb:171:in `block (3 levels) in rpc_stub_class'
/var/www/etl/releases/20220109122655/lib/etl/flow_blockchain/flow_client/client.rb:68:in `get_transaction_result_by_id'

Code:

  class Client
    def initialize(node_address)
      @stub = Flow::Access::AccessAPI::Stub.new(node_address, :this_channel_is_insecure)
    end

    # Returns the execution result of a transaction.
    # @param [String] id
    # @return [FlowClient::TransactionResult] the transaction result
    def get_transaction_result_by_id(id)
      req = Flow::Access::GetTransactionRequest.new(id: to_bytes(id))

      begin
        res = @stub.get_transaction_result(req)
      rescue GRPC::BadStatus => e
        raise StandardError, e.details 
      else
        TransactionResult.parse_grpc(res)
      end
    end
end

How can I increase the maximum available received message length?

Thank you in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The failing call is get_transaction_result_by_id in the reported client.rb at line 68, using the Flow::Access protobuf Stub. Start by tracing that stub's Ruby grpc channel configuration and the protobuf definitions linked in the issue. Done means retrieving an oversized transaction result without GRPC::ResourceExhausted and still parsing it as a TransactionResult.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, ruby
Domain
api, blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.