Skip to content

Commit

Permalink
doc: Minor grammar fixes (#7922)
Browse files Browse the repository at this point in the history
Fixes some minor grammar issues from #7918.
  • Loading branch information
akhi3030 authored and nikurt committed Nov 7, 2022
1 parent 390f52b commit 1d283bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/architecture/gas_params/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ The [Gas Profile](./gas_profile.md) section goes into more details on how gas
costs of a transaction are tracked in nearcore.

The [runtime parameter estimator](./estimator.md) is a separate binary within
the nearcore repository. It contains benchmarking-like code that is used to
validate existing parameters values. Or when new features are added, new code
has to be added there to estimate the safe values of new parameters. That
section is for you if you want to add new features, such as a new pre-compiled
method or other host functions.
the nearcore repository. It contains benchmarking-like code used to validate
existing parameters values. When implementing new features, code should be added
there to estimate the safe values of the new parameters. This section is for you
if you are adding new features such as a new pre-compiled method or other host
functions.


<!-- TODO: ## Action parameters-->
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/gas_params/estimator.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all users collude to make the system as slow as possible.

This benchmarking suite is used check that the gas parameters defined in the
protocol are correct. Correct in this context means, a chunk filled with 1 Pgas
will only take 1 second to be applied. Or more generally, per 1 Tgas of
will take at most 1 second to be applied. Or more generally, per 1 Tgas of
execution, we spend no more than 1ms wall-clock time.

For now, nearcore timing is the only one that matters. Things will become more
Expand Down
10 changes: 5 additions & 5 deletions docs/architecture/gas_params/gas_profile.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Gas Profile

The transaction runtime charges gas in various places around the code. But they
all end up summaries inside an `ActionResult`. More specifically, the counters
`gas_burnt` and `gas_used` and the `profile` field that keeps track of what the
gas has been spent on.
The transaction runtime charges gas in various places around the code. The
charges end up as summaries inside an `ActionResult`. More specifically, the
`gas_burnt` and `gas_used` counters track the total gas required and the
`profile` field keeps track of what the gas was spent on.

## Charing Gas
## Charging Gas
Generally speaking, gas is charged right before the computation that it pays for
is executed. It has to be before to avoid cheap resource exhaustion attacks.
Imagine the user has only 1 gas unit left but we start executing an expensive
Expand Down

0 comments on commit 1d283bf

Please sign in to comment.