-
Notifications
You must be signed in to change notification settings - Fork 360
Conversation
WalkthroughThe changes reflect a significant refactoring across the Cosmos and Ethereum integration layers, emphasizing transaction handling and state management. Key modifications include the removal of transaction result statuses, adjustments to configuration handling, and the enhancement of transaction pool operations. The updates also streamline the block proposal and finalization processes, and introduce new telemetry metrics. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files ignored due to path filters (18)
build/tools/go.mod
is excluded by:!**/*.mod
build/tools/go.sum
is excluded by:!**/*.sum
contracts/go.mod
is excluded by:!**/*.mod
contracts/go.sum
is excluded by:!**/*.sum
cosmos/go.mod
is excluded by:!**/*.mod
cosmos/go.sum
is excluded by:!**/*.sum
cosmos/x/evm/types/tx.pb.go
is excluded by:!**/*.pb.go
e2e/localnet/go.mod
is excluded by:!**/*.mod
e2e/localnet/go.sum
is excluded by:!**/*.sum
e2e/precompile/go.mod
is excluded by:!**/*.mod
e2e/precompile/go.sum
is excluded by:!**/*.sum
e2e/testapp/go.mod
is excluded by:!**/*.mod
e2e/testapp/go.sum
is excluded by:!**/*.sum
eth/go.mod
is excluded by:!**/*.mod
eth/go.sum
is excluded by:!**/*.sum
go.work.sum
is excluded by:!**/*.sum
lib/go.mod
is excluded by:!**/*.mod
lib/go.sum
is excluded by:!**/*.sum
Files selected for processing (59)
- contracts/bindings/testing/governance/governance_wrapper.abigen.go (1 hunks)
- cosmos/api/polaris/evm/v1alpha1/tx.pulsar.go (17 hunks)
- cosmos/config/config.go (4 hunks)
- cosmos/config/default.go (1 hunks)
- cosmos/config/flags/flags.go (1 hunks)
- cosmos/config/mocks/app_options.go (1 hunks)
- cosmos/config/template.go (1 hunks)
- cosmos/runtime/abci/proposal.go (2 hunks)
- cosmos/runtime/chain/abci.go (1 hunks)
- cosmos/runtime/miner/abci.go (2 hunks)
- cosmos/runtime/miner/interfaces.go (2 hunks)
- cosmos/runtime/miner/miner.go (6 hunks)
- cosmos/runtime/runtime.go (7 hunks)
- cosmos/runtime/txpool/ante.go (3 hunks)
- cosmos/runtime/txpool/comet.go (1 hunks)
- cosmos/runtime/txpool/handler.go (4 hunks)
- cosmos/runtime/txpool/handler_test.go (1 hunks)
- cosmos/runtime/txpool/mempool.go (5 hunks)
- cosmos/runtime/txpool/mempool_test.go (1 hunks)
- cosmos/runtime/txpool/mocks/geth_tx_pool.go (2 hunks)
- cosmos/runtime/txpool/mocks/lifecycle.go (1 hunks)
- cosmos/runtime/txpool/mocks/sdk_tx.go (1 hunks)
- cosmos/runtime/txpool/mocks/subscription.go (1 hunks)
- cosmos/runtime/txpool/mocks/tx_broadcaster.go (1 hunks)
- cosmos/runtime/txpool/mocks/tx_serializer.go (1 hunks)
- cosmos/runtime/txpool/mocks/tx_sub_provider.go (1 hunks)
- cosmos/runtime/txpool/telemetry.go (1 hunks)
- cosmos/x/evm/genesis_test.go (2 hunks)
- cosmos/x/evm/keeper/abci.go (1 hunks)
- cosmos/x/evm/keeper/genesis.go (1 hunks)
- cosmos/x/evm/keeper/keeper.go (3 hunks)
- cosmos/x/evm/keeper/processor.go (1 hunks)
- cosmos/x/evm/module.go (1 hunks)
- cosmos/x/evm/plugins/state/factory.go (3 hunks)
- cosmos/x/evm/types/keys.go (1 hunks)
- e2e/testapp/app.go (1 hunks)
- e2e/testapp/polard/cmd/commands.go (2 hunks)
- e2e/testapp/polard/cmd/root.go (3 hunks)
- eth/core/chain.go (2 hunks)
- eth/core/chain_resources.go (1 hunks)
- eth/core/chain_writer.go (7 hunks)
- eth/core/host.go (2 hunks)
- eth/core/mock/state_plugin.mock.go (5 hunks)
- eth/core/state/journal/mocks/accesslist.go (1 hunks)
- eth/core/state/journal/mocks/log.go (1 hunks)
- eth/core/state/journal/mocks/refund.go (1 hunks)
- eth/core/state/journal/mocks/self_destruct_state_plugin.go (1 hunks)
- eth/core/state/journal/mocks/self_destructs.go (1 hunks)
- eth/core/state/journal/mocks/transient_storage.go (1 hunks)
- eth/core/state/mock/state.mock.go (5 hunks)
- eth/core/state/mocks/plugin.go (2 hunks)
- eth/core/state/mocks/polar_state_db.go (1 hunks)
- eth/core/state/mocks/precompile_plugin.go (1 hunks)
- eth/eth.go (1 hunks)
- eth/params/chain_config.go (1 hunks)
- eth/polar/api_backend.go (1 hunks)
- eth/polar/backend.go (1 hunks)
- eth/polar/config.go (2 hunks)
- proto/polaris/evm/v1alpha1/tx.proto (1 hunks)
Files not summarized due to errors (1)
- contracts/bindings/testing/governance/governance_wrapper.abigen.go: Error: Message exceeds token limit
Files skipped from review due to trivial changes (18)
- cosmos/config/mocks/app_options.go
- cosmos/runtime/miner/abci.go
- cosmos/runtime/txpool/mocks/lifecycle.go
- cosmos/runtime/txpool/mocks/sdk_tx.go
- cosmos/runtime/txpool/mocks/subscription.go
- cosmos/runtime/txpool/mocks/tx_broadcaster.go
- cosmos/runtime/txpool/mocks/tx_serializer.go
- cosmos/runtime/txpool/mocks/tx_sub_provider.go
- cosmos/runtime/txpool/telemetry.go
- eth/core/state/journal/mocks/accesslist.go
- eth/core/state/journal/mocks/log.go
- eth/core/state/journal/mocks/refund.go
- eth/core/state/journal/mocks/self_destruct_state_plugin.go
- eth/core/state/journal/mocks/self_destructs.go
- eth/core/state/journal/mocks/transient_storage.go
- eth/core/state/mocks/plugin.go
- eth/core/state/mocks/polar_state_db.go
- eth/core/state/mocks/precompile_plugin.go
Additional comments: 57
cosmos/x/evm/types/keys.go (1)
- 26-26: The constant
MetricKeyInsertBlock
has been renamed fromMetricKeyInsertBlockAndSetHead
toMetricKeyInsertBlock
. This change suggests a possible change in the functionality or metric being tracked. Ensure that all references to this constant throughout the codebase are updated to reflect the new name.Verification successful
The search results confirm that the new constant
MetricKeyInsertBlock
is defined inkeys.go
and used inprocessor.go
. There are no other occurrences of this constant in the codebase, which suggests that all references to the constant have been updated accordingly.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the old constant name to ensure it's not used anywhere. rg --type go 'MetricKeyInsertBlockAndSetHead' # Search for the new constant name to validate its usage. rg --type go 'MetricKeyInsertBlock'Length of output: 250
Script:
#!/bin/bash # Search for the new constant name to validate its usage across the entire codebase. rg --type go 'MetricKeyInsertBlock'Length of output: 204
cosmos/runtime/miner/interfaces.go (1)
- 45-45: The
SetLatestQueryContext
method has been removed from theEVMKeeper
interface. This change could have implications on any types that implement this interface. Verify that all implementations ofEVMKeeper
have been updated to remove this method and that no functionality is broken as a result of this change.Verification successful
The verification process has been completed successfully. All implementations of
EVMKeeper
have been updated to remove theSetLatestQueryContext
method, and no functionality is broken as a result of this change.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for implementations of EVMKeeper to ensure they have been updated. ast-grep --lang go --pattern $'type $_ struct { $$$ }\nfunc ($_ $_) SetLatestQueryContext($_, $_) $_ { $$$ }'Length of output: 608
Script:
#!/bin/bash # Search for implementations of EVMKeeper to ensure they have been updated. # Adjusting the pattern to search for the method within any struct, which should be an implementation of EVMKeeper. ast-grep --lang go --pattern $'func ($_ $_) SetLatestQueryContext($_, $_) $_ { $$$ }'Length of output: 86
Script:
#!/bin/bash # Search for the EVMKeeper interface definition to confirm its current state. ast-grep --lang go --pattern $'type EVMKeeper interface { $$$ }' # Search for any structs that might implement EVMKeeper to ensure they do not contain the removed method. ast-grep --lang go --pattern $'type $_ struct { $$$ }\nfunc ($_ EVMKeeper) $$$'Length of output: 996
Script:
#!/bin/bash # Search for any structs that might implement EVMKeeper to ensure they do not contain the removed method. # Adjusting the pattern to search for structs and then for methods within those structs that might be related to EVMKeeper. ast-grep --lang go --pattern $'type $_ struct { $$$ }'Length of output: 305206
cosmos/x/evm/keeper/abci.go (2)
- 34-46: The
EndBlock
method now includes additional logic to retrieve the EVM block and check if it matches the current block number. Additionally, a call toSetFinalizedBlock
has been added. Ensure that the logic for retrieving and comparing the block number is correct and that the new call toSetFinalizedBlock
is properly handled.- 50-52: The
PrepareCheckState
method now includes a call toPrimePlugins
. Verify that this new call is correctly implemented and that it does not introduce any side effects or performance issues.Verification successful
The
PrimePlugins
method is correctly implemented, as it prepares the plugins by setting their context without introducing any side effects or performance issues based on the provided implementations of thePrepare
method for both the historical and block plugins. The mock implementations are also standard for testing purposes.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the usage of PrimePlugins to ensure it's correctly implemented. ast-grep --lang go --pattern $'func ($_ $_) PrimePlugins($_) { $$$ }'Length of output: 408
Script:
#!/bin/bash # Search for the implementation of the Prepare method for both bp and hp to ensure they are correctly implemented. ast-grep --lang go --pattern $'func ($_ $_) Prepare($_) { $$$ }'Length of output: 2627
eth/params/chain_config.go (1)
- 30-38: The
DefaultEIP155ChainID
constant has been reassigned toartioChainID
with a value of 80085. This change affects the default chain configuration for Ethereum. Confirm that this new chain ID is intended and correctly applied throughout the codebase.proto/polaris/evm/v1alpha1/tx.proto (1)
- 55-55: The
Status
enum and thestatus
field have been removed from theWrappedEthereumTransactionResult
message. This is a significant change in how transaction statuses are handled. Ensure that all parts of the codebase that interact with transaction statuses are updated to work with the new structure.Verification successful
The search for the
enum Status {
pattern did not yield any results, which suggests that theStatus
enum has been removed from the codebase. Additionally, the search for themessage WrappedEthereumTransactionResult {
pattern returned a result fromproto/polaris/evm/v1alpha1/tx.proto
, confirming that theWrappedEthereumTransactionResult
message is present but does not include any fields within the braces, which aligns with the removal of thestatus
field as indicated in the PR objectives and the AI-generated summary.Based on the provided script outputs, it can be concluded that the
Status
enum and thestatus
field have been removed from theWrappedEthereumTransactionResult
message in thetx.proto
file, consistent with the changes described in the review comment.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the usage of the old Status enum to ensure it's no longer used. ast-grep --lang proto --pattern $'enum Status { $$$ }' # Search for the usage of the WrappedEthereumTransactionResult message to validate the removal of the status field. ast-grep --lang proto --pattern $'message WrappedEthereumTransactionResult { $$$ status: $_ $$$ }'Length of output: 377
Script:
#!/bin/bash # Search for the usage of the old Status enum to ensure it's no longer used. rg 'enum Status {' # Search for the usage of the status field within the WrappedEthereumTransactionResult message to validate the removal of the status field. rg 'WrappedEthereumTransactionResult' -A 5 | rg 'status:'Length of output: 166
Script:
#!/bin/bash # Correct the regex pattern by escaping the curly braces and search for the usage of the old Status enum. rg 'enum Status \{' # Combine the search into a single rg command to look for the 'status' field within the 'WrappedEthereumTransactionResult' message. rg 'WrappedEthereumTransactionResult' -A 5 | rg 'status:'Length of output: 77
Script:
#!/bin/bash # Search for the usage of the old Status enum to ensure it's no longer used. rg 'enum Status \{' # Search for the usage of the status field within the WrappedEthereumTransactionResult message to validate the removal of the status field. # This time, ensure the command is structured correctly to search within the context of the message. rg 'message WrappedEthereumTransactionResult {'Length of output: 219
Script:
#!/bin/bash # Correct the regex pattern by escaping the curly braces and search for the usage of the old Status enum. rg 'enum Status \{' # Correct the regex pattern by escaping the curly braces and search for the structure of the WrappedEthereumTransactionResult message. rg 'message WrappedEthereumTransactionResult \{'Length of output: 152
cosmos/x/evm/keeper/genesis.go (1)
- 46-49: The
InitGenesis
function now sets the genesis context before writing the genesis block to the chain. Confirm that this change is consistent with the intended genesis process and that it does not affect the initialization of the chain adversely.cosmos/x/evm/keeper/keeper.go (2)
- 42-43: The
Keeper
struct now includes a new fieldtxpool *txpool.Mempool
. Ensure that this new field is properly initialized and used throughout the keeper's methods.- 66-68: The
Setup
method's signature has been updated to accept an additional parametertxPool *txpool.Mempool
. Verify that all calls toSetup
have been updated to pass the new parameter and that thetxpool
is correctly integrated into the keeper's logic.Verification successful
The search within
cosmos/runtime/runtime.go
has confirmed that theSetup
method is being called with the newtxPool
parameter, as shown by the line:if err := ek.Setup(p.WrappedBlockchain, p.WrappedTxPool); err != nil {
This line indicates that the
Setup
method is being invoked with two parameters:p.WrappedBlockchain
andp.WrappedTxPool
, which aligns with the updated method signature that includes thetxPool *txpool.Mempool
parameter.Based on this information, it can be concluded that the
Setup
method's signature has been correctly updated and the calls toSetup
have been adjusted to pass the newtxPool
parameter. Thetxpool
appears to be correctly integrated into the keeper's logic in thecosmos/runtime/runtime.go
file.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the calls to the Setup method to ensure the new parameter is being passed. ast-grep --lang go --pattern $'func ($_ $_) Setup($_, $_, $_) { $$$ }'Length of output: 71
Script:
#!/bin/bash # Search for the calls to the Setup method without specifying the number of parameters to ensure we find all occurrences. ast-grep --lang go --pattern $'func ($_ $_) Setup($$$) { $$$ }'Length of output: 64
Script:
#!/bin/bash # Use ripgrep to search for the string "Setup" within Go files to find where the method is being called. rg 'Setup' --type goLength of output: 3888
Script:
#!/bin/bash # Verify the call to the Setup method in the cosmos/runtime/runtime.go file to ensure the new txPool parameter is being passed. rg 'Setup' cosmos/runtime/runtime.goLength of output: 329
cosmos/x/evm/genesis_test.go (1)
- 67-73: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [70-87]
The assignment of the
cfg
variable has been changed fromconfig.DefaultConfig()
toconfig.DefaultPolarisConfig()
, which aligns with the PR objectives to update configuration management. Additionally, anil
argument is now passed to thechain.New
function call, which suggests a change in the initialization pattern of the chain. Ensure that thechain.New
function is designed to handle anil
argument without issues.cosmos/x/evm/plugins/state/factory.go (2)
- 100-106: The
NewPluginAtBlockNumber
method's signature has been changed to accept anint64
instead of auint64
. This change should be verified across the codebase to ensure that all calls to this method have been updated accordingly.Verification successful
The
NewPluginAtBlockNumber
method's signature has been updated to accept anint64
in the interface definition and the call site found ineth/core/chain_resources.go
has been updated to use anint64
as well. No other calls to this method with the olduint64
type were found in the codebase. Therefore, it appears that the necessary updates have been made in accordance with the changes to the method signature.* 106-110: The logic within the `NewPluginAtBlockNumber` method has been refactored to handle the context creation based on the block number. Ensure that the context creation logic is correct and that the error handling is appropriate.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that all calls to NewPluginAtBlockNumber have been updated to use int64. ast-grep --lang go --pattern $'NewPluginAtBlockNumber($_)'Length of output: 59
Script:
#!/bin/bash # Search for the string 'NewPluginAtBlockNumber' to find all occurrences in the codebase. rg 'NewPluginAtBlockNumber'Length of output: 437
eth/core/host.go (2)
- 60-60: The comment for the
BlockPlugin
interface'sPrepare
method has been updated to clarify its behavior. This change is minor and does not affect the functionality.- 80-80: The
NewPluginAtBlockNumber
method in theStatePluginFactory
interface now takes anint64
parameter instead of auint64
. This change should be verified across the codebase to ensure that all calls to this method have been updated accordingly.Verification successful
The change to the
NewPluginAtBlockNumber
method parameter fromuint64
toint64
has been reflected in the codebase. The method definitions and the call site inchain_resources.go
have been updated to useint64
, as verified by the search results.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that all calls to NewPluginAtBlockNumber have been updated to use int64. ast-grep --lang go --pattern $'NewPluginAtBlockNumber($_)'Length of output: 59
Script:
#!/bin/bash # Search for calls to NewPluginAtBlockNumber across the codebase using ripgrep rg "NewPluginAtBlockNumber\("Length of output: 316
e2e/testapp/polard/cmd/root.go (3)
- 35-35: The
evmconfig
package has been renamed topolarconfig
, and references have been updated accordingly. This change is consistent with the PR objectives to update configuration management.- 68-68: The function
PolarisConfigFn
is now called withpolarconfig.DefaultPolarisConfig()
instead ofevmconfig.DefaultConfig()
. This change is consistent with the PR objectives to update configuration management.- 118-118: The function
RecommendedCometBFTConfig
from thepolarconfig
package is used instead ofinitCometBFTConfig
. Ensure that theRecommendedCometBFTConfig
function provides the correct configuration for the Comet BFT consensus algorithm.eth/eth.go (1)
- 57-57: The
Remove
method has been added to theTxPool
interface, allowing the removal of transactions by hash. This change is consistent with the PR objectives to enhance transaction management.cosmos/runtime/abci/proposal.go (2)
- 125-137: The code now includes calls to
spf.SetLatestQueryContext(ctx)
andspf.SetInsertChainContext(ctx)
before processing the proposal. Additionally, there is a call topp.wrappedBlockchain.PrimePlugins(ctx)
after setting the insert chain context. Ensure that these context-setting methods and thePrimePlugins
call are correctly implemented and that they do not introduce any race conditions or other issues.- 160-167: The code now includes a check for an abort signal after
beginBlock
. This is a good practice to ensure that the process can be interrupted if necessary.cosmos/runtime/txpool/mempool.go (2)
- 65-87: The
Mempool
struct now embedseth.TxPool
and introduces new fields to manage transaction lifetimes and removal. TheNew
function's signature has been modified to accommodate these changes. Ensure that theeth.TxPool
integration and the new fields are correctly used throughout the codebase.- 110-142: The
Insert
andRemove
methods have been updated to handle Ethereum transactions and interact with the embeddedeth.TxPool
andCometRemoteCache
. Ensure that the logic for adding and removing transactions is correct and that it properly interacts with theeth.TxPool
.Verification successful
The
Remove
method is indeed present in themempool.go
file. To verify the logic within this method, we need to see the actual implementation. Since we have located the method signature, we can now request the contents of theRemove
method to ensure it interacts correctly with theeth.TxPool
.
The output provides a partial view of the
Remove
method's implementation in themempool.go
file. From the snippet, we can see that the method is designed to handle a Cosmos transaction (sdk.Tx
) and attempts to extract an Ethereum payload envelope (WrappedPayloadEnvelope
). If successful, it unwraps the payload to access the Ethereum transactions contained within.To fully verify the logic of the
Remove
method, we need to see the complete implementation, especially how it interacts with theeth.TxPool
. Let's extend the range of lines retrieved byrg
to ensure we capture the entire method body.
The provided output shows more of the
Remove
method's implementation. It details the process of extracting Ethereum transactions from a Cosmos transaction and then performing operations on them. Specifically, it mentions:
- Unwrapping the payload to access the Ethereum transactions.
- Unmarshalling each Ethereum transaction.
- Dropping the transaction from the
CometRemoteCache
(crc
).- A comment indicating a conditional removal from the mempool based on a force removal setting.
However, the output is still incomplete, as it cuts off mid-comment. To fully understand the
Remove
method's interaction witheth.TxPool
and to verify the logic, we need to see the rest of the method.
The complete
Remove
method implementation frommempool.go
has been provided. The method performs the following actions:
- It retrieves the Ethereum payload envelope from the Cosmos transaction.
- It unwraps the payload to access the individual Ethereum transactions.
- For each Ethereum transaction, it:
- Unmarshals the transaction.
- Calculates the transaction hash.
- Drops the transaction from the
CometRemoteCache
usingDropRemoteTx
.- Conditionally removes the transaction from the
eth.TxPool
ifforceTxRemoval
is set totrue
.The logic within the
Remove
method appears to be correct based on the provided code snippet. It properly interacts with both theCometRemoteCache
and theeth.TxPool
, with the latter interaction being conditional on theforceTxRemoval
flag.Based on the provided code and the verification process, the
Insert
andRemove
methods in theMempool
struct handle Ethereum transactions as described and interact with the embeddedeth.TxPool
andCometRemoteCache
as expected.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the correct logic for adding and removing transactions in Mempool. ast-grep --lang go --pattern $'Insert($_, $_)' --pattern $'Remove($_)'Length of output: 237
Script:
#!/bin/bash # Verify the correct logic for adding transactions in Mempool's Insert method. ast-grep --lang go --pattern $'func (m *Mempool) Insert($_, $_) { $$$ }' # Verify the correct logic for removing transactions in Mempool's Remove method. ast-grep --lang go --pattern $'func (m *Mempool) Remove($_) { $$$ }'Length of output: 143
Script:
#!/bin/bash # Attempt to locate the Remove method in the Mempool using ripgrep. rg 'func \(m \*Mempool\) Remove'Length of output: 111
Script:
#!/bin/bash # Retrieve the implementation of the Remove method from mempool.go. rg -A 10 'func \(m \*Mempool\) Remove' cosmos/runtime/txpool/mempool.goLength of output: 485
Script:
#!/bin/bash # Retrieve the full implementation of the Remove method from mempool.go. rg -A 20 'func \(m \*Mempool\) Remove' cosmos/runtime/txpool/mempool.goLength of output: 784
Script:
#!/bin/bash # Retrieve the remaining implementation of the Remove method from mempool.go. rg -A 30 'func \(m \*Mempool\) Remove' cosmos/runtime/txpool/mempool.goLength of output: 863
cosmos/runtime/miner/miner.go (1)
- 46-69: The
Miner
struct has been updated to include a reference tocore.Blockchain
and a mutex for block building. Ensure that these new fields are correctly used in the miner's methods and that the mutex is properly utilized to manage concurrent access.eth/core/chain.go (3)
- 57-58: The
Blockchain
interface has been updated to include thePrimePlugins
method and move theStatePluginFactory
method within the interface. Ensure that these changes are reflected in the implementations of the interface and that thePrimePlugins
method is correctly used.Verification successful
The search results confirm that the
Blockchain
interface is defined ineth/core/chain.go
and that there is at least one implementation of thePrimePlugins
method within theblockchain
struct in the same file. This indicates that the changes to theBlockchain
interface have been reflected in its implementation.* 141-144: The `blockchain` struct's `preparePlugins` method has been replaced with `PrimePlugins`, and the `LoadLastState` method's signature has been changed. Ensure that the `PrimePlugins` method is correctly implemented and that the `LoadLastState` method is updated throughout the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the correct implementation of the PrimePlugins method in the Blockchain interface. ast-grep --lang go --pattern $'PrimePlugins($_)'Length of output: 49
Script:
#!/bin/bash # Find all the files that contain the Blockchain interface definition to identify possible implementers. rg --type go "type Blockchain interface"Length of output: 88
Script:
#!/bin/bash # Search for the PrimePlugins method implementation in the codebase. rg --type go "func \(.+\) PrimePlugins"Length of output: 117
Verification successful
The
PrimePlugins
method has been correctly implemented in theblockchain
struct, as shown by the output fromast-grep
. The method prepares plugins if they are not nil.The
LoadLastState
method's signature has been updated toLoadLastState(number uint64) error
, and the implementation details provided show that it loads the last state based on the block number provided.Both methods are present and correctly implemented in the
blockchain
struct as per the PR objectives and the AI-generated summary.* 133-133: A bug fix comment has been added in the `NewChain` function. Verify that the bug fix is appropriate and that the `currentBlock` is correctly initialized.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the correct implementation of PrimePlugins and the updated LoadLastState method. ast-grep --lang go --pattern $'PrimePlugins($$$)' --pattern $'LoadLastState($_)'Length of output: 247
Script:
#!/bin/bash # Verify the correct implementation of PrimePlugins method. ast-grep --lang go --pattern $'func ($_ *blockchain) PrimePlugins($$$)' # Verify the updated LoadLastState method signature. ast-grep --lang go --pattern $'func ($_ *blockchain) LoadLastState($_)'Length of output: 1049
cosmos/config/flags/flags.go (1)
- 28-28: The addition of the
ForceTxRemoval
constant is consistent with the PR objectives and the AI-generated summary. It introduces a new configuration option for forceful transaction removal in the mempool.e2e/testapp/polard/cmd/commands.go (3)
- 35-35: The import path
github.com/berachain/polaris/cosmos/config
has been updated topolarconfig
, which aligns with the restructuring of the project's package structure.- 64-69: The
CustomAppConfig
struct now includes aPolaris
field of typepolarconfig.Config
, which is initialized with theDefaultPolarisConfig
. This change is consistent with the PR objectives to introduce new configuration options.- 72-72: The
customAppTemplate
variable concatenates theDefaultConfigTemplate
with thePolarisConfigTemplate
, which is expected as part of the configuration management updates.eth/polar/backend.go (1)
- 145-147: The addition of a panic statement in case of an error when setting the extra data for the miner is a critical change. This ensures that the application will not run with an improperly configured miner, which is a crucial aspect for the correctness of the system.
cosmos/runtime/txpool/handler.go (4)
- 86-86: The addition of the
CometRemoteCache
field to thehandler
struct is consistent with the PR objectives to enhance the mempool's capabilities by managing transactions added remotely.- 101-102: The
newHandler
function signature has been updated to include theCometRemoteCache
parameter, which is necessary for the new functionality introduced in the mempool.- 205-214: The
broadcastTransactions
method now includes logic to check if a transaction is remote before broadcasting it, and logs the number of transactions received and broadcasted. This is a significant change that aligns with the new mempool enhancements.- 234-236: The change in the
broadcastTransaction
method to consider a response code of1
as acceptable behavior is a logical update. It accounts for the scenario where a transaction is already in a block, and thus failing to broadcast is the correct outcome.eth/core/chain_resources.go (1)
- 74-74: The
StateAtBlockNumber
function now casts the block number to anint64
instead ofuint64
when callingNewPluginAtBlockNumber
. This change should be verified to ensure that it does not introduce any issues with block number handling, especially considering the maximum value ofint64
is less thanuint64
.cosmos/runtime/runtime.go (5)
- 58-58: The
EVMKeeper
interface'sSetup
method has been updated to accept an additional parameter of type*txpool.Mempool
. This change is necessary for the refactoring and updating of the mempool structure and its interaction with Ethereum transactions.- 91-94: The addition of the
blockBuilderMu
field of typesync.RWMutex
to thePolaris
struct is a concurrency control mechanism to ensure thread safety during block building and transaction insertion into the mempool.- 125-132: The initialization of
p.WrappedTxPool
has been updated to include new parameters, which is consistent with the changes made to thetxpool.New
function call. This is part of the mempool enhancements.- 162-162: The
Build
method of thePolaris
struct now passesp.WrappedTxPool
as an argument to theek.Setup
call, which is necessary due to the changes in theEVMKeeper
interface.- 233-236: The
LoadLastState
method has been updated to set the latest query context and prime plugins for the blockchain. This is part of the enhancements to the EVM keeper logic and state management.eth/core/chain_writer.go (5)
- 36-41: The
ChainWriter
interface has been updated with the removal of thecontext
parameter from several methods and the addition of a new methodSetFinalizedBlock
. Ensure that all implementations of this interface are updated accordingly to reflect these changes.- 60-67: The method
InsertBlockAndSetHead
has been updated to include an additional parameter. Verify that all calls to this method have been updated to pass the correct arguments.Verification successful
The search with
rg
has identified two relevant lines in the codebase where theInsertBlockAndSetHead
method is called or defined:
cosmos/runtime/chain/abci.go: if err = wbc.InsertBlockAndSetHead(block); err != nil {
eth/core/chain_writer.go:func (bc *blockchain) InsertBlockAndSetHead(block *ethtypes.Block) error {
From the output, it appears that the method
InsertBlockAndSetHead
is called with a single argument incosmos/runtime/chain/abci.go
, which matches the updated method signature ineth/core/chain_writer.go
. There are no calls to this method with an incorrect number of arguments.Based on this information, it can be concluded that all calls to the
InsertBlockAndSetHead
method have been updated to pass the correct number of arguments as per the changes in the pull request.* 96-125: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [72-113]Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for calls to InsertBlockAndSetHead to verify the correct number of arguments. ast-grep --lang go --pattern $'($_ *$_) InsertBlockAndSetHead($_, $_, $_)'Length of output: 420
Script:
#!/bin/bash # Search for calls to InsertBlockAndSetHead to verify the correct number of arguments. ast-grep --lang go --pattern $'($_ *$_) InsertBlockAndSetHead($$$)'Length of output: 413
Script:
#!/bin/bash # Use ripgrep to search for calls to InsertBlockAndSetHead in the codebase. rg 'InsertBlockAndSetHead\('Length of output: 293
The method
insertBlockAndSetHead
has been updated with additional logic for firing events. Ensure that the logic for emitting events is correct and that it does not introduce any race conditions or performance issues.
- 116-122: The method
InsertBlock
has been refactored to remove redundant comments and adjust the logic for finalizing blocks. Ensure that the refactoring does not alter the intended behavior of the method.- 243-250: A new method
SetFinalizedBlock
has been added to theblockchain
struct. Verify that this method is being called in the correct context and that it correctly updates the state of the blockchain.Verification successful
The
SetFinalizedBlock
method is indeed being called within the codebase. The search results show that it is called in the filecosmos/x/evm/keeper/abci.go
. This indicates that the method is used in the correct context to update the state of the blockchain, specifically within the EVM keeper logic during the ABCI (Application Blockchain Interface) process.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for calls to SetFinalizedBlock to ensure it's used correctly. ast-grep --lang go --pattern $'($_ *$_) SetFinalizedBlock() { $$$ }'Length of output: 414
Script:
#!/bin/bash # Search for calls to SetFinalizedBlock to ensure it's used correctly. # Adjusting the pattern to be more inclusive and correct any potential pattern errors. ast-grep --lang go --pattern $'func ($_ *$_) SetFinalizedBlock() { $$$ }'Length of output: 74
Script:
#!/bin/bash # Use ripgrep to search for the string "SetFinalizedBlock" to find where it might be called. rg "SetFinalizedBlock"Length of output: 213
cosmos/runtime/txpool/mocks/geth_tx_pool.go (1)
- 127-130: The
Remove
method has been added to theGethTxPool
mock. Ensure that the mock behavior is consistent with the actual implementation and that it is being used correctly in tests.cosmos/config/config.go (2)
- 88-91: The
ForceTxRemoval
configuration option has been added to theConfig
struct. Verify that this new configuration is being used correctly throughout the codebase.- 103-111: The
ExtraData
field in theMiner
configuration is populated with a subset of the Git commit hash if it's empty. Verify that this logic is correct and that the commit hash is being retrieved and set appropriately.Verification successful
The logic for setting the
ExtraData
field in theMiner
configuration is verified to be as described in the review comment. The Git commit hash is retrieved and a subset of it is used to populateExtraData
if it is initially empty. The check for the commit hash length being 40 characters ensures that a full SHA-1 hash is being used.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that the logic for setting ExtraData is correct and that the commit hash is used appropriately. ast-grep --lang go --pattern $'if len($_.Polar.Miner.ExtraData) == 0 { $$$ }'Length of output: 578
eth/polar/api_backend.go (2)
- 326-327: The modification to the
StateAndHeaderByNumber
method to check for bothblock
andstate
beingnil
before returning a "pending state is not available" error is a logical improvement. This ensures that the method does not proceed with anil
state, which could lead to unexpected behavior or crashes.- 339-339: The change from
pcore.ErrBlockNotFound
topcore.ErrHeaderNotFound
when a header is not found is more accurate and provides clearer information about the error condition.eth/core/mock/state_plugin.mock.go (1)
- 73-78: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [1-1]
The file
state_plugin.mock.go
is a generated mock file and should not be manually edited. Ensure that the generation of this file is part of the automated build or a pre-commit hook to maintain consistency.contracts/bindings/testing/governance/governance_wrapper.abigen.go (4)
- 83-83: The
GovernanceWrapperMetaData
variable has been updated with new ABI and binary data.This change is expected as part of the smart contract update process to reflect the new contract interface and bytecode.
- 83-83: The
DeployGovernanceWrapper
function now usesGovernanceWrapperMetaData
.This update is correct and aligns with the use of the new contract metadata structure.
- 83-83: The contract wrapper definitions (caller, transactor, filterer, and sessions) appear consistent with the updated metadata.
The definitions are correctly using the new
GovernanceWrapperMetaData
and no discrepancies were found.
- 83-83: The contract method bindings are auto-generated and should match the updated ABI.
The method bindings such as
Bank
,GetProposal
,Submit
,Vote
, andReceive
are correctly reflecting the new ABI.cosmos/api/polaris/evm/v1alpha1/tx.pulsar.go (1)
- 1217-1217: The removal of the
Status
enum fromWrappedEthereumTransactionResult
aligns with the PR objectives to refactor transaction result statuses.
@@ -80,7 +80,7 @@ type IGovernanceModuleTallyResult struct { | |||
// GovernanceWrapperMetaData contains all meta data concerning the GovernanceWrapper contract. | |||
var GovernanceWrapperMetaData = &bind.MetaData{ | |||
ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_governanceModule\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"bank\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBankModule\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelProposal\",\"inputs\":[{\"name\":\"proposalId\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getProposal\",\"inputs\":[{\"name\":\"proposalId\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIGovernanceModule.Proposal\",\"components\":[{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"messages\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.CodecAny[]\",\"components\":[{\"name\":\"typeURL\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"status\",\"type\":\"int32\",\"internalType\":\"int32\"},{\"name\":\"finalTallyResult\",\"type\":\"tuple\",\"internalType\":\"structIGovernanceModule.TallyResult\",\"components\":[{\"name\":\"yesCount\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"abstainCount\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"noCount\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"noWithVetoCount\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"submitTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"depositEndTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"totalDeposit\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"votingStartTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"votingEndTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"metadata\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"title\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"summary\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProposals\",\"inputs\":[{\"name\":\"proposalStatus\",\"type\":\"int32\",\"internalType\":\"int32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIGovernanceModule.Proposal[]\",\"components\":[{\"name\":\"id\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"messages\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.CodecAny[]\",\"components\":[{\"name\":\"typeURL\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"status\",\"type\":\"int32\",\"internalType\":\"int32\"},{\"name\":\"finalTallyResult\",\"type\":\"tuple\",\"internalType\":\"structIGovernanceModule.TallyResult\",\"components\":[{\"name\":\"yesCount\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"abstainCount\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"noCount\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"noWithVetoCount\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"submitTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"depositEndTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"totalDeposit\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"votingStartTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"votingEndTime\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"metadata\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"title\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"summary\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"governanceModule\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIGovernanceModule\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submit\",\"inputs\":[{\"name\":\"proposal\",\"type\":\"tuple\",\"internalType\":\"structIGovernanceModule.MsgSubmitProposal\",\"components\":[{\"name\":\"messages\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.CodecAny[]\",\"components\":[{\"name\":\"typeURL\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"initialDeposit\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"metadata\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"title\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"summary\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"expedited\",\"type\":\"bool\",\"internalType\":\"bool\"}]},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"vote\",\"inputs\":[{\"name\":\"proposalId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"option\",\"type\":\"int32\",\"internalType\":\"int32\"},{\"name\":\"metadata\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"error\",\"name\":\"ZeroAddress\",\"inputs\":[]}]", | |||
Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b506040516200264b3803806200264b83398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051612474620001d75f395f6104e501526124745ff3fe608060405260043610610072575f3560e01c806337a9a59e1161004d57806337a9a59e1461011357806376cdb03b14610150578063b5828df21461017a578063f1610a28146101b657610079565b8062e66c9a1461007d57806319f7a0fb146100ad5780632b0a7032146100e957610079565b3661007957005b5f80fd5b61009760048036038101906100929190610862565b6101f2565b6040516100a49190610911565b60405180910390f35b3480156100b8575f80fd5b506100d360048036038101906100ce9190610ac2565b610377565b6040516100e09190610b48565b60405180910390f35b3480156100f4575f80fd5b506100fd61041e565b60405161010a9190610bdb565b60405180910390f35b34801561011e575f80fd5b5061013960048036038101906101349190610bf4565b610441565b604051610147929190610c1f565b60405180910390f35b34801561015b575f80fd5b506101646104e3565b6040516101719190610c66565b60405180910390f35b348015610185575f80fd5b506101a0600480360381019061019b9190610c7f565b610507565b6040516101ad919061121d565b60405180910390f35b3480156101c1575f80fd5b506101dc60048036038101906101d79190610bf4565b6105bc565b6040516101e99190611376565b60405180910390f35b5f80600167ffffffffffffffff81111561020f5761020e61099e565b5b60405190808252806020026020018201604052801561024857816020015b610235610665565b81526020019060019003908161022d5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f815181106102a2576102a1611396565b5b60200260200101516020018190525082815f815181106102c5576102c4611396565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638ed6982d876040518263ffffffff1660e01b815260040161032c919061196e565b6020604051808303815f875af1158015610348573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061036c91906119a2565b915050949350505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b81526004016103d593929190611a24565b6020604051808303815f875af11580156103f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104159190611a74565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b815260040161049b9190610911565b60408051808303815f875af11580156104b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104da9190611a9f565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b606061051161067e565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b815260040161056d929190611b50565b5f60405180830381865afa158015610587573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105af9190612381565b5090508092505050919050565b6105c46106c1565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b815260040161061c9190610911565b5f60405180830381865afa158015610636573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061065e91906123f7565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f5610773565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020016060815260200160608152602001606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f60e082840312156107c5576107c46107ac565b5b81905092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126107ef576107ee6107ce565b5b8235905067ffffffffffffffff81111561080c5761080b6107d2565b5b602083019150836001820283011115610828576108276107d6565b5b9250929050565b5f819050919050565b6108418161082f565b811461084b575f80fd5b50565b5f8135905061085c81610838565b92915050565b5f805f806060858703121561087a576108796107a4565b5b5f85013567ffffffffffffffff811115610897576108966107a8565b5b6108a3878288016107b0565b945050602085013567ffffffffffffffff8111156108c4576108c36107a8565b5b6108d0878288016107da565b935093505060406108e38782880161084e565b91505092959194509250565b5f67ffffffffffffffff82169050919050565b61090b816108ef565b82525050565b5f6020820190506109245f830184610902565b92915050565b610933816108ef565b811461093d575f80fd5b50565b5f8135905061094e8161092a565b92915050565b5f8160030b9050919050565b61096981610954565b8114610973575f80fd5b50565b5f8135905061098481610960565b92915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109d48261098e565b810181811067ffffffffffffffff821117156109f3576109f261099e565b5b80604052505050565b5f610a0561079b565b9050610a1182826109cb565b919050565b5f67ffffffffffffffff821115610a3057610a2f61099e565b5b610a398261098e565b9050602081019050919050565b828183375f83830152505050565b5f610a66610a6184610a16565b6109fc565b905082815260208101848484011115610a8257610a8161098a565b5b610a8d848285610a46565b509392505050565b5f82601f830112610aa957610aa86107ce565b5b8135610ab9848260208601610a54565b91505092915050565b5f805f60608486031215610ad957610ad86107a4565b5b5f610ae686828701610940565b9350506020610af786828701610976565b925050604084013567ffffffffffffffff811115610b1857610b176107a8565b5b610b2486828701610a95565b9150509250925092565b5f8115159050919050565b610b4281610b2e565b82525050565b5f602082019050610b5b5f830184610b39565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ba3610b9e610b9984610b61565b610b80565b610b61565b9050919050565b5f610bb482610b89565b9050919050565b5f610bc582610baa565b9050919050565b610bd581610bbb565b82525050565b5f602082019050610bee5f830184610bcc565b92915050565b5f60208284031215610c0957610c086107a4565b5b5f610c1684828501610940565b91505092915050565b5f604082019050610c325f830185610902565b610c3f6020830184610902565b9392505050565b5f610c5082610baa565b9050919050565b610c6081610c46565b82525050565b5f602082019050610c795f830184610c57565b92915050565b5f60208284031215610c9457610c936107a4565b5b5f610ca184828501610976565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610cdc816108ef565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d42578082015181840152602081019050610d27565b5f8484015250505050565b5f610d5782610d0b565b610d618185610d15565b9350610d71818560208601610d25565b610d7a8161098e565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f610da982610d85565b610db38185610d8f565b9350610dc3818560208601610d25565b610dcc8161098e565b840191505092915050565b5f604083015f8301518482035f860152610df18282610d4d565b91505060208301518482036020860152610e0b8282610d9f565b9150508091505092915050565b5f610e238383610dd7565b905092915050565b5f602082019050919050565b5f610e4182610ce2565b610e4b8185610cec565b935083602082028501610e5d85610cfc565b805f5b85811015610e985784840389528151610e798582610e18565b9450610e8483610e2b565b925060208a01995050600181019050610e60565b50829750879550505050505092915050565b610eb381610954565b82525050565b5f608083015f8301518482035f860152610ed38282610d4d565b91505060208301518482036020860152610eed8282610d4d565b91505060408301518482036040860152610f078282610d4d565b91505060608301518482036060860152610f218282610d4d565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610f608161082f565b82525050565b5f604083015f830151610f7b5f860182610f57565b5060208301518482036020860152610f938282610d4d565b9150508091505092915050565b5f610fab8383610f66565b905092915050565b5f602082019050919050565b5f610fc982610f2e565b610fd38185610f38565b935083602082028501610fe585610f48565b805f5b8581101561102057848403895281516110018582610fa0565b945061100c83610fb3565b925060208a01995050600181019050610fe8565b50829750879550505050505092915050565b5f61103c82610b61565b9050919050565b61104c81611032565b82525050565b5f6101a083015f8301516110685f860182610cd3565b50602083015184820360208601526110808282610e37565b91505060408301516110956040860182610eaa565b50606083015184820360608601526110ad8282610eb9565b91505060808301516110c26080860182610cd3565b5060a08301516110d560a0860182610cd3565b5060c083015184820360c08601526110ed8282610fbf565b91505060e083015161110260e0860182610cd3565b50610100830151611117610100860182610cd3565b506101208301518482036101208601526111318282610d4d565b91505061014083015184820361014086015261114d8282610d4d565b9150506101608301518482036101608601526111698282610d4d565b915050610180830151611180610180860182611043565b508091505092915050565b5f6111968383611052565b905092915050565b5f602082019050919050565b5f6111b482610caa565b6111be8185610cb4565b9350836020820285016111d085610cc4565b805f5b8581101561120b57848403895281516111ec858261118b565b94506111f78361119e565b925060208a019950506001810190506111d3565b50829750879550505050505092915050565b5f6020820190508181035f83015261123581846111aa565b905092915050565b5f6101a083015f8301516112535f860182610cd3565b506020830151848203602086015261126b8282610e37565b91505060408301516112806040860182610eaa565b50606083015184820360608601526112988282610eb9565b91505060808301516112ad6080860182610cd3565b5060a08301516112c060a0860182610cd3565b5060c083015184820360c08601526112d88282610fbf565b91505060e08301516112ed60e0860182610cd3565b50610100830151611302610100860182610cd3565b5061012083015184820361012086015261131c8282610d4d565b9150506101408301518482036101408601526113388282610d4d565b9150506101608301518482036101608601526113548282610d4d565b91505061018083015161136b610180860182611043565b508091505092915050565b5f6020820190508181035f83015261138e818461123d565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f80833560016020038436030381126113eb576113ea6113cb565b5b83810192508235915060208301925067ffffffffffffffff821115611413576114126113c3565b5b602082023603831315611429576114286113c7565b5b509250929050565b5f819050919050565b5f8083356001602003843603038112611456576114556113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561147e5761147d6113c3565b5b600182023603831315611494576114936113c7565b5b509250929050565b5f6114a78385610d15565b93506114b4838584610a46565b6114bd8361098e565b840190509392505050565b5f80833560016020038436030381126114e4576114e36113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561150c5761150b6113c3565b5b600182023603831315611522576115216113c7565b5b509250929050565b5f6115358385610d8f565b9350611542838584610a46565b61154b8361098e565b840190509392505050565b5f604083016115675f84018461143a565b8583035f87015261157983828461149c565b9250505061158a60208401846114c8565b858303602087015261159d83828461152a565b925050508091505092915050565b5f6115b68383611556565b905092915050565b5f823560016040038336030381126115d9576115d86113cb565b5b82810191505092915050565b5f602082019050919050565b5f6115fc8385610cec565b93508360208402850161160e84611431565b805f5b8781101561165157848403895261162882846115be565b61163285826115ab565b945061163d836115e5565b925060208a01995050600181019050611611565b50829750879450505050509392505050565b5f808335600160200384360303811261167f5761167e6113cb565b5b83810192508235915060208301925067ffffffffffffffff8211156116a7576116a66113c3565b5b6020820236038313156116bd576116bc6113c7565b5b509250929050565b5f819050919050565b5f6116dc602084018461084e565b905092915050565b5f604083016116f55f8401846116ce565b6117015f860182610f57565b5061170f602084018461143a565b858303602087015261172283828461149c565b925050508091505092915050565b5f61173b83836116e4565b905092915050565b5f8235600160400383360303811261175e5761175d6113cb565b5b82810191505092915050565b5f602082019050919050565b5f6117818385610f38565b935083602084028501611793846116c5565b805f5b878110156117d65784840389526117ad8284611743565b6117b78582611730565b94506117c28361176a565b925060208a01995050600181019050611796565b50829750879450505050509392505050565b6117f181611032565b81146117fb575f80fd5b50565b5f8135905061180c816117e8565b92915050565b5f61182060208401846117fe565b905092915050565b61183181610b2e565b811461183b575f80fd5b50565b5f8135905061184c81611828565b92915050565b5f611860602084018461183e565b905092915050565b61187181610b2e565b82525050565b5f60e083016118885f8401846113cf565b8583035f87015261189a8382846115f1565b925050506118ab6020840184611663565b85830360208701526118be838284611776565b925050506118cf6040840184611812565b6118dc6040860182611043565b506118ea606084018461143a565b85830360608701526118fd83828461149c565b9250505061190e608084018461143a565b858303608087015261192183828461149c565b9250505061193260a084018461143a565b85830360a087015261194583828461149c565b9250505061195660c0840184611852565b61196360c0860182611868565b508091505092915050565b5f6020820190508181035f8301526119868184611877565b905092915050565b5f8151905061199c8161092a565b92915050565b5f602082840312156119b7576119b66107a4565b5b5f6119c48482850161198e565b91505092915050565b6119d681610954565b82525050565b5f82825260208201905092915050565b5f6119f682610d0b565b611a0081856119dc565b9350611a10818560208601610d25565b611a198161098e565b840191505092915050565b5f606082019050611a375f830186610902565b611a4460208301856119cd565b8181036040830152611a5681846119ec565b9050949350505050565b5f81519050611a6e81611828565b92915050565b5f60208284031215611a8957611a886107a4565b5b5f611a9684828501611a60565b91505092915050565b5f8060408385031215611ab557611ab46107a4565b5b5f611ac28582860161198e565b9250506020611ad38582860161198e565b9150509250929050565b5f60a083015f8301518482035f860152611af78282610d4d565b9150506020830151611b0c6020860182610cd3565b506040830151611b1f6040860182610cd3565b506060830151611b326060860182611868565b506080830151611b456080860182611868565b508091505092915050565b5f604082019050611b635f8301856119cd565b8181036020830152611b758184611add565b90509392505050565b5f67ffffffffffffffff821115611b9857611b9761099e565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115611bcb57611bca61099e565b5b602082029050602081019050919050565b5f611bee611be984610a16565b6109fc565b905082815260208101848484011115611c0a57611c0961098a565b5b611c15848285610d25565b509392505050565b5f82601f830112611c3157611c306107ce565b5b8151611c41848260208601611bdc565b91505092915050565b5f67ffffffffffffffff821115611c6457611c6361099e565b5b611c6d8261098e565b9050602081019050919050565b5f611c8c611c8784611c4a565b6109fc565b905082815260208101848484011115611ca857611ca761098a565b5b611cb3848285610d25565b509392505050565b5f82601f830112611ccf57611cce6107ce565b5b8151611cdf848260208601611c7a565b91505092915050565b5f60408284031215611cfd57611cfc611ba9565b5b611d0760406109fc565b90505f82015167ffffffffffffffff811115611d2657611d25611bad565b5b611d3284828501611c1d565b5f83015250602082015167ffffffffffffffff811115611d5557611d54611bad565b5b611d6184828501611cbb565b60208301525092915050565b5f611d7f611d7a84611bb1565b6109fc565b90508083825260208201905060208402830185811115611da257611da16107d6565b5b835b81811015611de957805167ffffffffffffffff811115611dc757611dc66107ce565b5b808601611dd48982611ce8565b85526020850194505050602081019050611da4565b5050509392505050565b5f82601f830112611e0757611e066107ce565b5b8151611e17848260208601611d6d565b91505092915050565b5f81519050611e2e81610960565b92915050565b5f60808284031215611e4957611e48611ba9565b5b611e5360806109fc565b90505f82015167ffffffffffffffff811115611e7257611e71611bad565b5b611e7e84828501611c1d565b5f83015250602082015167ffffffffffffffff811115611ea157611ea0611bad565b5b611ead84828501611c1d565b602083015250604082015167ffffffffffffffff811115611ed157611ed0611bad565b5b611edd84828501611c1d565b604083015250606082015167ffffffffffffffff811115611f0157611f00611bad565b5b611f0d84828501611c1d565b60608301525092915050565b5f67ffffffffffffffff821115611f3357611f3261099e565b5b602082029050602081019050919050565b5f81519050611f5281610838565b92915050565b5f60408284031215611f6d57611f6c611ba9565b5b611f7760406109fc565b90505f611f8684828501611f44565b5f83015250602082015167ffffffffffffffff811115611fa957611fa8611bad565b5b611fb584828501611c1d565b60208301525092915050565b5f611fd3611fce84611f19565b6109fc565b90508083825260208201905060208402830185811115611ff657611ff56107d6565b5b835b8181101561203d57805167ffffffffffffffff81111561201b5761201a6107ce565b5b8086016120288982611f58565b85526020850194505050602081019050611ff8565b5050509392505050565b5f82601f83011261205b5761205a6107ce565b5b815161206b848260208601611fc1565b91505092915050565b5f81519050612082816117e8565b92915050565b5f6101a0828403121561209e5761209d611ba9565b5b6120a96101a06109fc565b90505f6120b88482850161198e565b5f83015250602082015167ffffffffffffffff8111156120db576120da611bad565b5b6120e784828501611df3565b60208301525060406120fb84828501611e20565b604083015250606082015167ffffffffffffffff81111561211f5761211e611bad565b5b61212b84828501611e34565b606083015250608061213f8482850161198e565b60808301525060a06121538482850161198e565b60a08301525060c082015167ffffffffffffffff81111561217757612176611bad565b5b61218384828501612047565b60c08301525060e06121978482850161198e565b60e0830152506101006121ac8482850161198e565b6101008301525061012082015167ffffffffffffffff8111156121d2576121d1611bad565b5b6121de84828501611c1d565b6101208301525061014082015167ffffffffffffffff81111561220457612203611bad565b5b61221084828501611c1d565b6101408301525061016082015167ffffffffffffffff81111561223657612235611bad565b5b61224284828501611c1d565b6101608301525061018061225884828501612074565b6101808301525092915050565b5f61227761227284611b7e565b6109fc565b9050808382526020820190506020840283018581111561229a576122996107d6565b5b835b818110156122e157805167ffffffffffffffff8111156122bf576122be6107ce565b5b8086016122cc8982612088565b8552602085019450505060208101905061229c565b5050509392505050565b5f82601f8301126122ff576122fe6107ce565b5b815161230f848260208601612265565b91505092915050565b5f6040828403121561232d5761232c611ba9565b5b61233760406109fc565b90505f82015167ffffffffffffffff81111561235657612355611bad565b5b61236284828501611c1d565b5f8301525060206123758482850161198e565b60208301525092915050565b5f8060408385031215612397576123966107a4565b5b5f83015167ffffffffffffffff8111156123b4576123b36107a8565b5b6123c0858286016122eb565b925050602083015167ffffffffffffffff8111156123e1576123e06107a8565b5b6123ed85828601612318565b9150509250929050565b5f6020828403121561240c5761240b6107a4565b5b5f82015167ffffffffffffffff811115612429576124286107a8565b5b61243584828501612088565b9150509291505056fea264697066735822122045214736f7cde8a8c3f91a69f7e18a2c11443e62ee0dd7eadbfd1cb8e2cf9ed264736f6c63430008170033", | |||
Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b506040516200264b3803806200264b83398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051612474620001d75f395f6104e501526124745ff3fe608060405260043610610072575f3560e01c806337a9a59e1161004d57806337a9a59e1461011357806376cdb03b14610150578063b5828df21461017a578063f1610a28146101b657610079565b8062e66c9a1461007d57806319f7a0fb146100ad5780632b0a7032146100e957610079565b3661007957005b5f80fd5b61009760048036038101906100929190610862565b6101f2565b6040516100a49190610911565b60405180910390f35b3480156100b8575f80fd5b506100d360048036038101906100ce9190610ac2565b610377565b6040516100e09190610b48565b60405180910390f35b3480156100f4575f80fd5b506100fd61041e565b60405161010a9190610bdb565b60405180910390f35b34801561011e575f80fd5b5061013960048036038101906101349190610bf4565b610441565b604051610147929190610c1f565b60405180910390f35b34801561015b575f80fd5b506101646104e3565b6040516101719190610c66565b60405180910390f35b348015610185575f80fd5b506101a0600480360381019061019b9190610c7f565b610507565b6040516101ad919061121d565b60405180910390f35b3480156101c1575f80fd5b506101dc60048036038101906101d79190610bf4565b6105bc565b6040516101e99190611376565b60405180910390f35b5f80600167ffffffffffffffff81111561020f5761020e61099e565b5b60405190808252806020026020018201604052801561024857816020015b610235610665565b81526020019060019003908161022d5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f815181106102a2576102a1611396565b5b60200260200101516020018190525082815f815181106102c5576102c4611396565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638ed6982d876040518263ffffffff1660e01b815260040161032c919061196e565b6020604051808303815f875af1158015610348573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061036c91906119a2565b915050949350505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b81526004016103d593929190611a24565b6020604051808303815f875af11580156103f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104159190611a74565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b815260040161049b9190610911565b60408051808303815f875af11580156104b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104da9190611a9f565b91509150915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b606061051161067e565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b815260040161056d929190611b50565b5f60405180830381865afa158015610587573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105af9190612381565b5090508092505050919050565b6105c46106c1565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b815260040161061c9190610911565b5f60405180830381865afa158015610636573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061065e91906123f7565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f5610773565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020016060815260200160608152602001606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f60e082840312156107c5576107c46107ac565b5b81905092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126107ef576107ee6107ce565b5b8235905067ffffffffffffffff81111561080c5761080b6107d2565b5b602083019150836001820283011115610828576108276107d6565b5b9250929050565b5f819050919050565b6108418161082f565b811461084b575f80fd5b50565b5f8135905061085c81610838565b92915050565b5f805f806060858703121561087a576108796107a4565b5b5f85013567ffffffffffffffff811115610897576108966107a8565b5b6108a3878288016107b0565b945050602085013567ffffffffffffffff8111156108c4576108c36107a8565b5b6108d0878288016107da565b935093505060406108e38782880161084e565b91505092959194509250565b5f67ffffffffffffffff82169050919050565b61090b816108ef565b82525050565b5f6020820190506109245f830184610902565b92915050565b610933816108ef565b811461093d575f80fd5b50565b5f8135905061094e8161092a565b92915050565b5f8160030b9050919050565b61096981610954565b8114610973575f80fd5b50565b5f8135905061098481610960565b92915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109d48261098e565b810181811067ffffffffffffffff821117156109f3576109f261099e565b5b80604052505050565b5f610a0561079b565b9050610a1182826109cb565b919050565b5f67ffffffffffffffff821115610a3057610a2f61099e565b5b610a398261098e565b9050602081019050919050565b828183375f83830152505050565b5f610a66610a6184610a16565b6109fc565b905082815260208101848484011115610a8257610a8161098a565b5b610a8d848285610a46565b509392505050565b5f82601f830112610aa957610aa86107ce565b5b8135610ab9848260208601610a54565b91505092915050565b5f805f60608486031215610ad957610ad86107a4565b5b5f610ae686828701610940565b9350506020610af786828701610976565b925050604084013567ffffffffffffffff811115610b1857610b176107a8565b5b610b2486828701610a95565b9150509250925092565b5f8115159050919050565b610b4281610b2e565b82525050565b5f602082019050610b5b5f830184610b39565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ba3610b9e610b9984610b61565b610b80565b610b61565b9050919050565b5f610bb482610b89565b9050919050565b5f610bc582610baa565b9050919050565b610bd581610bbb565b82525050565b5f602082019050610bee5f830184610bcc565b92915050565b5f60208284031215610c0957610c086107a4565b5b5f610c1684828501610940565b91505092915050565b5f604082019050610c325f830185610902565b610c3f6020830184610902565b9392505050565b5f610c5082610baa565b9050919050565b610c6081610c46565b82525050565b5f602082019050610c795f830184610c57565b92915050565b5f60208284031215610c9457610c936107a4565b5b5f610ca184828501610976565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610cdc816108ef565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d42578082015181840152602081019050610d27565b5f8484015250505050565b5f610d5782610d0b565b610d618185610d15565b9350610d71818560208601610d25565b610d7a8161098e565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f610da982610d85565b610db38185610d8f565b9350610dc3818560208601610d25565b610dcc8161098e565b840191505092915050565b5f604083015f8301518482035f860152610df18282610d4d565b91505060208301518482036020860152610e0b8282610d9f565b9150508091505092915050565b5f610e238383610dd7565b905092915050565b5f602082019050919050565b5f610e4182610ce2565b610e4b8185610cec565b935083602082028501610e5d85610cfc565b805f5b85811015610e985784840389528151610e798582610e18565b9450610e8483610e2b565b925060208a01995050600181019050610e60565b50829750879550505050505092915050565b610eb381610954565b82525050565b5f608083015f8301518482035f860152610ed38282610d4d565b91505060208301518482036020860152610eed8282610d4d565b91505060408301518482036040860152610f078282610d4d565b91505060608301518482036060860152610f218282610d4d565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610f608161082f565b82525050565b5f604083015f830151610f7b5f860182610f57565b5060208301518482036020860152610f938282610d4d565b9150508091505092915050565b5f610fab8383610f66565b905092915050565b5f602082019050919050565b5f610fc982610f2e565b610fd38185610f38565b935083602082028501610fe585610f48565b805f5b8581101561102057848403895281516110018582610fa0565b945061100c83610fb3565b925060208a01995050600181019050610fe8565b50829750879550505050505092915050565b5f61103c82610b61565b9050919050565b61104c81611032565b82525050565b5f6101a083015f8301516110685f860182610cd3565b50602083015184820360208601526110808282610e37565b91505060408301516110956040860182610eaa565b50606083015184820360608601526110ad8282610eb9565b91505060808301516110c26080860182610cd3565b5060a08301516110d560a0860182610cd3565b5060c083015184820360c08601526110ed8282610fbf565b91505060e083015161110260e0860182610cd3565b50610100830151611117610100860182610cd3565b506101208301518482036101208601526111318282610d4d565b91505061014083015184820361014086015261114d8282610d4d565b9150506101608301518482036101608601526111698282610d4d565b915050610180830151611180610180860182611043565b508091505092915050565b5f6111968383611052565b905092915050565b5f602082019050919050565b5f6111b482610caa565b6111be8185610cb4565b9350836020820285016111d085610cc4565b805f5b8581101561120b57848403895281516111ec858261118b565b94506111f78361119e565b925060208a019950506001810190506111d3565b50829750879550505050505092915050565b5f6020820190508181035f83015261123581846111aa565b905092915050565b5f6101a083015f8301516112535f860182610cd3565b506020830151848203602086015261126b8282610e37565b91505060408301516112806040860182610eaa565b50606083015184820360608601526112988282610eb9565b91505060808301516112ad6080860182610cd3565b5060a08301516112c060a0860182610cd3565b5060c083015184820360c08601526112d88282610fbf565b91505060e08301516112ed60e0860182610cd3565b50610100830151611302610100860182610cd3565b5061012083015184820361012086015261131c8282610d4d565b9150506101408301518482036101408601526113388282610d4d565b9150506101608301518482036101608601526113548282610d4d565b91505061018083015161136b610180860182611043565b508091505092915050565b5f6020820190508181035f83015261138e818461123d565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f80833560016020038436030381126113eb576113ea6113cb565b5b83810192508235915060208301925067ffffffffffffffff821115611413576114126113c3565b5b602082023603831315611429576114286113c7565b5b509250929050565b5f819050919050565b5f8083356001602003843603038112611456576114556113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561147e5761147d6113c3565b5b600182023603831315611494576114936113c7565b5b509250929050565b5f6114a78385610d15565b93506114b4838584610a46565b6114bd8361098e565b840190509392505050565b5f80833560016020038436030381126114e4576114e36113cb565b5b83810192508235915060208301925067ffffffffffffffff82111561150c5761150b6113c3565b5b600182023603831315611522576115216113c7565b5b509250929050565b5f6115358385610d8f565b9350611542838584610a46565b61154b8361098e565b840190509392505050565b5f604083016115675f84018461143a565b8583035f87015261157983828461149c565b9250505061158a60208401846114c8565b858303602087015261159d83828461152a565b925050508091505092915050565b5f6115b68383611556565b905092915050565b5f823560016040038336030381126115d9576115d86113cb565b5b82810191505092915050565b5f602082019050919050565b5f6115fc8385610cec565b93508360208402850161160e84611431565b805f5b8781101561165157848403895261162882846115be565b61163285826115ab565b945061163d836115e5565b925060208a01995050600181019050611611565b50829750879450505050509392505050565b5f808335600160200384360303811261167f5761167e6113cb565b5b83810192508235915060208301925067ffffffffffffffff8211156116a7576116a66113c3565b5b6020820236038313156116bd576116bc6113c7565b5b509250929050565b5f819050919050565b5f6116dc602084018461084e565b905092915050565b5f604083016116f55f8401846116ce565b6117015f860182610f57565b5061170f602084018461143a565b858303602087015261172283828461149c565b925050508091505092915050565b5f61173b83836116e4565b905092915050565b5f8235600160400383360303811261175e5761175d6113cb565b5b82810191505092915050565b5f602082019050919050565b5f6117818385610f38565b935083602084028501611793846116c5565b805f5b878110156117d65784840389526117ad8284611743565b6117b78582611730565b94506117c28361176a565b925060208a01995050600181019050611796565b50829750879450505050509392505050565b6117f181611032565b81146117fb575f80fd5b50565b5f8135905061180c816117e8565b92915050565b5f61182060208401846117fe565b905092915050565b61183181610b2e565b811461183b575f80fd5b50565b5f8135905061184c81611828565b92915050565b5f611860602084018461183e565b905092915050565b61187181610b2e565b82525050565b5f60e083016118885f8401846113cf565b8583035f87015261189a8382846115f1565b925050506118ab6020840184611663565b85830360208701526118be838284611776565b925050506118cf6040840184611812565b6118dc6040860182611043565b506118ea606084018461143a565b85830360608701526118fd83828461149c565b9250505061190e608084018461143a565b858303608087015261192183828461149c565b9250505061193260a084018461143a565b85830360a087015261194583828461149c565b9250505061195660c0840184611852565b61196360c0860182611868565b508091505092915050565b5f6020820190508181035f8301526119868184611877565b905092915050565b5f8151905061199c8161092a565b92915050565b5f602082840312156119b7576119b66107a4565b5b5f6119c48482850161198e565b91505092915050565b6119d681610954565b82525050565b5f82825260208201905092915050565b5f6119f682610d0b565b611a0081856119dc565b9350611a10818560208601610d25565b611a198161098e565b840191505092915050565b5f606082019050611a375f830186610902565b611a4460208301856119cd565b8181036040830152611a5681846119ec565b9050949350505050565b5f81519050611a6e81611828565b92915050565b5f60208284031215611a8957611a886107a4565b5b5f611a9684828501611a60565b91505092915050565b5f8060408385031215611ab557611ab46107a4565b5b5f611ac28582860161198e565b9250506020611ad38582860161198e565b9150509250929050565b5f60a083015f8301518482035f860152611af78282610d4d565b9150506020830151611b0c6020860182610cd3565b506040830151611b1f6040860182610cd3565b506060830151611b326060860182611868565b506080830151611b456080860182611868565b508091505092915050565b5f604082019050611b635f8301856119cd565b8181036020830152611b758184611add565b90509392505050565b5f67ffffffffffffffff821115611b9857611b9761099e565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115611bcb57611bca61099e565b5b602082029050602081019050919050565b5f611bee611be984610a16565b6109fc565b905082815260208101848484011115611c0a57611c0961098a565b5b611c15848285610d25565b509392505050565b5f82601f830112611c3157611c306107ce565b5b8151611c41848260208601611bdc565b91505092915050565b5f67ffffffffffffffff821115611c6457611c6361099e565b5b611c6d8261098e565b9050602081019050919050565b5f611c8c611c8784611c4a565b6109fc565b905082815260208101848484011115611ca857611ca761098a565b5b611cb3848285610d25565b509392505050565b5f82601f830112611ccf57611cce6107ce565b5b8151611cdf848260208601611c7a565b91505092915050565b5f60408284031215611cfd57611cfc611ba9565b5b611d0760406109fc565b90505f82015167ffffffffffffffff811115611d2657611d25611bad565b5b611d3284828501611c1d565b5f83015250602082015167ffffffffffffffff811115611d5557611d54611bad565b5b611d6184828501611cbb565b60208301525092915050565b5f611d7f611d7a84611bb1565b6109fc565b90508083825260208201905060208402830185811115611da257611da16107d6565b5b835b81811015611de957805167ffffffffffffffff811115611dc757611dc66107ce565b5b808601611dd48982611ce8565b85526020850194505050602081019050611da4565b5050509392505050565b5f82601f830112611e0757611e066107ce565b5b8151611e17848260208601611d6d565b91505092915050565b5f81519050611e2e81610960565b92915050565b5f60808284031215611e4957611e48611ba9565b5b611e5360806109fc565b90505f82015167ffffffffffffffff811115611e7257611e71611bad565b5b611e7e84828501611c1d565b5f83015250602082015167ffffffffffffffff811115611ea157611ea0611bad565b5b611ead84828501611c1d565b602083015250604082015167ffffffffffffffff811115611ed157611ed0611bad565b5b611edd84828501611c1d565b604083015250606082015167ffffffffffffffff811115611f0157611f00611bad565b5b611f0d84828501611c1d565b60608301525092915050565b5f67ffffffffffffffff821115611f3357611f3261099e565b5b602082029050602081019050919050565b5f81519050611f5281610838565b92915050565b5f60408284031215611f6d57611f6c611ba9565b5b611f7760406109fc565b90505f611f8684828501611f44565b5f83015250602082015167ffffffffffffffff811115611fa957611fa8611bad565b5b611fb584828501611c1d565b60208301525092915050565b5f611fd3611fce84611f19565b6109fc565b90508083825260208201905060208402830185811115611ff657611ff56107d6565b5b835b8181101561203d57805167ffffffffffffffff81111561201b5761201a6107ce565b5b8086016120288982611f58565b85526020850194505050602081019050611ff8565b5050509392505050565b5f82601f83011261205b5761205a6107ce565b5b815161206b848260208601611fc1565b91505092915050565b5f81519050612082816117e8565b92915050565b5f6101a0828403121561209e5761209d611ba9565b5b6120a96101a06109fc565b90505f6120b88482850161198e565b5f83015250602082015167ffffffffffffffff8111156120db576120da611bad565b5b6120e784828501611df3565b60208301525060406120fb84828501611e20565b604083015250606082015167ffffffffffffffff81111561211f5761211e611bad565b5b61212b84828501611e34565b606083015250608061213f8482850161198e565b60808301525060a06121538482850161198e565b60a08301525060c082015167ffffffffffffffff81111561217757612176611bad565b5b61218384828501612047565b60c08301525060e06121978482850161198e565b60e0830152506101006121ac8482850161198e565b6101008301525061012082015167ffffffffffffffff8111156121d2576121d1611bad565b5b6121de84828501611c1d565b6101208301525061014082015167ffffffffffffffff81111561220457612203611bad565b5b61221084828501611c1d565b6101408301525061016082015167ffffffffffffffff81111561223657612235611bad565b5b61224284828501611c1d565b6101608301525061018061225884828501612074565b6101808301525092915050565b5f61227761227284611b7e565b6109fc565b9050808382526020820190506020840283018581111561229a576122996107d6565b5b835b818110156122e157805167ffffffffffffffff8111156122bf576122be6107ce565b5b8086016122cc8982612088565b8552602085019450505060208101905061229c565b5050509392505050565b5f82601f8301126122ff576122fe6107ce565b5b815161230f848260208601612265565b91505092915050565b5f6040828403121561232d5761232c611ba9565b5b61233760406109fc565b90505f82015167ffffffffffffffff81111561235657612355611bad565b5b61236284828501611c1d565b5f8301525060206123758482850161198e565b60208301525092915050565b5f8060408385031215612397576123966107a4565b5b5f83015167ffffffffffffffff8111156123b4576123b36107a8565b5b6123c0858286016122eb565b925050602083015167ffffffffffffffff8111156123e1576123e06107a8565b5b6123ed85828601612318565b9150509250929050565b5f6020828403121561240c5761240b6107a4565b5b5f82015167ffffffffffffffff811115612429576124286107a8565b5b61243584828501612088565b9150509291505056fea2646970667358221220f86c11bbafad99c494796136cccc24a01940ebe62573abc6f290ab431a019e7264736f6c63430008170033", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GovernanceWrapperABI
and GovernanceWrapperBin
variables are marked as deprecated.
Replace any usage of these deprecated variables with GovernanceWrapperMetaData.ABI
and GovernanceWrapperMetaData.Bin
to ensure the codebase is up-to-date with the latest contract ABI and bytecode.
// Load the last state of the Polaris EVM. | ||
// TODO: verify that the version of app CMS is the same as app.LastBlockHeight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment has been added to verify the version of the app CMS against app.LastBlockHeight
during the loading of the last state. Ensure that this verification is implemented and tested to prevent inconsistencies.
Would you like me to implement this verification check or open a GitHub issue to track this task?
# ForceTxRemoval indicates whether we use Cosmos to remove transactions from the Geth txpool. | ||
force-tx-removal = "{{.Polaris.Polar.ForceTxRemoval }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The search for inline comments near the force-tx-removal
references has provided a comment in the template.go
file that explains the purpose of the force-tx-removal
configuration option. The comment states:
# ForceTxRemoval indicates whether we use Cosmos to remove transactions from the Geth txpool.
This comment serves as inline documentation for the configuration option within the codebase. However, there were no additional explanatory comments or documentation found in the vicinity of the reference in the flags.go
file.
Given this context, it can be concluded that while there is a brief inline comment explaining the force-tx-removal
option in the template.go
file, there is no extensive documentation or user guide found in the Markdown files or other documentation files in the repository. Therefore, the review comment is correct in suggesting that the usage of this option should be clearly documented for end-users.
Analysis chain
The new configuration option force-tx-removal
has been added. Ensure that this option is documented and that its usage is clear to the end-users.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify that the new configuration option is documented in the README or relevant documentation.
rg --type md "force-tx-removal"
Length of output: 31
Script:
#!/bin/bash
# Search for documentation or comments regarding the 'force-tx-removal' configuration option in .go and .toml files.
rg "force-tx-removal" --type go --type toml
Length of output: 205
Script:
#!/bin/bash
# Check for inline comments near the 'force-tx-removal' references in the .go and .toml files.
rg -C 5 "force-tx-removal" --type go --type toml
Length of output: 1394
Summary by CodeRabbit
New Features
CometRemoteCache
interface for tracking transactions added remotely.Remove
method inTxPool
interface to allow transaction removal by hash.Improvements
EndBlock
method.Bug Fixes
StateAndHeaderByNumber
method.Refactor
Documentation
Chores