Commit 59d832c
committed
Add chain-type policies and allowlist support
Introduce ChainTypesConfig and AllowlistConfig to support chain-type-level default policies (cache rules and allowlists) while allowing per-chain overrides. Rework caching to key caches by primitives::Chain and derive cache rules from chain types or per-chain config: MemoryCache now accepts ChainTypesConfig and chain configs when created, and RequestCache/CacheProvider interfaces adjusted (removed legacy should_cache). NodeService now enforces allowlists via chain_types and returns HTTP 403 for disallowed requests. Updated config.yml with chain_types entries, added allowlist and chain type cache examples, exported new config types, wired chain_types through main, proxy builder and services, and updated/added tests to reflect the new behavior.1 parent a96e28f commit 59d832c
18 files changed
Lines changed: 632 additions & 259 deletions
File tree
- core
- apps/dynode
- src
- cache
- config
- monitoring
- proxy
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
69 | | - | |
| 81 | + | |
| 82 | + | |
70 | 83 | | |
71 | 84 | | |
72 | | - | |
| 85 | + | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 90 | + | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
86 | | - | |
| 97 | + | |
| 98 | + | |
87 | 99 | | |
88 | 100 | | |
89 | 101 | | |
| |||
0 commit comments