-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coreth sync: 0.12.4-rc.0 -> 0.12.7 (#975)
* coreth sync: 0.12.4-rc.0 -> 0.12.7 * Review coreth 0.12.7 (#980) * Apply suggested changes from https://github.com/ava-labs/coreth/pull/381/files * drop reexec=0 * add txHashes * bump avalanchego * remove manager * fix compat test * bump version for e2e tests --------- Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org>
- Loading branch information
Showing
273 changed files
with
5,703 additions
and
3,238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Security Policy | ||
|
||
Avalanche takes the security of the platform and of its users very seriously. We and our community recognize the critical role of external security researchers and developers and welcome | ||
responsible disclosures. Valid reports will be eligible for a reward (terms and conditions apply). | ||
|
||
## Reporting a Vulnerability | ||
|
||
**Please do not file a public ticket** mentioning the vulnerability. To disclose a vulnerability submit it through our [Bug Bounty Program](https://hackenproof.com/avalanche). | ||
|
||
Vulnerabilities must be disclosed to us privately with reasonable time to respond, and avoid compromise of other users and accounts, or loss of funds that are not your own. We do not reward spam or | ||
social engineering vulnerabilities. | ||
|
||
Do not test for or validate any security issues in the live Avalanche networks (Mainnet and Fuji testnet), confirm all exploits in a local private testnet. | ||
|
||
Please refer to the [Bug Bounty Page](https://hackenproof.com/avalanche) for the most up-to-date program rules and scope. | ||
|
||
## Supported Versions | ||
|
||
Please use the [most recently released version](https://github.com/ava-labs/subnet-evm/releases/latest) to perform testing and to validate security issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2023 The go-ethereum Authors | ||
// This file is part of the go-ethereum library. | ||
// | ||
// The go-ethereum library is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// The go-ethereum library is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
package misc | ||
|
||
import ( | ||
"math/big" | ||
|
||
"github.com/ava-labs/subnet-evm/params" | ||
) | ||
|
||
var ( | ||
minDataGasPrice = big.NewInt(params.BlobTxMinDataGasprice) | ||
dataGaspriceUpdateFraction = big.NewInt(params.BlobTxDataGaspriceUpdateFraction) | ||
) | ||
|
||
// CalcBlobFee calculates the blobfee from the header's excess data gas field. | ||
func CalcBlobFee(excessDataGas *big.Int) *big.Int { | ||
// If this block does not yet have EIP-4844 enabled, return the starting fee | ||
if excessDataGas == nil { | ||
return big.NewInt(params.BlobTxMinDataGasprice) | ||
} | ||
return fakeExponential(minDataGasPrice, excessDataGas, dataGaspriceUpdateFraction) | ||
} | ||
|
||
// fakeExponential approximates factor * e ** (numerator / denominator) using | ||
// Taylor expansion. | ||
func fakeExponential(factor, numerator, denominator *big.Int) *big.Int { | ||
var ( | ||
output = new(big.Int) | ||
accum = new(big.Int).Mul(factor, denominator) | ||
) | ||
for i := 1; accum.Sign() > 0; i++ { | ||
output.Add(output, accum) | ||
|
||
accum.Mul(accum, numerator) | ||
accum.Div(accum, denominator) | ||
accum.Div(accum, big.NewInt(int64(i))) | ||
} | ||
return output.Div(output, denominator) | ||
} |
Oops, something went wrong.