3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 14:54:15 +00:00
altcoinj/TODO
Mike Hearn ee083d6fac Patch 9 from Steves lazy parsing patchset.
Add UnsafeByteArrayOutputStream.  ByteArrayOutputStreams are used extensively and result in a lot of short lived byte arrays.

This patch contains two optimizations

1/ attempt to provide the final length to ByteArrayOutputStream constructor to avoid constantly resizing the backing array.  Default size is 32 which means larger messages may require several array reallocations and almost all will require at least one.

2/ provides the UnsafeByteArrayOutputStream class which eliminates method synchronization.  The toByteArray() will return the backing array rather than a copy if the correct length was provided in the constructor.

In the worst case scenario this cuts array allocations from 3 to 2.
In the most common worst case from 3 to 1.
In most best cases where final array size is greater than 128 bytes from > 4 to 1.
2011-10-14 12:37:27 +00:00

64 lines
2.5 KiB
Plaintext

Here is a brief list of things that still need to be done.
More unit tests:
- Create a MockNetworkConnection and use it to test the Peer.
API:
- Reorganize the package layout to be more modular.
- Support multiple active wallets.
- Allow sorting of transactions by time.
Protocol:
- Start up faster
- Store a block locator in the persisted chain
- Use the getheaders command to speed up the initial chain download
- Implement tx fees.
- Longer term potentially add a getmerklebranch protocol command so we can check 0-confirmation transactions.
- Support PeerGroups for holding open/using multiple connections at once.
Examples/documentation:
- Implement a simple Swing GUI payment app.
Cleanup:
- Find a way to avoid some horrid hacks when shutting down the network connection.
- Implement a BitCoin class that encapsulates a BigInteger and formatting.
- Make NetworkParameters use subclasses instead of static methods to construct.
==========
Impacts from Steves changes:
- Reformat affected files
- JavaDocs for the c'tors that take parseLazy/parseRetain
- Copyright header/correct author for EmptyMessage/ChildMessage/UnsafeByteArrayOutputStream
- Remove superfluous empty lines in ListMessage.java
- Remove VersionMessage check in Message serialization roundtrip checks
- Delete dead code in Message.checkParsed
- LazyParseByteCacheTest:
- copyright/comments/unused things
- debug prints
- some redundant asserts
- huge functions
- dead code
- Magic number 36 in ListMessage.parseLite
- Manipulator.java needs docs
- Assert in Message c'tor needs an English version.
- Spelling in PeerAddress.bitcoinSerializeToStream
- SpeedTest has a lot of unused fields, large functions. See if it can be simplified/densified.
- Caching immutable lists?
- Dead code in Transaction.parse
- javadocs on Transaction{Input,Output,} getters
- Delete the code related to deduping. The new network management code to be checked in later makes it unnecessary.
Also remove singleDigest as a result (it duplicates Sha256Hash).
- More thoroughly review UnsafeByteArrayOutputStream
Block.java:
- Reformat
- Replace magic number 80 with HEADER_SIZE_BYTES in Block.parseTransactions
- The parseLight stuff isn't clear without referring to superclass.
- Delete dead code in writeTransactions
- checkParse{Header,Transactions} should be maybeParse...
- immutableTransactions is misleading, it allows you to mutate the contents.
- Unit-test only getters should be package private.