Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

adopt some of the precompiled contracts to process schain groups logic #1702

Closed
1 task done
olehnikolaiev opened this issue Oct 20, 2023 · 6 comments · Fixed by #1713
Closed
1 task done

adopt some of the precompiled contracts to process schain groups logic #1702

olehnikolaiev opened this issue Oct 20, 2023 · 6 comments · Fixed by #1713
Assignees
Labels
enhancement New feature or request epic:oracle Oracle
Milestone

Comments

@olehnikolaiev
Copy link
Contributor

olehnikolaiev commented Oct 20, 2023

need to adapt some of the precompiled smart contracts like getConfigVariableUint256 to return the variables values depending on current block timestamp

Tasks

  1. enhancement epic:oracle
    DmytroNazarenko

How it works: https://github.com/skalenetwork/internal-support/blob/main/docs/issues-and-investigations/precompiledPatch.md

@DmytroNazarenko
Copy link
Collaborator

Add to 2.3 to unblock on-chain oracle usage

@olehnikolaiev olehnikolaiev moved this from In Progress to Code Review in SKALE Engineering 🚀 Oct 31, 2023
@olehnikolaiev olehnikolaiev linked a pull request Nov 1, 2023 that will close this issue
kladkogex added a commit that referenced this issue Nov 6, 2023
kladkogex added a commit that referenced this issue Nov 6, 2023
kladkogex added a commit that referenced this issue Nov 7, 2023
kladkogex added a commit that referenced this issue Nov 7, 2023
kladkogex added a commit that referenced this issue Nov 7, 2023
kladkogex added a commit that referenced this issue Nov 7, 2023
kladkogex added a commit that referenced this issue Nov 7, 2023
olehnikolaiev added a commit that referenced this issue Nov 7, 2023
olehnikolaiev added a commit that referenced this issue Nov 8, 2023
olehnikolaiev added a commit that referenced this issue Nov 13, 2023
olehnikolaiev added a commit that referenced this issue Nov 13, 2023
@PolinaKiporenko PolinaKiporenko moved this from Code Review to In Progress in SKALE Engineering 🚀 Nov 22, 2023
olehnikolaiev added a commit that referenced this issue Nov 22, 2023
olehnikolaiev added a commit that referenced this issue Nov 22, 2023
olehnikolaiev added a commit that referenced this issue Nov 22, 2023
@olehnikolaiev olehnikolaiev moved this from In Progress to Code Review in SKALE Engineering 🚀 Nov 22, 2023
olehnikolaiev added a commit that referenced this issue Nov 22, 2023
olehnikolaiev added a commit that referenced this issue Nov 22, 2023
@olehnikolaiev olehnikolaiev moved this from Code Review to Ready For Release Candidate in SKALE Engineering 🚀 Nov 23, 2023
@DmytroNazarenko
Copy link
Collaborator

skaled: 3.18.0-beta.0
patch: precompiledPatchTimestamp

@DmytroNazarenko DmytroNazarenko moved this from Ready For Release Candidate to Merged To Release Candidate in SKALE Engineering 🚀 Jan 23, 2024
@EvgeniyZZ EvgeniyZZ moved this from Merged To Release Candidate to QA in SKALE Engineering 🚀 Jan 23, 2024
@OleksanderSalamatov
Copy link

Verified

skaled: 3.18.0-beta.1

After rotations txs with verification of oracle result processed normally, after snapshots were made state root is equal on all nodes

regular node:

> eth.getTransactionReceipt("0x09e493fa038076fa671435e20ea6c8910593cb2c351a034d4d5be0d312a8f49e")
{
  blockHash: "0xa4d592cb7a771f08756eebbadf3dcba65d36ba22067691a834c011fafc4a9746",
  blockNumber: 19329,
  contractAddress: null,
  cumulativeGasUsed: 242545,
  from: "0x487360568fe5ee4ae5c75782d5f63e9935b0e512",
  gasUsed: 215939,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  status: "0x1",
  to: "0xaaab993e4b7b22f20db2a28c627e3cf84e991473",
  transactionHash: "0x09e493fa038076fa671435e20ea6c8910593cb2c351a034d4d5be0d312a8f49e",
  transactionIndex: 1
}
> eth.getTransactionReceipt("0x8904cdff383ba8cd0ca96042707467acfa886d6b88e6e66bbb63273b1937deaf")
{
  blockHash: "0xf4faf834866d1073ccacd0a5bec367d8abacecc43b03aefb7b2d55db6d3642ea",
  blockNumber: 19436,
  contractAddress: null,
  cumulativeGasUsed: 322363,
  from: "0x487360568fe5ee4ae5c75782d5f63e9935b0e512",
  gasUsed: 215939,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  status: "0x1",
  to: "0xaaab993e4b7b22f20db2a28c627e3cf84e991473",
  transactionHash: "0x8904cdff383ba8cd0ca96042707467acfa886d6b88e6e66bbb63273b1937deaf",
  transactionIndex: 4
}

catchuped node:

> eth.getTransactionReceipt("0x09e493fa038076fa671435e20ea6c8910593cb2c351a034d4d5be0d312a8f49e")
{
  blockHash: "0xa4d592cb7a771f08756eebbadf3dcba65d36ba22067691a834c011fafc4a9746",
  blockNumber: 19329,
  contractAddress: null,
  cumulativeGasUsed: 242545,
  from: "0x487360568fe5ee4ae5c75782d5f63e9935b0e512",
  gasUsed: 215939,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  status: "0x1",
  to: "0xaaab993e4b7b22f20db2a28c627e3cf84e991473",
  transactionHash: "0x09e493fa038076fa671435e20ea6c8910593cb2c351a034d4d5be0d312a8f49e",
  transactionIndex: 1
}
> eth.getTransactionReceipt("0x8904cdff383ba8cd0ca96042707467acfa886d6b88e6e66bbb63273b1937deaf")
{
  blockHash: "0xf4faf834866d1073ccacd0a5bec367d8abacecc43b03aefb7b2d55db6d3642ea",
  blockNumber: 19436,
  contractAddress: null,
  cumulativeGasUsed: 322363,
  from: "0x487360568fe5ee4ae5c75782d5f63e9935b0e512",
  gasUsed: 215939,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  status: "0x1",
  to: "0xaaab993e4b7b22f20db2a28c627e3cf84e991473",
  transactionHash: "0x8904cdff383ba8cd0ca96042707467acfa886d6b88e6e66bbb63273b1937deaf",
  transactionIndex: 4
}

@OleksanderSalamatov
Copy link

Has s problem with archive node, need to be retested.

@OleksanderSalamatov
Copy link

Blocker: #1836

@OleksanderSalamatov
Copy link

Fix versions for archive node:
skaled:3.18.0-historic
admin:2.11.0-sync-node.5

Config calls now do not cause errors with transaction execution on archive node and state root mismatch as a result

Log from archive node:

Reload configuration file Loading configuration from /schain_config/schain_skale-innocent-nasty.json ...
Reload configuration file Parsing configuration JSON ...
Reload configuration file Done, loaded configuration file /schain_config/schain_skale-innocent-nasty.json
2024-03-12 13:11:23.587728   Self-destructing#00000000…
2024-03-12 13:11:23.587764   Self-destructing#00000000…
2024-03-12 13:11:23.587778   Self-destructing#00000000…
2024-03-12 13:11:23.588622   Block sealed #1118117 (#e44eac89…)
2024-03-12 13:11:23.588654   Block stats:BN:1118116:BTS:1710249063:TXS:3:HDRS:11:LOGS:74:SENGS:1:TXRS:40:BLCKS:3:ACCS:199:BQS:1:BDS:288:TSS:0:UTX:0:VTX:0:CMM:868194:KDS:8
2024-03-12 13:11:23.588751   Block 1118117 DB usage is 1828. Piece DB usage is 207886743 bytes
2024-03-12 13:11:23.589309   noteChanged: {chain}
2024-03-12 13:11:23.589763   SWT:27:BFT:15865
2024-03-12 13:11:23.589783   Successfully imported 1 of 1 transactions

Log from core node:

Reload configuration file Loading configuration from /schain_config/schain_skale-innocent-nasty.json ...
Reload configuration file Parsing configuration JSON ...
Reload configuration file Done, loaded configuration file /schain_config/schain_skale-innocent-nasty.json
2024-03-12 13:11:13.290739   Self-destructing#00000000…
2024-03-12 13:11:13.290762   Self-destructing#00000000…
2024-03-12 13:11:13.290819   Self-destructing#00000000…
2024-03-12 13:11:13.291031   Block sealed #1118117 (#e44eac89…)
2024-03-12 13:11:13.291058   Block stats:BN:1118116:BTS:1710249063:TXS:3:HDRS:11:LOGS:76:SENGS:1:TXRS:27:BLCKS:3:ACCS:199:BQS:1:BDS:1859:TSS:0:UTX:0:VTX:0:CMM:2746821:KDS:8
2024-03-12 13:11:13.291142   Block 1118117 DB usage is 1828. Piece DB usage is 207886743 bytes
2024-03-12 13:11:13.291327   noteChanged: {chain}
2024-03-12 13:11:13.291631   SWT:16:BFT:9069
2024-03-12 13:11:13.291641   Successfully imported 1 of 1 transactions

@EvgeniyZZ EvgeniyZZ moved this from QA to Done in SKALE Engineering 🚀 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic:oracle Oracle
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants