-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PGDB Refactor & PG Rollback Functionality & Rollback Testing Endpoint #102
Conversation
…Be Investigated - Rewrote PG commands to use Transaction Blocks to avoid race conditions - Removed Function InitDBTest As InitDb now handles DB connections for all environments - Still some failures related to PG database that need adjustments to tests
…m into geth/tests
Db pg flag
Chain/Rollback Endpoint & Rollback Functionality Working
fixed api accountnonce to nonce
* updated_rollback_dev: Fix Docker With New Development Config
Db test suite - all tests related to db rollback functionality and the pg db are passing
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.
I pulled down and ran geth, it successfully recorded blocks, transactions, internal transactions and updated accounts accordingly.
gasPrice = 0 | ||
//Appending GENESIS to address stored as txHash and From Addr | ||
Genesis := []string{"GENESIS_", k.String()} | ||
GENESIS := "GENESIS" | ||
txHash := strings.Join(Genesis, k.String()) | ||
//Create the accountNonce, set to 1 (1 incoming tx), format type | ||
accountNonce := v.Nonce + 1 | ||
accountNoncee := strconv.FormatUint(accountNonce, 10) | ||
// accountNoncee := strconv.FormatUint(accountNonce, 10) |
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.
This should be removed if not used
Time string | ||
ID int | ||
Hash string | ||
BlockHash string |
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.
only one line is added (that I can see), we should probably revert the other changes
@@ -239,6 +271,7 @@ func testChainOdr(t *testing.T, protocol int, fn odrTestFn) { | |||
) | |||
gspec.MustCommit(ldb) | |||
// Assemble the test environment | |||
|
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.
new line should be removed
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.
Thanks @strangepowers I am also reviewing as getting some strange behaviour with respect to creation of Genesis Accounts as well as when running in Docker vs Local. I am going to delay the merge until I have a chance to further investigate this weekend - were you able to get docker running?
I am closing this for now - as some further testing is required - due to the fact that we are getting some strange behaviours when running in Docker versus locally |
Requesting this merge now so that it can be used as the basis for testnet docker images - using refactored code and working rollback functionality
This request contains fixes for issues Log in the API #95 panic: sql: converting argument $10 type: uint64 values with high bit set are not supported #83 Block Explorer UI only displays records when accessing from localhost #77
A temporary http endpoint has been provided to test forced rollbacks of the blockchain and pg database on the testnet - this should be removed eventually once the shyft geth messaging system has been architected and implemented.
Further work is currently being completed to address Restarting a non-mining node gives error when syncing with a mining node #78 and for ensuring that balances in the pg database above UINT64 can be handled within the pg database.