-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Labels
Description
Description
A team reported two examples of responses from the /blocks/{blockId} endpoint that return deeply nested utility.batch calls. This causes failure in a downstream tool.
/blocks/11667059in Polkadot Asset Hub chain/blocks/12133615/in Kusama Asset Hub chain
Example Response
Requesting /blocks/11667059 in Polkadot Asset Hub chain, returns:
...
...
"extrinsics": [
{
"method": {
"pallet": "parachainSystem",
"method": "setValidationData"
},
"signature": null,
"nonce": null,
...
...
{
"method": {
"pallet": "utility",
"method": "batch"
},
"signature": {
"signature": "0xae74c2d284b8ed599ca169291ac7b03f5104cc7db7d470ae82e1589b111a1d5fe06beaf915a29b48684d039c67069b461228def5034acfed0618edcb3c3a6383",
"signer": {
"id": "15mSrBU3CX8SnUL3cKskcrbEPmVZWufmP35oZvfTddRkLqxG"
}
},
"nonce": "0",
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
},
"args": {
"calls": [
{
"method": {
"pallet": "utility",
"method": "batch"
...
...This deeply nested calls are also present when requesting /blocks/12133615 in Kusama Asset Hub chain.
Proposed Solution
Add a query parameter in the /blocks/{blockId} endpoint that flattens nested calls beyond a safe depth (default: 5 levels):
?flattenNestedCalls=true- with a possible additional query parameter
maxCallDepthto select a depth other than the default one.
Reactions are currently unavailable