>I agree, but nothing I have advocated creates significant technical
>debt. It is also a bad engineering practice to combine functional
>changes (especially ones with poorly understood system wide
>consequences and low user autonomy) with structural tidying.

I don't think I would classify placing things in consensus critical code when it doesn't need to be as "structural tidying".  Gavin said "pile on" which you took as implying "a lot", he can correct me, but I believe he meant "add to".  

> (especially ones with poorly understood system wide consequences and low user autonomy)

This implies there you have no confidence in the unit tests and functional testing around Bitcoin and should not be a reason to avoid refactoring.  It's more a reason to increase testing so that you will have confidence when you refactor.

Also I don't think Martin Fowler would agree with you...

"Refactoring should be done in conjunction with adding new features."
 
"Always leave the code better than when you found it."

"Often you start working on adding new functionality and you realize the existing structures don't play well with what you're about to do.

In this situation it usually pays to begin by refactoring the existing code into the shape you now know is the right shape for what you're about to do."


-Martin Fowler








On Tue, Dec 8, 2015 at 7:31 PM, Gregory Maxwell via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
On Wed, Dec 9, 2015 at 1:09 AM, Gavin Andresen <gavinandresen@gmail.com> wrote:
> Create a 1-megabyte transaction, with all of it's inputs spending
> segwitness-spending SIGHASH_ALL inputs.
>
> Because the segwitness inputs are smaller in the block, you can fit more of
> them into 1 megabyte. Each will hash very close to one megabyte of data.

Witness size comes out of the 1MB at a factor of 0.25. It is not
possible to make a block which has signatures with the full 1MB of
data under the sighash while also having signatures externally.  So
every byte moved into the witness and thus only counted as 25% comes
out of the data being hashed and is hashed nInputs (*checksigs) less
times.

> I think it is a huge mistake not to "design for success" (see
> http://gavinandresen.ninja/designing-for-success ).

We are designing for success; including the success of being able to
adapt and cope with uncertainty-- which is the most critical kind of
success we can have in a world where nothing is and can be
predictable.

> I think it is a huge mistake to pile on technical debt in consensus-critical
> code. I think we should be working harder to make things simpler, not more
> complex, whenever possible.

I agree, but nothing I have advocated creates significant technical
debt. It is also a bad engineering practice to combine functional
changes (especially ones with poorly understood system wide
consequences and low user autonomy) with structural tidying.

> And I think there are pretty big self-inflicted current problems because
> worries about theoretical future problems have prevented us from coming to
> consensus on simple solutions.

That isn't my perspective. I believe we've suffered delays because of
a strong desire to be inclusive and hear out all ideas, and not
forestall market adoption, even for ideas that eschewed pragmatism and
tried to build for forever in a single step and which in our hear of
hearts we knew were not the right path today. It's time to move past
that and get back on track with the progress can make and have been
making, in terms of capacity as well as many other areas. I think that
is designing for success.
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev