Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TXG: Transaction Batches #200

Merged
merged 6 commits into from May 20, 2019

Conversation

Projects
None yet
2 participants
@fosskers
Copy link
Contributor

commented May 16, 2019

This PR allows one to send transactions in batches, the size of which can be defined on the command line.

Show resolved Hide resolved tools/txg/TXG.hs Outdated
@larskuhtz
Copy link
Contributor

left a comment

Approved with a few minor comments and suggestions.

Show resolved Hide resolved tools/txg/TXG.hs Outdated
Show resolved Hide resolved tools/txg/TXG.hs Outdated
Show resolved Hide resolved tools/txg/TXG.hs Outdated
Show resolved Hide resolved tools/txg/TXG.hs Outdated
Show resolved Hide resolved tools/txg/TXG.hs Outdated
let accounts = buildGenAccountsKeysets Sim.accountNames paymentKS coinKS
pure (cid, accounts)

logg Info $ toLogMessage ("Real Transactions: Transactions are being generated" :: Text)

-- Set up values for running the effect stack.
gen <- liftIO createSystemRandom

This comment has been minimized.

Copy link
@larskuhtz

larskuhtz May 16, 2019

Contributor

What about adding a config option for a seed create all generators from that, so that tests can be replayed?

This comment has been minimized.

Copy link
@fosskers

fosskers May 17, 2019

Author Contributor

Reasonable.

This comment has been minimized.

Copy link
@fosskers

fosskers May 17, 2019

Author Contributor

I will leave this as "future work".

Show resolved Hide resolved tools/txg/TXG/Types.hs Outdated
where
v :: ChainwebVersion
v = fromJuste $ chainwebVersionFromText "timedCPM-peterson"

scriptConfigParser :: MParser ScriptConfig
scriptConfigParser :: MParser Args

This comment has been minimized.

Copy link
@larskuhtz

larskuhtz May 16, 2019

Contributor

In the context of pLeftSemigroupalUpdate it may be more convenient to define something along the lines of

<*< hostAddresses %:: pListSemigroupalUpdate % textOption
    % long "host"
    <> short 'h'
    <> metavar "HOSTNAME:PORT"
    <> help "hostname and port of a host the receives transactions. This option can be used multiple times to send  transactions to more than one host"

i.e. bundle the hostname and port in a single option, which might be more intuitive for options that can be provided multiple times.

This comment has been minimized.

Copy link
@fosskers

fosskers May 17, 2019

Author Contributor

That's currently already the case, is it not?

fosskers added some commits May 16, 2019

[txg] Avoid timing anything in the TXG itself
Accurate timing info can be gathered from Chainweb's logs.
Avoiding extra `listen/` calls, etc., also reduces network load.

@fosskers fosskers force-pushed the colin/txg-misc branch from c8c60bd to a784170 May 20, 2019

@fosskers fosskers merged commit 43f2b74 into master May 20, 2019

1 check passed

ci/gitlab/gitlab.com Pipeline passed on GitLab
Details

@fosskers fosskers deleted the colin/txg-misc branch May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.