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

PRT-X566-add-archive-extension-to-evm #679

Merged
merged 15 commits into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ecosystem/lava-sdk/node_modules/*
ecosystem/lava-sdk/src/js/*
ecosystem/lava-sdk/dist/main.js
ecosystem/lava-sdk/thirdparty_protobufs/*
ecosystem/lava-sdk/proto/*
ecosystem/lava-sdk/dist/*
ecosystem/lava-sdk/.dccache
ecosystem/lava-sdk/.idea
Expand All @@ -47,6 +46,14 @@ ecosystem/lava-sdk/examples/tendermintRPC_test.ts
ecosystem/lava-sdk/examples/tendermintRPC_test2.ts
ecosystem/lava-sdk/examples/jsonRPC_badge_test.ts
ecosystem/lava-sdk/pairingList.json
# ecosystem/lava-sdk/proto/**/*[!.proto] #tried but didnt work
ecosystem/lava-sdk/proto/**/*.yaml
ecosystem/lava-sdk/proto/**/*.bazel
ecosystem/lava-sdk/proto/**/*.bzl
ecosystem/lava-sdk/proto/**/*.md
ecosystem/lava-sdk/proto/**/*.sh
ecosystem/lava-sdk/proto/**/*.json
ecosystem/lava-sdk/proto/**/*.go

# Ignore the bin and dist folders and their content
ecosystem/lava-sdk/bin/examples
Expand Down
12 changes: 12 additions & 0 deletions config/provider_examples/eth_provider_with_archive_debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
endpoints:
- api-interface: jsonrpc
chain-id: ETH1
network-address:
address: "127.0.0.1:2224"
node-urls:
- url: my-eth-node.com/eth/ws/archive
addons:
- archive
- url: my-eth-node.com/eth-with-debug/ws
addons:
- debug
30 changes: 30 additions & 0 deletions cookbook/projects/policy_all_chains_with_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# selected_providers_mode:
# ALLOWED = 0; // no providers restrictions
# MIXED = 1; // use the selected providers mixed with randomly chosen providers
# EXCLUSIVE = 2; // use only the selected providers
# DISABLED = 3; // selected providers feature is disabled

Policy:
geolocation_profile: 1 # USC
total_cu_limit: 9223372036854775807
epoch_cu_limit: 9223372036854775807
max_providers_to_pair: 9223372036854775807
selected_providers_mode: ALLOWED
chain_policies:
- chain_id: ETH1
requirements:
- collection:
api_interface: "jsonrpc"
type: "POST"
add_on: ""
extensions:
- "archive"
- chain_id: GTH1
requirements:
- collection:
api_interface: "jsonrpc"
type: "POST"
add_on: ""
extensions:
- "archive"
- chain_id: "*" # allows all other chains without specifying
62 changes: 62 additions & 0 deletions cookbook/specs/spec_add_ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,37 @@
"expected_value": "0x1"
}
]
},
{
"name": "pruning",
"parse_directive": {
"function_tag": "VERIFICATION",
"function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"earliest\", false],\"id\":1}",
"result_parsing": {
"parser_arg": [
"0",
"number"
],
"parser_func": "PARSE_CANONICAL",
"encoding": "hex"
},
"api_name": "eth_getBlockByNumber"
},
"values": [
{
"extension": "archive",
"expected_value": "0x0"
}
]
}
],
"extensions": [
{
"name": "archive",
"cu_multiplier": 1.5,
"rule": {
"block":254
}
}
]
},
Expand Down Expand Up @@ -1268,6 +1299,15 @@
}
]
}
],
"extensions": [
{
"name": "archive",
"cu_multiplier": 1.5,
"rule": {
"block":254
}
}
]
}
]
Expand Down Expand Up @@ -1326,6 +1366,28 @@
"expected_value": "0x5"
}
]
},
{
"name": "pruning",
"parse_directive": {
"function_tag": "VERIFICATION",
"function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"earliest\", false],\"id\":1}",
"result_parsing": {
"parser_arg": [
"0",
"number"
],
"parser_func": "PARSE_CANONICAL",
"encoding": "hex"
},
"api_name": "eth_getBlockByNumber"
},
"values": [
{
"extension": "archive",
"expected_value": "0x0"
}
]
}
]
}
Expand Down
82 changes: 82 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39518,6 +39518,12 @@ paths:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -41199,6 +41205,12 @@ paths:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -41654,6 +41666,12 @@ paths:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -42031,6 +42049,12 @@ paths:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -42486,6 +42510,12 @@ paths:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -67322,6 +67352,8 @@ definitions:
value:
type: string
addon:
type: string
extensions:
type: array
items:
type: string
Expand Down Expand Up @@ -67790,6 +67822,8 @@ definitions:
value:
type: string
addon:
type: string
extensions:
type: array
items:
type: string
Expand Down Expand Up @@ -67913,6 +67947,8 @@ definitions:
value:
type: string
addon:
type: string
extensions:
type: array
items:
type: string
Expand Down Expand Up @@ -68017,6 +68053,8 @@ definitions:
value:
type: string
addon:
type: string
extensions:
type: array
items:
type: string
Expand Down Expand Up @@ -68150,6 +68188,8 @@ definitions:
value:
type: string
addon:
type: string
extensions:
type: array
items:
type: string
Expand Down Expand Up @@ -69595,6 +69635,12 @@ definitions:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -70185,6 +70231,12 @@ definitions:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -70309,6 +70361,12 @@ definitions:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
lavanet.lava.spec.FUNCTION_TAG:
type: string
enum:
Expand Down Expand Up @@ -70432,6 +70490,12 @@ definitions:
type: string
expected_value:
type: string
lavanet.lava.spec.Rule:
type: object
properties:
block:
type: string
format: uint64
lavanet.lava.spec.Spec:
type: object
properties:
Expand Down Expand Up @@ -70683,6 +70747,12 @@ definitions:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -71991,6 +72061,12 @@ definitions:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down Expand Up @@ -72351,6 +72427,12 @@ definitions:
cu_multiplier:
type: number
format: float
rule:
type: object
properties:
block:
type: string
format: uint64
verifications:
type: array
items:
Expand Down
Loading