Commit Graph

36 Commits

Author SHA1 Message Date
Dave Collins
a20782d6a4
sampleconfig: Use embed with external files.
This updates the sampleconfig package to make use of Go's embed
functionality introduced in Go 1.16 which is acceptable since the
containing module requires Go 1.19.

Embedded files are preferable because they bring the benefits of both
external files in the repository that are easier to work with for
external tools and the ability to access their content programmatically
without having to deal with the various issues typically brought about
by programmatically accessing external files.

Also, when this was last updated to change the exported variable for
dcrd's sample config file over to a function (so it can't be mutated and
the implementation details can be changed if needed), the case for
dcrctl was missed.  Moreover, the existence of both configs makes the
func name FileContents ambiguous.

Unfortunately, those things can't be changed now without causing a major
module version bump to the main dcrd module which we really want to
avoid.

So, in order to address those things without needing a major module
version bump, this deprecates the FileContents func and
DcrctlSampleConfig variable and introduces two new functions named Dcrd
and Dcrctl that return the respective embedded sample configs.
2023-09-18 03:32:50 -05:00
Dave Collins
4ac52e6dc4
config: Deprecate block prio size CLI option.
Now that the old low-fee/free tx relay policy has been removed, there is
no longer any need to consider a block priority size for block templates
since the option only applied to handling prioritization of low-fee/free
transactions.

Consequently, this deprecates the --blockprioritysize CLI option and
removes the associated code that propagates the configuration option to
the block template generator code.
2022-09-28 12:49:31 -05:00
Dave Collins
dc988207f2
config: Deprecate min block size CLI option.
Now that the old low-fee/free tx relay policy has been removed, there is
no longer any need to consider a minimum block size for block templates
since the option only applied to handling low-fee/free transactions.

Consequently, this deprecates the --blockminsize CLI option and removes
the associated code that changes behavior based on the option.
2022-09-21 21:41:31 -05:00
Dave Collins
83050d3dfe
config: Deprecate limitfreerelay CLI option.
This deprecates the --limitfreerelay CLI option and removes the
associated code that changes behavior based on the option.

This is part of the overall removal of the low-fee/free tx relay policy
and associated rate limiting.
2022-06-29 13:07:04 -05:00
Dave Collins
11f2e7708e
config: Deprecate norelaypriority CLI option.
Prior to the introduction of child-pays-for-parent (CPFP), it was
possible for transactions to essentially become stuck forever if they
didn't pay a high enough fee for miners to include them in a block.

In order to prevent this, a policy was introduced to allow relaying of
low-fee/free transactions based on a priority that is calculated based
on the fee as well as the age of coins being spent.  This means that the
priority slowly increases over time as the coins age to ensure such
transactions would eventually be relayed and mined.  Further, in order
to prevent abuse the behavior could otherwise allow, this policy
includes additional rate-limiting of these types of transactions.

While the policy served its purpose in the past, there are some
downsides such as:
- A confusing UX where transactions that don't pay enough fees and also
  aren't old enough to meet the dynamically changing priority
  requirements are rejected due to having insufficient priority instead
  of not paying enough fees as the user might expect
- The priority requirements dynamically change over time which leads to
  non-deterministic behavior and thus ultimately results in what appear
  to be intermittent/transient failures to users

Since the policy is no longer necessary given said transactions can now
simply use CPFP to increase the overall fee of the entire transaction
chain thereby ensuring they are mined, this is the first of a series of
commits to remove the aforementioned policy along with associated rate
limiting from the mempool and transaction relay.

Specifically, it deprecates the --norelaypriority CLI option and removes
the associated code that changes behavior based on the option.
2022-06-29 13:07:03 -05:00
Dave Collins
d8051da345
server/indexers: Remove address index support.
This removes support for the address index which also entails removal of
the --addrindex and --dropaddrindex flags as well as all related
indexing infrastructure.

The legacy index is now automatically dropped if it exists to ensure
clients that are upgrading are not left with unneeded data in their
databases.

This is part of the overall removal of the deprecated address index.
2022-05-19 17:08:05 -05:00
Donald Adu-Poku
8f5270b707 sampleconfig: update rpc credentials documentation.
This updates the sample config documentation related to rpc credentials
to indicate they are only needed if the authorization type is basic.
2021-11-05 21:36:46 -05:00
Dave Collins
79d66fba38
sampleconfig: Update for deprecated nodnsseed.
This updates the sample config definition to replace the deprecated
nodnsseed argument that existed for the old DNS seeding method to the
new noseeders option that is used with HTTPS seeding instead.
2021-09-10 07:37:10 -05:00
Josh Rickmar
f9e382ecf8 sampleconfig: Add missing log options.
This adds the three currently missing config values related to logging
to the "Debug" section of the sample config, and renames the section
to "Logging" instead.

The description of the debuglevel option is also modified to describe
it as configuring the log verbosity, since it is not only related to
enabling debug logs.
2021-08-30 19:15:39 -05:00
Ryan Staudt
2394b885dd config: Add utxocachemaxsize.
This adds a utxocachemaxsize configuration option which represents the
maximum size in MiB of the utxo cache.  The default value is 150 MiB,
the minimum value is 25 MiB, and the maximum value is 32768 MiB
(32 GiB).
2021-02-22 12:16:31 -06:00
Dave Collins
cecfb5a0b4
multi: Update README.md files for go modules.
This updates the installation and updating section of the README.md
files in the various packages to call out the module they are a part of
and instruct the consumer to use the standard go tooling instead of the
old, and no longer correct, package-based 'go get -u' instructions.
2021-01-22 14:39:23 -06:00
Dave Collins
be936bb622
sampleconfig: Make constant a function instead.
This modifies the sampleconfig package to contain a single function
named FileContents instead of a constant.

This is being done because changing a constant is technically a major
semver breaking change while changing the contents returned by a
function is not and the goal is to ultimately make the root module
semver compliant.
2020-09-02 13:21:37 -05:00
David Hill
e26e71a9a2 multi: replace godoc.org with pkg.go.dev 2020-02-18 19:35:19 -06:00
Donald Adu-Poku
b86418a019 multi: add --peeridletimeout defaulting to 120s.
This adds --peeridletimeout config option and updates the peer
connection to enforce idle timeouts using the connection's read
deadline. Associated testsand documentation have also been updated.
2020-02-14 13:44:43 -06:00
David Hill
f65f4239ea config: add --dialtimeout defaulting to 30 seconds
dialtimeout specifies the amount of time for a connection to complete
before giving up.
2020-02-12 14:24:27 -06:00
Dave Collins
4c7d103f3e
config: Add flag to allow unsynced testnet mining.
This introduces a new flag named allowunsyncedmining which allows checks
that prevent unsynchonrized mining to be disabled on testnet.  This is
an advanced option and should not be used unless you understand exactly
why it exists and what it implications it carries.
2019-12-27 18:36:45 -06:00
David Hill
1b332e93db sampleconfig: add export dcrctl sample config 2019-11-12 14:31:31 -06:00
Dave Collins
cdd07e4771
mempool: Modify default orphan tx policy.
The current max orphan transaction size causes problems with dependent
transaction relay due to its artificially small size in relation to the
max standard transaction size.

Consequently, this modifies the orphan transaction policy by increasing
the max size of each orphan to the same value allowed for standard
non-orphan transactions and reducing the default max allowed number of
orphans to 100.

From a memory usage standpoint, the worst case max mem usage prior to
this change was 5MB plus structure and tracking overhead (1000 max
orphans * 5KB max each).  With this, that is raised to 10MB (100 max
orphans * 100KB max each) in the worst case.

It is important to note that the values were originally implemented as a
naive means to control the size of the orphan pool before several of the
recent enhancements which more aggressively remove orphans from the
orphan pool were added, so they needed to be evaluated again.

For a very long time prior to recent changes, the orphan pool would
quickly reach the max allowed worst-case usage and effectively stay
there forever whereas with more recent changes, the actual run-time
orphan pool usage is usually much smaller.

Finally, as another point in favor of this change, as the network has
evolved, nodes have generally become better about orphan management and
as such missing ancestors will typically either be broadcast or mined
fairly quickly resulting in fewer overall orphans.
2019-11-04 11:49:42 -06:00
Matheus Degiovani
54cf80fdf6 server: Add tlscurve config parameter
Electron 6 has dropped support to the P-521 curve, so in order to
upgrade Decrediton dcrd needs to support generating curve P-256.

This adds a --tlscurve parameter similar to what exists in dcrwallet to
select which curve to use when generating the RPC certificates.
2019-10-31 16:01:49 -05:00
Dave Collins
3e2208f8c1
build: Replace TravisCI with CI via Github actions. 2019-09-20 19:59:04 -05:00
Aaron Campbell
03678bb754 multi: Correct typos.
Correct typos found by reading code and creative grepping.
2019-08-16 17:37:58 -05:00
David Hill
893aa30dce multi: Use https links where available. 2019-06-18 14:20:06 -05:00
zhizhongzhiwai
6739ac7697 sampleconfig: Fix proxy typo. 2018-11-07 01:33:24 -06:00
hypernoob
029fc17e9c docs: Correct blockmaxsize and blockprioritysize. 2018-07-07 00:15:45 -05:00
qshuai
f99fd6cb4f config: Fix typo 2018-06-09 15:20:44 -05:00
Dave Collins
7a457fc9c3
policy: Lower default relay fee to 0.0001/kB.
This lowers the default minimum relay fee to 0.0001 DCR/Kb from its
previous value of 0.001 DCR/Kb and increases the high fee multiplier to
keep the same default high fee threshold of 1 DCR/kB.

In order to keep the comments accurate, it also updates the comments in
the isDust function and the sample config file to match the new default
relay fee as it's nice to have the most recent values as a reference in
the comments.

Finally, it updates the tests for the expected new values as a result of
the reduced default relay fee and adds add a couple of dust tests just
below and above the dust point for the new reduced default relay fee.

It should be noted that this is only a default node policy change and as
such does not affect the consensus rules in any way.
2018-05-26 09:45:38 -05:00
David Hill
5a4f367b66 multi: Remove everything to do about bloom filters. 2018-05-01 11:43:32 -05:00
Dave Collins
74d130057a
multi: Rename BIP0111Version to NodeBloomVersion.
This renames the BIP0111Version constant to NodeBloomVersion to better
describe its purpose.
2018-03-02 22:29:14 -06:00
Josh Rickmar
c6f9474348 Expand ~ to correct home directory on all OSes.
This fixes the behavior of expanding ~ on Windows and macOS, as well
as adding support for ~otheruser to expand to the home directory of
otheruser.

Modify the default sample config to reflect the change in the meaning
of ~ on Windows, and the unintended meaning of ~ on macOS.  Include
defaults for all 3 of the major operating system classes since
uncommenting the default Unix option on macOS or Windows would change
the blockchain data directory to a non-default location.
2018-02-22 20:35:44 -06:00
Dave Collins
7e2a6932e1
sampleconfig: Correct comment. 2018-02-21 10:02:44 -06:00
David Hill
5fc31ca578 multi: fix misspell linter warnings 2018-02-18 12:26:52 -06:00
Donald Adu-Poku
e48b9ab823 mempool: Rename RelayNonStd config option.
This renames the mempool.Config.RelayNonStd option to AcceptNonStd which
more accurately describes its behavior since the mempool was refactored
into a separate package.

The reasoning for this change is that the mempool is not responsible for
relaying transactions (nor should it be).  Its job is to maintain a pool
of unmined transactions that are validated according to consensus and
policy configuration options which are then used to provide a source of
transactions that need to be mined.

Instead, it is the server that is responsible for relaying transactions.
While it is true that the current server code currently only relays txns
that were accepted to the mempool, this does not necessarily have to
be the case.  It would be entirely possible (and perhaps even a good
idea as something do in the future), to separate the relay policy from
the mempool acceptance policy (and thus indirectly the mining policy).
2018-02-14 15:55:22 +00:00
Dave Collins
97c4b6b096
sampleconfig: Update min relay fee.
This updates the minimum relay fee in the sample config file to match
the actual default.  Note that it's commented anyways, so this does not
result in any logical change.  However, the file aims to have the
defaults commented out by default, so it makes sense to update the
value accordingly.
2018-01-06 19:26:50 -06:00
Jason Zavaglia
509eed37fb extend --profile cmd line option to allow interface to be specified
Closes #691
2017-09-09 15:26:37 +10:00
Dave Collins
f0a01ced0a
sampleconfig: Add package README and doc.go.
This adds a readme and doc.go for the sampleconfig package so it is
consistent with all of the other packages.

While here, it also changes the exported value to a constant and removes
the unused sampleConfigFilename constant.
2017-08-25 12:35:11 -05:00
jolan
d18bca456e config: export sampleconfig for use by dcrinstall 2017-08-25 10:32:26 -05:00