Page MenuHomePhabricator

Ensure the http server accept request at least twice as large as the block size.
ClosedPublic

Authored by deadalnix on Apr 12 2018, 20:32.

Details

Summary

As per title. This ensures it is always possible to submit blocks via RPC.

Fixes T319

Test Plan

Added a test case to abc-p2p-fullblocktest where a very large block is submited via RPC.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
largerpcsubmit
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2308
Build 2754: Bitcoin ABC Buildbot (legacy)
Build 2753: arc lint + arc unit

Event Timeline

schancel requested changes to this revision.Apr 12 2018, 20:56
schancel added a subscriber: schancel.
schancel added inline comments.
src/httpserver.cpp
43 ↗(On Diff #3489)

under wish -> under which

This makes no sense to me.

How about:

/** Maximum HTTP post body size.  Twice the maximum block size is added to this value in practice. */
static const size_t BASE_MAXIMUM_HTTP_BODY_SIZE = 0x02000000;
44 ↗(On Diff #3489)

Why is this and MAX_SIZE using hex? Are these values related?

static const uint64_t MAX_SIZE = 0x02000000
424 ↗(On Diff #3489)

I thought you wanted a solution that was specific to submitblock?

This revision now requires changes to proceed.Apr 12 2018, 20:56
src/httpserver.cpp
44 ↗(On Diff #3489)

No they aren't related.

424 ↗(On Diff #3489)

Well, there are no way to do that considering the way things are setup right now.

deadalnix added a task: Restricted Maniphest Task.
schancel added inline comments.
src/httpserver.cpp
43 ↗(On Diff #3492)

This still makes no sense, but √

This revision is now accepted and ready to land.Apr 12 2018, 23:06

reformulate comment as per suggestion

This revision was automatically updated to reflect the committed changes.